logo

qmk_firmware

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

HT32F52352_ANNEPRO2_C18.ld (3570B)


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