H7 compilation

Dear All,

I try to do my own compilation with H7 cam, and it works, ouhou !
I did it with a virtuallbox i had with ubuntu and qtcreator than i use for F7 cam.

For debugging with openocd (0.10.0), gdb-server and baremetal, i downloaded a stm32h7x.cfg here :

and added it to qtcreator options but i have this error before debugging : invalid command name ‘dap’
than i supposed coming from line 37 of cfg file: dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu

Have you used another cfg file for H7 file ?
I am a bit lost, and any help could be welcome.

Thanks,

I think you need to build openocd from source, or maybe try one of these builds:

http://gnutoolchains.com/arm-eabi/openocd/

I never had to debug the H7 with openocd so far, so I can’t help.

EDIT: Maybe this will help:

Thanks, I will try this.

What is your toolchain to debug H7 or F7 cam ?

I would prefer to use the st toolchain, via stm32cubeMxProgrammer configurator and the Atollic True Studio IDE specially now where there is an AI cube package for cnn dedicated for CMSIS-NN.
Unfortunately, i dont know how to join the openmv github with it…

Thanks,

I use stlink and gdb, but stlink doesn’t support H7 yet.

I installed this : GitHub - openocd-org/openocd: Official OpenOCD Read-Only Mirror (no pull requests)
and

  • it works for debugging bootloader (i did an frimware programmation with openmv IDE)
  • but i have reset for firmware at led_init( hardfault ), and mp_init during mp_lookuptable(…) if i comment led…

I just use printf() and OpenMV IDE. I’m basic.

I tried debugging with openocd today and it’s useless, reset halt doesn’t work and I can’t set any breakpoints.

Any news on this? Can it be done?

hello all,

I started new installation with :

  • OS : Ubuntu 18.04
  • Qt creator : 4.10.2
  • Default gcc (arm 32bit)
  • Default openocd
  • Plug in : Bare metal 4.1.2
  • debugger : GDB 8.3
    which allows to debug openmv3 with stm32f7.

For openmv4, i tried as well :

  • openocd from ntfreak with stm32h7x.cfg
    without success to debug firmware (bootloader seems ok).

I have during

  • led_init()
  • mp_hal_pin_output()
  • a hardfault_c_handler()
  • DEBUG=1 does not give more with the debug

Any help is welcome !

Hi, the opensource debugging tools don’t work very well with H7 as far as I know, you’ll need to use the official ST debugging software.

What is the official ST debugging software ?

I think the System Workbench for STM32 or STM32CubeIDE.

Thanks a lot for your ever quick answer and time.

From my side, I did not get the link between the st official software and your wiki install from github :

Do you mean to use :

  • stmcube32ide in place of qtcreator
  • or the official st on-chip debbuger ??? in place of openocd ???

thanks,

No I mean whatever debugger ST provides instead of openocd/st-util

Hey chrisPyres66,

I found an issue in our H7 firmware that prevents it from being debugged, it seems the DBGMCU is disabled in sleep/low-power modes by default and this disables debugging when say WFI() is called. I’ve fixed this issue and I can debug the H7 firmware using Segger JLINK + their GDB server, just thought you might want to know this.

great, i will check this