mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-05-12 11:42:57 -04:00
Demo/CORTEX_M3_MPS2_QEMU_GCC: Prepare startup.c for use with --gc-sections
Ensure that the handler2_address_const location will be correctly aligned when compiled to a separate section. Add the 'used' attribute to isr_vector to ensure it will not be elided from the output. Signed-off-by: Keith Packard <keithpac@amazon.com>
This commit is contained in:
parent
89ccc1da50
commit
68ef270215
1 changed files with 2 additions and 1 deletions
|
|
@ -135,6 +135,7 @@ void Default_Handler2( void )
|
|||
" ldr r1, [r0, #24] \n"
|
||||
" ldr r2, handler2_address_const \n"
|
||||
" bx r2 \n"
|
||||
" nop \n"
|
||||
" handler2_address_const: .word prvGetRegistersFromStack \n"
|
||||
);
|
||||
}
|
||||
|
|
@ -167,7 +168,7 @@ void Default_Handler6( void )
|
|||
}
|
||||
}
|
||||
|
||||
const uint32_t * isr_vector[] __attribute__( ( section( ".isr_vector" ) ) ) =
|
||||
const uint32_t * isr_vector[] __attribute__( ( section( ".isr_vector" ) , used ) ) =
|
||||
{
|
||||
( uint32_t * ) &_estack,
|
||||
( uint32_t * ) &Reset_Handler, /* Reset -15 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue