iamadahn opened a new pull request, #3986:
URL: https://github.com/apache/nuttx-apps/pull/3986

   ## Summary
   
   Use 8-byte alignment to prevent unaligned accesses on Cortex-M0+.
   
   ## Impact
   
   Without this explicit 8-byte alignment there is HardFault happening in 
canardInit() function on STM32G0B1CBT6, which was discovered while implementing 
fdcan support for that mcu.
   
   ## Testing
   
   Crash dump:
   ```
   NuttShell (NSH) NuttX-13.1.0
   nsh> 
   nsh> dronecan
   canard_main: Startdump_assert_info: Current Version: NuttX  13.1.0 
b76f61f47e-dirty Nov  6 2026 13:34:17 arm
   dump_assert_info: Assertion failed panic: at file: :0 task: <noname> 
process: <noname> 0x8010c99
   up_dump_register: R0: 20000f8e R1: 00000000 R2: 2000138e  R3: 00200000
   up_dump_register: R4: 00000020 R5: 20001390 R6: 20000fae  FP: 08010b05
   up_dump_register: R8: 00000000 SB: 00000000 SL: 00000000 R11: 00000000
   up_dump_register: IP: 00000800 SP: 20003c10 LR: 0801195f  PC: 0801198e
   up_dump_register: xPSR: 81000000 PRIMASK: 00000000 CONTROL: 00000000
   up_dump_register: EXC_RETURN: fffffff9
   dump_stackinfo: User Stack:
   dump_stackinfo:   base: 0x20003498
   dump_stackinfo:   size: 00002000
   dump_stackinfo:     sp: 0x20003c10
   stack_dump: 0x20003bf0: 20000f8e 00000000 2000138e 00200000 00000800 
0801195f 0801198e 81000000
   stack_dump: 0x20003c10: 08010b05 20001390 20000f8c 00000000 00000000 
08010cc9 0801098d 00003039
   stack_dump: 0x20003c30: 00000000 20000f80 0000002d 00000000 20002048 
00000000 00000000 08004d81
   stack_dump: 0x20003c50: 00000000 08001d09 00000000 00000000 00000000 
00000000 00000000 00000000
   dump_tasks:    PID GROUP PRI POLICY   TYPE    NPX STATE   EVENT      SIGMASK 
         STACKBASE  STACKSIZE   COMMAND
   dump_task:       0     0   0 FIFO     Kthread -   Ready              
0000000000000000 0x200013e0      1000   <noname>
   dump_task:       2     2 100 RR       Task    -   Ready              
0000000000000000 0x20002688      1488   <noname>
   dump_task:       4     4 100 RR       Task    -   Running            
0000000000000000 0x20003498      2000   <noname>
   ```
   
   With this fix crash is no longer happening and the example works as intended
   
   
   


-- 
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