cc2538: Set the entry point to the CCA

No entry point was defined, so it defaulted to the beginning of the
.text output section where the vector table is located by default in
Contiki. Actually, the vector table may be located elsewhere, and the
ROM-based boot loader first reads the CCA to find the vector table.

Consequently, this commit sets the entry point to the CCA, which fixes
both the entry point and the initial symbol reference, so this commit
also removes the now-unneeded "__used__" and "KEEP" keywords from the
CCA.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
Benoît Thébaudeau 2015-07-01 22:20:13 +02:00
parent 96dd24836c
commit ee3ee049e4
2 changed files with 3 additions and 2 deletions

View File

@ -59,6 +59,7 @@ MEMORY
#endif
}
ENTRY(flash_cca_lock_page)
SECTIONS
{
.text :
@ -110,6 +111,6 @@ SECTIONS
.flashcca :
{
KEEP(*(.flashcca))
*(.flashcca)
} > FLASH_CCA
}

View File

@ -262,7 +262,7 @@ void(*const vectors[])(void) =
default_handler, /* 162 MACTimer */
};
/*---------------------------------------------------------------------------*/
__attribute__((__section__(".flashcca"), __used__))
__attribute__((__section__(".flashcca")))
const flash_cca_lock_page_t flash_cca_lock_page = {
FLASH_CCA_BOOTLDR_CFG, /* Boot loader backdoor configuration */
FLASH_CCA_IMAGE_VALID, /* Image valid */