cancel
Showing results for 
Search instead for 
Did you mean: 

Keil is showing errors while compiling Touch GFX generated code...

Kylo Ren
Associate II

Hello,

I am new to Touch GFX. I have build a GUI in touch Gfx and then generated the code.

But when I tried to compile the generated code in Keil IDE , It shows the following errors

Build started: Project: STM32F769I_DISCO

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

Build target 'STM32F769I_DISCO'

Clean started - Project: 'STM32F769I_DISCO'

  deleting intermediate output files for target 'STM32F769I_DISCO'

assembling startup_stm32f769xx.s...

compiling CortexMMCUInstrumentation.cpp...

../TouchGFX/target/CortexMMCUInstrumentation.hpp(4): error: #5: cannot open source input file "platform/core/MCUInstrumentation.hpp": No such file or directory

 #include <platform/core/MCUInstrumentation.hpp>

../TouchGFX/target/CortexMMCUInstrumentation.cpp: 0 warnings, 1 error

compiling Buttons.cpp...

../TouchGFX/target/Buttons.cpp(39): error: #5: cannot open source input file "touchgfx/hal/Buttons.hpp": No such file or directory

 #include <touchgfx/hal/Buttons.hpp>

../TouchGFX/target/Buttons.cpp: 0 warnings, 1 error

compiling KeySampler.cpp...

../TouchGFX/target/KeySampler.hpp(42): error: #5: cannot open source input file "platform/driver/button/ButtonController.hpp": No such file or directory

 #include <platform/driver/button/ButtonController.hpp>

../TouchGFX/target/KeySampler.cpp: 0 warnings, 1 error

compiling TouchGFXHAL.cpp...

../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp(20): error: #5: cannot open source input file "touchgfx/hal/HAL.hpp": No such file or directory

 #include <touchgfx/hal/HAL.hpp>

../TouchGFX/target/TouchGFXHAL.cpp: 0 warnings, 1 error

compiling STM32TouchController.cpp...

../TouchGFX/target/STM32TouchController.hpp(23): error: #5: cannot open source input file "platform/driver/touch/TouchController.hpp": No such file or directory

 #include <platform/driver/touch/TouchController.hpp>

../TouchGFX/target/STM32TouchController.cpp: 0 warnings, 1 error

compiling TouchGFXGPIO.cpp...

../TouchGFX/target/TouchGFXGPIO.cpp(18): error: #5: cannot open source input file "touchgfx/hal/GPIO.hpp": No such file or directory

 #include <touchgfx/hal/GPIO.hpp>

../TouchGFX/target/TouchGFXGPIO.cpp: 0 warnings, 1 error

compiling TouchGFXConfiguration.cpp...

../TouchGFX/target/generated/TouchGFXConfiguration.cpp(17): error: #5: cannot open source input file "texts/TypedTextDatabase.hpp": No such file or directory

 #include <texts/TypedTextDatabase.hpp>

../TouchGFX/target/generated/TouchGFXConfiguration.cpp: 0 warnings, 1 error

compiling TouchGFXGeneratedHAL.cpp...

../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp(20): error: #5: cannot open source input file "touchgfx/hal/HAL.hpp": No such file or directory

 #include <touchgfx/hal/HAL.hpp>

../TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp: 0 warnings, 1 error

compiling STM32DMA.cpp...

../TouchGFX/target/generated/STM32DMA.cpp(20): error: #5: cannot open source input file "touchgfx/hal/OSWrappers.hpp": No such file or directory

 #include <touchgfx/hal/OSWrappers.hpp>

../TouchGFX/target/generated/STM32DMA.cpp: 0 warnings, 1 error

compiling OSWrappers.cpp...

../TouchGFX/target/generated/OSWrappers.cpp(17): error: #5: cannot open source input file "touchgfx/hal/OSWrappers.hpp": No such file or directory

I don't understand whats the issue with the generated code. I have not change any line of code just build it as it was generated.

Please help

Regards

Manvendra

 #include <touchgfx/hal/OSWrappers.hpp>

../TouchGFX/target/generated/OSWrappers.cpp: 0 warnings, 1 error

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello,

When you create a project the IDE by default is CubeIDE.

In order to make Keil compile, you need to specify in CubeMX (opening the .ioc file) the right IDE.

For that:

  • go to the Project Manager tab in CubeMX
  • Change the Toolchain/IDE into MDK-ARM (shown in the below picture)
  • Generate code from CubeMX
  • Generate code from TouchGFX Designer
  • Now you should be able to compile without errors.

0693W000000UySAQA0.png

/Alexandre

View solution in original post

5 REPLIES 5
Alexandre RENOUX
Principal

Hello,

It seems that the TouchGFX framework is not correctly installed.

Can you enumerate the steps you did to arrive to this ?

/Alexandre

Kylo Ren
Associate II

Hello Alexandre RENOUX ,

Thanks for your response.

Here are the steps which I am following

  1. Created a project in Touch GFX
  2. Selected STM32F769 Discovery board
  3. Then Added a button on the screen.
  4. Then I opened simulator just to see how it looks, and then closed the simulator.
  5. After that I generated the code.
  6. Then Opened the keil Project and Build it.
  7. When I build it , It shows this error which I mentioned above.

Regards,

Manvendra

Alexandre RENOUX
Principal

Hello,

When you create a project the IDE by default is CubeIDE.

In order to make Keil compile, you need to specify in CubeMX (opening the .ioc file) the right IDE.

For that:

  • go to the Project Manager tab in CubeMX
  • Change the Toolchain/IDE into MDK-ARM (shown in the below picture)
  • Generate code from CubeMX
  • Generate code from TouchGFX Designer
  • Now you should be able to compile without errors.

0693W000000UySAQA0.png

/Alexandre

Kylo Ren
Associate II

Hello,

Thanks for your response.

I followed your points. And now it is giving another error, It seems the installed compiler doesn't support C++.

Build started: Project: STM32F769I_DISCO

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

*** Warning: You are compiling one or more files of source type C++ and have selected 'use MicroLIB'. MicroLIB does not support C++!

  

Build target 'STM32F769I_DISCO'

assembling startup_stm32f769xx.s...

compiling TouchGFXHAL.cpp...

../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp(20): error: #5: cannot open source input file "touchgfx/hal/HAL.hpp": No such file or directory

 #include <touchgfx/hal/HAL.hpp>

../TouchGFX/target/TouchGFXHAL.cpp: 0 warnings, 1 error

compiling STM32TouchController.cpp...

../TouchGFX/target/STM32TouchController.hpp(23): error: #5: cannot open source input file "platform/driver/touch/TouchController.hpp": No such file or directory

 #include <platform/driver/touch/TouchController.hpp>

../TouchGFX/target/STM32TouchController.cpp: 0 warnings, 1 error

compiling TouchGFXGPIO.cpp...

../TouchGFX/target/TouchGFXGPIO.cpp(18): error: #5: cannot open source input file "touchgfx/hal/GPIO.hpp": No such file or directory

 #include <touchgfx/hal/GPIO.hpp>

../TouchGFX/target/TouchGFXGPIO.cpp: 0 warnings, 1 error

compiling CortexMMCUInstrumentation.cpp...

../TouchGFX/target/CortexMMCUInstrumentation.hpp(4): error: #5: cannot open source input file "platform/core/MCUInstrumentation.hpp": No such file or directory

 #include <platform/core/MCUInstrumentation.hpp>

../TouchGFX/target/CortexMMCUInstrumentation.cpp: 0 warnings, 1 error

compiling Buttons.cpp...

../TouchGFX/target/Buttons.cpp(39): error: #5: cannot open source input file "touchgfx/hal/Buttons.hpp": No such file or directory

 #include <touchgfx/hal/Buttons.hpp>

../TouchGFX/target/Buttons.cpp: 0 warnings, 1 error

compiling TouchGFXConfiguration.cpp...

../TouchGFX/target/generated/TouchGFXConfiguration.cpp(17): error: #5: cannot open source input file "texts/TypedTextDatabase.hpp": No such file or directory

 #include <texts/TypedTextDatabase.hpp>

../TouchGFX/target/generated/TouchGFXConfiguration.cpp: 0 warnings, 1 error

compiling KeySampler.cpp...

../TouchGFX/target/KeySampler.hpp(42): error: #5: cannot open source input file "platform/driver/button/ButtonController.hpp": No such file or directory

 #include <platform/driver/button/ButtonController.hpp>

../TouchGFX/target/KeySampler.cpp: 0 warnings, 1 error

compiling TouchGFXGeneratedHAL.cpp...

../TouchGFX/target/generated/TouchGFXGeneratedHAL.hpp(20): error: #5: cannot open source input file "touchgfx/hal/HAL.hpp": No such file or directory

 #include <touchgfx/hal/HAL.hpp>

../TouchGFX/target/generated/TouchGFXGeneratedHAL.cpp: 0 warnings, 1 error

compiling OSWrappers.cpp...

../TouchGFX/target/generated/OSWrappers.cpp(17): error: #5: cannot open source input file "touchgfx/hal/OSWrappers.hpp": No such file or directory

 #include <touchgfx/hal/OSWrappers.hpp>

../TouchGFX/target/generated/OSWrappers.cpp: 0 warnings, 1 error

compiling STM32DMA.cpp...

../TouchGFX/target/generated/STM32DMA.cpp(20): error: #5: cannot open source input file "touchgfx/hal/OSWrappers.hpp": No such file or directory

 #include <touchgfx/hal/OSWrappers.hpp>

../TouchGFX/target/generated/STM32DMA.cpp: 0 warnings, 1 error

compiling main.c...

compiling freertos.c...

compiling stm32f7xx_it.c...

compiling stm32f7xx_hal_timebase_tim.c...

compiling stm32f7xx_hal_msp.c...

compiling stm32f7xx_hal_cortex.c...

compiling stm32f7xx_hal_crc_ex.c...

compiling stm32f7xx_hal_crc.c...

compiling stm32f7xx_hal_rcc.c...

compiling stm32f7xx_hal_flash.c...

compiling stm32f7xx_hal_rcc_ex.c...

compiling stm32f7xx_hal_flash_ex.c...

compiling stm32f7xx_hal_gpio.c...

compiling stm32f7xx_hal_dma_ex.c...

compiling stm32f7xx_hal_dma.c...

compiling stm32f7xx_hal_pwr_ex.c...

compiling stm32f7xx_hal_pwr.c...

compiling stm32f7xx_hal.c...

compiling stm32f7xx_hal_i2c_ex.c...

compiling stm32f7xx_hal_exti.c...

compiling stm32f7xx_hal_dma2d.c...

compiling stm32f7xx_hal_i2c.c...

compiling stm32f7xx_hal_dsi.c...

compiling stm32f7xx_hal_sdram.c...

compiling stm32f7xx_ll_fmc.c...

compiling stm32f7xx_hal_ltdc_ex.c...

compiling stm32f7xx_hal_ltdc.c...

compiling stm32f7xx_hal_qspi.c...

compiling system_stm32f7xx.c...

compiling stm32f7xx_hal_tim_ex.c...

compiling croutine.c...

compiling event_groups.c...

compiling list.c...

compiling stm32f7xx_hal_tim.c...

compiling queue.c...

compiling stream_buffer.c...

compiling tasks.c...

compiling timers.c...

compiling heap_4.c...

compiling port.c...

compiling cmsis_os2.c...

"STM32F769I_DISCO\STM32F769I_DISCO.axf" - 10 Error(s), 0 Warning(s).

Target not created.

Build Time Elapsed: 00:00:06

Regards

Manvendra

Alexandre RENOUX
Principal

Hello,

The warning saying "MicroLIB does not support C++" is not important. This should not create the generated errors.

I have the impression that the include paths are not correctly defined in your project.

Are you sure you generated code with TouchGFX Designer before compiling in Keil ?

Can you check your include paths in your project ?

/Alexandre