Home › Forums › Mastering STM32 book support forum › Debug example from AC6
- This topic has 9 replies, 2 voices, and was last updated 8 years ago by julien.terrier.
-
AuthorPosts
-
November 13, 2016 at 12:39 pm #5063julien.terrierParticipant
Hello Carmine,
I imported an existing project in my Eclipse workspace. This example from “STM32Cube_FW_L4_V1.5.0” and I can build it but with Ac6 STM32 MCU GCC compiler. Then I installed openOCD and made debug configuration according your book. OpenOCD works but when I wanted to switch to debug mode I retrieved an error (you can see the attached picture) I did some research on the web and the problem seems to be in the GDB Client Setup where I have to choose the right executable but which is the right?
Have you an idea to fix my issue? I really need to use a debugger.
Thank you for your help and your patience
Attachments:
You must be logged in to view attached files.November 14, 2016 at 10:27 am #5068Carmine NovielloKeymasterThis looks to me as an issue with toolchain paths in Eclipse.
Try to check if in the Eclipse preferences->C/C++>Build->Global Tool Paths the Toolchain Folder corresponds to the folder containing gcc (e.g. C:\STM32Toolchain\gcc-arm).
November 14, 2016 at 10:16 pm #5079julien.terrierParticipantI have the right Global Tool Paths:
In my Eclipse workspace I installed the plug-in “System Worbench For STM32” and I created a debug configuration which work Ac6 STM32 Debugging
Consider that my problem is solved
Now I switch to another error:
Since I met any problem with my peripherique driver (see pevious post) I got an error with the GDB openOCD Debugging. If I want switch in debug mode with your code example from your github I retrieved this kind of errors:
openOCD 0.9 seems working as LD1 blinking but I can read in the console:
Warn : Cannot identify target as a STM32 family
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use ‘gdb_memory_map disable’.
Error: attempted ‘gdb’ connection rejectedWhat’s going on ? Have you an idea ?
To be clear my first problem is ok but now I have a problem with GDB openOCD debugging that I use with your example…
Thank you
- This reply was modified 8 years ago by julien.terrier.
- This reply was modified 8 years ago by julien.terrier.
Attachments:
You must be logged in to view attached files.November 14, 2016 at 10:51 pm #5097Carmine NovielloKeymasterWhich board are you using? Can you show me the OpenOCD external tool configuration?
November 15, 2016 at 2:41 pm #5116julien.terrierParticipantI using NUCLEO-L476RG.
see my external tool configuration for my Nucleo-L476RG
But I have the same problem with my nucleo-L073RZ with this external tool configuration:
Do you think that my problem is located in .cfg ?
st_nucleo_f4.cfg (C:/Users/julien/workspace/openocd-0.9/scripts/board):
# This is for all ST NUCLEO with any STM32F4. Known boards at the moment:
# STM32F401RET6
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260000
# STM32F411RET6
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260320source [find interface/stlink-v2-1.cfg]
transport select hla_swd
source [find target/stm32f4x.cfg]
reset_config srst_only
I can find stm32f4x.cfg under the path C:/Users/julien/workspace/openocd-0.9/scripts/target
thank you for your help.
- This reply was modified 8 years ago by julien.terrier.
- This reply was modified 8 years ago by julien.terrier.
Attachments:
You must be logged in to view attached files.November 15, 2016 at 2:48 pm #5124Carmine NovielloKeymasterSince you are using a Nucleo-L4 and a Nucleo-F0, you need to use corresponding configuration file (the st_nucleo_f4.cfg is only for F4 based boards), which are “board/st_nucleo_l476rg.cfg” and “board/st_nucleo_f0.cfg”. I found that the Table 1 at pg.75 lists a wrong config file for L4.
November 15, 2016 at 5:33 pm #5127julien.terrierParticipantRegarding nucleo-l476rg there is st_nucleo_l476rg.cfg anywhere in openocd-0.9/scripts/board or in openocd-0.9/scripts/target.
For my nucleo-l073rz it seems that I used the right .cfg and I got the same problem
I took openOCD-0.9 from ==> http://www.freddiechopin.info/en/download/category/4-openocd
and there no st_nucleo_l476rg.cfg or st_nucleo_l073rz.cfg.
I’m sure it has worked with the stm32l0discovery.cfg
Attachments:
You must be logged in to view attached files.November 15, 2016 at 5:36 pm #5134Carmine NovielloKeymasterI’m updating the installation instructions regarding OpenOCD. I’ll release a new version of the book late this night. Stay tuned.
November 15, 2016 at 5:50 pm #5138julien.terrierParticipantOk thank you for your support
November 15, 2016 at 7:11 pm #5141julien.terrierParticipantIt works with openOCD-10.0, I can debug my nucleo-l476rg thank you Carmine, thank you Liviu, thank you for your huge work.
-
AuthorPosts
- You must be logged in to reply to this topic.