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

arch/arm: cortex_m: Disable DWT null-pointer exception detection #33126

Conversation

erwango
Copy link
Member

@erwango erwango commented Mar 8, 2021

Null-pointer exception detection using DWT is currently incompatible
with current openocd runner default implementation that leaves debug
mode on by default.
As a consequence, on all targets that use openocd runner, null-pointer
exception detection using DWT will generated an assert.
As a consequence, all tests are failing on such platforms.

Disable this until openocd behavior is fixed (#32984)

Rationale: #31481 is a great addition, but given this is making a wide range of boards unusable, I think it's activation can wait #32984 to be fixed.

Signed-off-by: Erwan Gouriou erwan.gouriou@linaro.org

EDIT: Following discussion with @ioannisg and @galak, enable DWT based solution on Nordic based platforms

@erwango erwango added the Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc. label Mar 8, 2021
@github-actions github-actions bot added the area: ARM ARM (32-bit) Architecture label Mar 8, 2021
@erwango erwango force-pushed the temp_disable_null_pointer_exception_detection branch from ad271b2 to 70e56dd Compare March 8, 2021 08:44
@erwango erwango requested a review from nashif March 8, 2021 08:45
Null-pointer exception detection using DWT is currently incompatible
with current openocd runner default implementation that leaves debug
mode on by default.
As a consequence, on all targets that use openocd runner, null-pointer
exception detection using DWT will generated an assert.
As a consequence, all tests are failing on such platforms.

Disable this until openocd behavior is fixed (zephyrproject-rtos#32984) and enable
the MPU based solution for now.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
@erwango erwango force-pushed the temp_disable_null_pointer_exception_detection branch from 70e56dd to 99047a1 Compare March 8, 2021 13:44
@erwango erwango changed the title arch/arm: cortex_m: Disable default null-pointer exception detection arch/arm: cortex_m: Disable DWT null-pointer exception detection Mar 8, 2021
Copy link
Member

@ioannisg ioannisg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is as good as it can get right now, @erwango thanks for the leaving the MPU-solution enabled; I guess this has nothing to do with openOCD.

@erwango
Copy link
Member Author

erwango commented Mar 8, 2021

This is as good as it can get right now, @erwango thanks for the leaving the MPU-solution enabled; I guess this has nothing to do with openOCD.

@ioannisg can you formally approve then?

Default null pointer exception detection to the DWT solution
instead of MPU based solution.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
@erwango erwango force-pushed the temp_disable_null_pointer_exception_detection branch from 5276ce4 to 49343ad Compare March 8, 2021 20:23
@nashif nashif merged commit 79ea590 into zephyrproject-rtos:master Mar 9, 2021
@nashif
Copy link
Member

nashif commented Mar 9, 2021

this fixes this issue for me #32966

@erwango erwango deleted the temp_disable_null_pointer_exception_detection branch January 27, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture Hotfix Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants