-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to source level debug code in libmbed using IDE 2.3.3. #997
Comments
Hi @KurtE , |
Hey @KurtE, you should be able to specify additional gdb commands creating |
Thanks @facchinm and @umbynos, I tried a few different directories with the setup I had on my Ubuntu machine. So I tried pointing it to a location where I have done git clone .../mbed-os to my machine. So, I rebuilt the debug library again following the steps I showed on the forum page, mentioned in the first comment of this issue. After it completed, I then rebuilt the sketch again, started the debugger, and then opened the debug console and typed in: And this time it was able to step into the HAL function. Will be curious to see what happens and I reboot and try again, pointing the debugger at some other directory as the /tmp/mbed-os-program directory will no longer exist. |
quick update: - maybe information here and thread should be added to added to the debug documentation. That is, on the same boot you built the debug library, the Arduino IDE will find the sources out in your temp directory. So: /tmp/mbed-os-program/mbed-os directory to my main hard drive. Today, I was also able to build the debug version of the library on my Windows 11 machine using WSL 24.04, In the debug console, I used the commands: info sources to figure out
@per1234 and all: Wondering if maybe makes sense to sort of merge this information into my other issue: As maybe this is mostly a documentation issue? It would also be good, if someone would show an example of a debug_custom.json file, that Thanks all. |
In my case, I am trying to debug some OV5640 camera code I am trying to make work on the GIGA and thought it would be
easier if I could debug the code using the Arduino IDE debugger.
Took me a while to figure out how to build the debug version of the libmbed.a. More details about this are in the issue I created
#993
A lot more details about this is in the forum thread:
https://forum.arduino.cc/t/building-debug-libmbed-a/1315845/28
My WIP (more like Play in progress) sketch which includes the camera code is up at:
https://github.com/KurtE/Arduino_GIGA-stuff/tree/main/sketches/GigaCameraDisplay_GFX_OV5640
Warning it uses some of the libraries I have in same github project and others.
I am able to start up the debugger and set breakpoints and the like, and get to the line that tries to call into the HAL layer as seen:
However I can not step into this function, as I am guessing it can not find any source file for it.
That is, the sources I believe in the mbed-os project is contained in the file:
/home/kurte/github/mbed-os/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/STM32F7xx_HAL_Driver/stm32f7xx_hal_dcmi.c
Or when generating the debug version of the libmbed.a a similar path in /tmp
I noticed at the end of the mbed-os-to-arduino run there were some copies that were done, I believe from this:
Which makes sense, as the only .c file located under the cores/arduino/mbed directory is: mstd_mutex.cpp
Question is: how should it work?
Should I try to copy the .c files into where the header file is?
/home/kurte/Arduino/hardware/arduino-git/mbed/cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/STM32H7xx_HAL_Driver/stm32h7xx_hal_dcmi.h
Or is it simply not expected to work?
Thanks
Kurt
The text was updated successfully, but these errors were encountered: