lnk.sct 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-m33 -xc
  2. ; command above MUST be in first line (no comment above!)
  3. /*
  4. ;-------- <<< Use Configuration Wizard in Context Menu >>> -------------------
  5. */
  6. #include "mem_ARMv81MML.h"
  7. /*--------------------- Flash Configuration ----------------------------------
  8. ; <h> Flash Configuration
  9. ; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
  10. ; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
  11. ; </h>
  12. *----------------------------------------------------------------------------*/
  13. #define __ROM_BASE 0x10000000
  14. #define __ROM_SIZE 0x00300000
  15. /*--------------------- Embedded RAM Configuration ---------------------------
  16. ; <h> RAM Configuration
  17. ; <o0> RAM1 Base Address <0x0-0xFFFFFFFF:8>
  18. ; <o1> RAM1 Size (in Bytes) <0x0-0xFFFFFFFF:8>
  19. ; </h>
  20. *----------------------------------------------------------------------------*/
  21. #define __RAM1_BASE 0x30000000
  22. #define __RAM1_SIZE 0x00400000
  23. /*--------------------- Stack / Heap Configuration ---------------------------
  24. ; <h> Stack / Heap Configuration
  25. ; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
  26. ; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
  27. ; </h>
  28. *----------------------------------------------------------------------------*/
  29. #define __STACK_SIZE STACK_SIZE
  30. #define __HEAP_SIZE HEAP_SIZE
  31. #define __RAM2_RW_SIZE (__RAM1_SIZE - __STACK_SIZE - __HEAP_SIZE)
  32. LR_ROM __ROM_BASE __ROM_SIZE { ; load region size_region
  33. ER_ROM +0 { ; load address = execution address
  34. *.o (RESET, +First)
  35. * (InRoot$$Sections)
  36. ; *(Veneer$$CMSE) ; uncomment for secure applications
  37. * (+RO-CODE)
  38. ; * (+XO)
  39. }
  40. /* make sure stack-overflow will cause bus-fault (which might be escalated to hardfault) */
  41. ARM_LIB_STACK __RAM1_BASE ALIGN 8 EMPTY __STACK_SIZE { ; Reserve empty region for stack
  42. }
  43. RW_RAM1 +0 __RAM2_RW_SIZE {
  44. * (+RO-DATA)
  45. .ANY (+RW +ZI)
  46. }
  47. ARM_LIB_HEAP +0 ALIGN 8 EMPTY __HEAP_SIZE { ; Reserve empty region for heap
  48. }
  49. }