Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twister: Broken on NRF52840 with pyocd option timeout error #39216

Closed
pratapnaidu opened this issue Oct 6, 2021 · 5 comments · Fixed by #41335
Closed

Twister: Broken on NRF52840 with pyocd option timeout error #39216

pratapnaidu opened this issue Oct 6, 2021 · 5 comments · Fixed by #41335
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug

Comments

@pratapnaidu
Copy link

Describe the bug
The twister framework bails with timeout error when executed while choosing pyocd option as west runner

To Reproduce
Steps to reproduce the behavior:

  1. Checkout the branch above 2.5.0 version
  2. set the GNUARMEMB toolchain, both path and toolchain
  3. ./scripts/twister --device-testing --device-serial /dev/ttyACM0 --west-flash --west-runner=pyocd -p nrf52840dk_nrf52840 -T tests/drivers/adc/adc_api -vv

Expected behavior

<<<-----------------------------------(on zephyr-v2.5.0)----------------------------------------------->>>

DEBUG   - DEVICE: PROJECT EXECUTION SUCCESSFUL
DEBUG   - run status: nrf52840dk_nrf52840/tests/drivers/adc/adc_api/drivers.adc passed
INFO    - 1/1 nrf52840dk_nrf52840       tests/drivers/adc/adc_api/drivers.adc    PASSED (device 5.319s)

Impact
Projects using pyocd with cmsis daplink firmware on nrf52840 dk board

Logs and console output

DEBUG   - Timed out while monitoring serial output on nrf52840dk_nrf52840
DEBUG   - run status: nrf52840dk_nrf52840/tests/drivers/adc/adc_api/drivers.adc timeout
INFO    - 1/1 nrf52840dk_nrf52840       tests/drivers/adc/adc_api/drivers.adc   FAILED Timeout (device 64.248s)

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: gnuarmemb
  • Commit SHA or Version used (1af1052) / (2.7.0-rc2)

Additional context
There is one interesting observation though,the same twister command works on 2.5.0 version, and when we execute on 2.6 and higher we get this warning of possible DAPLINK:Overflow error, as highlighted below

DEBUG   - DEVICE: ===================================================================
DEBUG   - DEVICE: START - test_adc_sample_with_interval
DEBUG   - DEVICE: sample_with_interval_callback: sampling 0
DEBUG   - DEVICE: sample_with_interval_callback: sampling 1
DEBUG   - DEVICE: sample_with_interval_callback:<**DAPLink:Overflow**>
DEBUG   - DEVICE: *** Booting Zephyr OS build v2.7.0-rc2  ***
DEBUG   - DEVICE: Running test suite adc_basic_test
@pratapnaidu pratapnaidu added the bug The issue is a bug, or the PR is fixing a bug label Oct 6, 2021
@galak galak added the priority: low Low impact/importance bug label Oct 7, 2021
@galak galak added the platform: nRF Nordic nRFx label Oct 7, 2021
@carlescufi
Copy link
Member

Could you try setting CONFIG_ NULL_POINTER_EXCEPTION_DETECTION= NULL_POINTER_EXCEPTION_DETECTION_NONE and see if that helps?

@pratapnaidu
Copy link
Author

Apologies for the delay, so this issue is related to #32984 which got auto closed for being stale.

So, what part of the subsys this issue is related? West

@niklasparnesten
Copy link

Could you try setting CONFIG_ NULL_POINTER_EXCEPTION_DETECTION= NULL_POINTER_EXCEPTION_DETECTION_NONE and see if that helps?

I am having the same problem when running twister with openocd and nrf.

Setting CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y in the testcase.yml works for me, but I do not understand why...

@nashif nashif assigned carlescufi and unassigned nashif Dec 15, 2021
@nashif
Copy link
Member

nashif commented Dec 15, 2021

Now a twister issue, this is the good old CONFIG_NULL_POINTER_EXCEPTION_DETECTION bug.

@carlescufi
Copy link
Member

This is essentially this issue: #33590

carlescufi added a commit to carlescufi/zephyr that referenced this issue Dec 20, 2021
Having DWT-based NULL-pointer detection enabled by default trips a lot
of users since it will make any debugging fail when enabled. Disable it
by default and let users enable it if they desire to.

Fixes zephyrproject-rtos#39216.

Signed-off-by: Carles Cufi <[email protected]>
carlescufi added a commit that referenced this issue Dec 20, 2021
Having DWT-based NULL-pointer detection enabled by default trips a lot
of users since it will make any debugging fail when enabled. Disable it
by default and let users enable it if they desire to.

Fixes #39216.

Signed-off-by: Carles Cufi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants