cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix build errors in IAR EWARM V9.32.1 and/ or Keil uVision V5.38.0.0 for TouchGFX projects V4.21.1 and STM32CubeMX V6.7.0 ?

GMcPh.1
Associate II

I created a very simple GUI in TouchGFX and generated the code. I then opened the .ioc file in ST32CubeMX and generated the code for each different IDE. The code works in STM32CubeIDE but fails for both EWARM and uVision. Obviously generating the code for each IDE before trying each IDE.

In both EWARM and uVision, I managed to add all the include directories so that the projects could at least find all the .hpp files to try and build.

In EWARM, I finally get the following output;

STM32F769I_DISCO.out

Error[Li005]: no definition for "BitmapDatabase::getInstanceSize()" [referenced from C:\TouchGFXProjects\test02\EWARM\STM32F769I_DISCO\Obj\Application\User\TouchGFX\target\generated\TouchGFXConfiguration.o]

Error[Li005]: no definition for "BitmapDatabase::getInstance()" [referenced from C:\TouchGFXProjects\test02\EWARM\STM32F769I_DISCO\Obj\Application\User\TouchGFX\target\generated\TouchGFXConfiguration.o]

Error[Li005]: no definition for "touchgfx::Texts::setLanguage(unsigned short)" [referenced from C:\TouchGFXProjects\test02\EWARM\STM32F769I_DISCO\Obj\Application\User\TouchGFX\target\generated\TouchGFXConfiguration.o]

Error[Li005]: no definition for "Model::Model()" [referenced from C:\TouchGFXProjects\test02\EWARM\STM32F769I_DISCO\Obj\Application\User\TouchGFX\target\generated\TouchGFXConfiguration.o]

Error[Li005]: no definition for "FrontendApplication::FrontendApplication(Model &, FrontendHeap &)" [referenced from C:\TouchGFXProjects\test02\EWARM\STM32F769I_DISCO\Obj\Application\User\TouchGFX\target\generated\TouchGFXConfiguration.o]

Error[Li005]: no definition for "FrontendApplicationBase::gotoScreen1ScreenNoTransition()" [referenced from C:\TouchGFXProjects\test02\EWARM\STM32F769I_DISCO\Obj\Application\User\TouchGFX\target\generated\TouchGFXConfiguration.o]

Error[Li005]: no definition for "Virtual function table for ApplicationFontProvider" [referenced from C:\TouchGFXProjects\test02\EWARM\STM32F769I_DISCO\Obj\Application\User\TouchGFX\target\generated\TouchGFXConfiguration.o]

Error[Lp011]: section placement failed

      unable to allocate space for sections/blocks with a total estimated minimum size of 0x19'b4b4 bytes (max align 0x4) in <[0x2002'0000-0x2007'bfff], [0x2007'c000-0x2007'ffff]> (total uncommitted space 0x6'0000).

      Uncommitted:

      [0x2002'0000-0x2007'bfff]: 0x5'c000

      [0x2007'c000-0x2007'ffff]:  0x4000

Total number of errors: 8

Total number of warnings: 3

Build failed

While in uVision I get: (small portion)

STM32F769I_DISCO\STM32F769I_DISCO.axf: Error: L6218E: Undefined symbol touchgfx::DMA_Interface::execute() (referred from stm32dma.o).

STM32F769I_DISCO\STM32F769I_DISCO.axf: Error: L6218E: Undefined symbol touchgfx::LockFreeDMA_Queue::LockFreeDMA_Queue(touchgfx::BlitOp*, unsigned long) (referred from stm32dma.o).

Not enough information to list image symbols.

Not enough information to list load addresses in the image map.

Finished: 2 information, 0 warning and 108 error messages.

"STM32F769I_DISCO\STM32F769I_DISCO.axf" - 108 Error(s), 2 Warning(s).

Target not created.

Has anybody managed to use IAR EWARM or Keil uVision to successfully create and work on projects using the latest versions of each?

Is there a simple solution I'm missing?

Thanks in advance for the help.

5 REPLIES 5
MM..1
Chief II

Try start project normal way :

1. Opn MX and create clean project for your F7 and your IDE setup all peripherals

/ add touchgfx package in MX

generate

open projct file in IAR or KEIL

2/ double click on touchgfx template file and create gui generate code

3/ go back into IDE and try build

