generated from hulk/gd32e23x_template_cmake_vscode
build: 对齐模板工具链与 .vscode,APP 迁移 Bootloader 布局(0x08002000/54K)
工程编译与开发环境(参照 gd32e23x_template_cmake_vscode 模板) - cmake/arm-none-eabi-gcc.cmake:硬编码工具链路径改为 GD32_GCC_BIN 环境变量 / -DTOOLCHAIN_DIRECTORY 参数,与模板逐字一致 - .vscode:launch/tasks/settings/extensions 对齐模板,烧录与调试全部 读取 GD32_GCC_BIN / GD32_OPENOCD_BIN / GD32_OPENOCD_SCRIPTS 环境变量; 新增 J-Link 调试配置与 flash/reset/erase.jlink 脚本 - CMakeLists.txt:POST_BUILD 增加 Application/Application.hex 生成 (J-Link 烧录脚本 loadfile 依赖) - 验证:Debug / Release 编译通过(本机 ARM GCC 15.2.1) Bootloader 布局适配(与旧版独立镜像不兼容,升级需整片烧录一次) - LD/gd32e23x_flash.ld:FLASH ORIGIN=0x08002000, LENGTH=54K - Src/system_gd32e23x.c:VECT_TAB_OFFSET=0x2000——Bootloader 不写 VTOR,APP 必须自设向量表,否则中断落回 Bootloader 向量表 - 验证:.vectors 链接于 0x08002000,固件 12164B(54KB 上限 22%) 驱动修复 - Src/ldc1612.c:ldc1612_config_single_channel 各步骤 I2C 写入检查 返回值,失败立即返回错误(原审查项 L3) 文档 - README:重写本地编译/烧录/调试说明,新增"固件布局与 Bootloader"章节
This commit is contained in:
Vendored
+32
-10
@@ -9,20 +9,19 @@
|
||||
"type": "cortex-debug",
|
||||
"runToEntryPoint": "main",
|
||||
"showDevDebugOutput": "none",
|
||||
"gdbPath": "${workspaceFolder}/Toolchain/xpack-arm-none-eabi-gcc-11.3.1-1.1/bin/arm-none-eabi-gdb.exe",
|
||||
"gdbPath": "${env:GD32_GCC_BIN}/arm-none-eabi-gdb.exe",
|
||||
"servertype": "openocd",
|
||||
"serverpath": "${workspaceFolder}/Toolchain/xpack-openocd-0.11.0-3/bin/openocd.exe",
|
||||
"serverpath": "${env:GD32_OPENOCD_BIN}/openocd.exe",
|
||||
"svdFile": "${workspaceFolder}/GD32E230.svd",
|
||||
"liveWatch": {
|
||||
"enabled": true,
|
||||
"samplesPerSecond": 1
|
||||
},
|
||||
"configFiles": [
|
||||
"${workspaceFolder}/Toolchain/xpack-openocd-0.11.0-3/scripts/target/openocd_gdlink_gd32e23x.cfg"
|
||||
"${env:GD32_OPENOCD_SCRIPTS}/${config:gd32.openocd.targetConfig}"
|
||||
],
|
||||
"serverArgs": [
|
||||
"-s", "${workspaceFolder}/Toolchain/xpack-openocd-0.11.0-3/scripts"
|
||||
"-s", "${env:GD32_OPENOCD_SCRIPTS}"
|
||||
],
|
||||
"env": {
|
||||
"OPENOCD_SCRIPTS": "${env:GD32_OPENOCD_SCRIPTS}"
|
||||
},
|
||||
"searchDir": [
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
@@ -30,7 +29,30 @@
|
||||
"preRestartCommands": [
|
||||
"load",
|
||||
"continue"
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
"cwd": "${workspaceFolder}",
|
||||
"executable": "${workspaceFolder}/Build/Debug/Application/Application.elf",
|
||||
"name": "Debug with J-Link",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"runToEntryPoint": "main",
|
||||
"showDevDebugOutput": "none",
|
||||
"gdbPath": "${env:GD32_GCC_BIN}/arm-none-eabi-gdb.exe",
|
||||
"servertype": "jlink",
|
||||
"device": "${config:gd32.jlink.device}",
|
||||
"interface": "${config:gd32.jlink.interface}",
|
||||
"svdFile": "${workspaceFolder}/GD32E230.svd",
|
||||
"liveWatch": {
|
||||
"enabled": true,
|
||||
"samplesPerSecond": 1
|
||||
},
|
||||
"preLaunchTask": "Build",
|
||||
"preRestartCommands": [
|
||||
"load",
|
||||
"continue"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user