H7 compilation

General discussion about topics related to OpenMV.
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

H7 compilation

Postby chrisPyres66 » Wed Jul 03, 2019 11:55 am

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 :
https://github.com/ntfreak/openocd/blob ... m32h7x.cfg

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,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: H7 compilation

Postby iabdalkader » Wed Jul 03, 2019 12:12 pm

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:

https://hackaday.io/page/4773-bringing- ... nocd-linux
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: H7 compilation

Postby chrisPyres66 » Thu Jul 04, 2019 2:50 am

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,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: H7 compilation

Postby iabdalkader » Thu Jul 04, 2019 8:35 am

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

https://github.com/texane/stlink
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: H7 compilation

Postby chrisPyres66 » Thu Jul 04, 2019 8:44 am

I installed this : https://github.com/ntfreak/openocd
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...
User avatar
kwagyeman
Posts: 4446
Joined: Sun May 24, 2015 2:10 pm

Re: H7 compilation

Postby kwagyeman » Thu Aug 01, 2019 1:54 pm

I just use printf() and OpenMV IDE. I'm basic.
Nyamekye,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: H7 compilation

Postby iabdalkader » Mon Sep 09, 2019 2:32 pm

chrisPyres66 wrote:
Thu Jul 04, 2019 8:44 am
I installed this : https://github.com/ntfreak/openocd
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 tried debugging with openocd today and it's useless, reset halt doesn't work and I can't set any breakpoints.
xvbv
Posts: 9
Joined: Wed Nov 27, 2019 10:16 am

Re: H7 compilation

Postby xvbv » Wed Nov 27, 2019 11:17 am

Any news on this? Can it be done?
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: H7 compilation

Postby chrisPyres66 » Mon Dec 02, 2019 11:05 am

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 !
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: H7 compilation

Postby iabdalkader » Mon Dec 02, 2019 11:47 am

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.
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: H7 compilation

Postby chrisPyres66 » Mon Dec 02, 2019 12:08 pm

What is the official ST debugging software ?
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: H7 compilation

Postby iabdalkader » Mon Dec 02, 2019 2:46 pm

https://www.st.com/en/microcontrollers- ... s-software

I think the System Workbench for STM32 or STM32CubeIDE.
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: H7 compilation

Postby chrisPyres66 » Tue Dec 03, 2019 3:13 am

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 :
https://github.com/openmv/openmv/wiki

Do you mean to use :
- stmcube32ide in place of qtcreator
- or the official st on-chip debbuger ??? in place of openocd ???

thanks,
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: H7 compilation

Postby iabdalkader » Tue Dec 03, 2019 5:49 am

chrisPyres66 wrote:
Tue Dec 03, 2019 3:13 am
Do you mean to use :
- stmcube32ide in place of qtcreator
- or the official st on-chip debbuger ??? in place of openocd ???
No I mean whatever debugger ST provides instead of openocd/st-util
User avatar
iabdalkader
Posts: 1214
Joined: Sun May 24, 2015 3:53 pm

Re: H7 compilation

Postby iabdalkader » Mon Dec 16, 2019 12:17 pm

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.
User avatar
chrisPyres66
Posts: 152
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: H7 compilation

Postby chrisPyres66 » Wed Dec 18, 2019 11:15 am

great, i will check this

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests