m484.ld 1012 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. SPDX-License-Identifier: BSD-3-Clause
  3. Copyright (c) 2022, Alex Taradov <alex@taradov.com>. All rights reserved.
  4. */
  5. MEMORY
  6. {
  7. flash (rx) : ORIGIN = 0x00000000, LENGTH = 0x80000 /* 512k */
  8. ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x20000 /* 128k */
  9. }
  10. __top_flash = ORIGIN(flash) + LENGTH(flash);
  11. __top_ram = ORIGIN(ram) + LENGTH(ram);
  12. ENTRY(irq_handler_reset)
  13. SECTIONS
  14. {
  15. .text : ALIGN(4)
  16. {
  17. FILL(0xff)
  18. KEEP(*(.rom_vectors))
  19. KEEP(*(.reset_handler))
  20. . = ALIGN(4);
  21. } > flash
  22. . = ALIGN(4);
  23. _etext = .;
  24. .uninit_RESERVED : ALIGN(4)
  25. {
  26. KEEP(*(.bss.$RESERVED*))
  27. } > ram
  28. .data : ALIGN(4)
  29. {
  30. FILL(0xff)
  31. _data = .;
  32. *(.vectors)
  33. *(.text*)
  34. *(.rodata)
  35. *(.rodata.*)
  36. *(.ramfunc .ramfunc.*);
  37. *(vtable)
  38. *(.data*)
  39. . = ALIGN(4);
  40. _edata = .;
  41. } > ram AT > flash
  42. .bss : ALIGN(4)
  43. {
  44. _bss = .;
  45. *(.bss*)
  46. *(COMMON)
  47. . = ALIGN(4);
  48. _ebss = .;
  49. PROVIDE(_end = .);
  50. } > ram
  51. PROVIDE(_stack_top = __top_ram - 0);
  52. }