K64F: Explicitly set the start of .text

If you don't specify the start address of a section explicitly, that
section can end up at different addresses depending on its alignment. If
the alignment of a section is not explicitly set, it inherits it from
the element with the highest alignment inside that section.

Since the uVisor code is in the .text section, and it *must* end up at a
known location, we set the start address of .text to 0x410, which is the
value that the uVisor binary expects.
pull/1936/head
Alessandro Angelino 2016-06-13 15:26:44 +01:00 committed by Milosch Meriac
parent 23eadc7944
commit abd24ae4f1
1 changed files with 5 additions and 1 deletions

View File

@ -90,7 +90,11 @@ SECTIONS
} > m_flash_config
/* The program code and other data goes into internal flash */
.text :
/* Note: The uVisor expects this section at a fixed location, as specified by
* the porting process configuration parameter: FLASH_OFFSET. */
__UVISOR_TEXT_OFFSET = 0x410;
__UVISOR_TEXT_START = ORIGIN(m_interrupts) + __UVISOR_TEXT_OFFSET;
.text __UVISOR_TEXT_START :
{
/* uVisor code and data */
. = ALIGN(4);