Open GeorgeCGV opened 8 months ago
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Reproduction steps change after #1922:
The CONFIG_BOOT_DISABLE_CACHES
must be set to n
, then follow the "To Reproduce" steps from above.
Build and run the bootloader with CONFIG_NO_OPTIMIZATIONS
and CONFIG_DEBUG
if CONFIG_BOOT_DISABLE_CACHES
is enabled to trigger the issue in the bootloader.
This also happens in my setup.
Board: sam_v71_xult
(I detached onboard Xplained Pro board debugger and replaced it w/ picoprobe)
App: samples/hello_world
Toolchain: zephyr-sdk-0.16.5-1
Zephyr commit SHA: 0a8d03b95f
prj.conf:
CONFIG_DEBUG=y
CONFIG_DEBUG_INFO=y
CONFIG_NO_OPTIMIZATIONS=y
CONFIG_CACHE_MANAGEMENT=y
Confirmed applying ARM-software/CMSIS_5#1426 to cachel1_armv7.h
solves the problem
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Unfortunately https://github.com/ARM-software/CMSIS_5/pull/1426 is not in CMSIS 5.9.0. However, it is in CMSIS_6, so migrating to it could help resolve this issue.
Describe the bug The application freezes in an endless loop when the bootloader starts it.
The Zephyr calls
z_arm_init_arch_hw_at_boot
after the bootloader jumps to the application. It detects the enabled D-Cache and tries to disable it. That performs a call toSCB_DisableDCache
that stucks in an endless loop.The issue is related to https://github.com/ARM-software/CMSIS_5/issues/620. I confirm that applying https://github.com/ARM-software/CMSIS_5/pull/1426 to https://github.com/zephyrproject-rtos/cmsis fixes the problem.
The patch requires an addition:
Currently, Zephyr uses CMSISv5. The upstream fixes the issue in the develop branch that is not released (v5.9.0 won't fix the problem), and in CMSISv6 (not used).
It would be great to mention the issue in the docs.
To Reproduce
1 Build and flash bootloader with enabled D-Cache and I-Cache (
CONFIG_CACHE_MANAGEMENT=y
).CONFIG_CACHE_MANAGEMENT=y
) andExpected behavior An application shall start.
Impact It might be a showstopper. Developers must be aware of the issue. Otherwise, they risk bricking their devices after an application update.
Environment (please complete the following information):