cancel
Showing results for 
Search instead for 
Did you mean: 

undefined reference to `touchgfx_init'

LLart.1
Associate

Cant compile code from CubeMX generated project. I get:

undefined reference to `touchgfx_init'

I have generated code from cubeMX and then TouchGFX and then clicked build all in the CubeIDE, but get errors I cant seem to fix. Any help appreciated...

1 ACCEPTED SOLUTION

Accepted Solutions
LLart.1
Associate

Thanks, found the answer in the thread above:

Step 1: Create a New STM32CubeIDE Project

1) In STM32CubeIDE > File > New > Select Part Number > Next > Set ProjectName > Click Finish

2) Enable SYS > Serial Wire (other configs can be made later)

3) Save and close ProjectName.IOC

4) Build Project (Compiling should be successful!)

Step 2: Add TouchGFX 4.17 to the Project

5) Open ProjectName.IOC > Enable CRC > Software Packs > Select Component > TouchGFX 4.17

6) Expand Software Packs > Enable Graphic Application > *LEAVE ALL TouchGFX SETTINGS TO DEFAULT*

7) Save and close IOC *DO NOT BUILD THE PROJECT *

Step 3: Generate TouchGFX 4.17 Templates

8) Double-click on \TouchGFX\ApplicationTemplate.touchgfx.part

9) Select "Blank UI" > Click red Import button > Click Generate Code > Close Designer using the X

Step 4: Clean & Compile Project

10) Right-click ProjectName > Select "Clean Project"

11) Right-click ProjectName > Select "Build Project" (Compiling should be successful at this stage!)

Step 5: ToughGFX Configurations and Code generation

12) Open ProjectName.IOC > Software Packs > TouchGFX > Set Screen Resolution e.g. 240x240, etc

13) Double-click on \TouchGFX\ApplicationTemplate.touchgfx.part, Click Generate Code > Close Designer using the X

14) Right-click ProjectName > Select "Clean Project"

15) Right-click ProjectName > Select "Build Project" (Compiling should be successful at this stage!)

done!

View solution in original post

2 REPLIES 2
TDK
Guru

https://community.st.com/s/question/0D53W00000bcwtf/stm32h747iitxundefined-reference-to-touchgfxinit-its-stm32-cube-mx-generated-code-and-giving-this-error

Seems like it's a linkage issue.

If you feel a post has answered your question, please click "Accept as Solution".
LLart.1
Associate

Thanks, found the answer in the thread above:

Step 1: Create a New STM32CubeIDE Project

1) In STM32CubeIDE > File > New > Select Part Number > Next > Set ProjectName > Click Finish

2) Enable SYS > Serial Wire (other configs can be made later)

3) Save and close ProjectName.IOC

4) Build Project (Compiling should be successful!)

Step 2: Add TouchGFX 4.17 to the Project

5) Open ProjectName.IOC > Enable CRC > Software Packs > Select Component > TouchGFX 4.17

6) Expand Software Packs > Enable Graphic Application > *LEAVE ALL TouchGFX SETTINGS TO DEFAULT*

7) Save and close IOC *DO NOT BUILD THE PROJECT *

Step 3: Generate TouchGFX 4.17 Templates

8) Double-click on \TouchGFX\ApplicationTemplate.touchgfx.part

9) Select "Blank UI" > Click red Import button > Click Generate Code > Close Designer using the X

Step 4: Clean & Compile Project

10) Right-click ProjectName > Select "Clean Project"

11) Right-click ProjectName > Select "Build Project" (Compiling should be successful at this stage!)

Step 5: ToughGFX Configurations and Code generation

12) Open ProjectName.IOC > Software Packs > TouchGFX > Set Screen Resolution e.g. 240x240, etc

13) Double-click on \TouchGFX\ApplicationTemplate.touchgfx.part, Click Generate Code > Close Designer using the X

14) Right-click ProjectName > Select "Clean Project"

15) Right-click ProjectName > Select "Build Project" (Compiling should be successful at this stage!)

done!