nrf52: hardfault recorder v aplikaci a v .noinit (#5)
Recorder nikdy nefungoval: handler byl patch v utility/debug.cpp frameworku, jenže jádro se linkuje jako archiv a weak HardFault_Handler ze startupu už vektor pokrývá, takže debug.o se do žádného buildu nedostal (nm ukazoval jen W symbol). Záznam navíc ležel na 0x2003FFF0, kam po resetu sahá zásobník bootloaderu. Handler je teď silný symbol v NRF52Board.cpp a zapisuje do g_hardfault_record v .noinit; funguje i s commitnutým pinem frameworku (lokální patch už není potřeba). Ověřeno na x2: testovací build s -D BENCH_FAULT_CMD, příkaz hardfault → po resetu 'HARDFAULT before last reboot: PC=00033442' = udf v handleCommand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c7f9c2ef79
commit
f6fc21d40d
4 files changed
+50
-3
No files matched your search
@@ -36,7 +36,10 @@ MEMORY
|
||||
* 18. 10. 2026: what DOES survive is the middle of RAM. The clock record now
|
||||
* lives in .noinit (src/helpers/NRF52Board.cpp), which the linker places right
|
||||
* after .bss -- measured on x1 (XIAO, companion): set +30 days, soft `reboot`,
|
||||
* the clock came back +30 days. The hardfault record should move there too.
|
||||
* the clock came back +30 days. The hardfault record moved there too
|
||||
* (g_hardfault_record, handler in NRF52Board.cpp) and was proven on x2: a
|
||||
* deliberate fault printed its PC on the next boot. These 16 B are no longer
|
||||
* used by anything; kept only so the RAM layout of existing envs is unchanged.
|
||||
*/
|
||||
RAM (rwx) : ORIGIN = 0x20006000, LENGTH = 0x2003FFF0 - 0x20006000
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user