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.
 
 
 
 
 
 

209 lines
6.0 KiB

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