Skip to main content
awiernie
Associate III
July 14, 2022
Solved

TouchGFX Generator 4.20.0 throws away user code in target directory

  • July 14, 2022
  • 4 replies
  • 1384 views

After upgrading from TouchGFX 4.19.1 to 4.20.0 the TouchController (and maybe also GPIO) does not work anymore.

The reason is, that now (after device configuration tool code generation or TouchGFX update) our user code in all files in the directory "target" disappeared. During migration it could be selected do keep the user code - the user code in main.c was kept.

Before:

/* USER CODE BEGIN STM32TouchController */

#include <STM32TouchController.hpp>

#include "touch.h"

extern I2C_HandleTypeDef hi2c3;

extern TS_Driver_t ts_driver;

TS_State_t state;

void STM32TouchController::init()

{

  /**

   * Initialize touch controller and driver

   *

   */

ts_driver.Init();

ts_driver.GetFWVersion(&hi2c3,state.fw_version);

ts_driver.GetModelName(&hi2c3,state.model_name);

}

----------------------------

Now:

/* USER CODE BEGIN STM32TouchController */

#include <STM32TouchController.hpp>

void STM32TouchController::init()

{

  /**

   * Initialize touch controller and driver

   *

   */

}

Is this a bug? How can this be fixed/avoided?

This topic has been closed for replies.
Best answer by Yoann KLEIN

Hello @awiernie​ ,

I know that there was some issues with file deletion with CubeMX 6.6.0.

0693W00000QLJwtQAH.png 

They just released version 6.6.1, can you try to regenerate with this one and let us know ?

Thank you,

/Yoann

4 replies

awiernie
awiernieAuthor
Associate III
July 14, 2022

If I replace the files with the older version, the files are rewritten if I build the project with the empty versiond.

MM..1
Super User
July 14, 2022

IDE 1.10.0 and MX 6.6.0 have this issue maybe latest solve this .

I on every upgrade touchgfx backup and erase target manualy.

After generate compare and solve diffs.

Yoann KLEIN
Yoann KLEINBest answer
ST Employee
July 15, 2022

Hello @awiernie​ ,

I know that there was some issues with file deletion with CubeMX 6.6.0.

0693W00000QLJwtQAH.png 

They just released version 6.6.1, can you try to regenerate with this one and let us know ?

Thank you,

/Yoann

Yoann KLEINST Software Developer | TouchGFX
awiernie
awiernieAuthor
Associate III
July 15, 2022

I had already installed 6.6.1, but I clicked continue (and not migrate):

0693W00000QLKXLQA5.pngNow I have migrated and the code was not erased - the TouchScreen works again.