STM32F405xG.ld 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /*
  14. * STM32F405xG memory setup.
  15. * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
  16. */
  17. MEMORY
  18. {
  19. flash0 : org = 0x08000000, len = 1M
  20. flash1 : org = 0x00000000, len = 0
  21. flash2 : org = 0x00000000, len = 0
  22. flash3 : org = 0x00000000, len = 0
  23. flash4 : org = 0x00000000, len = 0
  24. flash5 : org = 0x00000000, len = 0
  25. flash6 : org = 0x00000000, len = 0
  26. flash7 : org = 0x00000000, len = 0
  27. ram0 : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */
  28. ram1 : org = 0x20000000, len = 112k /* SRAM1 */
  29. ram2 : org = 0x2001C000, len = 16k /* SRAM2 */
  30. ram3 : org = 0x00000000, len = 0
  31. ram4 : org = 0x10000000, len = 64k /* CCM SRAM */
  32. ram5 : org = 0x40024000, len = 4k /* BCKP SRAM */
  33. ram6 : org = 0x00000000, len = 0
  34. ram7 : org = 0x00000000, len = 0
  35. }
  36. /* For each data/text section two region are defined, a virtual region
  37. and a load region (_LMA suffix).*/
  38. /* Flash region to be used for exception vectors.*/
  39. REGION_ALIAS("VECTORS_FLASH", flash0);
  40. REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
  41. /* Flash region to be used for constructors and destructors.*/
  42. REGION_ALIAS("XTORS_FLASH", flash0);
  43. REGION_ALIAS("XTORS_FLASH_LMA", flash0);
  44. /* Flash region to be used for code text.*/
  45. REGION_ALIAS("TEXT_FLASH", flash0);
  46. REGION_ALIAS("TEXT_FLASH_LMA", flash0);
  47. /* Flash region to be used for read only data.*/
  48. REGION_ALIAS("RODATA_FLASH", flash0);
  49. REGION_ALIAS("RODATA_FLASH_LMA", flash0);
  50. /* Flash region to be used for various.*/
  51. REGION_ALIAS("VARIOUS_FLASH", flash0);
  52. REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
  53. /* Flash region to be used for RAM(n) initialization data.*/
  54. REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
  55. /* RAM region to be used for Main stack. This stack accommodates the processing
  56. of all exceptions and interrupts.*/
  57. REGION_ALIAS("MAIN_STACK_RAM", ram0);
  58. /* RAM region to be used for the process stack. This is the stack used by
  59. the main() function.*/
  60. REGION_ALIAS("PROCESS_STACK_RAM", ram0);
  61. /* RAM region to be used for data segment.*/
  62. REGION_ALIAS("DATA_RAM", ram0);
  63. REGION_ALIAS("DATA_RAM_LMA", flash0);
  64. /* RAM region to be used for BSS segment.*/
  65. REGION_ALIAS("BSS_RAM", ram0);
  66. /* RAM region to be used for the default heap.*/
  67. REGION_ALIAS("HEAP_RAM", ram0);
  68. /* Generic rules inclusion.*/
  69. INCLUDE rules.ld