cancel
Showing results for 
Search instead for 
Did you mean: 

IAR Workbench will not build project generated with TouchGFX Designer 4.17

JRoyn.1
Associate II

Hello,

I am trying to setup a IAR 8 project using TouchGFX Designer 4.17.0

When I open the generated project in IAR Workbench, it fails to build.

What I do:

  • Create a new project in TouchGFX Designer using STM32H7B3I Evaluation template
  • Generate code
  • Open the generated STM Cube project (.ioc file) in STM32CubeMX
  • Select EWARM as toolchain / IDE in STM32CubeMX
  • Generate code
  • Open project (IAR Workbench)
  • Project->Build all in IAR Workbench

Then I get a lot of compile errors

When I run the code on the board using "Run Target" in TouchGFX Designer, the code runs fine (and no build errors or warnings).

Versions:

  • TouchGFX Designer: 4.17.0
  • STM32CubeMx: 6.3.0
  • IAR Workbench: 8.50.9

Board: STM32H7B3I-EVAL

Are there issues with TouchGFX Designer 4.17.0, or am I doing something wrong?

Regards, Jan

5 REPLIES 5
Alexandre RENOUX
Principal

Hello JRoyn.1,

Indeed you are missing one step :)

What you should do :

  • Create a new project in TouchGFX Designer using STM32H7B3I Evaluation template
  • Generate code
  • Open the generated STM Cube project (.ioc file) in STM32CubeMX
  • Select EWARM as toolchain / IDE in STM32CubeMX
  • Generate code
  • Re-generate code with TouchGFX Designer (every time you change the .ioc file, you need to regenerate with TouchGFX Designer)
  • Open project (IAR Workbench)
  • Project->Build all in IAR Workbench

Hope this helps,

/Alexandre

JRoyn.1
Associate II

Hello,

Thanks, that helped. Code builds and run on the target now.

However, still some warnings:

When I open the project in STM32Cube the first time:

Need to upgrade from 1.9.0 to 1.9.0?

Choosing "Continue" worked fine.

When downloading code to target using IAR Workbench:

Tue Aug 24, 2021 08:51:26: Flash download warning: 18972 out of 18972 bytes from data record CODE:[0x90000000,0x90004A1B] will not be flashed 

Tue Aug 24, 2021 08:51:26: There were warnings while generating flash loader input. 

Tue Aug 24, 2021 08:51:26: See the Debug Log window for details. 

Tue Aug 24, 2021 08:51:28: Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4_2\arm\config\flashloader\ST\FlashSTM32H7xx.mac 

...

Tue Aug 24, 2021 08:51:34: Warning: Verify error, failed to read memory at address 0x90000000 - 0x90003FFF 

Tue Aug 24, 2021 08:51:34: Warning:  

Tue Aug 24, 2021 08:51:34: Verify error at address 0x90000000, target byte: 0x11, byte in file: 0x00 

Tue Aug 24, 2021 08:51:34: Warning:  

Tue Aug 24, 2021 08:51:34: Verify error at address 0x90000004, target byte: 0x18, byte in file: 0x00 

...

Tue Aug 24, 2021 08:51:36: Hardware reset with strategy 0 was performed 

Tue Aug 24, 2021 08:51:36: Target reset 

Tue Aug 24, 2021 08:51:36: There were 1 error and 2 warnings during the initialization of the debugging session. 

The warnings does not seem to create any issues though.

Thanks for help,

Regards, Jan

Alexandre RENOUX
Principal

Hello JRoyn.1,

Data record code not being flashed might not be a big issue for your application to work, although not really sure on that point.

Maybe you can try with CubeMX 6.2.1 instead and see if it produces the same issue.

/Alexandre

Hi,

When working with IAR or Keil you should not use the "Run on target" option from those tools otherwise you will not use the external flash loader for your ST board as shown in the warning message. You should use STM32CubeProgrammer instead: make sure to go to the External Loader section and select the right one for your board. In your case it should be the MX25LM51245G_STM32H7B3_DISCO.stdlr .

/Romain

It should be the MX25LM51245G_STM32H7B3-EVAL-REV<A or B depending on your board revision>.stdlr in your case sorry, not the one for the discovery kit.

/Romain