cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745x Examples from STM32CubeMX not compilable

AKrue.1
Associate II

Hello,

I would like to experiment on the nucleo board with STM32H745 development kit (dual cores), butr I face some issues. I just downloaded the firmware package from CubeMX and integrated the example code with SystemWorkbench4STM32 as the project files are ready to be used.

During compilation, when everything is integrated in SystemWorkbench4STM32, I get a lot of errors:

C:/Users/***/STM32Cube/Repository/STM32Cube_FW_H7_V1.7.0/Projects/NUCLEO-H745ZI-Q/Examples/BSP/CM7/Src/stm32h7xx_it.c:140: multiple definition of `SysTick_Handler'

Example/User/CM4/stm32h7xx_it.o:C:/Users/***/STM32Cube/Repository/STM32Cube_FW_H7_V1.7.0/Projects/NUCLEO-H745ZI-Q/Examples/BSP/CM4/Src/stm32h7xx_it.c:138: first defined here

This happens to a lot of symbols. It looks like both compilations (CM7 +CM4) are affecting each other when generating the final 2 elf files. This is really strange..

Because of this behaviour, I cannot even test the nucleo board at all. Is there any fix available for this issue in order to make it run?

6 REPLIES 6
TDK
Guru

To get it to work right, you need separate compilation units for the CM4 and CM7 cores.

I opened this project in STM32CubeIDE, it converted the project format, and hit build and it compiled no problem. Might consider switching.

If you feel a post has answered your question, please click "Accept as Solution".
AKrue.1
Associate II

Hello TDK,

It was acutally a mistake derived from myself as I tried to "enable" the CM4 folder again in the project files as it was excluded for some reason. I don't understand why the CM4 folder is greyed out / excluded after importing the demonstration project into the SystemWorkbench4STM or STM32CubeIDE. When you enable CM4 folder, I get all the errors again. On both platforms, it is behaving like this.

I was just reading the STM32 "how to debug multicore" document for the STM32H7, but when you take a careful look on the pictures e.g. for Keil or SysWorkbench4STM, then you see that the CM7 and CM4 folders within the IDE are not greyed out.

Do I miss here something when the CM4 folder is greyed out in order to have a correct compilation with 2 elf files at the end?

TDK
Guru

If a folder is grayed out, it is probably "excluded from build". Since it's dual core, it should have two projects, as opposed to one project creating both ELF files. The CM4 folder will be excluded from one and the CM7 will be excluded from the other. At least this is how STM32CubeMX configures things in a default project. Not sure what is happening when you import projects. They can also be excluded at the file level instead of folder level.

If you feel a post has answered your question, please click "Accept as Solution".
AKrue.1
Associate II

Hello TDK,

can you tell me the behaviour on your machine? I have imported several projects from the SW_Fimware-package for STM32H7 for further tests, but everytime the CM4 folder is greyed out/excluded from build. I have read the instructions carefully within the ST documentation, but in the end I don't know if I didn't catch a hidden point.

This is my STM32CubeID version:

STM32CubeIDE

Version: 1.4.2

Build: 7643_20200813_1322 (UTC)

OS: Windows 8.1, v.6.3, x86_64 / win32

Java version: 1.8.0_252

I have tested this on a Win7 machine as well with the same results.

This is how it looks like when I create a new workspace and import the project and run the build. Both elf files are generated but always taking into account that the CM4 folder is greyed out / excluded from build. The CM4 folder is greyed out even before I start the compilation.

0693W000003RU5bQAG.jpg

Somehow this approach looks strange compared to the manuals which are provided by ST.

How can I fix this issue?

TDK
Guru

Here's what I did:

  • Open the .project file within the SW4STM32 directory.
  • STM32CubeIDE will launch and want to convert the project to the right format for this IDE. Let it do so (click OK, then Finish)
  • Right click the project and hit Build. It will build both the CM4 and CM7 projects.

The first two steps can also be done by File -> Open projects from file system and selecting the directory with the .project file.

My screen look similar to yours. CM4 is grayed out because it is excluded from the Debug_CM7 build configuration.

I doubt Win7 or Win8 will affect things here.

If you feel a post has answered your question, please click "Accept as Solution".
AKrue.1
Associate II

Hello TDK,

thanks for your input. I just wanted to try out the Debug_CM4 build configuration because according to my understanding the CM7 should be excluded for this specific build configuation, but this is not the case. CM4 is still greyed out and it compiles correctly. But somehow this looks strange. So I tried to exclude the CM7 folder manually in order to have a similarity like with the CM7 build configuration. But it here I get a lot of errors because it looks like that the include paths are always referring to the CM7 files, although in the Compiler settings it says something like "/../CM4/inc, but this is not the true. When I expand the "include" files in the project folder tab, I also see only the CM7 includes, no matter if I change the Debug settings to CM4.

For example if I jump to the main.c file from the CM4 folder and I try to track the main.h file, it will always jump into the main.h from CM7 folder. This is the root cause for several compilation errors why several defines are missing.

Can you tell me what am I am doing wrong? Because with that obersavations I have made, the CM4_Debug configuration is completely useless because I can achieve the same behavior with the CM7_build configuration. What is the benefit and the difference of the CM4 Debug configuration when everyhting around the CM4 files are greyed out? How can you develop SW in a easy way when the files are always apparently excluded for the CM4 files/build? Persoanlly speaking this looks really confusing for somebody who is just coping with the CM4 processor.