cancel
Showing results for 
Search instead for 
Did you mean: 

control an LED with a toggle button on TouchGFX

sana1
Associate III

I'm new to TouchGFX and I'm attempting to control an LED with a toggle button on TouchGFX. I've written some code for it, but I'm encountering two errors that I'm having trouble understanding. Could you provide any advice or assistance on how to resolve these errors?"

 

c:\st\stm32cubeide_1.10.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe:C:\TouchGFXProjects\MyApplication_3\STM32H735IGKX_FLASH.ld:91: non constant or forward reference address expression for section .ARM.extab
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:74: STM32H735G-DK.elf] Error 1

"make -j12 all" terminated with exit code 2. Build might be incomplete. 

 

7 REPLIES 7
SofLit
ST Employee

You have one error on the linker file.
Did you modify it: STM32H735IGKX_FLASH.ld? Especially at line 91?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
MM..1
Chief III

@sana1 wrote:

I'm new to TouchGFX and I'm attempting to control an LED with a toggle button on TouchGFX. I've written some code for it, ...

 


Show your code especialy where you wrote   extab

no i don't do any modification in this file 

sana1_0-1713013174292.png

sana1_1-1713013213428.png

i just declared the function toggle led and don't modify any other file 

 

sana1
Associate III

sana1_0-1713013472338.png

sana1_1-1713013482564.png

this is all my modification on the code that touch gfx generated 

Sorry, but your code seems ok, but do nothink , learn more how TGFX works.

Error seems be based on project generated in TGFX, but opened in IDE and maybe ioc edited and regenerated.

This result to many troubles...

For learn use TGFX gen project , edit only existed files with any editor and build and run only in TGFX.

As said by @MM..1 you need to learn/understand how TGFX works.

I'm not a TouchGFX expert but I'm not in favor of using/including HAL in the GUI.

This is how TouchGFX is working: Model/Presenter/View layers: No HAL calls in the GUI.

You need to use model.cpp as interface between your low level/HW and the GUI. 

SofLit_0-1713028728949.png

I've already provided you in another thread a very simple tutorial on this link on how TouchGFX can interact with the low level application. The tutorial shows how to toggle a LED with a GUI toggle button and how to get the HW button status on the screen. This tutorial must help you.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
LouisB
ST Employee

Hello @sana1 ,

Your seems to be closely related to this post Re: Hardware button - STMicroelectronics Community ,you can also refer to it for your issue.

I hope that helps,
Regards,  

Louis BOUDO
ST Software Developer | TouchGFX