cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Application/UI Template Generation

Vicente Inostroza
Associate II

Hi.

Using TouchGFX 4.15.0, I've run into three issues related to Template packing/generation.

First Issue is that, following the information available at the Creating Application Templates, I was not able to successfully execute the process at all.

To test the procedure, I started with a TouchGFX-Designer generated project based of a Discovery board Application and simple UI Templeta

After running tgfx.exe to generate the initial .zip file and .json manifest, the .zip file is created, but then tgfx.exe fails as follows:

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: input
   at System.Version.Parse(String input)
   at System.Version..ctor(String version)
   at TouchGFXPackages.Implementation.CreateTouchGFXPackage.GetTgfxVersion()
   at TouchGFXPackages.Implementation.CreateTouchGFXPackage.GetPackageUrl()
   at TouchGFXPackages.Implementation.CreateTouchGFXPackage.CreateMetaData()
   at TouchGFXPackages.Implementation.CreateTouchGFXPackage.CreateTgfxJsonPackage()
   at TouchGFXDesignerCLI.Commands.Pack.PackExecutor.Create()
   at TouchGFXDesignerCLI.Commands.Pack.PackExecutor.Run()
   at TouchGFXDesignerCLI.Commands.Pack.PackCommand.Run(String[] remainingArguments)
   at ManyConsole.ConsoleCommandDispatcher.DispatchCommand(IEnumerable`1 commands, String[] arguments, TextWriter consoleOut, Boolean skipExeInExpectedUsage)
   at TouchGFXDesignerCLI.Program.Main(String[] args)
Signal 67

To bypass this and generate a full application package, I opted to use TGFX 4.13.0 instead. With this I was able to generate a complete Application Template which I added to both TGFX 4.13.0 and 4.15.0.

The second issue is that the Application Template can't be used on TouchGFX Designer (either version). While it is detected in both, when tryin to generate the project the Designer fails with a "Downloading Application template failed, check your internet connection and try again".

This happens both with TGFX-Designer 4.13.0 and 4.15.0.

Third issue is that for UI Template generation I've not been able to find definite information on the online documentation.

However, Testing around I was able to generate a UI Template by changing the Type value from TGAT to TGUI on the .json manifest before packaging the .tpa file.

For this I wanted confirmation that this is the intended procedure, or if more changes are required to the json file to have a proper UI Template package.

Thank you and regards.

2 REPLIES 2
Romain DIELEMAN
ST Employee

Hi,

I have created with success an application template with TouchGFX 4.15 yesterday following the procedure in the documentation. So I am surprised by your issue :grinning_face_with_sweat: . Could you share your project to see if I can replicate it? Are you using the TouchGFX 4.15 Environment?

For the UI template generation, I do not know how to do it myself unfortunately but your process does seem logical. If it generates errors you could share a UI example/demo/template in a different way : what I often do is to create the UI using the simulator (instead of an application template of a baord). Users can then create a project with the application template they want, create the project and then import the UI project. This means that you need to share a touchGFX project instead of having it available directly from Designer.

/Romain

cs
Associate II

Hi Romain,

I encouter the same error with TouchGFX 4.16.1. In fact, pack and validate functions always throw exceptions whatever I tried.

I ran it within 4.16.1 environment.

$ /k/TouchGFX/4.16.1/designer/tgfx.exe pack -d tgfx_exe_test
 
Executing pack (Packs up the TouchGFX application):
 
Found k:\TouchGFXProjects\tgfx_exe_test\TouchGFX\tgfx_exe_test.touchgfx
Created tgfx_exe_test.zip
 
Exception non gérée : System.ArgumentNullException: La valeur ne peut pas être null.
Nom du paramètre : input
   à System.Version.Parse(String input)
   à System.Version..ctor(String version)
   à TouchGFXPackages.Implementation.CreateTouchGFXPackage.GetTgfxVersion()
   à TouchGFXPackages.Implementation.CreateTouchGFXPackage.GetPackageUrl()
   à TouchGFXPackages.Implementation.CreateTouchGFXPackage.CreateMetaData()
   à TouchGFXPackages.Implementation.CreateTouchGFXPackage.CreateTgfxJsonPackage()
   à TouchGFXDesignerCLI.Commands.Pack.PackExecutor.Create()
   à TouchGFXDesignerCLI.Commands.Pack.PackExecutor.Run()
   à TouchGFXDesignerCLI.Commands.Pack.PackCommand.Run(String[] remainingArguments)
   à ManyConsole.ConsoleCommandDispatcher.DispatchCommand(IEnumerable`1 commands, String[] arguments, TextWriter consoleOut, Boolean skipExeInExpectedUsage)
   à TouchGFXDesignerCLI.Program.Main(String[] args)
Signal 67

And also:

$ /k/TouchGFX/4.16.1/designer/tgfx.exe validate -d MyPartialBufferReference -t TGAT
 
Executing validate (Validates a directory before packing):
 
System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
   à Validator.PackageValidation.PackageValidatorBase..ctor(DirectoryInfo workDirectory, String typeStr)
   à Validator.PackageValidation.ApplicationTemplatePackageValidator..ctor(DirectoryInfo WorkDirectory)
   à Validator.PackageValidation.TouchGFXPackageValidator.Validate(PackageType type, DirectoryInfo dir, IApplicationNotifier notifier)
   à Validator.PackageValidation.TouchGFXPackageValidator.Validate(String type, DirectoryInfo dir, IApplicationNotifier notifier)
   à TouchGFXDesignerCLI.Commands.Validate.ValidateExecutor.Execute(String projectPath, String type)
   à TouchGFXDesignerCLI.Commands.Validate.ValidateCommand.Run(String[] remainingArguments)

The last one was the result of a validation of an application generated by TouchFX designer itself

Can you have a look on these issues?

Thanks and regards,

Christian Schoffit