Skip to main content
Lead II
July 10, 2025
Solved

Need help with creating Board Setup file (.tpa)

  • July 10, 2025
  • 5 replies
  • 817 views

I have a custom board. Right now we have a "template project" which is mostly a stripped project and we have a customer project. We periodically merge some changes between them. Instead of copying the template project and modifying it I would like to be able to use it as a board in TouchGFX designer directly. This will be important when we will use the board for more than 1 customer.

I followed the instructions, but the board doesn't show up.

I followed these instructions: https://support.touchgfx.com/docs/development/scenarios/scenarios-create-at

I stripped the project.

My project structure is:

C:\source\company\company-stm32-touchgfx-hmi-bsp
C:\source\company\company-stm32-touchgfx-hmi-bsp\.git
C:\source\company\company-stm32-touchgfx-hmi-bsp\Doc
C:\source\company\company-stm32-touchgfx-hmi-bsp\Source\Middlewares
C:\source\company\company-stm32-touchgfx-hmi-bsp\Source\TouchGFX
C:\source\company\company-stm32-touchgfx-hmi-bsp\Source\TouchGFX\company-STM32-TouchGFX-HMI-BSP.touchgfx

I closed TouchGFX Designer

In TouchGFX environment terminal:

cd "C:\source\company\company-stm32-touchgfx-hmi-bsp"
/c/TouchGFX/4.25.0/designer/tgfx.exe pack -d Source
company-STM32-TouchGFX-HMI-BSP.zip is created
MyApplication.json is created

add some details to MyApplication.json
leave PathToDotTouchGFX empty as TouchGFX is in the root of the projectfolder

/c/TouchGFX/4.25.0/designer/tgfx.exe pack -rc -d Source

rename MyApplication-1.0.0.tpa to company-STM32-TouchGFX-HMI-BSP-1.0.0.tpa
moved company-STM32-TouchGFX-HMI-BSP-1.0.0.tpa to C:\TouchGFX\4.25.0\app\packages

 Opening TouchGFX Designer doesn't show the board under partners.

 

Best answer by unsigned_char_array

I was able to get it to work.

  • git clean -fdx (to remove build artifacts and other untracked files)

  • Open TouchGFX environment terminal

  • cd to parent directory

  • /c/TouchGFX/4.25.0/designer/tgfx.exe pack -d project_name

  • add some details to project_name.json: 

  • "PathToDotTouchGFX": "TouchGFX",

  • "Type": "TGAT"

  • remove .git folder from zip and other files you want to remove (I remove some documentation)

  • /c/TouchGFX/4.25.0/designer/tgfx.exe pack -rc --version=1.1.1 -d project_name

  • copy tpa file to C:\TouchGFX\4.25.0\app\packages

 

