ld指令
tcp:localhost:50000
JLinkGDBServer
-singlerun -if swd -port 50000 -device ASR6601SE -rtos GDBServer/RTOSPlugin_FreeRTOS.dylib
-singlerun -if JTAG -port 50000 -device HPM5301xEGx -rtos GDBServer/RTOSPlugin_FreeRTOS.dylib
-select USB -device HPM5301xEGx -endian little -if JTAG -speed auto -ir -noLocalhostOnly -nologtofile -port 50000
-SWOPort 2332 -TelnetPort 2333
-nogui -select USB -halt -device HPM5301xEGx -if JTAG -port 50000 -speed 4000 -nosinglerunClion 与 Blackmagic的集成
- 创建gdb的初始化脚本
脚本有 gdb 参数 -x 引入
shell
define target remote
tar ext $arg0
mon s
att 1
shell sleep 10
load创建‘运行/调试’配置项
- 调试器为 : arm-none-eabi-gdb
- 'target remote' 为:/dev/cu.usbmodem39A2337132331
根据实现情况填写blackmagic的设备文件
- GDB 服务器: arm-none-eabi-gdb
- GDB 服务器实参: -x $ContentRoot$/.gdbinit $CMakeCurrentProductFile$
宏$ContentRoot$ 为项目的根目录 $CMakeCurrentProductFile$ 为生成的目标文件