cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Generator 4.20.0 throws away user code in target directory

awiernie
Senior II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Yoann KLEIN
ST Employee

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

View solution in original post

4 REPLIES 4
awiernie
Senior II

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

MM..1
Chief II

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
ST Employee

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

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.