1
0

lpc11u37.ld 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * LPC11u37 linker script file.
  3. * This linker is intended to use with libc.
  4. */
  5. MEMORY
  6. {
  7. irom (rx) : ORIGIN = 0x0, LENGTH = 0x20000 /* 128k */
  8. isram (rwx) : ORIGIN = 0x10000000, LENGTH = 0x2000 /* 8k */
  9. isramUsb (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2k */
  10. }
  11. /* Define a symbol for the top of stack */
  12. /* It won't be used if user define FIXED_STACKHEAP_SIZE */
  13. __StackTop = ORIGIN(isram) + LENGTH(isram);
  14. ENTRY(Reset_Handler)
  15. SECTIONS
  16. {
  17. /* MAIN TEXT SECTION */
  18. .text : ALIGN(4)
  19. {
  20. __text_start = .;
  21. FILL(0xff)
  22. /* Always keep this vector table */
  23. KEEP(*(.isr_vector_table))
  24. *(.after_vectors*)
  25. *(.text*)
  26. *(.rodata .rodata.*)
  27. . = ALIGN(4);
  28. __text_end = .;
  29. } > irom
  30. /*
  31. * For exception handling/unwind - some Newlib functions (in common
  32. * with C++ and STDC++) use this.
  33. * Use KEEP so it's not discarded with --gc-sections
  34. */
  35. .ARM.extab : ALIGN(4)
  36. {
  37. KEEP(*(.ARM.extab* .gnu.linkonce.armextab.*))
  38. } > irom
  39. __exidx_start = .;
  40. .ARM.exidx : ALIGN(4)
  41. {
  42. KEEP(*(.ARM.exidx* .gnu.linkonce.armexidx.*))
  43. } > irom
  44. __exidx_end = .;
  45. /* This is used for USB RAM section */
  46. .usb_ram (NOLOAD): ALIGN(4)
  47. {
  48. FILL(0xff)
  49. *(USB_RAM)
  50. } > isramUsb
  51. /* MAIN BSS SECTION */
  52. .bss 0x10000100: ALIGN(4)
  53. {
  54. __bss_start = .;
  55. *(.bss*)
  56. rt_*.o(COMMON)
  57. *(COMMON)
  58. bin/obj/usbd.o(COMMON)
  59. *(.heap)
  60. __fixed_heap_end = .;
  61. *(.stack)
  62. . = ALIGN(4) ;
  63. __bss_end = .;
  64. PROVIDE(end = .);
  65. } > isram
  66. __data_load_addr = LOADADDR (.data);
  67. .data : ALIGN(4)
  68. {
  69. FILL(0xff)
  70. __data_start = .;
  71. *(.data*)
  72. . = ALIGN(4) ;
  73. __data_end = .;
  74. } > isram AT>irom
  75. /* Define a symbol for the start of heap */
  76. /* It won't be used if user defined FIXED_STACKHEAP_SIZE */
  77. PROVIDE(_pvHeapStart = .);
  78. }