Bare-metal Rust on the Xilinx Zynq ZC706 devkit
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.

link.x 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ENTRY(_boot_cores);
  2. STACK_SIZE = 0x8000;
  3. /* Provide some defaults */
  4. PROVIDE(Reset = _boot_cores);
  5. PROVIDE(UndefinedInstruction = Reset);
  6. PROVIDE(SoftwareInterrupt = Reset);
  7. PROVIDE(PrefetchAbort = Reset);
  8. PROVIDE(DataAbort = Reset);
  9. PROVIDE(ReservedException = Reset);
  10. PROVIDE(IRQ = Reset);
  11. PROVIDE(FIQ = Reset);
  12. MEMORY
  13. {
  14. /* 256 kB On-Chip Memory */
  15. OCM : ORIGIN = 0, LENGTH = 0x30000
  16. OCM3 : ORIGIN = 0xFFFF0000, LENGTH = 0x10000
  17. }
  18. SECTIONS
  19. {
  20. .exceptions ORIGIN(OCM) :
  21. {
  22. KEEP(*(.text.exceptions));
  23. } > OCM
  24. .__fill (NOLOAD) : {
  25. . = ORIGIN(OCM) + 0x8000;
  26. } > OCM
  27. .text (ORIGIN(OCM) + 0x8000) :
  28. {
  29. *(.text.boot);
  30. *(.text .text.*);
  31. } > OCM
  32. .rodata : ALIGN(4)
  33. {
  34. *(.rodata .rodata.*);
  35. } > OCM
  36. .data : ALIGN(4)
  37. {
  38. *(.data .data.*);
  39. } > OCM
  40. .bss (NOLOAD) : ALIGN(0x4000)
  41. {
  42. /* Aligned to 16 kB */
  43. KEEP(*(.bss.l1_table));
  44. *(.bss .bss.*);
  45. . = ALIGN(4);
  46. } > OCM
  47. __bss_start = ADDR(.bss);
  48. __bss_end = ADDR(.bss) + SIZEOF(.bss);
  49. .stack (NOLOAD) : ALIGN(0x1000) {
  50. . += STACK_SIZE;
  51. } > OCM
  52. __stack_end = ADDR(.stack);
  53. __stack_start = ADDR(.stack) + SIZEOF(.stack);
  54. /DISCARD/ :
  55. {
  56. /* Unused exception related info that only wastes space */
  57. *(.ARM.exidx);
  58. *(.ARM.exidx.*);
  59. *(.ARM.extab.*);
  60. }
  61. }