📄 lpc2148-rom-boot.ld
字号:
/* . | |0x000002d8 SWI_Routine *//* . | |0x000002ec UNDEF_Routine *//* . | |0x000002b0 IRQ_routine *//* . |---------------------------------|0x000001cc initialize *//* . | |0x000000D4 *//* . | Startup Code | *//* . | (assembler) | *//* . | | *//* . |---------------------------------|0x00000040 Reset_Handler *//* . | |0x0000003F *//* . | Interrupt Vector Table (unused) | *//* . | 64 bytes | *//* .--------->|---------------------------------|0x00000000 _startup */* *//* *//* The easy way to prevent the linker from loading anything into a memory area is to define *//* a MEMORY region for it and then avoid assigning any .text, .data or .bss sections into it. *//* *//* *//* MEMORY *//* { *//* ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 *//* *//* } *//* *//* *//* Author: James P. Lynch *//* *//* ****************************************************************************************************** *//* identify the Entry Point */ENTRY(_startup)/* specify the LPC2148 memory areas */MEMORY { flash : ORIGIN = 0, LENGTH = 16K /* FLASH ROM */ ram_isp_low(A) : ORIGIN = 0x40000120, LENGTH = 223 /* variables used by Philips ISP bootloader */ /* ram : ORIGIN = 0x40000200, LENGTH = 32513 /* free RAM area */ ram : ORIGIN = 0x40001200, LENGTH = 2048 ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* variables used by Philips ISP bootloader */ ram_usb_dma : ORIGIN = 0x7FD00000, LENGTH = 8192 /* on-chip USB DMA RAM area (not used) */}/* define a global symbol _stack_end */_stack_end = 0x40007EDC;/* now define the output sections */SECTIONS { . = 0; /* set location counter to address zero */ startup : { *(.startup)} >flash /* the startup code goes into FLASH */ .text : /* collect all sections that should go into FLASH after startup */ { *(.text) /* all .text sections (code) */ *(.rodata) /* all .rodata sections (constants, strings, etc.) */ *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */ *(.glue_7) /* all .glue_7 sections (no idea what these are) */ *(.glue_7t) /* all .glue_7t sections (no idea what these are) */ _etext = .; /* define a global symbol _etext just after the last code byte */ } >flash /* put all the above into FLASH */ .data : /* collect all initialized .data sections that go into RAM */ { _data = .; /* create a global symbol marking the start of the .data section */ *(.data) /* all .data sections */ _edata = .; /* define a global symbol marking the end of the .data section */ } >ram AT >flash /* put all the above into RAM (but load the LMA copy into FLASH) */ .bss : /* collect all uninitialized .bss sections that go into RAM */ { _bss_start = .; /* define a global symbol marking the start of the .bss section */ *(.bss) /* all .bss sections */ } >ram /* put all the above in RAM (it will be cleared in the startup code */ . = ALIGN(4); /* advance location counter to the next 32-bit boundary */ _bss_end = . ; /* define a global symbol marking the end of the .bss section */} _end = .; /* define a global symbol marking the end of application RAM */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -