[3] | 1 | define memory with size = 4G; |
---|
| 2 | |
---|
| 3 | define symbol _estack = 0x20009000; |
---|
| 4 | define region RAM = [0x20000000 size 0x9000]; |
---|
| 5 | define region FLASH = [0x8000000 size 0x10000]; |
---|
| 6 | define block ctors { section .ctors, section .ctors.*, block with alphabetical order { init_array } }; |
---|
| 7 | define block dtors { section .dtors, section .dtors.*, block with reverse alphabetical order { fini_array } }; |
---|
| 8 | define block exidx { section .ARM.exidx, section .ARM.exidx.* }; |
---|
| 9 | define block tbss { section .tbss, section .tbss.* }; |
---|
| 10 | define block tdata { section .tdata, section .tdata.* }; |
---|
| 11 | define block tls { block tbss, block tdata }; |
---|
| 12 | define block heap with size = __HEAPSIZE__, alignment = 8, readwrite access { }; |
---|
| 13 | define block stack with size = __STACKSIZE__, alignment = 8, readwrite access { }; |
---|
| 14 | do not initialize { section .non_init }; |
---|
| 15 | initialize by copy { section .fast }; |
---|
| 16 | |
---|
| 17 | place in FLASH { section .isr_vector }; |
---|
| 18 | keep { section .isr_vector }; |
---|
| 19 | place in FLASH { section .init, section .init.*, section .text, section .text.*, section .rodata, section .rodata.*, section .segger.*, block exidx, block ctors, block dtors }; |
---|
| 20 | place in RAM { section .data, section .data.*, section .RamFunc* }; |
---|
| 21 | place in RAM { section .bss, section .bss.* }; |
---|
| 22 | place in RAM { block heap, block tls, section .non_init, section .fast }; |
---|
| 23 | define symbol __stack_end__ = _estack; |
---|