cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX 4.24.0 Custom Board Failed Generate Code

ButterDeco
Associate II

Generating Code in Post Generate Target step failed, 

ButterDeco_0-1721815653985.png

 


I'm making custom board project using STM34F411E-DISCO board and LCD with SPI 1 connectivity, after configure board in STM32CubeMX ver 6.12 --> Generate Code --> add TouchGFX_DataTransfer.c and .h library --> open the project in TouchGFX, I put box in my screen, and tried to generate code to test configuration and got failed massage when generate the code. here the failed massage:

Generate Code
    Generate
        Done
    Generate Assets
        make -f simulator/gcc/Makefile assets -j8
        Reading ./application.config
        Reading ./target.config
        Done
    Post Generate
        touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
        Done
    Post Generate Target
        touchgfx update_project
        D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx/generators/keil_project_updater.rb:313:in `check_compiler_options': undefined method `text' for nil:NilClass (NoMethodError)
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx/generators/keil_project_updater.rb:35:in `run'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx/generators/cubemx_project_selector.rb:106:in `run'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx/generators/update_project.rb:115:in `run'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx/cli/inside.rb:48:in `update_project'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx.rb:16:in `<module:CLI>'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx.rb:9:in `<module:TouchGFX>'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/lib/touchgfx.rb:8:in `<top (required)>'
        	from <internal:D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        	from <internal:D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/lib/ruby/gems/3.0.0/gems/touchgfx-cli-4.24.0/bin/touchgfx:6:in `<top (required)>'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/bin/touchgfx:23:in `load'
        	from D:/TouchGFX/4.24.0/env/MinGW/msys/1.0/Ruby30-x64/bin/touchgfx:23:in `<main>'
        Failed
    Failed
​


The project I copied from GitHub Work just fine, here the link:
https://github.com/controllerstech/STM32/tree/master/TOUCH%20GFX/ILI9341%20SPI


I tried to configure TouchGFX + Keil V5 with compiler ARMCLANG v6.22.
ButterDeco_1-1721816152362.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @ButterDeco ,

It seems like the structure of your Keil project is causing the issue. Would you please open the .uvprojx in an editor and ensure that vShortEn is set to 1 under Project->Targets->TargetOption->TargetArmAds->Cads->vShortEn?

If it doesn't help, please share your project.

Best regards,

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

7 REPLIES 7

Hello @ButterDeco ,

It seems like the structure of your Keil project is causing the issue. Would you please open the .uvprojx in an editor and ensure that vShortEn is set to 1 under Project->Targets->TargetOption->TargetArmAds->Cads->vShortEn?

If it doesn't help, please share your project.

Best regards,

Mohammad MORADI
ST Software Developer | TouchGFX
ButterDeco
Associate II

Hi @Mohammad MORADI ESFAHANIASL,

Thank you for responding my question! I've search for vShortEn but I can't seem to find it. following your instruction I should open my project in keil uVision, I tried open options for target bud don't find Target Arm Ads. Am I doing this right?

ButterDeco_0-1722486448362.png

 

No, I meant opening your Keil project in a code editor 

vShortEn.png

Mohammad MORADI
ST Software Developer | TouchGFX

Hi @Mohammad MORADI ESFAHANIASL,

Thank you! now I can successfully generated code in my Touch FX, much appreciate! now I run to a problem when build code in keil v5, the GitHub program above can run just fine without this kind of error, is it because my keil's project structure again? I haven't add any code after generate code from touchGFX. my hypotheses the problem from linker that generated from touch GFX.  

Build started: Project: Step1
*** Using Compiler 'V6.22', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'Step1'
compiling main.c...
compiling stm32f4xx_it.c...
compiling stm32f4xx_hal_msp.c...
compiling stm32f4xx_hal_timebase_tim.c...
compiling TouchGFXHAL.cpp...
../TouchGFX/target/TouchGFXHAL.cpp(41): warning: "A user must call touchgfx::startNewTransfer(); once touchgfxDisplayDriverTransmitBlock() has succesfully sent a block." [-W#warnings]
   41 | #warning "A user must call touchgfx::startNewTransfer(); once touchgfxDisplayDriverTransmitBlock() has succesfully sent a block."
      |  ^
../TouchGFX/target/TouchGFXHAL.cpp(42): warning: "A user must implement C-methods touchgfxDisplayDriverTransmitActive() and touchgfxDisplayDriverTransmitBlock() used by the Partial Framebuffer Strategy." [-W#warnings]
   42 | #warning "A user must implement C-methods touchgfxDisplayDriverTransmitActive() and touchgfxDisplayDriverTransmitBlock() used by the Partial Framebuffer Strategy."
      |  ^
2 warnings generated.
compiling STM32TouchController.cpp...
compiling TouchGFXGPIO.cpp...
compiling TouchGFXConfiguration.cpp...
compiling TouchGFXGeneratedHAL.cpp...
compiling STM32DMA.cpp...
compiling OSWrappers.cpp...
compiling app_touchgfx.c...
compiling system_stm32f4xx.c...
compiling stm32f4xx_hal_crc.c...
compiling stm32f4xx_hal_rcc.c...
compiling stm32f4xx_hal_rcc_ex.c...
compiling stm32f4xx_hal_flash.c...
compiling stm32f4xx_hal_flash_ex.c...
compiling stm32f4xx_hal_flash_ramfunc.c...
compiling stm32f4xx_hal_gpio.c...
compiling stm32f4xx_hal_dma_ex.c...
compiling stm32f4xx_hal_dma.c...
compiling stm32f4xx_hal_pwr.c...
compiling stm32f4xx_hal_pwr_ex.c...
compiling stm32f4xx_hal_cortex.c...
compiling stm32f4xx_hal.c...
compiling stm32f4xx_hal_exti.c...
compiling stm32f4xx_hal_spi.c...
compiling stm32f4xx_hal_tim.c...
compiling stm32f4xx_hal_tim_ex.c...
compiling FrontendApplication.cpp...
compiling Model.cpp...
compiling Screen1Presenter.cpp...
compiling Screen1View.cpp...
compiling ApplicationFontProvider.cpp...
compiling BitmapDatabase.cpp...
compiling CachedFont.cpp...
compiling Font_verdana_10_4bpp_0.cpp...
compiling Font_verdana_20_4bpp_0.cpp...
compiling Font_verdana_40_4bpp_0.cpp...
compiling FontCache.cpp...
compiling FrontendApplicationBase.cpp...
compiling GeneratedFont.cpp...
compiling Kerning_verdana_10_4bpp.cpp...
compiling Kerning_verdana_20_4bpp.cpp...
compiling Kerning_verdana_40_4bpp.cpp...
compiling LanguageGb.cpp...
compiling Screen1ViewBase.cpp...
compiling SVGDatabase.cpp...
compiling Table_verdana_10_4bpp.cpp...
compiling Table_verdana_20_4bpp.cpp...
compiling Table_verdana_40_4bpp.cpp...
compiling Texts.cpp...
compiling TypedTextDatabase.cpp...
compiling UnmappedDataFont.cpp...
compiling VectorFontRendererBuffers.cpp...
linking...
Step1\Step1.axf: Error: L6218E: Undefined symbol touchgfxDisplayDriverTransmitActive (referred from touchgfxgeneratedhal.o).
Step1\Step1.axf: Error: L6218E: Undefined symbol touchgfxDisplayDriverTransmitBlock (referred from touchgfxgeneratedhal.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 2 error messages.
"Step1\Step1.axf" - 2 Error(s), 2 Warning(s).
Target not created.

 

Hey @ButterDeco,

I'm glad that the code generation works now  

Regarding the other error, could you please clean your project first (from the top menu: Project -> Clean Targets) and compile again? If the error persists, delete the generated folder in your TouchGFX project directory, and regenerate the code again through the TouchGFX designer, and then compile again from Keil.

See if that helps

Mohammad MORADI
ST Software Developer | TouchGFX

You are life saver! @Mohammad MORADI ESFAHANIASL 

thank you so much! I can build the program without error now! 

Thank you so much for your kind words 

Great to hear the project can be built now.

Good luck!

Mohammad MORADI
ST Software Developer | TouchGFX