cancel
Showing results for 
Search instead for 
Did you mean: 

Why does TD fail to build sample projects (displays 'Error during code generation)'? I think it's a bug!

NReyn.11
Associate

Sometimes creating a new project fails to build via TouchGFX Designer.

Steps to reproduce:

1. Launch TouchGFX Designer

2. Open notifications via 'Detailed log' button

3. Create a new project in TouchGFX Designer (use STM32F746G-DISCO board and TextureMapper compatible sample

4. Watch the output in the notification window and the following occurs:

- make -f simulator/gcc/Makefile assets -j10

- touchgfx update_project --project-file=../EWARM/STM32F746G-DISCO.ewp --gui-group-name=Application/User/TouchGFX/gui --generated-group-name=Application/User/TouchGFX/generated && touchgfx update_project --project-file=simulator/msvs/Application.vcxproj && ruby updateMXProj.rb

- Post Generate Error <- No clues are provided in output logs

5. Open MINGW32 to try to find out why the command failed:

- cd to the project folder

- repeat the failing command ('touchgfx update_project --project-file=../EWARM/STM32F746G-DISCO.ewp' etc)

- See output:

>>> $ touchgfx update_project --project-file=../EWARM/STM32F746G-DISCO.ewp --gui-group-name=Application/User/TouchGFX/gui --generated-group-nam

e=Application/User/TouchGFX/generated && touchgfx update_project --project-file=simulator/msvs/Application.vcxproj && ruby updateMXProj.rb

C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/iar_project_updater.rb:144:in `read': No such file or directory - ../EWARM/STM32F746G-DISCO.ewp (Errno::ENOENT)

    from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/iar_project_updater.rb:144:in `project_file_contents'

    from C:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/generators/iar_project_updater.rb:148:in `project_file_xml'

See the error: 'No such file or directory - ../EWARM/STM32F746G-DISCO.ewp'

6. Check the file system and sure enough, that file doesn't exist.

7. Copying the file '<project-name>.ewp in the EWARM folder to 'STM32F746G-DISCO.ewp' fixes the problem and allows the project code to be generated and built!

It looks like there's some sort of misuse of filenames or error creating the EMWARM/ewp files when instantiating a new project from samples or conflict bewteen TouchGFX Designer and the commands used to generate code, but it oddly doesn't always fail.

I've also experienced a problem where trying to create a new UI after editing an original one, where the edited version of the original UI would'nt load again with TD displaying an error indicating that the file is corrupt.

1 REPLY 1
YKim.11
Associate

Hello Martin​,

Thank you very much to the solution to the question.

It worked fine as you suggested  

after modifying it in the config Tab.

​But what does "V3" mean in Application Template?

(TouchGFX 4.13.0)

Would you let me know it ?

0693W000000Vj6zQAC.png