Issue configuration
-
- Beginner
- Posts: 28
- Joined: Wed Jul 22, 2020 4:19 am
Issue configuration
Hi,
Please I need your help! I am trying to debug using st LINK /v2. So, I used this page, https://www.bitcraze.io/documentation/r ... debugging/.
When, I do this 'sudo apt-get install arm-none-eabi-gcc', it returns 'E: Unable to locate package arm-none-eabi-gcc'. I tried to fix this issues but it still the same problem.
and when I tried to debug, it returns this issue ''OpenOCD GDB executable "arm-none-eabi-gdb" was not found.
Please configure "cortex-debug.armToolchainPath" correctly''
Help please! Thanks!
Please I need your help! I am trying to debug using st LINK /v2. So, I used this page, https://www.bitcraze.io/documentation/r ... debugging/.
When, I do this 'sudo apt-get install arm-none-eabi-gcc', it returns 'E: Unable to locate package arm-none-eabi-gcc'. I tried to fix this issues but it still the same problem.
and when I tried to debug, it returns this issue ''OpenOCD GDB executable "arm-none-eabi-gdb" was not found.
Please configure "cortex-debug.armToolchainPath" correctly''
Help please! Thanks!
Re: Issue configuration
Hi,
what operating system are you using?
what operating system are you using?
-
- Beginner
- Posts: 28
- Joined: Wed Jul 22, 2020 4:19 am
Re: Issue configuration
Hi,
I am using Ubuntu 18.04.
I am using Ubuntu 18.04.
Re: Issue configuration
Hi, thanks for the information, I can reproduce your problem on my side.
The problem seems to be a typo in the doc: you need to install gcc-arm-none-eabi instead.
The full dependency list then becomes:
With that installed, it is possible to clone and build the Crazyflie firmware on Ubuntu 18.04 and 20.04.
I will update the documentation.
The problem seems to be a typo in the doc: you need to install gcc-arm-none-eabi instead.
The full dependency list then becomes:
Code: Select all
sudo apt-get install -y gcc-arm-none-eabi make python3 git
I will update the documentation.
-
- Beginner
- Posts: 28
- Joined: Wed Jul 22, 2020 4:19 am
Re: Issue configuration
Hi Arnaud,
Thank you for your answer!
I did it, I can't debug. It still this issue ''OpenOCD GDB executable "arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" correctly''
I am using vs code, I added the "cortex-debug.armToolchainPath" to my settings.json file:
And my launch.json is as follows:
Here, I didn't understand what's ''configFiles''.
I would like also to check with you, for the installation of Cortex-Debug: https://marketplace.visualstudio.com/it ... rtex-debug, using vs code, I have to do just ext install marus25.cortex-debug, or I have to install the tools in section ''Installation Requirements'' in the page that I mention.
Help please. Thank you.
Thank you for your answer!
I did it, I can't debug. It still this issue ''OpenOCD GDB executable "arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" correctly''
I am using vs code, I added the "cortex-debug.armToolchainPath" to my settings.json file:
Code: Select all
{
"cortex-debug.armToolchainPath": "/usr/bin/arm-none-eabi-gcc",
"cortex-debug.openocdPath": "/usr/bin/openocd"
}
Code: Select all
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": "./build_crazyflie/crazyflie/example/sample-crazyflie.elf",
"request": "launch",
"type": "cortex-debug",
"device": "STM32F405",
"svdFile": "STM32F405.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink-v2.cfg", "target/stm32f4x.cfg"],
"runToMain": true,
"preLaunchCommands": [
"set mem inaccessible-by-default off",
"enable breakpoint",
"monitor reset"
]
},
I would like also to check with you, for the installation of Cortex-Debug: https://marketplace.visualstudio.com/it ... rtex-debug, using vs code, I have to do just ext install marus25.cortex-debug, or I have to install the tools in section ''Installation Requirements'' in the page that I mention.
Help please. Thank you.
Last edited by Hada Hamdi on Thu Oct 29, 2020 7:22 pm, edited 2 times in total.
-
- Beginner
- Posts: 28
- Joined: Wed Jul 22, 2020 4:19 am
Re: Issue configuration
Hi,
Also, I tried to fix this issue by using this documentation https://blog.csdn.net/qq_40833810/artic ... /106713462 , it seems that for st link/v2, I have to install https://developer.arm.com/tools-and-sof ... /downloads.
and openocd https://sourceforge.net/projects/openocd/files/openocd/.
I put the correct path in the seeting.json file:
and for interfaces I need stlink-v2.cfg and stm32f4x.cfg, I put them in "configFiles": ["interface/stlink-v2.cfg", "target/stm32f4x.cfg"],
is it correct !!
Always the same problem. ""OpenOCD GDB executable "arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" correctly.""""
Thanks a lot !!
Also, I tried to fix this issue by using this documentation https://blog.csdn.net/qq_40833810/artic ... /106713462 , it seems that for st link/v2, I have to install https://developer.arm.com/tools-and-sof ... /downloads.
and openocd https://sourceforge.net/projects/openocd/files/openocd/.
I put the correct path in the seeting.json file:
Code: Select all
"cortex-debug.armToolchainPath": "/home/student/Documents/gcc-arm-none-eabi-9-2020-q2-update/bin",
"cortex-debug.openocdPath": "/home/student/Documents/openocd-0.10.0"
is it correct !!
Always the same problem. ""OpenOCD GDB executable "arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" correctly.""""
Thanks a lot !!
-
- Bitcraze
- Posts: 630
- Joined: Tue Jun 30, 2015 7:47 am
Re: Issue configuration
I'm happy it worked out for you!
For anyone else that might have similar problems, there is information about how to set up a debugger in the repo docs. There is also a VsCode section https://www.bitcraze.io/documentation/r ... ng-vs-code
For anyone else that might have similar problems, there is information about how to set up a debugger in the repo docs. There is also a VsCode section https://www.bitcraze.io/documentation/r ... ng-vs-code
-
- Beginner
- Posts: 28
- Joined: Wed Jul 22, 2020 4:19 am
Re: Issue configuration
Hi,
No, I said that I have the issue in the screenshot that I put previously.
No, I said that I have the issue in the screenshot that I put previously.
Re: Issue configuration
It seems that you are just missing gdb. On Ubuntu there is a package called "gdb-multiarch" that seems to replace all platform specific gdb.
On my machine I could get vs-code cortex debug to work by adding a link to gdb-multiarch:
This allows vs-code to find gdb. You should just have openocd installed and then debugging should work using the st-link.
Most of the procedures found online will link to the arm-embedded gcc website. It should not be needed anymore to install gcc from there since the ubuntu package is working. Moreover, if you can update to Ubuntu 20.04, the gcc-arm-none-eabi now actually comes from the arm-embedded project.
Please us if my procedure above worked so that I can update the procedure on the howto page.
On my machine I could get vs-code cortex debug to work by adding a link to gdb-multiarch:
Code: Select all
sudo apt install gdb-multiarch
sudo ln -s /usr/bin/gdb-multiarch /usr/local/bin/arm-none-eabi-gdb
Most of the procedures found online will link to the arm-embedded gcc website. It should not be needed anymore to install gcc from there since the ubuntu package is working. Moreover, if you can update to Ubuntu 20.04, the gcc-arm-none-eabi now actually comes from the arm-embedded project.
Please us if my procedure above worked so that I can update the procedure on the howto page.
-
- Beginner
- Posts: 28
- Joined: Wed Jul 22, 2020 4:19 am
Re: Issue configuration
Hi Arnaud,
Thank you for your reply.
To solve the problem, I follow this page in stack overflow https://stackoverflow.com/questions/534 ... urses-so-5.
And it's okay.
Thank you for your reply.
To solve the problem, I follow this page in stack overflow https://stackoverflow.com/questions/534 ... urses-so-5.
Code: Select all
sudo apt-get install build-essential libncurses5-dev libexpat1-dev texinfo-doc-nonfree
pushd /tmp
wget -qO- ftp://ftp.gnu.org/gnu/gdb/gdb-8.2.tar.xz | tar Jxv
mkdir gdb
cd gdb
../gdb-8.2/configure --enable-tui --with-expat --prefix=/usr/local --target=arm-eabi --program-prefix=arm-eabi-
make all
sudo make install
popd