ram.o 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. ENTRY(_start)
  2. __max_flash_size = 256k;
  3. __base = 0x10000000;
  4. __comm_vma = 0x64000;
  5. __max_comm_size = 0x1200;
  6. __bcomm_vma = 0x18C00;
  7. __max_bcomm_size = 0x1400;
  8. __raminit_vma = 0x17000;
  9. __aram_vma = 0x50000;
  10. __cram_vma = 0x18000;
  11. __dram_vma = 0x58000;
  12. __nram_vma = 0x40000;
  13. __acomm_vma = 0x50000;
  14. __max_acomm_size = 0x6e00;
  15. __sleep_comm_vma = 0x52000;
  16. __max_sleep_comm_size = 0x1000;
  17. __pwrdwn_comm_vma = 0x52000;
  18. __max_pwrdwn_comm_size = 0x1000;
  19. __dbb_comm_vma = 0x41400;
  20. __max_dbb_comm_size = 0x400;
  21. MEMORY
  22. {
  23. init : org = __base, len = 512
  24. flash(rx) : org = __base + 512, len = __max_flash_size
  25. comm(rx) : org = __comm_vma, len = __max_comm_size
  26. bcomm(rx) : org = __bcomm_vma, len = __max_bcomm_size
  27. acomm(rx) : org = __acomm_vma, len = __max_acomm_size
  28. sleep_comm(rx) : org = __sleep_comm_vma, len = __max_sleep_comm_size
  29. pwrdwn_comm(rx) : org = __pwrdwn_comm_vma, len = __max_pwrdwn_comm_size
  30. dbb_comm(rx) : org = __dbb_comm_vma, len = __max_dbb_comm_size
  31. raminit(rx) : org = __raminit_vma, len = 512
  32. data : org = 0x18500, len = 0x700
  33. stack : org = 0x63C00, len = 1k
  34. aram : org = __aram_vma, len = 27k + 0x200
  35. cram : org = __cram_vma, len = 0x500
  36. dram : org = __dram_vma, len = 0x4500
  37. nram : org = __nram_vma, len = 6k
  38. }
  39. SECTIONS
  40. {
  41. .init : {
  42. *(.reset)
  43. *(.init_text)
  44. . = ALIGN(512);
  45. } > init
  46. .bcomm : {
  47. *(.bt_voice*)
  48. *(.text.sleep.rf)
  49. *(.com_text.led_disp)
  50. *(.com_text.ret.bt21.isr*)
  51. *(.com_text.rf*)
  52. *(.com_text.mav)
  53. *(.com_text.mute)
  54. *(.com_text.mictrim)
  55. *(.com_text.sbccode)
  56. *(.com_text.aec*)
  57. *(.com_text.tkey*)
  58. *(.com_text.bsp.tkey*)
  59. *(.com_text.bsp.key*)
  60. *(.com_text.bb.*)
  61. *(.com_text.bt.*)
  62. *(.com_text.btmem.pbap)
  63. *(.com_text.ble)
  64. . = ALIGN(512);
  65. } > bcomm AT > flash
  66. .comm : {
  67. KEEP(*(.vector))
  68. *(.plt)
  69. *(.com_text*)
  70. *(.com_rodata*)
  71. *(.srodata*)
  72. *debug.o(.rodata*)
  73. *(.data*)
  74. *(.sdata*)
  75. . = ALIGN(512);
  76. } > comm AT > flash
  77. .raminit : {
  78. *(.ramint.text*)
  79. . = ALIGN(512);
  80. } > raminit AT > flash
  81. .acomm : {
  82. *(.text.opus.asm)
  83. *(.text.opus.proc)
  84. *(.text.opus.ec_tell)
  85. *(.text.opus.entenc)
  86. *(.text.opus.mathops)
  87. *(.text.opus.metric)
  88. *(.text.opus.compute_mdcts)
  89. *(.text.opus.mdct)
  90. *(.text.opus.bands)
  91. *(.text.opus.kissfft)
  92. *(.text.opus.comb)
  93. *(.text.opus.vq)
  94. *(.rodata.opus*)
  95. . = ALIGN(512);
  96. } > acomm AT > flash
  97. .sleep_comm : {
  98. *(.text.sleep_com*)
  99. *(.sleep_text*)
  100. . = ALIGN(512);
  101. } > sleep_comm AT > flash
  102. .pwrdwn_comm : {
  103. *(.text.pwrdwn*)
  104. . = ALIGN(512);
  105. } > pwrdwn_comm AT > flash
  106. .dbb_comm : {
  107. *(.text.dbb*)
  108. . = ALIGN(512);
  109. } > dbb_comm AT > flash
  110. .flash : {
  111. *(.text.bb.tws.sw_nanos)
  112. . = ALIGN(512);
  113. *(.text.bfunc.bt)
  114. *(.text.bfunc.sleep)
  115. *(.text.bfunc.process)
  116. *(.text.bfunc.warning)
  117. *(.text.bfunc.vhouse)
  118. *(.text.bfunc*)
  119. *(.text.opus*)
  120. *(.text.ains3*)
  121. *(.rodata.ains3*)
  122. *(.text.dongle)
  123. *(.text.ble*)
  124. *(.text*)
  125. *(.rodata*)
  126. *(.rela*)
  127. . = ALIGN(512);
  128. } > flash
  129. .bss (NOLOAD):
  130. {
  131. __bss_start = .;
  132. *(.bss*)
  133. *(.sbss*)
  134. *(COMMON)
  135. *(.buf*)
  136. *(.wavres.buf)
  137. *(.anc.*)
  138. *(.anc_buf*)
  139. *(.ble_buf*)
  140. *(.ble_cache*)
  141. __bss_end = .;
  142. } > data
  143. __bss_size = __bss_end - __bss_start;
  144. .stack (NOLOAD) : {
  145. __irq_stack_start = .;
  146. . = 0x400;
  147. __irq_stack = .;
  148. } > stack
  149. __irq_stack_size = __irq_stack - __irq_stack_start;
  150. .aram_fcc __aram_vma (NOLOAD) : {
  151. . = 0x3350;
  152. *(.fcc_buf)
  153. } > aram
  154. .ains3_ram __aram_vma (NOLOAD) : {
  155. . = 0x5830;
  156. *(.ains3_buf.*)
  157. . = 0x6990;
  158. } > aram
  159. .cram_fcc __cram_vma (NOLOAD) : {
  160. *(.huart_buf)
  161. } > cram
  162. .cram_qtest __cram_vma (NOLOAD) : {
  163. *(.qtest_buf)
  164. } > cram
  165. .cram_eq __cram_vma (NOLOAD) : {
  166. *(.eq_dec_buf)
  167. } > cram
  168. .cram_dbb __cram_vma (NOLOAD) : {
  169. *(.dbb_dec_buf)
  170. } > cram
  171. .cram_dongle __cram_vma (NOLOAD) : {
  172. *(.dongle_buf)
  173. } > cram
  174. nram_opus __nram_vma (NOLOAD) : {
  175. *(.siri*)
  176. *(.opus_buf.buf)
  177. *(.att_siri.buf)
  178. *(.mavsco_buf)
  179. . = 0x1714;
  180. . = 0x1800;
  181. } > nram
  182. nram_dbb __nram_vma (NOLOAD) : {
  183. *(.codecs_buf.pcm)
  184. *(.codecs_pcm*)
  185. . = 0x1400;
  186. } > nram
  187. .dram_opus __dram_vma (NOLOAD) : {
  188. *(.opus_buf*)
  189. . = 0x4500;
  190. } > dram
  191. }
  192. __comm_lma = LOADADDR(.comm);
  193. __comm_size = SIZEOF(.comm);
  194. __bcomm_lma = LOADADDR(.bcomm);
  195. __bcomm_size = SIZEOF(.bcomm);
  196. __acomm_lma = LOADADDR(.acomm);
  197. __acomm_size = SIZEOF(.acomm);
  198. __sleep_comm_lma = LOADADDR(.sleep_comm);
  199. __sleep_comm_size = SIZEOF(.sleep_comm);
  200. __pwrdwn_comm_lma = LOADADDR(.pwrdwn_comm);
  201. __pwrdwn_comm_size = SIZEOF(.pwrdwn_comm);
  202. __raminit_lma = LOADADDR(.raminit);
  203. __raminit_size = SIZEOF(.raminit);
  204. __dbb_comm_lma = LOADADDR(.dbb_comm);
  205. __dbb_comm_size = SIZEOF(.dbb_comm);