Skip to main content
Benjamin Brammer
Senior II
November 26, 2018
Solved

Cube MX Code Generation for TrueStudio not generating project files

  • November 26, 2018
  • 4 replies
  • 3017 views

Hey guys,

I have a very big problem. For a reason I don't understand, my CubeMX project which worked really fine and had no problem at all did now get the following error as I was regenerating code (I did this a hundreds of times without problem but since last thursday I get this error) : "The code has successfully been generated under ... but STUDIOproject generation have a problem".

Since then my project is not working correctly anymore. For example my UART is not transmitting any data correctly but receiving. I tried to just save the project new and generate new code but the problem is the same and no TrueStudio project is generated.

I noticed that STM made an update for CubeMX (5.00) and so I installed it and updated all the firmware packages and migrated my project in hope that this might correct the error but nothing changed.

Now I don't know what to do. How do I get my project to work normal again? I also tried to make a new empty project with True Studio and just copy the generated files like my src and inc code and the driver folder. But when compilying, True Studio every time reports different errors of .h files it doesn't find..which are included in the ressource tab in the project setting.

I desperately need help with this, please!

best regards

Benjamin

This topic has been closed for replies.
Best answer by jeffz

I have seen same error before. the fix is, save the cube project as a new project and create new TrueStudio project. It works for me.

there are some details may help you and ST people:

I found the Cube V4.27 creates TrueStudio has different file structure as V4.25. this could be the reason of failure to create TrueStudio project file.

Another tip is, doesn't try newest Cube version because they are buggie! Use the one which you create your project successful.

Jeff

4 replies

Khouloud GARSI
Technical Moderator
November 26, 2018

Hi @Benjamin Brammer​ ,

I have forwarded your issue to our teams. One of our CubeMX experts will answer you ASAP.

Khouloud.

Benjamin Brammer
Senior II
November 26, 2018

Thx. For your fast support!

Khouloud GARSI
Technical Moderator
November 26, 2018

You're always welcome!

Nawres GHARBI
Technical Moderator
November 26, 2018

Hi @Benjamin Brammer​ 

Could you please attach your ioc and the log files please ?

Benjamin Brammer
Senior II
November 26, 2018

Hello!

where od I find the log files? But I culd also just send you the complete project including cubeMX files

Benjamin Brammer
Senior II
November 26, 2018

this was the last version where I got the error. And with this build my UART5 is not working anymore properly. I think because he just creates the source files but doesn't modify the TrueStudio project settings..

jeffz
jeffzAnswer
Associate II
November 26, 2018

I have seen same error before. the fix is, save the cube project as a new project and create new TrueStudio project. It works for me.

there are some details may help you and ST people:

I found the Cube V4.27 creates TrueStudio has different file structure as V4.25. this could be the reason of failure to create TrueStudio project file.

Another tip is, doesn't try newest Cube version because they are buggie! Use the one which you create your project successful.

Jeff

Benjamin Brammer
Senior II
November 27, 2018

Hey Jeffz,

thanks for your answer and suggestion. Although I did exactly try this the last week, as I wrote in my post, I tried it today again and it seem to work. The Code got generated correctly without an error. But still my UART5 is behaving strange. So the receive is working but the transmit is not. I will have to look into this more deeply. As I reported everything worked fine until this code generation bug. It is really strange since when I execute the HAL function for HAL_UART_Transmit() there is no bit pattern created on my oscilloscope. Just a constant high or low on tx and rx . Very strange...

Benni

Benjamin Brammer
Senior II
November 27, 2018

OK.. I don't understand the error yet, but it has something to do with the debug session. I tried to let my STM32 run without debugging and the UART works absolutely fine.

Might this happening because I wanted to use the SWV ? I activated it and got the problems since then.