主题中讨论的其他器件:Z-STACK
大家好!
我使用 Zigbee IoT 设备原型、基于带有 CC1352芯片的 Z-Stack 库。 我的工作设置如下所示:
我遇到以下问题:
*如果项目是由 GCC 编译器构建的,则所有文件和调试工作都像一种魅力。
*如果项目是由 Clang 编译器构建的,则调试不起作用。 以下是来自 OpenOCD 服务器端的输出:
Open On-Chip Debugger 0.12.0 Licensed under GNU GPL v2 For bug reports, read openocd.org/.../bugs.html Info : Listening on port 6663 for tcl connections Info : Listening on port 4443 for telnet connections Info : XDS110: connected Info : XDS110: vid/pid = 0451/bef3 Info : XDS110: firmware version = 3.0.0.25 Info : XDS110: hardware version = 0x002b Info : XDS110: connected to target via JTAG Info : XDS110: TCK set to 2500 kHz Info : clock speed 1000 kHz Info : JTAG tap: cc13x2.jrc tap/device found: 0x3bb4102f (mfg: 0x017 (Texas Instruments), part: 0xbb41, ver: 0x3) Info : JTAG tap: cc13x2.cpu enabled Info : [cc13x2.cpu] Cortex-M4 r0p1 processor detected Info : [cc13x2.cpu] target has 6 breakpoints, 4 watchpoints Info : starting gdb server for cc13x2.cpu on 3333 Info : Listening on port 3333 for gdb connections Info : accepting 'gdb' connection on tcp/3333 undefined debug reason 8 - target needs reset Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333" Info : JTAG tap: cc13x2.jrc tap/device found: 0x3bb4102f (mfg: 0x017 (Texas Instruments), part: 0xbb41, ver: 0x3) Info : JTAG tap: cc13x2.cpu enabled Warn : [cc13x2.cpu] Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support. [cc13x2.cpu] halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x00004a78 msp: 0x20013a00 Info : JTAG tap: cc13x2.jrc tap/device found: 0x3bb4102f (mfg: 0x017 (Texas Instruments), part: 0xbb41, ver: 0x3) Info : JTAG tap: cc13x2.cpu enabled Warn : [cc13x2.cpu] Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support. [cc13x2.cpu] halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x00004a78 msp: 0x20013a00, semihosting Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1172 ms). Workaround: increase "set remotetimeout" in GDB Info : JTAG tap: cc13x2.jrc tap/device found: 0x3bb4102f (mfg: 0x017 (Texas Instruments), part: 0xbb41, ver: 0x3) Info : JTAG tap: cc13x2.cpu enabled Warn : [cc13x2.cpu] Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support. [cc13x2.cpu] halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc, semihosting Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1132 ms). Workaround: increase "set remotetimeout" in GDB Info : Padding image section 0 at 0x0000616b with 1 bytes Info : Flash write discontinued at 0x00006274, next section at 0x00057fa8 Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1613 ms). Workaround: increase "set remotetimeout" in GDB Info : JTAG tap: cc13x2.jrc tap/device found: 0x3bb4102f (mfg: 0x017 (Texas Instruments), part: 0xbb41, ver: 0x3) Info : JTAG tap: cc13x2.cpu enabled Warn : [cc13x2.cpu] Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support. [cc13x2.cpu] halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x00004a78 msp: 0x20013a00, semihosting Info : JTAG tap: cc13x2.jrc tap/device found: 0x3bb4102f (mfg: 0x017 (Texas Instruments), part: 0xbb41, ver: 0x3) Info : JTAG tap: cc13x2.cpu enabled Warn : [cc13x2.cpu] Only resetting the Cortex-M core, use a reset-init event handler to reset any peripherals or configure hardware srst support. [cc13x2.cpu] halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x00004a78 msp: 0x20013a00, semihosting Info : [cc13x2.cpu] only breakpoints of two bytes length supported Error: can't add breakpoint: resource not available
在这两种情况下都使用了 ${CCS_INSTALL_ROOT}\tools\compiler\gcc-arm-none-eabi-9-2019-Q4-major\bin\arm-none-eabi-gdb.exe debugger。 TI Clang 似乎没有自己的调试器。
指向此处-仅为 IAR 和 TI Clang 编译器提供的 ZStack 库、没有生成文件或任何其他构建脚本可使用 GCC 进行构建。
所以、结果有以下问题: 通过 TI Clang 编译器构建的项目是否甚至可以使用 OpenOCD 和某种形式的 GDB 进行调试? 如果否、正确的实现方式是什么? 也许可以为 GCC 工具集构建 ZStack?
谢谢、Alexander。