Open MerrimanInd opened 6 months ago
It seems that I have a very similar problem. Identical setup, very similar output, probably identical. The output of the Debug Console reports
Launching gdb-server: ./traveo_debug/CypressAutoFlashUtility/bin/openocd.exe -c "gdb_port 50000" -c "tcl_port 50002" -c "telnet_port 50004" -s ./traveo_debug/CypressAutoFlashUtility/scripts -f "c:/Users/.../.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl" -f interface/kitprog3.cfg -f target/traveo2_1m_a0.cfg Please check TERMINAL tab (gdb-server) for output from ./traveo_debug/CypressAutoFlashUtility/bin/openocd.exe Finished reading symbols from objdump: Time: 27 ms Finished reading symbols from nm: Time: 27 ms Official(ToolchainDesc { channel: "stable", date: None, target: TargetTriple("x86_64-pc-windows-gnu") }) [Official(ToolchainDesc { channel: "stable", date: None, target: TargetTriple("x86_64-pc-windows-gnu") }), Official(ToolchainDesc { channel: "stable", date: None, target: TargetTriple("x86_64-pc-windows-msvc") }), Official(ToolchainDesc { channel: "nightly", date: None, target: TargetTriple("x86_64-pc-windows-msvc") })] 'arm-none-eabi-gdb-py.exe' is not recognized as an internal or external command, operable program or batch file. Error: Unable to start GDB even after 5 seconds or it couldn't even start Make sure you can start gdb from the command-line and run any command like "echo hello". If you cannot, it is most likely because "libncurses" or "python" is not installed. Some GDBs require these GDB session ended unexpectedly. exit-code: 1 GDB could not start as expected. Bad installation or version mismatch. See if you can start gdb from a shell prompt and check its version (Must be >= 9)
I have what seems to be a clean setup, and everything else seems to work, but the command indicated in bold is nowhere to be seen.
The call to arm-none-eabi-gdb-py.exe command comes from the batch file rust-gdb.bat, but I don't understand which package is supposed to provide it. My only guess at this point is that something might be missing from the arm toolchain.
@marcomas2000 arm-none-eabi-gdb-py
is part of the arm toolchain which you can download here. It looks like the latest release (13.2.rel_1) doesn't include it for some reason. You may need an older version of the toolchain.
@marcomas2000
arm-none-eabi-gdb-py
is part of the arm toolchain which you can download here. It looks like the latest release (13.2.rel_1) doesn't include it for some reason. You may need an older version of the toolchain.
@christianheussy Thank you for your quick reply. I imagined it after posting, because I remembered that the link on the setup page redirects to a page on the ARM website that labels that version as kind of unsupported. I know that it's a minor issue, but since this is apparently the only very detailed example for working with Rust on a relatively cheap board for hobbyists, I believe that we could try to eliminate the dependency from Python 2.7, if possible at all.
@marcomas2000 I believe you can change the rust-gdb.bat file to point to the non Python version of GDB but you lose some printing features. But this is far from the only detailed example for Rust on a cheap board. Rust's own embedded book supports the Microbit and STM32 Discovery board.
If you want to discuss further please create a new issue or a discussion as the bug in my code is still active and I want to keep this thread open for that.
@MerrimanInd I have the same problem now, so this issue needs some clarification. I know about the support for other boards, of course, I just found this example to be (potentially) the best ''Getting Started'', especially because it comes with some support from the hardware manufacturer.
@MerrimanInd I have the same problem now, so this issue needs some clarification. I know about the support for other boards, of course, I just found this example to be (potentially) the best ''Getting Started'', especially because it comes with some support from the hardware manufacturer.
@MerrimanInd @marcomas2000 Sorry for taking so long to get back to you on this topic but we've been busy working on an svd2rust alternative called svd2pac and I've just started looking into this issue.
My initial guess is that this is due to an incompatibility between the newer version of KitProg that @MerrimanInd is using and the older version of OpenOCD included with the code example. I have a baremetal example that works with the latest versions but I need to test it a bit more and check if the GDB debug configuration works as expected. Will try to get it done by next week.
@schaazzz thanks, appreciate the attention! I've also been distracted with other projects but finally looking back into this. I've actually had a few different versions of KitProg on the PSoC on the board. I accidentally flashed it and haven't been able to determine what it shipped with so I've tried a few versions. If you're aware of a specific version that would be compatible with this modified version of OpenOCD I can test with that.
Recently I attempted to flash my board with IAR EWARM and I wasn't able to get the debugger working there either, even though it's recognized correctly in Device Manager. Hope I didn't brick it.
It would be great to move to the upstream version of OpenOCD since that seems to be the only part of the toolchain that's specifically Windows-only. Not sure what changes were made between the Infineon version and the main version or if that's feasible/reasonable at all.
Hey any updates on the OpenOCD/Cypress Auto Flash Utility incompatibility?
I'm trying to run the Rust GPIO example on the T2G Body Entry Starter Kit. I seem to have the toolchain set up correctly, the code compiles, and it seems to flash but immediately halts on the microcontroller.
I'm using the ARM GNU toolchain v13, the attached OpenOCD, etc. One issue I had was with the version of KitProg3. I updated the firmware on the PSoC chip and am now running v2.40, which I don't believe is what came on the eval board but it seems to be working.
@shahzeb I didn't want to clutter up the comments on your Getting Started w/ Rust post, hope you can help here instead!
Here's my terminal output when I run the openocd Debug M0 Master
And over in the debug console there's quite a bit of printout but this seems like a possibly relevant section: