-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Describe the bug
If the application is compiled with CONFIG_NOCACHE_MEMORY=y it crashes early during the Zephyr's boot process. No log output can be observed. In case of Atmel SAM platform it may reboot successfully after watchdog reset, which happens after about 20 s. After the first successful boot the subsequent reboots often run without any issues.
The crash happens before the logger subsystem is initialized, however analyzing z_arm_fault reveals that it takes place when executing
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
in SCB_CleanInvalidateDCache() located in zephyrproject/modules/hal/cmsis/CMSIS/Core/Include/cachel1_armv7.h:306
The issue was introduced by d6b5023 commit. Reverting the commit fixes the issue.
To Reproduce
Steps to reproduce the behavior:
west build -b sam_e70_xplained -- -DCONFIG_NOCACHE_MEMORY=y samples/hello_world/west flash- Power cycle the board, i.e. cut off power supply for several seconds and then turn it on.
- No "Hello World!" message can be seen in the terminal.
Impact
This is a show stopper for any application that requires CONFIG_NOCACHE_MEMORY=y. The option is required by e.g. Atmel SAM Ethernet driver.
Atmel SAM is using standard ARM MPU module. It is likely that other ARM families face the same issue.
Environment
- OS: Linux
- Toolchain zephyr 0.12.4
- Version v2.6.0-rc1