Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. MEMORY
  2. {
  3. FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
  4. RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
  5. }
  6.  
  7. ...
  8.  
  9. .fini_array :
  10. {
  11. PROVIDE_HIDDEN (__fini_array_start = .);
  12. KEEP (*(SORT(.fini_array.*)))
  13. KEEP (*(.fini_array*))
  14. PROVIDE_HIDDEN (__fini_array_end = .);
  15.  
  16. } >FLASH
  17.  
  18. /* Uninitialized section, persistent across resets
  19. When the following section is put before .data the binary ends up being
  20. padded with zero up to (0x20000000 - 0x8000000) bytes (384MB) wtf ??
  21. if put after .data the resulting binary is fine */
  22. .persistent :
  23. {
  24. . = ALIGN(4);
  25. *(.persistent)
  26. . = ALIGN(4);
  27. } >RAM
  28.  
  29. /* Initialized data sections goes into RAM, load LMA copy after code */
  30. .data :
  31. {
  32. . = ALIGN(4);
  33. _data_s = .;
  34. *(.data)
  35. *(.data*)
  36. . = ALIGN(4);
  37. _data_e = .;
  38. } >RAM AT> FLASH
  39.  
  40. /* used by the startup to initialize data */
  41. _data_init_s = LOADADDR(.data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement