-
-
Notifications
You must be signed in to change notification settings - Fork 213
Description
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:
copy_core_files () {
echo -n "Copying generic MbedOS headers to core... "
rsync -zar --exclude="targets/" --exclude="*TEST*/" --include="*/" --include="*.h" --exclude="*" \
mbed-os/ "$ARDUINOCOREMBED"/
rsync -zar --exclude="targets/" --exclude="*TEST*/" --include="*/" --include="mstd_*" --exclude="*" \
mbed-os/ "$ARDUINOCOREMBED"/
echo " done."
}
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