X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=betty%2Flpc2220_rom.ld;fp=betty%2Flpc2220_rom.ld;h=11fa38dfddc15d4718420d4cd7a9e675365f4759;hb=21b21d3d5c7feb1ece4c8ea3d495e03c502450ea;hp=0000000000000000000000000000000000000000;hpb=cc9a44bee2152e887691958d3580e17ef15810e2;p=my-code%2Farm.git diff --git a/betty/lpc2220_rom.ld b/betty/lpc2220_rom.ld new file mode 100644 index 0000000..11fa38d --- /dev/null +++ b/betty/lpc2220_rom.ld @@ -0,0 +1,43 @@ +/* + * lpc2220_rom.ld - linker script for the lpc2220 device (->rom) + * + * author: hackbard@hackdaworld.org + * + */ + +/* memory definitions */ + +MEMORY { + FLASH_BANK0 (rx) : ORIGIN=0x80000000, LENGTH=0x00100000 + FLASH_BANK2 (rx) : ORIGIN=0x82000000, LENGTH=0x00100000 + RAM (rw) : ORIGIN=0x40000000, LENGTH=0x00010000 +} + +/* section definitions */ + +SECTIONS { + + /* startup and user code (.text) */ + .text : { + startup.o(.text) // startup code + *(.text) // our code + *(.glue_7) // glue code + *(.glue_7t) // glue code + } > FLASH_BANK0 + + . = ALIGN(4) + + /* read only data */ + .rodata : { *(.rodata) } > FLASH_BANK0 + + . = ALIGN(4) + + /* initialized data */ + .data : { *(.data) } > RAM + + . = ALIGN(4); + + /* uninitialized data */ + .bss : { *(.bss) } > RAM +} +