memory.x 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. MEMORY
  2. {
  3. /* NOTE 1 K = 1 KiBi = 1024 bytes */
  4. /* TODO Adjust these memory regions to match your device memory layout */
  5. FLASH : ORIGIN = 0x08000000, LENGTH = 256K
  6. RAM : ORIGIN = 0x20000000, LENGTH = 64K
  7. }
  8. /* This is where the call stack will be allocated. */
  9. /* The stack is of the full descending type. */
  10. /* You may want to use this variable to locate the call stack and static
  11. variables in different memory regions. Below is shown the default value */
  12. /* _stack_start = ORIGIN(RAM) + LENGTH(RAM); */
  13. /* You can use this symbol to customize the location of the .text section */
  14. /* If omitted the .text section will be placed right after the .vector_table
  15. section */
  16. /* This is required only on microcontrollers that store some configuration right
  17. after the vector table */
  18. /* _stext = ORIGIN(FLASH) + 0x400; */
  19. /* Example of putting non-initialized variables into custom RAM locations. */
  20. /* This assumes you have defined a region RAM2 above, and in the Rust
  21. sources added the attribute `#[link_section = ".ram2bss"]` to the data
  22. you want to place there. */
  23. /* Note that the section will not be zero-initialized by the runtime! */
  24. /* SECTIONS {
  25. .ram2bss (NOLOAD) : ALIGN(4) {
  26. *(.ram2bss);
  27. . = ALIGN(4);
  28. } > RAM2
  29. } INSERT AFTER .bss;
  30. */