부트로더 주소설정방법
LinkerScript.ld
SECTIONS
{
.boot_loader :
{
. = ALIGN(4);
KEEP(*(.boot_loader)) /* Startup code */
. = 0x4000;
} >FLASH
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
Generate binary file
Generate hex file
main.o :
section size addr
.boot_loader 16384 134217728 <<====0x8000000
.isr_vector 388 134234112 <<====0x8004000
.text 43480 134234500
.ARM.attributes 41 0
부트로더가 없다면, 실행되지 않는다. 부트로더에서 호출해주어야 실행된다.
SECTIONS
{
.boot_loader :
{
. = ALIGN(4);
KEEP(*(.boot_loader)) /* Startup code */
. = 0x0000;
} >FLASH
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH
Generate binary file
Generate hex file
main.o :
section size addr
.boot_loader 0 134217728 <<===0x8000000
.isr_vector 388 134217728 <<===0x8000000
.text 43480 134218116
.ARM.attributes 41 0
.init_array 8 134261596