Skip to main content
Adel Benhamida
Associate
Jun 2, 2019 4:20 AM UTC
Question

Error while compiling with a new cubeIDE project(STM32F429I-DISCO)

I have generated a new CUBEIDE Project (STM32F429I-DISCO) with help of CUBEMX and i configured the LTDC with SPI5,CS,WR....etc, and i selected Touchgfx for designing the UI, i designed a simple UI, but when i try to compile the code i get 3 errors :

C:/Users/po4A/STM32CubeIDE/workspace_1.0.0/de/Debug/../Startup/startup_stm32f429zitx.s:113: undefined reference to `main'

C:/Users/po4A/STM32CubeIDE/workspace_1.0.0/de/Debug/../Src/stm32f4xx_it.c:205: undefined reference to `hltdc'

C:/Users/po4A/STM32CubeIDE/workspace_1.0.0/de/Debug/../Src/stm32f4xx_it.c:219: undefined reference to `hdma2d'

I DID NOT WRITE ANY CODE YET, i just wanted upload the UI to the board.

This topic has been closed for replies.

15 replies

Markus GIRDLAND
ST Employee
Jun 3, 2019 9:44 AM UTC

Martin Kjeldsen in the TouchGFX team has a great guide to get started with CubeIDE and TouchGFX right here:

https://community.st.com/s/question/0D50X0000AqD8zPSQS/stm32cubeide-and-touchgfx-4100-resolving-compilation-issues

Adel Benhamida
Associate
Jun 3, 2019 9:53 AM UTC

I've watched this video, but this video was for the STM32F746G-DISCO board, I tried it but it didn't work, my board is the STM32F429I-DISCO Board

Martin KJELDSEN
Principal III
Jun 3, 2019 12:18 PM UTC

What kind of issues are you looking at currently - Maybe i can add some text on how to get this board working if it has issues as well? I would expect the procedure to be somewhat similar since it's also a parallel RGB LCD. But since the project generation could be different...

Thanks!

/Martin

Adel Benhamida
Associate
Jun 3, 2019 12:28 PM UTC

I have compiling issues, if you go check it you will find the same error, generate a project for the STM32F429I-DISCO with STM32CubeIDE and use TouchGFX for designing the UI, first of all before you add any code and you try to generate the UI using TouchGFX you will see an error within TouchGFX (Can't Generate Source Code Error) which can be resolved by changing the PostGenerate attribute..., after this, you design your UI and save it and try to compile the project without adding any code you will get 3 errors :

C:/Users/po4A/STM32CubeIDE/workspace_1.0.0/de/Debug/../Startup/startup_stm32f429zitx.s:113: undefined reference to `main'

C:/Users/po4A/STM32CubeIDE/workspace_1.0.0/de/Debug/../Src/stm32f4xx_it.c:205: undefined reference to `hltdc'

C:/Users/po4A/STM32CubeIDE/workspace_1.0.0/de/Debug/../Src/stm32f4xx_it.c:219: undefined reference to `hdma2d'

i hope you do a video guide on setting up the IDE with touchgfx for the STM32F429I-DISCO BOARD.

Thanks

Martin KJELDSEN
Principal III
Jun 4, 2019 11:16 AM UTC

You've selected a C project and not a C++ project (TouchGFX is C++ - hltdc is defined in BoardConfiguration.cpp, main from main.cpp, etc).

/Martin

Adel Benhamida
Associate
Jun 5, 2019 9:15 AM UTC

The problem is when i try to create a C++ Project with STM32CubeIDE, i see a lot files have .C extension including (main.c) and that means it creates a c project instead of c++ one, what's the problem here ?

My STM32CubeIDE Version : 1.0.0, Build: 2872_20190423-2022 (UTC)

Zcj
Visitor II
Jun 9, 2019 11:55 AM UTC

Hi, I met the same problem several days ago ,yesterday night I found the cause of this problem.

After “clean project�?, the directory of the project source file was missing, the file path under "/test/core " is missing.After manually adding the path "/test/core", the problem is solved. 0690X000008iOeYQAU.png  :face_with_tears_of_joy:I hope you can understand my poor english:face_with_tears_of_joy: 0690X000008iOedQAE.png

Martin KJELDSEN
Principal III
Jun 11, 2019 7:01 AM UTC

Hi @Zcj​ 

Glad you found the problem. Your english is great :)

Zcj
Visitor II
Jun 12, 2019 2:24 PM UTC

Thank you very much. I believe that the next version will become even better and better, let us look forward to it.