cancel
Showing results for 
Search instead for 
Did you mean: 

Does TouchGFX support mbed framework?

AMege
Associate II

Currently TouchGFX generates code (my target is a STM32F469 DISCOVERY board) that is based on the ST CubeMX framework. Is the 'mbed' framework on the roadmap, since I like it *a lot* better.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Hi @AMege​,

TouchGFX does not directly support any framework. It is an independent framework and rendering mechanism. CubeMX helps configure projects so that what is required for TouchGFX to run (memory, LTDC, display, etc) are available.

Does that answer your question?

Best regards,

Martin

View solution in original post

19 REPLIES 19
Martin KJELDSEN
Chief III

Hi @AMege​,

TouchGFX does not directly support any framework. It is an independent framework and rendering mechanism. CubeMX helps configure projects so that what is required for TouchGFX to run (memory, LTDC, display, etc) are available.

Does that answer your question?

Best regards,

Martin

Martin KJELDSEN
Chief III

To be more precise:

What you would do is use the mbed framework to do what you want and then maybe present some data in your TouchGFX application. Check https://community.st.com/s/question/0D50X0000AU4zodSQB/interfacing-with-hardware-in-touchgfx-applications for inspiration on how to interface with hardware and generally present data coming from other tasks.

/Martin

AMege
Associate II

Hi Martin,

thank you for your response, however I fail to understand how the generated code from TouchGFX, heavily using the CubeMX HAL layer to access the board resources can be replaced with the mbed HAL layer??

I already know how to interface with hardware in a TouchGFX application (both ways), but that was based on a project that did not use the mbed framework.

The mbed framework is a much higher level API than the ST CubeMX HAL drivers (that I don't like very much).

Regards,

/Antoine

Martin KJELDSEN
Chief III

Hi Antoine,

What i'm trying to say is that TouchGFX does not really care about which HAL you're using. It only requires some memory to render frames into and that you've set up whatever display interface you're using to transfer the pixels rendered to that buffer to the display. That's why you can take a TouchGFX GUI and run it on SDL2 simulator and on any hardware configuration that matches the dimensions of the application.

/Martin

I understand, but I don't know how to "strip" the CubeMX generated code from the TouchGFX project and replace it with the mbed HAL layer.

Are there howtos for this?

I guess there aren't any .. yet 🙂 Do you really need CubeMX in this case? Anything you configure will be configured using STs HAL. If you start from one of the application templates from inside the designer i think this will become more apparent to you. Look into BoardConfiguration.cpp.

Let me know!

/Martin

In other words, when I click the "Generate Code" button, how can I control what HAL layer is used?

"Do you really need CubeMX in this case?"

No, I don't

"Look into BoardConfiguration.cpp."

Ok, but this is generated code, how can I control the generation process so it produces a different BoardConfiguration.cpp?

Or do I need to "hack" this file and every time I use "Generate Code" loose my changes?

BoardConfiguration.cpp is not generated code. It's a part of the port for the particular board when coming from our application templates.

/Martin