how Debug firmware

Discussion related to "under the hood" OpenMV topics.
User avatar
chrisPyres66
Posts: 31
Joined: Mon Jul 16, 2018 9:22 am
Location: France

how Debug firmware

Postby chrisPyres66 » Tue Jul 17, 2018 11:06 am

Dear all,

I installed qtcreator for openmv, and i managed to run the IDE, and debug bootloader through the stlink (F10: step by step works).
But i dont success to debug the firmware, because due to memory position i supposed.

I am a bit lost about what change between memory parameters to debug the firmware.

I tried to change the line in stm32fxxx.ld.s :
- FLASH_TEXT (rx) : ORIGIN = OMV_TEXT_ORIGIN, LENGTH = OMV_TEXT_LENGTH
by
- FLASH_TEXT (rx) : ORIGIN = OMV_BOOT_ORIGIN, LENGTH = OMV_TEXT_LENGTH

What are your points to do this ?

Thanks,
User avatar
iabdalkader
Posts: 595
Joined: Sun May 24, 2015 3:53 pm

Re: how Debug firmware

Postby iabdalkader » Tue Jul 17, 2018 2:43 pm

You don't need to change the linker script, just use the main firmware image with gdb and break on main() and it will work. For example:

Code: Select all

arm-none-eabi-gdb -ex "tar ext:4242" ../firmware/OPENMV3/firmware.elf
(gdb) break main
User avatar
chrisPyres66
Posts: 31
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: how Debug firmware

Postby chrisPyres66 » Wed Jul 18, 2018 6:12 am

Thanks for your answer which is what i do but i was in the disassembled memory.

The solution i found was to increase the processor ressource of ubuntu virtualbox...
Apparently, QTCreator limits its debugging in function of its ressource because it worked with the bootloader.

I hope it could help someone else. Thanks to your great team !

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests