generic_gcc_nrf52.ld 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /* Linker script to configure memory regions. */
  2. SEARCH_DIR(.)
  3. GROUP(-lgcc -lc -lnosys)
  4. MEMORY
  5. {
  6. FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xd9000
  7. RAM (rwx) : ORIGIN = 0x20005978, LENGTH = 0x3a688
  8. }
  9. SECTIONS
  10. {
  11. }
  12. SECTIONS
  13. {
  14. . = ALIGN(4);
  15. .mem_section_dummy_ram :
  16. {
  17. }
  18. .cli_sorted_cmd_ptrs :
  19. {
  20. PROVIDE(__start_cli_sorted_cmd_ptrs = .);
  21. KEEP(*(.cli_sorted_cmd_ptrs))
  22. PROVIDE(__stop_cli_sorted_cmd_ptrs = .);
  23. } > RAM
  24. .fs_data :
  25. {
  26. PROVIDE(__start_fs_data = .);
  27. KEEP(*(.fs_data))
  28. PROVIDE(__stop_fs_data = .);
  29. } > RAM
  30. .log_dynamic_data :
  31. {
  32. PROVIDE(__start_log_dynamic_data = .);
  33. KEEP(*(SORT(.log_dynamic_data*)))
  34. PROVIDE(__stop_log_dynamic_data = .);
  35. } > RAM
  36. .log_filter_data :
  37. {
  38. PROVIDE(__start_log_filter_data = .);
  39. KEEP(*(SORT(.log_filter_data*)))
  40. PROVIDE(__stop_log_filter_data = .);
  41. } > RAM
  42. } INSERT AFTER .data;
  43. SECTIONS
  44. {
  45. .mem_section_dummy_rom :
  46. {
  47. }
  48. .sdh_ble_observers :
  49. {
  50. PROVIDE(__start_sdh_ble_observers = .);
  51. KEEP(*(SORT(.sdh_ble_observers*)))
  52. PROVIDE(__stop_sdh_ble_observers = .);
  53. } > FLASH
  54. .sdh_soc_observers :
  55. {
  56. PROVIDE(__start_sdh_soc_observers = .);
  57. KEEP(*(SORT(.sdh_soc_observers*)))
  58. PROVIDE(__stop_sdh_soc_observers = .);
  59. } > FLASH
  60. .sdh_req_observers :
  61. {
  62. PROVIDE(__start_sdh_req_observers = .);
  63. KEEP(*(SORT(.sdh_req_observers*)))
  64. PROVIDE(__stop_sdh_req_observers = .);
  65. } > FLASH
  66. .sdh_state_observers :
  67. {
  68. PROVIDE(__start_sdh_state_observers = .);
  69. KEEP(*(SORT(.sdh_state_observers*)))
  70. PROVIDE(__stop_sdh_state_observers = .);
  71. } > FLASH
  72. .sdh_stack_observers :
  73. {
  74. PROVIDE(__start_sdh_stack_observers = .);
  75. KEEP(*(SORT(.sdh_stack_observers*)))
  76. PROVIDE(__stop_sdh_stack_observers = .);
  77. } > FLASH
  78. .nrf_queue :
  79. {
  80. PROVIDE(__start_nrf_queue = .);
  81. KEEP(*(.nrf_queue))
  82. PROVIDE(__stop_nrf_queue = .);
  83. } > FLASH
  84. .nrf_balloc :
  85. {
  86. PROVIDE(__start_nrf_balloc = .);
  87. KEEP(*(.nrf_balloc))
  88. PROVIDE(__stop_nrf_balloc = .);
  89. } > FLASH
  90. .cli_command :
  91. {
  92. PROVIDE(__start_cli_command = .);
  93. KEEP(*(.cli_command))
  94. PROVIDE(__stop_cli_command = .);
  95. } > FLASH
  96. .crypto_data :
  97. {
  98. PROVIDE(__start_crypto_data = .);
  99. KEEP(*(SORT(.crypto_data*)))
  100. PROVIDE(__stop_crypto_data = .);
  101. } > FLASH
  102. .pwr_mgmt_data :
  103. {
  104. PROVIDE(__start_pwr_mgmt_data = .);
  105. KEEP(*(SORT(.pwr_mgmt_data*)))
  106. PROVIDE(__stop_pwr_mgmt_data = .);
  107. } > FLASH
  108. .log_const_data :
  109. {
  110. PROVIDE(__start_log_const_data = .);
  111. KEEP(*(SORT(.log_const_data*)))
  112. PROVIDE(__stop_log_const_data = .);
  113. } > FLASH
  114. .log_backends :
  115. {
  116. PROVIDE(__start_log_backends = .);
  117. KEEP(*(SORT(.log_backends*)))
  118. PROVIDE(__stop_log_backends = .);
  119. } > FLASH
  120. } INSERT AFTER .text
  121. INCLUDE "nrf_common.ld"