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
  • 13019 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

Zeder N
Visitor II
September 13, 2019

Hello Martin!

Thanks you for your guide.

But when i add more picture into the project. An error occurred

..\tools\arm-none-eabi\bin\ld.exe: abc_project.elf section `ExtFlashSection' will not fit in region `FLASH'
..\tools\arm-none-eabi\bin\ld.exe: region `FLASH' overflowed by 398052 bytes

I think the default linker of Stm32ide not suitable for touchgfx. Can you show me how to fix it? Thanks you very much.

HP_it
Senior II
September 13, 2019

Hey @Zeder N​ 

You might want to have a look at my question about the same thing:

https://community.st.com/s/question/0D50X0000BI1CvjSQF/external-vs-internal-flash-memory-for-touchgfx-assets

Basically you have to change your linker script to include the QSPI regions AND include the drivers AND make sure you are loading the QSPI with the correct data. It's quite straightforward when you've done it :)

I've made a video guide on how to get the QSPI memory to work, available here: https://youtu.be/237lPdMsDZs

Zeder N
Visitor II
September 13, 2019

@HP​  @Martin KJELDSEN​  Thanks you!! It's worked for me:>

NSeba
Associate II
September 22, 2019

I am using STM32F429IGT6 microcontroller, Cube IDE Version: 1.0.2, and TouchGFX 4.10.0

I have configured all peripherals as shown in your example, but the TouchGFX option is not coming active

Attatching the project, Please check whether I have done anything wrong

Martin KJELDSEN
Principal III
September 23, 2019

Hi,

I'll check it out as soon as possible.

/Martin

NSeba
Associate II
September 24, 2019

Sir,

Thanks for the consideration.

I got it correct and compiled successfully , I missed enabling some interrupts as in your example.

  1. I am using an LCD without controller (800*480) connected to LTDC. Disabled ILI 9346 in TouchGFX Parameter. Am I correct ?
  2. Even after that the system is asking to specify other pins and SPI which are not in my LCD (platform settings). Will it cause any issues ?; I am yet to test it on hardware.
  3. How to interface my touch controller XPT2046 with touchGFX ?

0690X00000ARblAQAT.png0690X00000ARbkwQAD.png

RRoon
Associate III
October 9, 2019

Hi Martin,

I've taken your f746g-disco-test example above, an loaded it into CubeIDE 1.02.

If I only do a build, it works fine.

I click on the .ioc file and it prompts me to "Migrate or Cancel Project". I migrate and CubeMX opens.

I select Graphics > TouchGFx and Execute.

TouchGFx opens.

I do no edits. I click Run Simulator- I get "Unable to Launch Simulator".

I click "Generate Code" - I get "Error during code generation".

Errors :

make -f simulator/gcc/Makefile assets -j10

touchgfx update_project --project-file=../.cproject

Post Generate Error

no <projectDescription> node in ../.cproject

What does this mean ? The Update process is presumably screwing up something ?

RRoon
Associate III
October 9, 2019

I fixed it. Your mention of Post Generate above gave me a clue. Thanks!

The migration changes this line in GFX Project file.

I just deleted it.

151:      "PostGenerateCommand": "touchgfx update_project --project-file=../.cproject ",

Martin KJELDSEN
Principal III
October 10, 2019

Yep that's one way of doing it. Or, you can download this patch gem which will be able to understand cubeide projects (this was not supported by 4.10.0 originally.

http://sw-center-st-com.s3-eu-west-1.amazonaws.com/touchgfx/TouchGFX/Evaluation/4.10.0/touchgfx-cli-4.10.2.gem

Try installing this from the 4.10.0 touchgfx environment and your post generate command should work.

/Martin

RRoon
Associate III
October 10, 2019

Hi Martin,

how do I install this ?

Martin KJELDSEN
Principal III
October 11, 2019

​Hi @RRoon​

gem install touchgfx-cli-4.10.2.gem

 Just do it from your TouchGFX  environment.

/Martin

Ciuffoly
Senior
November 21, 2019

I like this idea because there are many information and video available about this integration but there is a lot of confusion.

I have a STM32F749G and using your app I have the same problem of my app.

Until here with F6 all ok

 /* Configure the system clock */

 SystemClock_Config();

after start an infinite loop on this function

void TIM6_DAC_IRQHandler(void)

{

 /* USER CODE BEGIN TIM6_DAC_IRQn 0 */

 /* USER CODE END TIM6_DAC_IRQn 0 */

 HAL_TIM_IRQHandler(&htim6);

 /* USER CODE BEGIN TIM6_DAC_IRQn 1 */

 /* USER CODE END TIM6_DAC_IRQn 1 */

}

Ciuffoly
Senior
November 21, 2019

I have solved this first problem adding these lines

int main(void)

{

 /* USER CODE BEGIN 1 */

   DBGMCU->APB1FZ = 0xFFFFFFFF;

   DBGMCU->APB2FZ = 0xFFFFFFFF;

 /* USER CODE END 1 */

Ciuffoly
Senior
November 21, 2019

but now the interface run but I cannot arrive to my while(1) because the code go in loop inside the function osKernelStart();

/* Start scheduler */

 osKernelStart();

 /* We should never get here as control is now taken by the scheduler */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 GPIO_InitTypeDef GPIO_InitStructure;

 GPIO_InitStructure.Pin = GPIO_PIN_1;

 GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;

 GPIO_InitStructure.Pull = GPIO_NOPULL;

 GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(GPIOI, &GPIO_InitStructure);

 while (1)

 {

   /* USER CODE END WHILE */

    //HAL_GPIO_TogglePin(Ld1_GPIO_Port, GPIO_PIN_1); //Toggle LED

    if (HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_1)) {

        HAL_GPIO_WritePin(GPIOI, GPIO_PIN_1, GPIO_PIN_RESET);

    } else {

       HAL_GPIO_WritePin(GPIOI, GPIO_PIN_1, GPIO_PIN_SET);

    }

    HAL_Delay(5000); //Delay 1 Seconds

   /* USER CODE BEGIN 3 */

 }

 /* USER CODE END 3 */

MPham.1
Visitor II
April 11, 2020

hi. When i open file of touchGFX from STM32cubeIDE, i have massage: touchGFX contains spaces, this can result in erroneous behaviour while compiling. So, i can't generate code my application. Please help me, solve it. thanks

scottSD
Senior III
April 13, 2020

This thread is very old. Are you actually using CubeIDE 1.0.0 and TouchGFX 4.13.0?

You should really update to the latest version. The follow thread is about the new versions:

https://community.st.com/s/question/0D50X0000BwjU6pSQE/official-release-xcubetouchgfx-v4130

Cvega.11
Associate II
October 29, 2020

0693W0000059guTQAQ.jpghello friend

Touchgfx does not work for me, I get the pixelated screen I use stm32cubeide 1.4.0 it does not work for me download version 1.2.0 and also download TouchGFX V4.14 and nothing, change the version ==> V4.13 and still some help friend , I hope you can help me ??

I made a simple program in touchgfx and there it works, but the detail is that I use LWIP in my program, I need to use it from stm32cubeide