cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with creating Board Setup file (.tpa)

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.

 

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.
8 REPLIES 8

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.

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,

Gaetan Godart
Software engineer at ST (TouchGFX)

@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.

Maybe you can help me. I tried to create a simple project, but it didn't work.
I also don't know what the "Url" parameter in the json file is for. Does it mean boards will always be uploaded? Or can you have a local board 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
ST Employee

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 SOYKURT
ST Software Developer | TouchGFX

I tried it again.

The board works.

But some things don't work.

  1. The version number in the json file is ignored. I set it to 2.0.0 but the generated package is 1.0.0 in the file name
  2. The image is ignored. I tried relative and absolute paths. Also paths with different slashes.
  3. the name of the board file is "MyApplication" for some reason. Even though that is not the board name.
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.

Hello @unsigned_char_array ,

1- To specify the version, you can use this extra option "--version=VALUE", for instance:

tgfx.exe pack -rc --version=3.0.0 -d MyApplication_23

 2- The image cannot be an image from your path unfortunately, you need to give a path from an image from internet.

3- This is not related to the packing procedure I believe. Can you open your .touchgfx and check what's in the field "Name" ?

 ...
"CustomContainerDefinitions": [],
"Name": "STM32N6570-DK",
"Resolution": {
"Width": 800,
"Height": 480
},
"SelectedColorDepth": 16,
...

 

Osman SOYKURT
ST Software Developer | TouchGFX

@Osman SOYKURT wrote:

The image cannot be an image from your path unfortunately, you need to give a path from an image from internet.


The image is hosted on a network drive mapped server. Path is something like:

 "file:///K:/path_to_image/image.png"

Why doesn't that work?

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.