cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple problems with autogenerated code

Miloš
Associate II

Dear ST, please help me resolve these issues. Here are the details:

1. I create an app in GFX with some widgets that use images. The board is https://riverdi.com/product/7-inch-lcd-display-stm32h7-rvt70hssnwn00/

I program it from GFX and everything looks correct.

2. Open .project in IDE and run from there, the images are messed up as seen on screenshot. Edit: If I then reprogram from GFX everything looks fine again.

3. Open ioc

a) I am presented with option to migrate or continue, I think I tried both with similar outcome but cant be sure.

b) I am told that I am missing a package (this is a new one for me, I think it is because I installed latest GFX version 4.21.4). I think this GFX package is not available to install from the manager.

4. Generate code - I get a warning about clock not being configured, frankly not sure how to fix that but I saw on YT some examples where people ignore this warning.

5. After code has been generated, a large number of files are changed (tracking via git client) with some major problems

   a) the following lines are missing from freertos.c

volatile uint8_t TouchINT_irq = 0;

extern volatile uint8_t TouchINT;

int32_t X_touch;

int32_t Y_touch;

I assume they should have been placed in the USER code section by GFX, that way they would survive the code re-generation

   b) a bunch of files in target\generated\ were deleted (see screenshot)

   c) main.c was modified (screenshot) : app_touchgfx.h was removed from include and init calls to

 MX_TouchGFX_Init(); 

 MX_TouchGFX_PreOSInit();   

   d) makefiles were modified and paths to TouchGFX were removed so app_touchgfx.h cant be found anymore

   e) qspi.c and .h cant be compiled because of errors

   I have to revert all of the above to the version created by GFX.

   However that is not enough because the makefiles are autogenerated and restoring them doesnt help, the path to TouchGFX probably has to be added somewhere else.

   Previously I have managed to somehow restore the code so that it was compilable from IDE but either the new version changed something else or I forgot how. But, even then when I compiled it the screen was dark due to who knows what. I was going to test that further but now I am stuck due to the paths and have no willpower to try anything else.

2 REPLIES 2
DrBob
Associate II

I am having the same issue.  After generating code from the CubeIDE, I get the same errors as you.  The clock issue is easy to fix.  From the IOC editor, select the "Clock Configuration" tab on top.  Then click "Resolve Clock Issues".  That should do it.  Hoping someone can help us out.

Dadigno
Associate III

 

I'm also experiencing a similar issue: when I make any changes to software packs other than X-CUBE-TOUCHGFX, the MX_TouchGFX_Init() function call is no longer invoked in the app_azure_rtos.c file, preventing TouchGFX initialization. The only workaround I've found so far is the following:

  • Uncheck Graphics Application in the X-CUBE-TOUCHGFX software pack.
  • Generate code using STM32CubeMX.
  • Check Graphics Application again.
  • Regenerate code.

Upon performing these steps, the MX_TouchGFX_Init() function call is magically restored, and TouchGFX initialization resumes functioning correctly. I believe this is a troublesome bug within STMCubeMX.