diff options
| author | hathach <[email protected]> | 2025-09-03 17:42:23 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-09-03 19:15:39 +0700 |
| commit | f69d89454ef4a57a1ff199d42cb24a7eff4f6d90 (patch) | |
| tree | 2727ca936202715b70a40969065e7c53f8ff2e11 | |
| parent | a75daaf8194de6f1c821a8e8073c4e2e19e66197 (diff) | |
fix pre-commit and fix READONLY linker keyword with clang
| -rw-r--r-- | hw/bsp/stm32l4/boards/stm32l496nucleo/STM32L496XX_FLASH.ld | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/hw/bsp/stm32l4/boards/stm32l496nucleo/STM32L496XX_FLASH.ld b/hw/bsp/stm32l4/boards/stm32l496nucleo/STM32L496XX_FLASH.ld index 1978d2077..5aa932e20 100644 --- a/hw/bsp/stm32l4/boards/stm32l496nucleo/STM32L496XX_FLASH.ld +++ b/hw/bsp/stm32l4/boards/stm32l496nucleo/STM32L496XX_FLASH.ld @@ -51,8 +51,6 @@ /* Entry Point */ ENTRY(Reset_Handler) -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */ /* Generate a link error if heap and stack don't fit into RAM */ _Min_Heap_Size = 0x500; /* required amount of heap */ _Min_Stack_Size = 0x1000; /* required amount of stack */ @@ -65,6 +63,9 @@ RAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 64K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K } +/* Highest address of the user mode stack */ +_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */ + /* Define output sections */ SECTIONS { @@ -102,14 +103,14 @@ SECTIONS . = ALIGN(8); } >FLASH - .ARM.extab (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ - { + .ARM.extab : + { . = ALIGN(8); *(.ARM.extab* .gnu.linkonce.armextab.*) . = ALIGN(8); } >FLASH - .ARM (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + .ARM : { . = ALIGN(8); __exidx_start = .; @@ -118,7 +119,7 @@ SECTIONS . = ALIGN(8); } >FLASH - .preinit_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + .preinit_array : { . = ALIGN(8); PROVIDE_HIDDEN (__preinit_array_start = .); @@ -126,8 +127,8 @@ SECTIONS PROVIDE_HIDDEN (__preinit_array_end = .); . = ALIGN(8); } >FLASH - - .init_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + + .init_array : { . = ALIGN(8); PROVIDE_HIDDEN (__init_array_start = .); @@ -137,7 +138,7 @@ SECTIONS . = ALIGN(8); } >FLASH - .fini_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */ + .fini_array : { . = ALIGN(8); @@ -152,7 +153,7 @@ SECTIONS _sidata = LOADADDR(.data); /* Initialized data sections goes into RAM, load LMA copy after code */ - .data : + .data : { . = ALIGN(8); _sdata = .; /* create a global symbol at data start */ @@ -165,12 +166,12 @@ SECTIONS _edata = .; /* define a global symbol at data end */ } >RAM AT> FLASH - + /* Uninitialized data section */ . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) @@ -193,7 +194,7 @@ SECTIONS . = ALIGN(8); } >RAM - + /* Remove information from the standard libraries */ /DISCARD/ : @@ -204,5 +205,3 @@ SECTIONS } } - - |