Only issue I have now is that I'm trying to run some TouchGFX demo's and they are not all working:

  • Elevator Demo: both simulator and target had artifacts (things rotated or skewed) unless I disabled dither or rotate screen 90 degrees (in that case part of the demo falls outside the screen and is not fully visible. It is also very slow and some glitches happen occasionally.
  • Flash-limited E-bike demo. It's too large unless I remove Chinese. But then it does build but I get hart-faults.

5 replies

Lead II
July 11, 2025

I discovered that adding or modifying boards in C:\Users\USERNAME\AppData\Roaming\TouchGFX-4.25.0\Downloads did work.

Instead of generating a  .tpa file I tried to modify an existing one. Those files are just zip files renamed. I modified the existing Simulator .tpa file by changing vendor name and it still showed up under a different vendor. I renamed it to Simulator2 added some random files. On problem is that if I add a custom image the image won't show up. Only if I manually copy the image to the C:\Users\USERNAME\AppData\Roaming\TouchGFX-4.25.0\Downloads folder and rename it to thumbnail.png.

Additionally I get an error when I try generating a project with it: "Download of Simulator2 failed".

Here is my package.json file:

{
 "Meta": {
 "Url": "C:\\TouchGFX\\4.25.0\\app\\packages\\Simulator.zip",
 "MD5sum": "EDFFB435236C401429CA7AE0898CFF3E",
 "Size": 57869,
 "Author": [
 {
 "Name": "John Doe",
 "Contact": "",
 "URL": ""
 }
 ],
 "LicenseUrl": "",
 "Copyright": "",
 "TouchGFXVersion": {
 "Major": 4,
 "Minor": 25,
 "Build": 0
 },
 "CreatedAt": "2018-09-26T00:00:00Z",
 "PathToDotTouchGFX": "TouchGFX",
 "EmbeddedOs": "Windows"
 },
 "Data": {
 "Version": {
 "Major": 1,
 "Minor": 0,
 "Build": 1
 },
 "Name": "Simulator2",
 "HumanFriendlyName": "Simulator2",
 "BoardName": "PC",
 "Type": "TGAT",
 "Vendor": "company",
 "Description": "The simulator runs exclusively on your PC without the need for any embedded target.\nUse the simulator for prototyping applications, when your hardware is not available, or for evaluating TouchGFX.\nAny display resolution and any color depth can be chosen.\nThe simulator supports a GCC and a Visual Studio™ based build.",
 "DocumentationLink": "",
 "Category": "",
 "Images": [
 "C:\\TouchGFX\\4.25.0\\app\\packages\\Simulator.png"
 ],
 "Tags": [],
 "AvailableResolutions": [ 
 {
 "Height": 600,
 "Width": 1024
 }],
 "TargetBpp": [
 16
 ]
 }
}

 

If I run the package tool it overwrites my json file and changes the version. The tool does many renames by default. Such as naming files MyApplication by default. It's really confusing. There are no error messages and there are no real-world examples.

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
GaetanGodart
Technical Moderator
July 14, 2025

Hello @unsigned_char_array ,

 

To see the new TPA in your TouchGFX Designer, I think your TPA must be added to touchgfx\app\packages where touchgfx is your local installation.

 

Regards,

Lead II
July 14, 2025

@GaetanGodart wrote:

Hello @unsigned_char_array ,

 

To see the new TPA in your TouchGFX Designer, I think your TPA must be added to touchgfx\app\packages where touchgfx is your local installation.

 

Regards,


I did.
I moved it to 

C:\TouchGFX\4.25.0\app\packages

But it didn't work. I didn't get any error message, so I don't know why TouchGFX is not seeing the file (I think it does see the file, but it failed to parse it or something). 

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
Osman SOYKURT
Technical Moderator
July 22, 2025

Hello @unsigned_char_array , 

The only field that needs to be changed are the one specified in the https://support.touchgfx.com/docs/development/scenarios/scenarios-create-at . Therefore the fact that it overwrites some of your changes it's not surprising. The Url field should also be auto filed after running the first command 

tgfx.exe pack -d

 

Osman SOYKURTST Software Developer | TouchGFX
Osman SOYKURT
Technical Moderator
August 5, 2025

Hello,
If in your JSON you have set the Type to "TGAT", then the custom TBS should appear in the 'Create' window in TouchGFX Designer.
I can test that for you on my side if you send me your .tpa file.

Osman SOYKURTST Software Developer | TouchGFX
Lead II
August 6, 2025

I'm making progress. I found I accidentally inserted a space after TGAT (I'm sure I did not make this mistake before, but it wasn't working then for other reasons I guess). The board is now visible, but it only allows creating it for simulator. I'm doing more experiments. If I don't figure it out I'll send you the file.

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
Osman SOYKURT
Technical Moderator
August 6, 2025

Hello @unsigned_char_array ,

Super, you're almost there :)
Do you mean only run on simulator works? If so, make sure you have the right build configuration in the Config panel as well as the GCC folder with the makefile and related files.

Osman SOYKURTST Software Developer | TouchGFX
Osman SOYKURT
Technical Moderator
September 2, 2025

Hello @unsigned_char_array ,

Have you been able to progress on the topic? Can you run on target from your custom tpa?

Osman SOYKURTST Software Developer | TouchGFX
unsigned_char_arrayAuthorBest answer
Lead II
September 23, 2025

I was able to get it to work.

  • git clean -fdx (to remove build artifacts and other untracked files)

  • Open TouchGFX environment terminal

  • cd to parent directory

  • /c/TouchGFX/4.25.0/designer/tgfx.exe pack -d project_name

  • add some details to project_name.json: 

  • "PathToDotTouchGFX": "TouchGFX",

  • "Type": "TGAT"

  • remove .git folder from zip and other files you want to remove (I remove some documentation)

  • /c/TouchGFX/4.25.0/designer/tgfx.exe pack -rc --version=1.1.1 -d project_name

  • copy tpa file to C:\TouchGFX\4.25.0\app\packages

 

Only issue I have now is that I'm trying to run some TouchGFX demo's and they are not all working:

  • Elevator Demo: both simulator and target had artifacts (things rotated or skewed) unless I disabled dither or rotate screen 90 degrees (in that case part of the demo falls outside the screen and is not fully visible. It is also very slow and some glitches happen occasionally.
  • Flash-limited E-bike demo. It's too large unless I remove Chinese. But then it does build but I get hart-faults.
"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
Osman SOYKURT
Technical Moderator
October 9, 2025

Great to hear! Looks like your original issue is resolved. And thank you for sharing the procedure to others in the community :)

Osman SOYKURTST Software Developer | TouchGFX
Lead II
October 9, 2025

Do you know what can be the issue with Elevator Demo?

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."