qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

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 /*
     26  * HT32F52342 w/ Anne Pro 2 bootloader memory setup.
     27  */
     28 MEMORY {
     29     flash0   : org = 0x00004000, len = 64k - 16k       /* firmware */
     30     flash1   : org = 0x00000000, len = 0
     31     flash2   : org = 0x00000000, len = 0
     32     flash3   : org = 0x00000000, len = 0
     33     flash4   : org = 0x00000000, len = 0
     34     flash5   : org = 0x00000000, len = 0
     35     flash6   : org = 0x00000000, len = 0
     36     flash7   : org = 0x00000000, len = 0
     37     ram0     : org = 0x20000000, len = 16k             /* RAM */
     38     ram1     : org = 0x00000000, len = 0
     39     ram2     : org = 0x00000000, len = 0
     40     ram3     : org = 0x00000000, len = 0
     41     ram4     : org = 0x00000000, len = 0
     42     ram5     : org = 0x00000000, len = 0
     43     ram6     : org = 0x00000000, len = 0
     44     ram7     : org = 0x00000000, len = 0
     45 }
     46 
     47 /* For each data/text section two region are defined, a virtual region
     48    and a load region (_LMA suffix).*/
     49 
     50 /* Flash region to be used for exception vectors.*/
     51 REGION_ALIAS("VECTORS_FLASH", flash0);
     52 REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
     53 
     54 /* Flash region to be used for constructors and destructors.*/
     55 REGION_ALIAS("XTORS_FLASH", flash0);
     56 REGION_ALIAS("XTORS_FLASH_LMA", flash0);
     57 
     58 /* Flash region to be used for code text.*/
     59 REGION_ALIAS("TEXT_FLASH", flash0);
     60 REGION_ALIAS("TEXT_FLASH_LMA", flash0);
     61 
     62 /* Flash region to be used for read only data.*/
     63 REGION_ALIAS("RODATA_FLASH", flash0);
     64 REGION_ALIAS("RODATA_FLASH_LMA", flash0);
     65 
     66 /* Flash region to be used for various.*/
     67 REGION_ALIAS("VARIOUS_FLASH", flash0);
     68 REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
     69 
     70 /* Flash region to be used for RAM(n) initialization data.*/
     71 REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
     72 
     73 /* RAM region to be used for Main stack. This stack accommodates the processing
     74    of all exceptions and interrupts.*/
     75 REGION_ALIAS("MAIN_STACK_RAM", ram0);
     76 
     77 /* RAM region to be used for the process stack. This is the stack used by
     78    the main() function.*/
     79 REGION_ALIAS("PROCESS_STACK_RAM", ram0);
     80 
     81 /* RAM region to be used for data segment.*/
     82 REGION_ALIAS("DATA_RAM", ram0);
     83 REGION_ALIAS("DATA_RAM_LMA", flash0);
     84 
     85 /* RAM region to be used for BSS segment.*/
     86 REGION_ALIAS("BSS_RAM", ram0);
     87 
     88 /* RAM region to be used for the default heap.*/
     89 REGION_ALIAS("HEAP_RAM", ram0);
     90 
     91 /* Generic rules inclusion.*/
     92 INCLUDE rules.ld