Skip to main content
Martin KJELDSEN
Principal III
May 27, 2019
Question

CubeIDE 1.0.0 + TouchGFX 4.10.0: Working project inside (STM32F746G-DISCO)

  • May 27, 2019
  • 84 replies
  • 13031 views

Hello everyone,

Due to an increasing number of people having issues with CubeIDE and TouchGFX Integration i'm attaching a working project for STM32F746G-DISCO for your inspection - There were a good number of things to do before it worked, only some of which i highlighted in my quick-guide and even some of those steps were a bit ambiguous and could be executed in different ways.

I've written down what i've done to get this project working and i will use this in planning a video tutorial - It has to be somewhat official, so i can't simply start up the screencast and start talking. But i'll keep you updated.

/Martin

This topic has been closed for replies.

84 replies

jea74
Associate III
June 9, 2019

Finally got it working... have to re-exclude folders and files *each time* the code is regenerated ! And also re-edit the .touchgfx file

& relaunch code generation several times !! Really time consuming ... Hope a better integration in CubeIDE will arrive soon.

But I still cannot update a text value from the default task in main.cpp ?! Is there somewhere an example of this ? Looks like it has to do with Model::tick() ?

It is not clear if I need to declare to field I want to update with <d> or not ? Even with a default value set in Designer the field is not visible !?

Martin KJELDSEN
Principal III
June 11, 2019

Oh, didn't see this reply before answering your previous one :)

yes, there's an issue that every time you re-generate code you'll get your modifications overwritten.

I'm not sure what you mean by updating a text value from the default task. Are you updating the text value in your view? Can you show me some code?

Best regards,

Martin

jea74
Associate III
June 11, 2019

Hello Martin,

Thanks for your answer, I got the updating working by modifying an example. This basic code works fine with RTOS messaging from main.cpp

Regarding the overwriting issue, would it be possible to have in the Designer an option to disable the generation of the code for the simulator so that it will not "pollute" anymore the CubeIDE project files ?!? (at least it will minimize the manual (re-re-re-re)code excluding and maybe faster than waiting a change from the CubeIDE team ?)

Best Regards, J.

void update_task(void const * argument)
{
 /* USER CODE BEGIN update_task */
 USARTSendString("Enter UpdateTask.\n");
 for(;;)
 {
 messageInfo++;
 uc_i32toa(messageInfo, taskBuffer);
 USARTSendString(taskBuffer);
 USARTSendString(" - UpdateTask running...\n");
 osMessagePut(queueUpdateGUIHandle, messageInfo, 0);
 osDelay(100);
 }
 /* USER CODE END update_task */
}

void Model::tick()
{
	 // Check for messages from backend, with zero timeout
	 osEvent evt = osMessageGet(queueUpdateGUIHandle, 0);
	 if (evt.status == osEventMessage)
	 {
	 uint32_t *message = (uint32_t*)evt.value.p;
 modelListener->UPDATE_VALUE((int)message);
	 }
}
 
void Screen1Presenter::UPDATE_VALUE(int value)
{
	view.UPDATE_VALUE(value);
}
 
void Screen1View::UPDATE_VALUE(int value)
{
 Unicode::snprintfFloat(txtVoltBuffer, TXTVOLT_SIZE, "%f", value/100.0);
 txtVolt.invalidate();
}
 

Martin KJELDSEN
Principal III
June 11, 2019

Hi,

Glad you got something working. About "generating code", then you're in luck, because in 4.12 (we're going to skip 4.11) code generation is a manual thing.

/Martin

scottSD
Senior III
August 15, 2019

Martin,

Do you know when 4.12 will be released?

And will it work better with STM32CubeIDE?

I've been looking forward to this release for some time now.

jea74
Associate III
June 12, 2019

Thanks, waiting impatiently 4.12 then ! ...Linux version also ? =)

Martin KJELDSEN
Principal III
June 12, 2019

We're building a zip file for all releases that can be used on linux/gcc. Obviously, there's no designer available, but the tools and creating applications for the simulator are working. I'm not sure what the strategy is re: linux release officially, though. I will get back to you.

/Martin

FloX
Associate
June 19, 2019

I am completly new to stm32.

I haved tried to transfer the tutorial to a STM32F769I-DISCO.

Codegeneration in touchgfx is working.

I can't solve the issue "../Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/HALSDL2.hpp:22:10: fatal error: SDL2/SDL_video.h: No such file or directory"

exclude simulator doen't fix it.

What other changes did i need to do?

Martin KJELDSEN
Principal III
June 20, 2019

Hi,

Can you post your entire error log? There are a number of simulator files/folders to exclude

/Martin

DBain
Associate
July 10, 2019

Please any update on the notes/video timetable?

DBain
Associate
July 10, 2019

BTW is TouchGFX 4.10.0 available for Linux? Cannot seem to install it under wine.

Martin KJELDSEN
Principal III
July 11, 2019

The designer, at least, is not available for Linux. I'm not sure when and if it will be. What are the issues installing it under Wine?

/Martin

shorai
Associate III
August 15, 2019

@Martin and @Scott,

Without being pedantic, I hope there is something that got lost in translation :)

'code generation is a manual thing.' in my country would mean that me (manual) would write all the code.

Not quite what I expect a 'code generator' should be doing for me ;)

I'll wait for the next release and test it out.

zul-a
Visitor II
August 30, 2019

@Martin KJELDSEN​  Thanks for posting this solution here. Please give an estimated time by which we can expect STM32CubeIDE to generate a bug free code for Touch gfx projects ? This issue with Cube and touch gfx integration is quite old now. At least I have struggled with it for more than a year now.

Kind Regards

ZU

zul-a
Visitor II
August 30, 2019

Hi Martin

It complies fine when I migrate it to CubeIDE. I am getting the following error once I compile after opening f746g-disco-test.ioc file to make changes to configuration. It asks me to migrate and I click yes. Compile straight away without making any change and it throws these errors. I am on version 1.0.2 of the IDE.

Any ideas?

Thanks

0690X000009anAyQAI.png

ALomb
Senior
August 30, 2019

Hi @zul-a​ ,

as shown in the video I think you must remove some files and directorie from project build.

0690X000009aw9CQAQ.jpg

scottSD
Senior III
August 30, 2019

This does not always work. I have gotten STM32CubeIDE into a state where even when selecting some items to "Exclude Resource from build", it will still fail to compile because it still attempts to include them (even after explicitly telling it not to).

What I have done to alleviate this problem is edit the actual project file (as mentioned previously in this thread). A good idea is to keep the project in a repository (I use SVN) and restore some of the changes that have been altered as a result of a STMCubeMX code generation.

I have yet to determine exactly what needs to be changed, however.

We are all patiently waiting for a version of STM32CubeIDE that correctly integrates TouchGFX.

zul-a
Visitor II
August 30, 2019

@scottSD​ and @Community member​  Thanks for your feedback.

Scott I cannot agree with you more on your last statement. This is long over due now.