GMcPh.1
Associate II

Hi,

Thanks for the suggestion. I've tried following your method and although it appears to build, it still has an error which could well be due to some setting I have incorrect in CubeMX.

The error is now:

Error[Lp011]: section placement failed

      unable to allocate space for sections/blocks with a total estimated minimum size of 0x19'00d0 bytes (max align 0x8) in <[0x2000'0000-0x2007'ffff]> (total uncommitted space 0x8'0000).

The part that really worries me is that if I look at the CubeMX configuration from first building a project in ToughGFX, that has pre-defined Tasks and Queues under FreeRTOS which when starting with CubeMX are no longer there.

I went back to google and found a Youtube video showing what to do. I followed that and managed to build the project just fine. The new version of EWARM requires the project file to be updated in order to work with V9.32.1 which I'm using.

Now for some reason I can't flash and debug the board. Go figure.....

Fri Jan 20, 2023 22:23:10: Flash download warning: 1647564 out of 1647564 bytes from data record CODE:[0x9000'0000,0x9019'23cb] will not be flashed 

Fri Jan 20, 2023 22:23:10: There were warnings while generating flash loader input. 

Fri Jan 20, 2023 22:23:10: See the Debug Log window for details. 

As far as I can tell, IAR can't flash the QSPI Flash on the STM32F769I-DISCO. I have experimented with the default board file but to no avail.

I did use the same method but used Keil uVision and that also worked. The project built just fine and I managed to upload the code onto the board. Happy days.

So if anybody knows the correct Debugger settings for the board, please post them here.

MM..1
Chief II

First error is normal if you set framebuffer by alocation and dont manage memory linker settings ... not generated from MX.

Second error is about flashing external memory, too based on IDE settings not generated. Need your setup.

Real new custom projects isnt prepared for use from MX , this is only help wizard. Maybe in future AI go here.

I dont use IAR then no help with set...

Osman SOYKURT
ST Employee

Hello GMcPh.1,

That is strange, normally you could have use the TBS without including any files. You created your project from a TBS (TouchGFX board setup) right? I just tried with the latest version of TouchGFX (4.21.1) and I can compile a simple GUI on IAR and Keil without issues.

Can you try to create an new project based on STM32F769I Discovery TBS and then "Edit>Import>Import GUI" and select one of the examples suggested. Click on generate code on Designer (F4 shortcut), and then open STM32CubeMX and generate code on EWARM for example. Then, you must regenerate from TouchGFX Designer again, before trying to compile on IAR (same with Keil).

Concerning the log output you're referring (Error[Li005]: no definition for "BitmapDatabase::getInstanceSize()" [referenced from ...) I guess what's missing is the path in the preprocessor configuration. But that shouldn't happen if you create your project the way I described.

0693W00000Y8uGWQAZ.png 

And for the other error (Error[Lp011]: section placement failed

      unable to allocate space for sections/blocks with a total estimated minimum size of 0x19'00d0 bytes (max align 0x8) in <[0x2000'0000-0x2007'ffff]> (total uncommitted space 0x8'0000).) --> this is a issue with the linker script, but the linker scripts we're providing in our TBS is configured to have enough space. So unless you're not including multiple huge images, it shouldn't happen.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX
GMcPh.1
Associate II

Hello Osman,

Thank you for your reply. I followed the STM32 Graphics: How to use IAR EWARM with TouchGFX templates - YouTube video and managed to build the project just fine. The problem I now have is in uploading the code to the development board. I'm using one the standard templates from TouchGFX Designer (SVG Image Example).

I have tried to follow your method and the project builds just fine, but I'm still having problems uploading the code to the development board.

The first error/ popup I get is 0693W00000Y8uQMQAZ.pngfollowed by

0693W00000Y8uQlQAJ.pngLooking at the debug log I get

0693W00000Y8uRPQAZ.pngJust in case you can't read the text, I get this:

Mon Jan 23, 2023 11:01:59: Flash download warning: 1647564 out of 1647564 bytes from data record CODE:[0x9000'0000,0x9019'23cb] will not be flashed 

The settings for the linker is as follows

0693W00000Y8uS8QAJ.pngand I'll attached the file and stuck a .c on it in order to upload it.

I am happy to upload the whole project somewhere if that makes it easier or even have a remote session to debug this.

Thanks in advance for all the help.