Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

215 lines
6.1 KiB

  1. /*
  2. ******************************************************************************
  3. **
  4. ** File : LinkerScript.ld
  5. **
  6. XXX
  7. ** Author : Auto-generated by STM32CubeIDE
  8. **
  9. ** Abstract : Linker script for STM32L151CCUx Device from stm32l1 series
  10. ** 256Kbytes FLASH
  11. ** 32Kbytes RAM
  12. **
  13. ** Set heap size, stack size and stack location according
  14. ** to application requirements.
  15. **
  16. ** Set memory bank area and size if external memory is used.
  17. **
  18. ** Target : STMicroelectronics STM32
  19. **
  20. ** Distribution: The file is distributed as is without any warranty
  21. ** of any kind.
  22. **
  23. *****************************************************************************
  24. ** @attention
  25. **
  26. ** <h2><center>&copy; COPYRIGHT(c) 2020 STMicroelectronics</center></h2>
  27. **
  28. ** Redistribution and use in source and binary forms, with or without modification,
  29. ** are permitted provided that the following conditions are met:
  30. ** 1. Redistributions of source code must retain the above copyright notice,
  31. ** this list of conditions and the following disclaimer.
  32. ** 2. Redistributions in binary form must reproduce the above copyright notice,
  33. ** this list of conditions and the following disclaimer in the documentation
  34. ** and/or other materials provided with the distribution.
  35. ** 3. Neither the name of STMicroelectronics nor the names of its contributors
  36. ** may be used to endorse or promote products derived from this software
  37. ** without specific prior written permission.
  38. **
  39. ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  40. ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  41. ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  42. ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  43. ** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  44. ** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  45. ** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  46. ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  47. ** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  48. ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  49. **
  50. *****************************************************************************
  51. */
  52. /* Entry Point */
  53. ENTRY(Reset_Handler)
  54. /* Highest address of the user mode stack */
  55. _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
  56. _Min_Heap_Size = 0x200 ; /* required amount of heap */
  57. _Min_Stack_Size = 0x400 ; /* required amount of stack */
  58. /* Memories definition */
  59. MEMORY
  60. {
  61. RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
  62. FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 256K
  63. EEPROM (r) : ORIGIN = 0x8080000, LENGTH = 8K
  64. }
  65. /* Sections */
  66. SECTIONS
  67. {
  68. /* The startup code into "FLASH" Rom type memory */
  69. .isr_vector :
  70. {
  71. . = ALIGN(4);
  72. KEEP(*(.isr_vector)) /* Startup code */
  73. . = ALIGN(4);
  74. } >FLASH
  75. /* The program code and other data into "FLASH" Rom type memory */
  76. .text :
  77. {
  78. . = ALIGN(4);
  79. *(.text) /* .text sections (code) */
  80. *(.text*) /* .text* sections (code) */
  81. *(.glue_7) /* glue arm to thumb code */
  82. *(.glue_7t) /* glue thumb to arm code */
  83. *(.eh_frame)
  84. KEEP (*(.init))
  85. KEEP (*(.fini))
  86. . = ALIGN(4);
  87. _etext = .; /* define a global symbols at end of code */
  88. } >FLASH
  89. /* Constant data into "FLASH" Rom type memory */
  90. .rodata :
  91. {
  92. . = ALIGN(4);
  93. *(.rodata) /* .rodata sections (constants, strings, etc.) */
  94. *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
  95. . = ALIGN(4);
  96. __start_set_sysinit_set = .;
  97. KEEP(*(set_sysinit_set)) /* sysinit linker sets */
  98. __stop_set_sysinit_set = .;
  99. } >FLASH
  100. .ARM.extab : {
  101. . = ALIGN(4);
  102. *(.ARM.extab* .gnu.linkonce.armextab.*)
  103. . = ALIGN(4);
  104. } >FLASH
  105. .ARM : {
  106. . = ALIGN(4);
  107. __exidx_start = .;
  108. *(.ARM.exidx*)
  109. __exidx_end = .;
  110. . = ALIGN(4);
  111. } >FLASH
  112. .preinit_array :
  113. {
  114. . = ALIGN(4);
  115. PROVIDE_HIDDEN (__preinit_array_start = .);
  116. KEEP (*(.preinit_array*))
  117. PROVIDE_HIDDEN (__preinit_array_end = .);
  118. . = ALIGN(4);
  119. } >FLASH
  120. .init_array :
  121. {
  122. . = ALIGN(4);
  123. PROVIDE_HIDDEN (__init_array_start = .);
  124. KEEP (*(SORT(.init_array.*)))
  125. KEEP (*(.init_array*))
  126. PROVIDE_HIDDEN (__init_array_end = .);
  127. . = ALIGN(4);
  128. } >FLASH
  129. .fini_array :
  130. {
  131. . = ALIGN(4);
  132. PROVIDE_HIDDEN (__fini_array_start = .);
  133. KEEP (*(SORT(.fini_array.*)))
  134. KEEP (*(.fini_array*))
  135. PROVIDE_HIDDEN (__fini_array_end = .);
  136. . = ALIGN(4);
  137. } >FLASH
  138. /* Used by the startup to initialize data */
  139. _sidata = LOADADDR(.data);
  140. /* Initialized data sections into "RAM" Ram type memory */
  141. .data :
  142. {
  143. . = ALIGN(4);
  144. _sdata = .; /* create a global symbol at data start */
  145. *(.data) /* .data sections */
  146. *(.data*) /* .data* sections */
  147. . = ALIGN(4);
  148. _edata = .; /* define a global symbol at data end */
  149. } >RAM AT> FLASH
  150. /* Uninitialized data section into "RAM" Ram type memory */
  151. . = ALIGN(4);
  152. .bss :
  153. {
  154. /* This is used by the startup in order to initialize the .bss section */
  155. _sbss = .; /* define a global symbol at bss start */
  156. __bss_start__ = _sbss;
  157. *(.bss)
  158. *(.bss*)
  159. *(COMMON)
  160. . = ALIGN(4);
  161. _ebss = .; /* define a global symbol at bss end */
  162. __bss_end__ = _ebss;
  163. } >RAM
  164. /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
  165. ._user_heap_stack :
  166. {
  167. . = ALIGN(8);
  168. PROVIDE ( end = . );
  169. PROVIDE ( _end = . );
  170. . = . + _Min_Heap_Size;
  171. . = . + _Min_Stack_Size;
  172. . = ALIGN(8);
  173. } >RAM
  174. .eeprom :
  175. {
  176. . = ALIGN(4);
  177. *(.eeprom)
  178. . = ALIGN(4);
  179. } >EEPROM
  180. /* Remove information from the compiler libraries */
  181. /DISCARD/ :
  182. {
  183. libc.a ( * )
  184. libm.a ( * )
  185. libgcc.a ( * )
  186. }
  187. .ARM.attributes 0 : { *(.ARM.attributes) }
  188. }