Could you step me through the procedure to try this out. I have not had success yet to get OpenOCD working. It looks like openocd does not like the rtt command on my end.
Here is what I tried:
I cloned the latest crazyflie firmware just in case I missed something.
I made config.mk and uncommented the line DEBUG_PRINT_ON_SEGGER_RTT = 1
make clean
make (I had to change the Makefile back to using stlink-v2.cfg instead of stlink.cfg) stlink.cfg could not be found
then I created launch.json as per wiki, and copied STM32F405.svd into my firmware folder.
then in VS Code went to Run Debug and launched the debugger. That worked and I was able to step through the code.
then I ran make rtt. This seemed to not work, below is what I received in the console
openocd -d2 -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c targets -c "rtt setup 0x20000000 262144 \"SEGGER RTT\"" -c "rtt start" -c "rtt server start 2000 0"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v29 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.922835
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32f4x.cpu hla_target little stm32f4x.cpu running
invalid command name "rtt"
Is the problem that I do not have the stlink.cfg file and am using the stlink-v2.cfg file. Or is my openocd the wrong version?
Thanks