rtthread-lpc5410x.ld 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * - Up to 512 kB on-chip flash memory
  3. * - Up to 96 kB main SRAM.
  4. * - An additional 8 kB SRAM. with GNU ld
  5. * Date Author Notes
  6. * 2014-11-02 aozima first implementation
  7. * 2014-12-16 RT_learning change little for support LPC5410x
  8. */
  9. /* Program Entry, set to mark it as "used" and avoid gc */
  10. MEMORY
  11. {
  12. FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K /* */
  13. SRAM (rwx) : ORIGIN = 0x02000000, LENGTH = 96K
  14. }
  15. _system_stack_size = 0x200;
  16. SECTIONS
  17. {
  18. .text :
  19. {
  20. _text = .;
  21. KEEP(*(.isr_vector))
  22. *(.text*)
  23. *(.rodata*)
  24. /* section information for finsh shell */
  25. . = ALIGN(4);
  26. __fsymtab_start = .;
  27. KEEP(*(FSymTab))
  28. __fsymtab_end = .;
  29. . = ALIGN(4);
  30. __vsymtab_start = .;
  31. KEEP(*(VSymTab))
  32. __vsymtab_end = .;
  33. . = ALIGN(4);
  34. /* section information for components init. */
  35. . = ALIGN(4);
  36. __rt_init_start = .;
  37. KEEP(*(SORT(.rti_fn*)))
  38. __rt_init_end = .;
  39. . = ALIGN(4);
  40. } > FLASH
  41. /* .ARM.exidx is sorted, so has to go in its own output section. */
  42. __exidx_start = .;
  43. .ARM.exidx :
  44. {
  45. *(.ARM.exidx* .gnu.linkonce.armexidx.*)
  46. /* This is used by the startup in order to initialize the .data secion */
  47. _sidata = .;
  48. } > FLASH
  49. __exidx_end = .;
  50. /* end of all text. */
  51. _etext = .;
  52. .data : AT(_etext)
  53. {
  54. _data = .;
  55. *(vtable)
  56. *(.data*)
  57. _edata = .;
  58. } > SRAM
  59. .bss :
  60. {
  61. _bss = .;
  62. *(.bss*)
  63. *(COMMON)
  64. _ebss = .;
  65. } > SRAM
  66. __bss_end = .;
  67. }