CMSIS2000
0.0.7
|
* Script ALSO SUITABLE TO SYSTEMS WITH BIG MEMORY (SDRAM EXT SRAM) FOR DEBUG PURPOSES (breakpoints in RAM) * * * * * * * THIS SCRIPT HAS NO MEMORY SECTIONS DEFENITON !!!!! USE THIS SCRIPT AS A PART OF OTHER * * * * FOR EXAMPLE: * * INCLUDE ../CMSIS/Device/NXP/LPC2xxx/Source/GCC/lpc24x8_sect.ld * * INCLUDE ../CMSIS/Device/NXP/LPC2xxx/Source/GCC/lpc2xxx_generic_one_sect.ld * * * * The Linker Script defines how the code and data emitted by the GNU C compiler and * * assembler are to be loaded into memory (code goes into FLASH, variables go into RAM). * * * * Any symbols defined in the Linker Script are automatically global and available * * to the rest of the program. * * * * LFLAGS = -Map main.map -nostartfiles -T YOU_SCRIPT.cmd * * * * * * The Philips boot loader supports the ISP (In System Programming) via the serial port and the IAP * * (In Application Programming) for flash programming from within your application. * * * * The boot loader uses RAM memory and we MUST NOT load variables or code in these areas.* * * * RAM used by boot loader: 0x40000120 - 0x400001FF (223 bytes) for ISP variables * * 0x4000FFE0 - 0x4000FFFF (32 bytes) for ISP and IAP variables* * 0x4000FEE0 - 0x4000FFDF (256 bytes) stack for ISP and IAP * * * * * * MEMORY MAP * *-----------------------------------------------------------------------------------------* * | |0x40xx0000 * * END OF RAM.-------->|---------------------------------| * * | SVC Stack 8 bytes |0x40xxxFFC <------- _stack_end * * .-------->|---------------------------------| * * | FIQ Stack X bytes |0x40xxxxxx * * .-------->|---------------------------------| * * | ABT Stack Y bytes |0x40xxxxxx * * .-------->|---------------------------------| * * | UDF Stack Z bytes |0x40xxxxxx * * .-------->|---------------------------------| * * | IRQ Stack I bytes |0x40xxxxxx * * .-------->|---------------------------------| * * . | |0x40xxxxxx * * . | stack area for user program | * * . | | * * . | | * * . | free ram | * * ram | | * * . | MAY BE YOUR IMAGE | * * . | IS HERE !!!!!???? | * * . | | * * . | | * * . | | * * . | | * * . | | * * . |---------------------------------|0x40000040 * * . | |0x4000003F * * . | Interrupt Vectors (re-mapped) | * * . | 56-64 bytes |0x40000000 * * .-------->|---------------------------------| * * | | * * * * * * * * | | * * |---------------------------------| * * . | |0xxxxxxxxx * * . | | * * . | | * * . | unused AREA | * * . | | * * . |.................................| * * . | | * * . | BSS NO LOAD AREA | * * . | | * * .--------> |.................................| END OF BINARY IMAGE * * image | | * * . | | * * . | | * * . | copy of .data area | * * somewhere | (.data) | * * . | (.text.ram_code) | * * . | | * * . |---------------------------------| * * . | | * * . | READ ONLY DATA | * * . | *(.rodata*) | * * . | | * * . |---------------------------------| * * . | | * * . | C code | * * . | *(.text) | * * . | (.text.ram_code) | * * . |---------------------------------| * * . | |0xxxxxxxxx * * . | Startup Code | * * . | (assembler) | * * . | *(.text.vectors) | * * . |---------------------------------|0xxxxxxxxx Reset_Handler <-_etext* * . | SELF COPY CODE HERE (assembler) | * * . +-->| *(.text.vectors) |0xxxxxxxxx sc_here * * . | |---------------------------------| * * . | | Interrupt Vector Table | * * . | | 56-64 bytes | * * . | | | * * . +---|B sc_here (PC+CONST) | * * onesect.--------->|---------------------------------|0xxxxxxxxx _vectors, * * !!!SOMEWHERE IN SRAM OR EXT SRAM OR SDRAM !!!! | _vectors_start,_startup * * OR MAY BE EVEN IN FLASH | * * . | unused AREA | * * . | | * * . | | * * * * * * Author: James P. Lynch * * Author: Dmitriy A. Cherepanov *