generated from hulk/gd32e23x_template_cmake_vscode
build: 恢复正式发布布局 0x08002000/54K + VECT_TAB_OFFSET=0x2000
调试裸机布局(0x08000000/VTOR=0)仅限本地临时修改,不进仓库;
This commit is contained in:
@@ -35,11 +35,14 @@ GD32E230 电涡流传感器节点固件:LDC1612(电涡流/电感数字转换
|
||||
- 传感器:LDC1612 @0x2B(40MHz 外部时钟),TMP112 @0x49(ADD0=GND)
|
||||
- 调试宏(均默认关闭):DEBUG_VERBOSE / COM_DEBUG / LDC_DEBUG / EDDY_DRIVE_CURRENT_DETECTION
|
||||
|
||||
## 内存布局(当前调试阶段,2026-10-02 用户确认)
|
||||
## 内存布局(仓库默认 = 正式发布布局)
|
||||
|
||||
- **APP 直接链接在 0x08000000,VECT_TAB_OFFSET=0x00(Src/system_gd32e23x.c),
|
||||
不考虑 Bootloader**;正式发布时再切回 Bootloader 布局(0x08002000/54K + OTA 打包,
|
||||
参见 hulk-mcu-firmware skill)
|
||||
- **APP 链接在 0x08002000(54K),VECT_TAB_OFFSET=0x2000(Src/system_gd32e23x.c),
|
||||
前置 8KB Bootloader**;OTA/Ymodem 打包(_UPDATE.bin/_BL.bin)基于此布局,
|
||||
详见 hulk-mcu-firmware skill
|
||||
- 调试阶段如需脱离 Bootloader 裸机运行(直接烧 0x08000000):临时把
|
||||
`LD/gd32e23x_flash.ld` 的 ORIGIN 改为 0x08000000、VECT_TAB_OFFSET 改为 0x00,
|
||||
**仅限本地临时修改,不要提交推送**(否则烧 _BL 镜像时 Bootloader 会覆盖 APP 头部)
|
||||
- 修改布局需同时改 `LD/gd32e23x_flash.ld` 的 ORIGIN 与 VECT_TAB_OFFSET
|
||||
|
||||
## 开发进度
|
||||
|
||||
@@ -12,7 +12,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
|
||||
/* Memories definition */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 54K
|
||||
FLASH (rx) : ORIGIN = 0x08002000, LENGTH = 54K
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#define __HXTAL (HXTAL_VALUE) /* high speed crystal oscillator frequency */
|
||||
#define __SYS_OSC_CLK (__IRC8M) /* main oscillator frequency */
|
||||
|
||||
#define VECT_TAB_OFFSET (uint32_t)0x00 /* vector table base offset */
|
||||
#define VECT_TAB_OFFSET (uint32_t)0x2000 /* vector table base offset */
|
||||
|
||||
/* select a system clock by uncommenting the following line */
|
||||
//#define __SYSTEM_CLOCK_8M_HXTAL (__HXTAL)
|
||||
|
||||
Reference in New Issue
Block a user