logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

HT32F52342_ANNEPRO2_C15.ld (3511B)


  1. /*
  2. * Copyright (c) 2013-2016 Fabio UJonathan A. Kollaschtzig, http://fabioutzig.com
  3. * (c) 2020 Yaotian Feng (Codetector) <codetector@codetector.cn>
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining
  6. * a copy of this software and associated documentation files (the "Software"),
  7. * to deal in the Software without restriction, including without limitation
  8. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. * and/or sell copies of the Software, and to permit persons to whom the
  10. * Software is furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in
  13. * all copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  16. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21. * SOFTWARE.
  22. */
  23. /*
  24. * HT32F52342 w/ Anne Pro 2 bootloader memory setup.
  25. */
  26. MEMORY {
  27. flash0 : org = 0x00004000, len = 64k - 16k /* firmware */
  28. flash1 : org = 0x00000000, len = 0
  29. flash2 : org = 0x00000000, len = 0
  30. flash3 : org = 0x00000000, len = 0
  31. flash4 : org = 0x00000000, len = 0
  32. flash5 : org = 0x00000000, len = 0
  33. flash6 : org = 0x00000000, len = 0
  34. flash7 : org = 0x00000000, len = 0
  35. ram0 : org = 0x20000000, len = 8k - 4 /* RAM */
  36. ram1 : org = 0x00000000, len = 0
  37. ram2 : org = 0x00000000, len = 0
  38. ram3 : org = 0x00000000, len = 0
  39. ram4 : org = 0x00000000, len = 0
  40. ram5 : org = 0x00000000, len = 0
  41. ram6 : org = 0x00000000, len = 0
  42. ram7 : org = 0x00000000, len = 0
  43. }
  44. /* For each data/text section two region are defined, a virtual region
  45. and a load region (_LMA suffix).*/
  46. /* Flash region to be used for exception vectors.*/
  47. REGION_ALIAS("VECTORS_FLASH", flash0);
  48. REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
  49. /* Flash region to be used for constructors and destructors.*/
  50. REGION_ALIAS("XTORS_FLASH", flash0);
  51. REGION_ALIAS("XTORS_FLASH_LMA", flash0);
  52. /* Flash region to be used for code text.*/
  53. REGION_ALIAS("TEXT_FLASH", flash0);
  54. REGION_ALIAS("TEXT_FLASH_LMA", flash0);
  55. /* Flash region to be used for read only data.*/
  56. REGION_ALIAS("RODATA_FLASH", flash0);
  57. REGION_ALIAS("RODATA_FLASH_LMA", flash0);
  58. /* Flash region to be used for various.*/
  59. REGION_ALIAS("VARIOUS_FLASH", flash0);
  60. REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
  61. /* Flash region to be used for RAM(n) initialization data.*/
  62. REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
  63. /* RAM region to be used for Main stack. This stack accommodates the processing
  64. of all exceptions and interrupts.*/
  65. REGION_ALIAS("MAIN_STACK_RAM", ram0);
  66. /* RAM region to be used for the process stack. This is the stack used by
  67. the main() function.*/
  68. REGION_ALIAS("PROCESS_STACK_RAM", ram0);
  69. /* RAM region to be used for data segment.*/
  70. REGION_ALIAS("DATA_RAM", ram0);
  71. REGION_ALIAS("DATA_RAM_LMA", flash0);
  72. /* RAM region to be used for BSS segment.*/
  73. REGION_ALIAS("BSS_RAM", ram0);
  74. /* RAM region to be used for the default heap.*/
  75. REGION_ALIAS("HEAP_RAM", ram0);
  76. /* Generic rules inclusion.*/
  77. INCLUDE rules.ld