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

@Michael K​ 

When going the "Import" route, which option did you choose? I see different results depending on the method I choose:

1) File > Import > General > Existing Projects into Workspace

2) File > Import > C/C++> Existing Code as MakeFile Project

When I choose #1 above I only have to add the "QUADSPI (rx) : ORIGIN = 0x90000000, LENGTH = 64M" line because the definition of QUADSPI is already done (as you stated, verify that its there).

However, I am getting the following compile error:

No rule to make target 'C:/TouchGFXProjects/Stm32F769iDiscovery002/TouchGFX/generated/images/src/__designer/Blue_Buttons_Round_Edge_small.cpp', needed by 'Application/User/generated/Blue_Buttons_Round_Edge_small.o'

 Which apparently can be taken care of by adding a button (not sure why this is necessary).

@scottSD​ 

Check your project hierarchy. Sometimes if you add a widget, generate code, and then remove the widget and generate code again, it leaves behind C resource files and/or object files, in this case Blue_Buttons_Round_Edge_small.o. If you delete the unused files, then it should compile (n.b. I think this is to do with the Debug configuration of most IDEs opting to include ALL project code, rather than optimizing for what is actually #included)

In CubeIDE, the unused files will appear in the Application/User/generated folder, and often have little /!\ symbols next to them. Delete them, clean the project, and try to build again.

Embedded UI/UX Consulting: cadenza.design

@Michael K​ 

When I add  "QUADSPI (rx) : ORIGIN = 0x90000000, LENGTH = 64M" to the linker definition file, I get a "No space left on device".

I removed it to make the code compile.

However, not able to debug now because getting the following:

Error message from debugger back end:
Load failed
Failed to execute MI command:

@Martin KJELDSEN​ 

I am assuming @PPete.1son​  meant that he is using the Swipe "UI", not "Template".

@Michael K​ 

Thanks for the reply.

"Check your project hierarchy. Sometimes if you add a widget, generate code, and then remove the widget and generate code again, it leaves behind C resource files and/or object files, in this case Blue_Buttons_Round_Edge_small.o. If you delete the unused files, then it should compile (n.b. I think this is to do with the Debug configuration of most IDEs opting to include ALL project code, rather than optimizing for what is actually #included)"

I find it interesting about that because I did not add a single widget to the project aside from a box. Anyway, I was able to fix the error by adding that particular button.

@scottSD​ 

By adding the button, the code now references it and there is no problem. If you want to remove the button in the future, delete the unused file and it will stop complaining.

You can't remove the quadspi section, otherwise it will place the stuff intended for quadspi at the beginning of the file. Attempting to flash with this overwrites reserved flash space on the chip. Try changing Length=64M to Length=16M

Embedded UI/UX Consulting: cadenza.design

@Michael K​ 

I appreciate the feedback

I did try that based on what I read in another thread. When I do, I still get a "No space left on device".

   text	   data	    bss	    dec	    hex	filename
 207890	    304	  35284	 243478	  3b716	STM32F769I_DISCO.elf
Finished building: default.size.stdout
arm-none-eabi-objcopy:STM32F769I_DISCO.bin[ExtFlashSection]: No space left on device

I'd like to know if I am correct in my steps. I have not seen anyone (ST included) provide detailed steps to accomplish this. I have heard that the AT for the Stm32F769i-Discovery is complete, but then someone else says extra work is necessary.

1) Create a design in TouchGFX (4.13.0) selecting the Stm32F769i-Discovery (3.0.0) Application Template. Click "Generate Code".

2) Tested on the target by doing a "Run Target" from within the Designer.

3) In Stm32CubeIDE (1.2.0), Go to File > Import > General > Existing Projects into Workspace.

4) Browse to the directory where the design in Step 1 is located. Click Finish.

5) I am able to Build without any compile errors.

5) Edit the linker script (".ld" file). And add the following to the memories definition. This is line 66.

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

6) I tried to build again and at this time I get the following error:

text	   data	    bss	    dec	    hex	filename
 213046	    308	  25752	 239106	  3a602	STM32F769I_DISCO.elf
Finished building: default.size.stdout
 
arm-none-eabi-objcopy:STM32F769I_DISCO.bin[ExtFlashSection]: No space left on device

Can anyone tell me if I am missing some steps?

Note that I also tried setting the QUADSPI length to 16M.

@scottSD​ Do you have enough hard drive space left? The bin file can get quite large, even for simple programs (i.e. >2GB). You can also disable bin file generation in Project Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU Post build outputs.

N.b. from this screen you can enable hex generation, which can be useful if you want to flash directly with ST-Link

Embedded UI/UX Consulting: cadenza.design

@Michael K​ 

That was it! I really appreciate the info.

I was indeed getting low on hard drive space as a result of the MANY attempts at trying to get a project to work. But even after removing a bunch of projects, disabling the bin file generation really helped me out (I wasn't aware of this feature).

I guess it's time for some clean up.

Thanks!