Skip to content

Commit 51be86e

Browse files
authored
Merge pull request ARMmbed#9 from AlessandroA/specify_text_section_alignment
Explicitly set the start address of hardcoded uVisor sections
2 parents 999f798 + 99d4a92 commit 51be86e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hal/targets/cmsis/TARGET_Freescale/TARGET_K64F/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ SECTIONS
9090
} > m_flash_config
9191

9292
/* The program code and other data goes into internal flash */
93-
.text :
93+
/* Note: The uVisor expects this section at a fixed location, as specified by
94+
* the porting process configuration parameter: FLASH_OFFSET. */
95+
__UVISOR_TEXT_OFFSET = 0x410;
96+
__UVISOR_TEXT_START = ORIGIN(m_interrupts) + __UVISOR_TEXT_OFFSET;
97+
.text __UVISOR_TEXT_START :
9498
{
9599
/* uVisor code and data */
96100
. = ALIGN(4);
@@ -200,7 +204,7 @@ SECTIONS
200204
__UVISOR_BSS_START = ORIGIN(m_data) + __UVISOR_SRAM_OFFSET;
201205
ASSERT(__interrupts_ram_end__ <= __UVISOR_BSS_START,
202206
"The ISR relocation region overlaps with the uVisor BSS section.")
203-
.uvisor.bss (NOLOAD):
207+
.uvisor.bss __UVISOR_BSS_START (NOLOAD):
204208
{
205209
. = ALIGN(32);
206210
__uvisor_bss_start = .;

0 commit comments

Comments
 (0)