Hi,
I have added "config HW_STACK_PROTECTION" in KConfig file of the board.
Is there a way I can check during runtime if the Stack Protection is enabled? Is there any register to check this?
Hi,
I have added "config HW_STACK_PROTECTION" in KConfig file of the board.
Is there a way I can check during runtime if the Stack Protection is enabled? Is there any register to check this?
Hi,
I suggest trying to create a stack overflow in a test project. Then run the stack overflow both with and without this config and observe the difference.
See for example https://stackoverflow.com/questions/392859/generate-a-stack-overflow on how to do this.
Regards,
Sigurd Hellesvik
In both cases, I get usage fault exception. There is NO indication that a stack overflow error has been caught.
CONFIG_HW_STACK_PROTECTION seems to be enabled by default for me, so I tried to explicitly set it to "n".
Here are logs from a test I did with (first) and without (last) CONFIG_HW_STACK_PROTECTION:
A small observation. Stack Overflow error works only with MPU?
Where can I see these log messages? I'm debugging with nrf Connect on VS Code.
AlphaBeta said:Where can I see these log messages? I'm debugging with nrf Connect on VS Code.
I see the logs on UART. See Logging. Also, getting logs from an application is among the first steps to get started with the nRF Connect SDK in DevAcademy fundamentals. Follow this course to learn how to see the logs in the VS Code extension. (Using the nRF Serial Terminal)
AlphaBeta said:A small observation. Stack Overflow error works only with MPU?
See https://github.com/zephyrproject-rtos/zephyr/discussions/28866
AlphaBeta said:Where can I see these log messages? I'm debugging with nrf Connect on VS Code.
I see the logs on UART. See Logging. Also, getting logs from an application is among the first steps to get started with the nRF Connect SDK in DevAcademy fundamentals. Follow this course to learn how to see the logs in the VS Code extension. (Using the nRF Serial Terminal)
AlphaBeta said:A small observation. Stack Overflow error works only with MPU?
See https://github.com/zephyrproject-rtos/zephyr/discussions/28866