mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-15 06:19:55 +00:00
cherry pick openocd patch from zephyr main
This commit is contained in:
@@ -66,6 +66,11 @@ if {![using_hla]} {
|
||||
proc nrf54l-load {file} {
|
||||
mww 0x5004b500 0x101
|
||||
load_image $file
|
||||
# Commit the final partial 128-bit RRAM write line left by load_image.
|
||||
# RRAMC.TASKS_COMMITWRITEBUF @ 0x5004b008. Mirrors upstream 1079b21dcda7
|
||||
# (see patches/zephyr/0016); without it the image's last line keeps the
|
||||
# previous firmware's bytes.
|
||||
mww 0x5004b008 1
|
||||
}
|
||||
|
||||
# Define CTRL_AP_NUM explicitly to avoid variable errors
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
ZephCore: backport of upstream zephyrproject-rtos/zephyr 1079b21dcda7
|
||||
("boards: seeed: commit RRAM write buffer after image load", PR #117961,
|
||||
merged to main 2026-09-01). Not on v4.4-branch, and no backport requested.
|
||||
|
||||
The board's `nrf54l-load` proc enables RRAMC writes with a one-line
|
||||
(128-bit) write buffer and calls load_image, but never commits the buffer.
|
||||
The image's final partial line is lost at reset, so those bytes keep
|
||||
whatever the previously flashed firmware had there. Symptom depends on what
|
||||
lands in that line: in the XIAO nRF54L15 battery-ADC build it was the
|
||||
startup value of `sync_evt_pool.__bufs`, and flashing that image over a
|
||||
debug build bus-faulted at the first BT HCI allocation (BFAR 0xf7ce720d,
|
||||
the debug image's bytes). Erasing does not help; the lost line then reads
|
||||
0xFF. Reproduced and fix verified on hardware 2026-09-18.
|
||||
|
||||
DROP THIS PATCH once the Zephyr pin contains 1079b21dcda7 (or upstream's
|
||||
later refactor ca77b788f93a, which moves the proc to
|
||||
boards/seeed/common/openocd_nrf54l.cfg as `nrf54l_load`). It will then fail
|
||||
`git apply --check`, which is fatal at configure time.
|
||||
|
||||
diff --git a/boards/seeed/xiao_nrf54l15/support/openocd.cfg b/boards/seeed/xiao_nrf54l15/support/openocd.cfg
|
||||
index 8ec6b496f65a..c0e227ff342e 100644
|
||||
--- a/boards/seeed/xiao_nrf54l15/support/openocd.cfg
|
||||
+++ b/boards/seeed/xiao_nrf54l15/support/openocd.cfg
|
||||
@@ -66,6 +66,9 @@ if {![using_hla]} {
|
||||
proc nrf54l-load {file} {
|
||||
mww 0x5004b500 0x101
|
||||
load_image $file
|
||||
+ # Commit the final partial 128-bit RRAM write line left by load_image.
|
||||
+ # RRAMC.TASKS_COMMITWRITEBUF @ 0x5004b008.
|
||||
+ mww 0x5004b008 1
|
||||
}
|
||||
|
||||
# Define CTRL_AP_NUM explicitly to avoid variable errors
|
||||
Reference in New Issue
Block a user