mahatma.lds 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. OUTPUT_FORMAT("elf32-c33", "elf32-c33",
  2. "elf32-c33")
  3. OUTPUT_ARCH(c33)
  4. MEMORY
  5. {
  6. a0ram (rwx): ORIGIN = 0x00000000, LENGTH = 8k
  7. ivram (rwx): ORIGIN = 0x00080000, LENGTH = 12k
  8. dstram (rwx): ORIGIN = 0x00084000, LENGTH = 2k
  9. sdram (rwx): ORIGIN = 0x10000000, LENGTH = 32M
  10. }
  11. SECTIONS
  12. {
  13. .iram : {
  14. LONG(4)
  15. LONG(8)
  16. LONG(12)
  17. LONG(0xcafedeca)
  18. *(.suspend_text)
  19. *(.suspend_rodata)
  20. *(.suspend_data)
  21. *(.suspend_bss)
  22. } > a0ram
  23. /*__MAIN_STACK = ORIGIN(sdram) + LENGTH(sdram) - 4; */
  24. __MAIN_STACK = 0x10000000 + 32M - 4;
  25. __MAIN_STACK_LIMIT = __MAIN_STACK - 1M;
  26. .dst_ram : {
  27. *traps.o(.data)
  28. /* traps.o(.*) */
  29. } > dstram
  30. /*__dp = ORIGIN(sdram);*/
  31. __dp = 0x10000000;
  32. /**
  33. * assign 2K of the RAM for IDMA transfer
  34. * must be aligned to a 16 bytes boundry
  35. */
  36. .idma : {
  37. . = . + 2048;
  38. } > sdram
  39. .text : {
  40. *mahatma.o(*.text)
  41. *(.text)
  42. } > sdram
  43. .rodata : {
  44. *(.rodata)
  45. } > sdram
  46. .data : {
  47. *(.data)
  48. } > sdram
  49. .bss : {
  50. *(.bss)
  51. } > sdram
  52. .comment : {
  53. *mahatma.o(.comment)
  54. } > sdram
  55. __START_idma = ADDR(.idma);
  56. __END_idma = __START_idma + SIZEOF(.idma);
  57. __START_text = ADDR(.text);
  58. __END_text = __START_text + SIZEOF(.text);
  59. __START_rodata = ADDR(.rodata);
  60. __END_rodata = __START_rodata + SIZEOF(.rodata);
  61. __START_data = ADDR(.data);
  62. __END_data = __START_data + SIZEOF(.data);
  63. __START_bss = ADDR(.bss);
  64. __END_bss = __START_bss + SIZEOF(.bss);
  65. __START_heap = (__END_bss + 1023) & (~ 1023);
  66. __END_heap = __MAIN_STACK_LIMIT & (~ 1023);
  67. __SIZE_heap = __END_heap - __START_heap;
  68. __SIZE_kernel = ADDR(.comment) - ADDR(.text);
  69. }