link.sct 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ; *************************************************************
  2. ; *** Scatter-Loading Description File for GD32E230 + RT-Thread
  3. ; *** Target: GD32E230C8T6 (64KB Flash, 8KB SRAM)
  4. ; *** This version is more structured and recommended.
  5. ; *************************************************************
  6. #!armclang --cpu=cortex-m23
  7. ; Define stack and heap sizes
  8. define symbol Stack_Size = 0x00000400; ; 1KB for Main Stack
  9. define symbol Heap_Size = 0x00000100; ; 256B for C-library Heap
  10. ; Max size of load region LR_IROM1
  11. LR_IROM1 0x08000000 0x00010000 { ; Load region: Flash, 64KB
  12. ; First execution region for exception vectors and startup code
  13. ER_IROM1 0x08000000 0x00010000 {
  14. *.o (RESET, +First)
  15. *(InRoot$$Sections)
  16. .ANY (+RO)
  17. ; --- Special sections for RT-Thread ---
  18. * (FSymTab)
  19. * (VSymTab)
  20. * (rti_fn*)
  21. ; --------------------------------------
  22. }
  23. ; RAM region for RW, ZI, Stack, and Heap
  24. RW_IRAM1 0x20000000 0x00002000 { ; RW region: SRAM, 8KB
  25. ; C-library Stack, placed at the top of RAM, growing downwards
  26. ARM_LIB_STACK STACK_TOP(0x20002000) EMPTY -Stack_Size { }
  27. .ANY (+RW +ZI)
  28. ; C-library Heap, placed after RW/ZI data
  29. ARM_LIB_HEAP +0 EMPTY Heap_Size { }
  30. }
  31. }