mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/cortexm: fix pointer calculation
gcc9 started realizing that _sram is basically an uint8_t[1] and thus HARDFAULT_HANDLER_REQUIRED_STACK_SPACE cannot be added to it without exceeding the one-sized array. This commit casts _sram to (uintptr_t) where that happens.
This commit is contained in:
parent
be66fb0507
commit
68a4099c1c
@ -221,7 +221,7 @@ __attribute__((naked)) void hard_fault_default(void)
|
||||
"mov r3, sp \n" /* r4_to_r11_stack parameter */
|
||||
"bl hard_fault_handler \n" /* hard_fault_handler(r0) */
|
||||
:
|
||||
: [sram] "r" (&_sram + HARDFAULT_HANDLER_REQUIRED_STACK_SPACE),
|
||||
: [sram] "r" ((uintptr_t)&_sram + HARDFAULT_HANDLER_REQUIRED_STACK_SPACE),
|
||||
[eram] "r" (&_eram),
|
||||
[estack] "r" (&_estack)
|
||||
: "r0","r4","r5","r6","r8","r9","r10","r11","lr"
|
||||
|
Loading…
Reference in New Issue
Block a user