1
0

target.ld 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* target.ld
  2. *
  3. * Copyright (C) 2006-2023 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. /* IoT-safe example
  22. * Linker script for STM32L4
  23. */
  24. MEMORY
  25. {
  26. FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1M
  27. SRAM1_STACK (rw) : ORIGIN = 0x20000000, LENGTH = 16K
  28. SRAM1(rw) : ORIGIN = 0x20000000 + 16K, LENGTH = 256K - 16K
  29. SRAM2 (rw) : ORIGIN = 0x20040000, LENGTH = 64K
  30. }
  31. SECTIONS
  32. {
  33. .text :
  34. {
  35. _start_text = .;
  36. KEEP(*(.isr_vector))
  37. *(.text*)
  38. *(.rodata*)
  39. . = ALIGN(4);
  40. _end_text = .;
  41. } > FLASH
  42. .edidx :
  43. {
  44. . = ALIGN(4);
  45. *(.ARM.exidx*)
  46. } > FLASH
  47. _stored_data = .;
  48. .data : AT (_stored_data)
  49. {
  50. _start_data = .;
  51. *(.data*)
  52. . = ALIGN(4);
  53. _end_data = .;
  54. } > SRAM1
  55. .bss :
  56. {
  57. _start_bss = .;
  58. *(.bss*)
  59. *(COMMON)
  60. . = ALIGN(4);
  61. _end_bss = .;
  62. _end = .;
  63. } > SRAM1
  64. }
  65. PROVIDE(_start_heap = ORIGIN(SRAM2));
  66. PROVIDE(_end_stack = ORIGIN(SRAM1_STACK) + LENGTH(SRAM1_STACK));