stm32l151xb_flash.icf 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*###ICF### Section handled by ICF editor, don't touch! ****/
  2. /*-Editor annotation file-*/
  3. /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
  4. /*-Specials-*/
  5. define symbol __ICFEDIT_intvec_start__ = 0x08000000;
  6. /*-Memory Regions-*/
  7. define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
  8. define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
  9. define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
  10. define symbol __ICFEDIT_region_RAM_end__ = 0x20003FFF;
  11. /*-Sizes-*/
  12. define symbol __ICFEDIT_size_cstack__ = 0x500;
  13. define symbol __ICFEDIT_size_heap__ = 0x200;
  14. /**** End of ICF editor section. ###ICF###*/
  15. define exported symbol size_cstack_protect = 32;
  16. define memory mem with size = 4G;
  17. define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
  18. define symbol ram_start = __ICFEDIT_region_RAM_start__;
  19. define symbol ram_end = __ICFEDIT_region_RAM_end__;
  20. define symbol size_bootreservedram = 32; // Bootloader I/O (ISP)
  21. define symbol size_bootioram = 32; // Bootloader I/O (App <-> Boot)
  22. define symbol size_stack_protect = 32; // neutral area for CSTACK overflow detection
  23. define symbol ram0_start = ram_start;
  24. define symbol ram0_end = ram_start + size_bootreservedram;
  25. define symbol ram1_start = ram0_end;
  26. define symbol ram1_end = ram1_start + size_bootioram;
  27. define symbol ram2_start = ram1_end;
  28. define symbol ram2_end = ram2_start + size_stack_protect;
  29. define symbol ram3_start = ram2_end;
  30. define symbol ram3_end = ram3_start + __ICFEDIT_size_cstack__;
  31. define symbol ram4_start = ram3_end;
  32. define symbol ram4_end = ram_end;
  33. define region RAM0_region = mem:[from ram0_start to ram0_end ]; // Bootloader ISP reserved
  34. define region RAM1_region = mem:[from ram1_start to ram1_end ]; // Bootloader I/O (APP <-> BOOT) reserved
  35. define region RAM2_region = mem:[from ram2_start to ram2_end ]; // Application CSTACK neutral zone
  36. define region RAM3_region = mem:[from ram3_start to ram3_end ]; // Application CSTACK
  37. define region RAM4_region = mem:[from ram4_start to ram4_end ]; // Application RAM
  38. define block BOOTRESERVED with alignment = 8, size = size_bootreservedram { section .bootreserved };
  39. define block BOOTIO with alignment = 8, size = size_bootioram { section .bootio };
  40. define block CSTACKTAIL with alignment = 8, size = size_cstack_protect { section .cstacktail };
  41. define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
  42. define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
  43. initialize by copy { readwrite, section .cstacktail };
  44. do not initialize { section .noinit, section .bootreserved, section .bootio };
  45. place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
  46. place in ROM_region { readonly };
  47. place in RAM0_region { block BOOTRESERVED };
  48. place in RAM1_region { block BOOTIO };
  49. place in RAM2_region { block CSTACKTAIL };
  50. place in RAM3_region { block CSTACK };
  51. place in RAM4_region { block HEAP, readwrite };