cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating TouchGFX development from IAR to Atollic TrueSTUDIO?

Jesper Ronnholm
Associate III

We are currently investigating how to best move from IAR to Atollic, but we're having problems linking the project. More specifically, the linker cannot find the lib file (libtouchgfx.a for gcc), even though it has a seemingly correct path (based on filesystem and/or workspace) and is tracking the object in the workspace.

It may be we're just a bunch of Atollic noobs, but are there any established, working ways of importing, configuring, and building a generated project in Atollic? (In terms of generating resources and setting them up, file structure, include paths, etc.)

3 REPLIES 3
Jesper Ronnholm
Associate III

It's worth mentioning I've read previous attempts at accomplishing this. But, as also mentioned in other posts about this, it only seems to work smoothly for previous versions of both TouchGFX and Atollic.

Their new respective versions doesn't play well together out of the box.

Mon2
Senior III

Hi. Here is a hack that may work for you (not confirmed). We too were facing some compiler errors but was related to the simulator code breaking during compilation. Martin (ST employee and Draupner developer of TouchGFX who is on this forum) noted that our linker was breaking due to:

For building through the designer the mingw32 library must be present: Middlewares\ST\TouchGFX\touchgfx\lib\win\mingw32\libtouchgfx.a

The SDL libs are inside: Middlewares\ST\TouchGFX\touchgfx\lib\sdl2\win32

So what we did was to take a known good generated project and cut & paste the above missing files and folders to the broken one and all is good and now working.

So, proceed to launch TouchGFX -> select perhaps the STM32F4xx kit of your choice -> whip up some simple GUI although this should not matter -> Generate code -> Launch the simulator -> all good? If yes, proceed to the above folders and cut & paste them to your broken target.

The exact folder structure is the key here along with spoon feeding the missing files.

Please post your results.

Jesper Ronnholm
Associate III

Hi,

I've tried the procedure you described, but I think I'm hampered by my using a custom hardware setup (although with STM32F7xx as source platform). Since we're attempting to rearrange large parts of the code to fit with other 3rd-party solutions, being too dependent on the designer would be a problem.

However, we discovered another solution to the Atollic problem. Apparently, when you include the library file, you must tweak its name manually in the include path:

For example, if your path to the lib file is:

C:\MyApplication\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a

you have to include the path separately

C:\MyApplication\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m7\gcc\

and omit both the "lib" and file-ending of the file "libtouchgfx-float-abi-hard.a" as

touchgfx-float-abi-hard.

Atollic doesn't seem to like it any other way, despite itself actually formatting the include in the wrong way when you first put it in.

That's how we solved it, anyway. Seems to work with normal CubeMX projects with TouchGFX code tacked right onto it, so maybe a bit more flexible than going through the designer.

Sadly, we've started to look for alternatives to Atollic anyway. So I'm not sure we will continue even with this fix.