Skip to main content
awiernie
Associate III
Jul 14, 2022 4:08 PM UTC
Solved

TouchGFX Generator 4.20.0 throws away user code in target directory

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.
Yoann KLEIN
Yoann KLEINBest answer
ST Employee
Jul 15, 2022 9:54 AM UTC

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

4 replies

awiernie
awiernieAuthor
Associate III
Jul 14, 2022 4:20 PM UTC

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
Jul 14, 2022 5:43 PM UTC

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
Jul 15, 2022 9:54 AM UTC

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
Jul 15, 2022 12:28 PM UTC

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.