iar_evalsoc_smp.icf 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //////////////////////////////////////////////////////////////////////
  2. // RISC-V ilink configuration file
  3. // for the Nuclei Evaluation SoC DDR Linker File
  4. //
  5. define exported symbol _link_file_version_2 = 1;
  6. define exported symbol _max_vector = 4096;
  7. define exported symbol __STACK_SIZE = CSTACK_SIZE;
  8. define exported symbol __HEAP_SIZE = HEAP_SIZE;
  9. define memory mem with size = 4G;
  10. // TODO: Set memory region information according to your device
  11. define region ROM_region32 = mem:[from 0xA0000000 size 0x2000000];
  12. define region RAM_region32 = mem:[from 0xA2000000 size 0x2000000];
  13. initialize by copy { rw };
  14. do not initialize { section *.noinit };
  15. keep symbol __iar_cstart_init_gp; // defined in cstartup.s
  16. define block CSTACK with alignment = 16, size = CSTACK_SIZE * SMP_CPU_CNT { };
  17. define block HEAP with alignment = 16, size = HEAP_SIZE { };
  18. define block MINTERRUPTS with maximum size = 64k { ro section .mtext };
  19. define block MVECTOR with alignment = 64, maximum size = _max_vector*4 { ro section .mintvec };
  20. define block SVECTOR with alignment = 64, maximum size = _max_vector*4 { ro section .sintvec };
  21. define block RTT_INIT_FUNC with fixed order { ro section .rti_fn*, ro section FSymTab, ro section VSymTab };
  22. define block RW_DATA with static base GPREL { rw data };
  23. keep { ro section .alias.hwreset };
  24. keep { section FSymTab };
  25. keep { section VSymTab };
  26. keep { section .rti_fn* };
  27. "CSTARTUP32" : place at start of ROM_region32 { ro section .alias.hwreset,
  28. ro section .cstartup };
  29. "ROM32":place in ROM_region32 { ro,
  30. block RTT_INIT_FUNC,
  31. block MINTERRUPTS,
  32. block MVECTOR,
  33. block SVECTOR };
  34. "RAM32":place in RAM_region32 { block RW_DATA,
  35. block HEAP,
  36. block CSTACK
  37. };