元驭机器人元驭机器人Hall 传感器教学下载原文件
1/*!2    \file    gd32e23x_flash.ld3    \brief   linker script file45    \version 2026-02-04, V2.5.0, firmware for GD32E23x6*/78/*9 * Copyright (c) 2009-2020 Arm Limited. All rights reserved.10 * Copyright (c) 2026, GigaDevice Semiconductor Inc.11 *12 * SPDX-License-Identifier: Apache-2.013 *14 * Licensed under the Apache License, Version 2.0 (the License); you may15 * not use this file except in compliance with the License.16 * You may obtain a copy of the License at17 *18 * www.apache.org/licenses/LICENSE-2.019 *20 * Unless required by applicable law or agreed to in writing, software21 * distributed under the License is distributed on an AS IS BASIS, WITHOUT22 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.23 * See the License for the specific language governing permissions and24 * limitations under the License.25 */26/* This file refers the CMSIS standard, some adjustments are made according to GigaDevice chips */2728/* memory map */29MEMORY30{31  /* Last 1 KB page (0x08007C00) stores RS485 id, baud, zero and calibration. */32  FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 31K33  RAM (xrw)       : ORIGIN = 0x20000000, LENGTH = 6K34}3536ENTRY(Reset_Handler)3738SECTIONS39{40  __stack_size = DEFINED(__stack_size) ? __stack_size : 2K;41  __heap_size = DEFINED(__heap_size) ? __heap_size : 1K;4243  /* ISR vectors */44  .vectors :45  {46    . = ALIGN(4);47    KEEP(*(.vectors))48    . = ALIGN(4);49    __Vectors_End = .;50    __Vectors_Size = __Vectors_End - __gVectors;51  } >FLASH5253  /* text section, such as program code */54  .text :55  {56    . = ALIGN(4);57    *(.text)58    *(.text*)59    *(.glue_7)60    *(.glue_7t)61    *(.eh_frame)62    KEEP (*(.init))63    KEEP (*(.fini))64    . = ALIGN(4);65    /* the symbol '_etext' will be defined at the end of code section */66    _etext = .;67  } >FLASH6869  /* ro-data section, such as constant data */70  .rodata :71  {72    . = ALIGN(4);73    *(.rodata)74    *(.rodata*)75    . = ALIGN(4);76  } >FLASH7778  /* exception process table */79  .ARM.extab :80  {81    *(.ARM.extab* .gnu.linkonce.armextab.*)82  } >FLASH8384  /* exception process table index */85  .ARM :86  {87    __exidx_start = .;88    *(.ARM.exidx*)89    __exidx_end = .;90  } >FLASH9192  /* ARM attributes */93  .ARM.attributes :94  {95   *(.ARM.attributes)96  } >FLASH9798  .preinit_array :99  {100    PROVIDE_HIDDEN (__preinit_array_start = .);101    KEEP (*(.preinit_array*))102    PROVIDE_HIDDEN (__preinit_array_end = .);103  } >FLASH104105  .init_array :106  {107    PROVIDE_HIDDEN (__init_array_start = .);108    KEEP (*(SORT(.init_array.*)))109    KEEP (*(.init_array*))110    PROVIDE_HIDDEN (__init_array_end = .);111  } >FLASH112113  .fini_array :114  {115    PROVIDE_HIDDEN (__fini_array_start = .);116    KEEP (*(.fini_array*))117    KEEP (*(SORT(.fini_array.*)))118    PROVIDE_HIDDEN (__fini_array_end = .);119  } >FLASH120121  /* provide some necessary symbols for initialized data */122  _sidata = LOADADDR(.data);123  .data :124  {125    . = ALIGN(4);126    /* the symbol '_sdata' will be defined at the data section end start */127    _sdata = .;128    *(.data)129    *(.data*)130    . = ALIGN(4);131    /* the symbol '_edata' will be defined at the data section end */132    _edata = .;133  } > RAM AT> FLASH134135  /* provide some necessary symbols for uninitialized data */136  . = ALIGN(4);137  .bss :138  {139    . = ALIGN(4);140    /* the symbol '_sbss' will be defined at the bss section start */141    _sbss = .;142    __bss_start__ = _sbss;143    *(.bss)144    *(.bss*)145    *(COMMON)146    . = ALIGN(4);147    /* the symbol '_ebss' will be defined at the bss section end */148    _ebss = .;149    __bss_end__ = _ebss;150  } > RAM151152  /* heap and stack space */153  .heap_stack :154  {155    . = ALIGN(8);156    PROVIDE ( end = _ebss );157    PROVIDE ( _end = _ebss );158    . = . + __heap_size;159    PROVIDE( _heap_end = . );160    . = . + __stack_size;161    PROVIDE( _sp = . ); 162    . = ALIGN(8);163  } > RAM164}165166/* input sections */167GROUP(libgcc.a libc.a libm.a libnosys.a)