zhangyu-duck opened a new pull request, #21306:
URL: https://github.com/apache/nuttx/pull/21306

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   TriCore trap handling rework, independent of iLLD:
   
   - implement the BTV trap vector table in tricore_vectors.c and drop the iLLD 
IfxCpu_Trap.c / Ifx_Cfg_Trap.h dependency
   - encode the trap class and TIN into the panic message ("Trap c=<n> t=<n>") 
so panic notifier callbacks can tell which trap caused the panic
   - handle the FCU trap (FCX=0, no free CSA): tricore_fcu_register_pool() 
provides an external CSA pool so the handler can still reach the panic/assert 
path
   - capture PSTR/DSTR/DATR/DEADD into g_trapinfo, which is added to the 
coredump for offline analysis
   - cleanup trap code for small codesize: extract 
tricore_trap_panic()/tricore_trap_alert(), switch-based dispatch, and gate 
diagnostic strings under CONFIG_DEBUG_TRAP_ALERT
   
   tricore_trapcall.o size:
   
   | | text | rodata |
   |---|---|---|
   | before | 2166 | 1634 |
   | DEBUG_TRAP_ALERT=y | 968 | 1396 |
   | DEBUG_TRAP_ALERT=n | 608 | 107 |
   
   ## Dependency
   
   Depends on #21150. This branch is stacked on top of it, so it also contains 
the commits of the dependent PR(s); only the last 5 commit(s) belong to this PR:
   
   - arch/tricore: Implementing trap vector table without relying on illd
   - arch/tricore: encode trap class and id into panic message
   - arch/tricore: handling FCU exception(FCX=0, means no csa any more)
   - arch/tricore: capture trap debug registers into g_trapinfo for coredump
   - arch/tricore: cleanup trap related code for small codesize
   
   ## Impact
   
   TriCore architecture only (arch/tricore). Adds CONFIG_DEBUG_TRAP_ALERT and 
the tricore_fcu_register_pool() API. No impact on other architectures.
   
   ## Testing
   
   Built triboard_tc4x9_com:nsh (TC4xx, cmake) and a2g-tc397-5v-tft:nsh (TC3xx, 
both make and cmake) with tricore-elf-gcc on Ubuntu host. Each commit passes 
checkpatch and builds on its own.
   
   Tested on both TC4xx (TC4x9) and TC3xx (TC397) boards: system boots normally 
and ostest passes.
   
   ```
   nsh> uname -a
   NuttX 13.1.0 4ba98bbd2d4 Oct 31 2026 21:28:55 tricore triboard_tc4x9_com
   nsh> ostest
   ...
   ostest_main: Exiting with status 0
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to