Atmel SAM E70 / Cortex-M7 fails to boot if CONFIG_NOCACHE_MEMORY=y #35107
Labels
area: ARM
ARM (32-bit) Architecture
bug
The issue is a bug, or the PR is fixing a bug
platform: Microchip SAM
Microchip SAM Platform (formerly Atmel SAM)
priority: high
High impact/importance bug
Milestone
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 executingin
SCB_CleanInvalidateDCache()
located inzephyrproject/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
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
The text was updated successfully, but these errors were encountered: