stlink v2 Debugger not working in current firmware
Posted: Tue Apr 28, 2020 4:54 pm
Hello again,
due to some suboptimal git configurations our git repository was decoupled from the bitcraze repository since last summer. This actually seemed to cause my uart-related problems discussed in another post.
Today I went for a "fresh start", so taking the current firmware and creating a new branch to integrate our developments we done so far.
However, we crucially rely on our debugging abilities with the stlink v2 debuggers to develop our algorithms. Unfortunately, debugging is not working anymore. "Flash using debugger" seems to work, but I can not start the firmware in debug mode.
To clarify, debugging does also not work for the unmodified master being the current bitcraze firmware - so I do not expect issues referring to our modifications.
On the other hand, compile works out, I just had to comment some lines in pulse_processor_v2 since they seemed to be unused and I got compile errors. Commenting these lines there is just one warning concerning cygwin, but it works out anyway.
I am working on a Ubuntu 18.04 machine with Eclipse, my Debug Configuration seems to be correct, my openocd path is pointing to the openocd file and the remaining settings are:
Gdb Port is 3333
Telnet Port is 4444
Config Options are -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c targets
The gdb client setting is currently arm-none-eadi-gdb, which is also within the gdb_path (In fact I tried different settings but none worked so far).
The error I get is "Error while launching command: usr/bin/arm-none-eabi --version"
In the make-file you provided you are using
CROSS_COMPILE ?= arm-none-eabi-
although on your git page (https://github.com/bitcraze/crazyflie-firmware) you wrote "Note: Do not use the gcc-arm-none-eabi package that is part of the Ubuntu repository as this is outdated". Maybe this is related to my issue (Although, compile/Cload seems to work)? At least it leads to some confusion on my side. I followed your advice in the lines above
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt install gcc-arm-embedded
but what would be the correct choice now arm-none-gcc/arm-none-gcc-7.xx ? I have a couple of files in my directory but no one reads "gcc-arm-none-eabi"
Remark: You are also using OPENOCD_TARGET ?= target/stm32f4x_stlink.cfg within your makefile. I tried stm32f4x.cfg but this seems not to have any effect.
So finally, I have no clue what to try now. Any advice is highly appreciated and please take into account that I am not a very experienced in those toolchain issues yet (hopefully it will become better at some point).
Thank you in advance
Klaus
due to some suboptimal git configurations our git repository was decoupled from the bitcraze repository since last summer. This actually seemed to cause my uart-related problems discussed in another post.
Today I went for a "fresh start", so taking the current firmware and creating a new branch to integrate our developments we done so far.
However, we crucially rely on our debugging abilities with the stlink v2 debuggers to develop our algorithms. Unfortunately, debugging is not working anymore. "Flash using debugger" seems to work, but I can not start the firmware in debug mode.
To clarify, debugging does also not work for the unmodified master being the current bitcraze firmware - so I do not expect issues referring to our modifications.
On the other hand, compile works out, I just had to comment some lines in pulse_processor_v2 since they seemed to be unused and I got compile errors. Commenting these lines there is just one warning concerning cygwin, but it works out anyway.
I am working on a Ubuntu 18.04 machine with Eclipse, my Debug Configuration seems to be correct, my openocd path is pointing to the openocd file and the remaining settings are:
Gdb Port is 3333
Telnet Port is 4444
Config Options are -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c targets
The gdb client setting is currently arm-none-eadi-gdb, which is also within the gdb_path (In fact I tried different settings but none worked so far).
The error I get is "Error while launching command: usr/bin/arm-none-eabi --version"
In the make-file you provided you are using
CROSS_COMPILE ?= arm-none-eabi-
although on your git page (https://github.com/bitcraze/crazyflie-firmware) you wrote "Note: Do not use the gcc-arm-none-eabi package that is part of the Ubuntu repository as this is outdated". Maybe this is related to my issue (Although, compile/Cload seems to work)? At least it leads to some confusion on my side. I followed your advice in the lines above
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt install gcc-arm-embedded
but what would be the correct choice now arm-none-gcc/arm-none-gcc-7.xx ? I have a couple of files in my directory but no one reads "gcc-arm-none-eabi"
Remark: You are also using OPENOCD_TARGET ?= target/stm32f4x_stlink.cfg within your makefile. I tried stm32f4x.cfg but this seems not to have any effect.
So finally, I have no clue what to try now. Any advice is highly appreciated and please take into account that I am not a very experienced in those toolchain issues yet (hopefully it will become better at some point).
Thank you in advance
Klaus