cancel
Showing results for 
Search instead for 
Did you mean: 

Setup up STM32F769I-DISCO board with cubemx and touchgfx support

PPete
Associate III

Iam looking for a howto to setup up the STM32F769I-DISCO board as a stm32cubeide project with cubemx with touchgfx integration.

is there a howto?

29 REPLIES 29
Martin KJELDSEN
Chief III

Use the F769I-DISCO application template through the TouchGFX designer - It has an ioc file for CubeMX in which you can generate a CubeIDE project. The AT also comes with an empty CubeIDe project when you create the application.

/Martin

I'd like to add that I needed to add a definition for QUADSPI in the linker script that was generated by the touchgfx project for the CubeIDE project, otherwise the contents of memory intended for the QUADSPI location were being placed at the 0x0, causing problems when trying to flash the hex file (i.e. the chip did not like being programmed in reserved memory space, and manually deleting the data everywhere before 0x08000000 resulted in a black screen).

To fix - Verify the presence of the following near the bottom of the file - specifically the label QUADSPI...

ExtFlashSection :
	{
		*(ExtFlashSection ExtFlashSection.*)
		*(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
	} >QUADSPI

..And then add a definition for QUADSPI at the memory section near the top...

/* Memories definition */
MEMORY
{
  RAM    (xrw)    : ORIGIN = 0x20000000,   LENGTH = 512K
  FLASH    (rx)    : ORIGIN = 0x8000000,   LENGTH = 2048K
  QUADSPI  (rx)    : ORIGIN = 0x90000000, LENGTH = 64M
}

@Martin KJELDSEN​ , perhaps the missing definition is a bug in the project generation of TouchGFX?

Oops, i think you're right. Setting up the linker script is a manual thing (cannot be generated by cubemx, conceptually, since QSPI is a BSP thing). But for some reason we forgot to add the proper linker script for CubeIDE.

Thanks!

PPete
Associate III

Hi Martin,

the template worked well. Thanks for your help.

🙂

@Michael K​ 

Thanks for the heads up on that. Was there anything else you had to do?

With TouchGFX 4.13.0, I'm able "Run Target" on my Stm32F769-Disco, but after doing a "Start new project from STM32CubeMX.ioc file" in Stm32CubeIDE (1.2.1), I still get a black screen when debugging.

@scottSD​ 

I haven't had much success with generating a TouchGFX project with an IOC file. IIRC, the MX_TouchGFX_Process() call didn't even make it into the FreeRTOS default task loop, and when I added it I got hard faults. Even debugging through CubeIDE with a TouchGFX generated project gives hard faults while Run Target works fine. I don't know what to make of it, and I'm coming up on a deadline so I haven't been able to look into it further. I'm just doing what I can building and running the code through the Designer.

Edit: I did have to double the FreeRTOS heap and stack for the default task in order to display more than a dozen or so widgets on screen at once.

Have you debugged? If you're using FreeRTOS do you have enough heap? stack for your tasks? etc. What's your application doing?

hi martin,

i made a touchgfx project with the swipe template. Then i opend the ico file with cubemx and generated the code.

After updateing QUADSPI memory stuff a was able to compile the project. But i also have i black screen when i start the debug mode.

I updated the heap size. Do i have to update the stack size of the gui Task in any file?

Ralf

"Swipe template" - does that mean that you also selected an application template? e.g. stm32f746g-disco, or is this your own hardware?

/Martin