Skip to main content
Aplou.1
Associate II
August 5, 2020
Solved

TouchGFX 4.13.0 project with CMSISv2 ??

  • August 5, 2020
  • 11 replies
  • 3549 views

Hello everyone,

I am currently working on a project with touchGFX (4.13.0) and I want to use CMSISv2 functions and calls. Since the default configuration from touchGFX is CMSISv1, I open the cubeMX project created by touchGFX and changed the CMSIS version in the FreeRTOS config menu. I generated files from cubeMX, then generated files from touchGFX. And when I "Run Target" I get this error :

Run Target
 Generate
 Done
 Generate Assets
 make -f simulator/gcc/Makefile assets -j8
 Done
 Post Generate
 touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
 Done
 Post Generate Target
 touchgfx update_project --project-file=../STM32F7508-DK.ioc --platform=m7
 Done
 Compile
 make -f ../gcc/Makefile -j8
 Generating TouchGFX/generated/texts/src/Texts.cpp
 Generating TouchGFX/generated/texts/src/LanguageGb.cpp
 Compiling TouchGFX/generated/fonts/src/Font_verdana_40_4bpp_0.cpp
 Compiling TouchGFX/generated/fonts/src/Kerning_verdana_40_4bpp.cpp
 Compiling TouchGFX/generated/fonts/src/Kerning_verdana_20_4bpp.cpp
 Compiling TouchGFX/generated/fonts/src/Kerning_verdana_10_4bpp.cpp
 Compiling TouchGFX/generated/fonts/src/Table_verdana_10_4bpp.cpp
 Compiling TouchGFX/generated/fonts/src/Table_verdana_40_4bpp.cpp
 Compiling TouchGFX/generated/fonts/src/Font_verdana_20_4bpp_0.cpp
 Compiling TouchGFX/generated/fonts/src/Font_verdana_10_4bpp_0.cpp
 Compiling TouchGFX/generated/fonts/src/Table_verdana_20_4bpp.cpp
 Compiling TouchGFX/generated/texts/src/LanguageGb.cpp
 Compiling TouchGFX/generated/texts/src/Texts.cpp
 Compiling TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp
 Compiling TouchGFX/target/generated/STM32DMA.cpp
 Compiling TouchGFX/target/generated/TouchGFXConfiguration.cpp
 Compiling TouchGFX/target/TouchGFXHAL.cpp
 Compiling TouchGFX/target/generated/OSWrappers.cpp
 TouchGFX/target/generated/OSWrappers.cpp:21:10: fatal error: cmsis_os2.h: No such file or directory
 #include <cmsis_os2.h>
 ^~~~~~~~~~~~~
 compilation terminated.
 gcc/Makefile:327: recipe for target 'TouchGFX/build/STM32F7508-DK/TouchGFX/target/generated/OSWrappers.o' failed
 make[2]: *** [TouchGFX/build/STM32F7508-DK/TouchGFX/target/generated/OSWrappers.o] Error 1
 make[2]: *** Waiting for unfinished jobs....
 Compiling TouchGFX/target/TouchGFXGPIO.cpp
 make[1]: *** [generate_assets] Error 2
 gcc/Makefile:294: recipe for target 'generate_assets' failed
 ../gcc/Makefile:47: recipe for target 'all' failed
 make: *** [all] Error 2
 Failed
 Failed

So when touchGFX compiles, it does not find CMSISv2 files. I tried messing around with some includes or paths but I could not come up with something useful...

I appreciate any help you could give me!

Thanks in advance!

Alex

This topic has been closed for replies.
Best answer by Aplou.1

Hello,

I was able to fix my issues, turns out that the main problem was that the make file was note correctly generated (had to changed CMSISv1 refference to CMSISv2). The rest were some coding errors on my part.

Some thing strange tho, I had a screen with a big image (bigger resolution than the screen I am displaying on) that work perfectly on CMSISv1. When I switched to CMSISv2, the image display operation crashed the TouchGFX thread... I don't know why. The fix was simply to reduce the resolution of the image to match the screen.

Thank you for all the help!!

Alex

11 replies

VBurs
Associate III
August 5, 2020

I got the same issue...can someone help?

Aplou.1
Aplou.1Author
Associate II
August 5, 2020

Okay so i figured that the makefile has some hardcoded paths to CMSIS in line 93 and 97. But it is still not working... What am I missing ?

Romain DIELEMAN
ST Employee
August 6, 2020

Hi,

Which board and application template version are you using? The default configuration is not always CMSIS v1, as we have updated most of the ATs to CMSIS v2.

/Romain

Aplou.1
Aplou.1Author
Associate II
August 6, 2020

Hi Romain,

Thank You for your response !

This is the application template I chose :

0693W000003Ocq0QAC.png

Alex

Alexandre RENOUX
Visitor II
August 6, 2020

Hello,

Can you try deleting your Middlewares/ folder, regenerate with CubeMX and then with TouchGFX Designer ?

This is to make sure that CubeMX will generate it correctly. If it does not solve the issue even if the CMSIS_RTOS_V2 folder is generated, then look again to the include paths.

Also, if you changed the CMSIS version in the FreeRTOS config menu, make sure it is also changed in the TouchGFX Generator config menu.

/Alexandre

Aplou.1
Aplou.1Author
Associate II
August 6, 2020

Hello Alexandre,

I have deleted and regenerated like you recomended, but my problem persists... I can compile and flash but I get a black screen on my devboard (Before the change it worked).

As per the touchGFX config menu, I am not sure what menu you are talking about, is this the one ?

0693W000003Oe8eQAC.png

Thank You ,

Alex

Alexandre RENOUX
Visitor II
August 7, 2020

Hello,

No the compilation problem has been resolved and now you have another problem :)

At least you are one step further now.

Yes I was talking about this config menu.

We noticed sometimes that CMSIS v2 does not work on some board but v1 works and vice versa. This is also probably why we haven't changed to v2 for this board.

Also, æake sure that the FreeRTOS v2 is well configured: For instance, your touchgfx task need a certain size to work correctly. Please have a look at the CubeMX config of the L4R9-Disco Application Template that uses CMSIS v2 for reference.

/Alexandre

Aplou.1
Aplou.1Author
Associate II
August 6, 2020

!!Update!!

I was able to compile and flash my code to my dev board, now the proble is that I have a black screen on boot... But I created a task to print a message on the serial port and I get the message on my computer trough USB. So freeRTOS is running and the task is running, So there is a problem with starting the touchGFX task...

Also I tried to set a different page as a startup screen, and it worked !! the bad news is that is means that first page has a problem of some sort. Since I there is a big image on that screen I assume it could be a problem with the RAM size of stack size ?

Thanks A Lot!

Alex

Alexandre RENOUX
Visitor II
August 11, 2020

Hello,

Did you program your Flash correctly ?

Because if your code is running but your screen is black, that means that the data of the image is not retrieved correctly.

Try to put a box on top of your image in your start up screen. And see if you see the box.

When you talk about "a different page as start up screen", what the difference with the one not working ?

/Alexandre

Aplou.1
Aplou.1AuthorBest answer
Associate II
August 12, 2020

Hello,

I was able to fix my issues, turns out that the main problem was that the make file was note correctly generated (had to changed CMSISv1 refference to CMSISv2). The rest were some coding errors on my part.

Some thing strange tho, I had a screen with a big image (bigger resolution than the screen I am displaying on) that work perfectly on CMSISv1. When I switched to CMSISv2, the image display operation crashed the TouchGFX thread... I don't know why. The fix was simply to reduce the resolution of the image to match the screen.

Thank you for all the help!!

Alex