cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX compatibility with ChibiOS

DOkaz.1
Associate II

Hi,

Doing some research for development of a smartwatch like product and was trying to figure out if TouchGFX was compatible with ChibiOS.

It seems like it should be possible, with the docs saying that any CMIS compliant OS is supported, however I wanted to double check to make sure.

It also seems like the process would have to be manual for configuration, is there any guides on what exactly needs to be configured for TouchGFX to work?

From Docs:

 Generally, the following manual steps are required:

  1. Configure the RTOS
  2. Define a task to run TouchGFX (MX_TouchGFX_Process)
  3. Start the scheduler

I have some embedded knowledge, so i understand most of the concepts but pretty new to RTOS development.

Any help would be greatly appreciated.

Thanks!

5 REPLIES 5
Osman SOYKURT
ST Employee

Hello DOkaz.1,

The steps looks fine to me. The file you need to modify is OSWrappers.cpp. This one contains the definition of all functions that works with the OS. So you need to remove FreeRTOS functions and use your function to make them work with ChibiOS. You can get help from this document which explains which function do what.

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX
Martin KJELDSEN
Chief III

Hi,

The TouchGFX Generator in CubeMX supports CMSIS V1 and V2 interfaces. Looking at github it looks as if chibiOS is cmsis OS compliant:

ChibiOS/cmsis_os.c at master · ChibiOS/ChibiOS (github.com)

This means you can use the OSWrapper.cpp you get from us (By choosing CMSIS OS V1/2 in the TouchGFX generator interface).

Since CubeMX cannot help you with ChibiOS, you just have to add the files to your project manually, and also start a new task for TouchGFX to run in. You can get some inspiration by looking at how we do it for FreeeRTOS (Check one of the board packages from the designer).

/Martin

Hi Martin,

Thanks for the help! Do you recommend using ChibiOS in the CubeMX IDE or should I do all my work in CubeMX and then copy all of the file to the ChibiOS dev environment and then build from there?

If moving ChibiOS into the CubeMX dev environment is the way to go, is there a guide on how to do that?

Thanks!

Daniel

DOkaz.1
Associate II

@Martin KJELDSEN​ @Osman SOYKURT​ Just to confirm, I need to choose FREERTOS in the code generator (as well as configuring everything needed), enabling CMVIS_V1/CMIS_V2 (Probably will go with V2 since it seems cross-compatible and if I go multi core it'll be required) and then manually moving the needed generated files into ChibiOS (removing the FreeRtos specific stuff) and starting a new TouchGFX task for it?

0693W00000NrDV0QAN.png 

Once I have the CubeMX configuration, i can generate TouchGFX applications using that config and also add it to the ChibiOS.

Is there any steps that I'm missing?

Thanks!

Osman SOYKURT
ST Employee

Hello DOkaz.1,

Yes it seems to fine with this steps. @Martin KJELDSEN​ can you confirm ?

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX