Setting up debugging with Eclipse toolchain is a nightmare.
We would need
1) Eclipse
2) GDB - TODO an explanation what is the role of GDB
3) OpenOCD - "on chip debugger", the lowest-layer of debugging interface.
Useful links:
http://hertaville.com/2012/09/16/part-3-debugging-openocd-0-6-0/
(sorry this one is in Russian) http://makesystem.net/?p=2146
[info] debugging - eclipse toolchain
- AndreyB
- Site Admin
- Posts: 14334
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
debugging - eclipse toolchain
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14334
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: debugging - eclipse toolchain
Step 1: installation
Download OpenOCD and start stm32f4 configuration like
run_openocd.bat
OpenOCD windows binaries are available here
Configure 'Debug' as on these pictures:
http://i.imgur.com/plS8JMt.png
http://i.imgur.com/K0j34v4.png
http://i.imgur.com/hY5rdKn.png
http://i.imgur.com/pgc00mg.png
http://i.imgur.com/zo6K9DG.png
http://i.imgur.com/Irv4xFZ.png
http://i.imgur.com/kRgapgT.png
Download OpenOCD and start stm32f4 configuration like
Code: Select all
openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c reset
OpenOCD windows binaries are available here
Configure 'Debug' as on these pictures:
http://i.imgur.com/plS8JMt.png
http://i.imgur.com/K0j34v4.png
http://i.imgur.com/hY5rdKn.png
http://i.imgur.com/pgc00mg.png
http://i.imgur.com/zo6K9DG.png
http://i.imgur.com/Irv4xFZ.png
http://i.imgur.com/kRgapgT.png
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
-
- contributor
- Posts: 51
- Joined: Tue Nov 05, 2013 1:43 pm
Re: debugging - eclipse toolchain
Checkout ChibiStudio. It's a very nice packaged Eclipse setup for ChibiOS, GDB, OpenOCD and GCC.
Re: debugging - eclipse toolchain
if somebody use J-Link Debugger see that - http://gnuarmeclipse.livius.net/blog/jlink-debugging/
- AndreyB
- Site Admin
- Posts: 14334
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: debugging - eclipse toolchain
Just a note for myself: debugging works fine with 5.4_2016q3 version of everything and open OCD 0.9.0 as long as I point at the correct version of arm-none-eabi-gdb.exe
Using arm-none-eabi-gdb.exe from the wrong version does not help things
Also just tested and 7 2018-q2-update works as well.
Using arm-none-eabi-gdb.exe from the wrong version does not help things
Also just tested and 7 2018-q2-update works as well.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
- AndreyB
- Site Admin
- Posts: 14334
- Joined: Wed Aug 28, 2013 1:28 am
- Location: Jersey City
- Github Username: rusefillc
- Slack: Andrey B
Re: debugging - eclipse toolchain
One little annoying issue with some F7 chips - they have silicon errors causing default software breakpoints to not work. OpenOCD is kind enough to show relevant error message "Warn : Silicon bug: single stepping will enter pending exception handler!"
In order to use openocd and debug F7 you need to change break point breakpoint type from default to "hardware"
See also http://www.chibios.com/forum/viewtopic.php?f=16&t=4912
In order to use openocd and debug F7 you need to change break point breakpoint type from default to "hardware"
See also http://www.chibios.com/forum/viewtopic.php?f=16&t=4912
- Attachments
-
- hardware.png (28.65 KiB) Viewed 5217 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute