cancel
Showing results for 
Search instead for 
Did you mean: 

cubemx code generation issue

molnardavid84
Associate II
Posted on April 11, 2016 at 10:56

Hi,

I'm developing some application with STM32L4 uC, cubeMX and truestudio.Unfortunately after some modification  cubeMX do not generate compile-able code. I dig into the problem and found out that if I go into the .cproject file and revert the following line to the original the compile will be successfull.

before:

<sourceEntries>

<entry flags=''VALUE_WORKSPACE_PATH|RESOLVED'' kind=''sourcePath'' name=''''/>

</sourceEntries>

after:

<sourceEntries><entry flags=''VALUE_WORKSPACE_PATH|RESOLVED'' kind=''sourcePath'' name=''Src'' /><entry flags=''VALUE_WORKSPACE_PATH|RESOLVED'' kind=''sourcePath'' name=''Inc'' />

Can somebody help me about this?

Thank you in advance, 

Dave

#cubemx-stm32-truestudio
9 REPLIES 9
Nesrine M_O
Lead II
Posted on April 11, 2016 at 11:49

Hi Dave,

Could you precise which CubeMX version are you using? If you are using an old version try to use the latest (4.14).

Please let us know if the issue still exist with the last version.

-Syrine-

molnardavid84
Associate II
Posted on April 11, 2016 at 11:53

Hi Syrine,

Thank you for your answer

cubeMx about box:

version 4.14.0 

STM32Cube V1.0

Nesrine M_O
Lead II
Posted on April 11, 2016 at 12:17

Hi Dave,

I will report this issue to our CUBEMX team for checking, thank you for highlighting it, and Sorry for the inconvenience it may bring.

-Syrine-

molnardavid84
Associate II
Posted on April 11, 2016 at 12:44

Thank you for your help.

Just to summarize it for others.

SOLUTION

revert the sourceEntries to this in .cproject file

{CODE()}

<sourceEntries>

<entry flags=''VALUE_WORKSPACE_PATH|RESOLVED'' kind=''sourcePath'' name=''''/>

</sourceEntries>

{CODE}

valentin
Senior
Posted on April 12, 2016 at 05:30

Thanks for sharing this. I'm experiencing strange problems as well right now ...

I hope, any of this feedback is of help for the debugging of CubeMX.

Good things first:

I love that now finally the Src and Inc folders are linked properly in the truestudio project so that additional files show up.

Bad things:

It seems as if the most recent CubeMX version introduced some problems. Debugging crashes from time to time or TrueStudio starts complaining about Reset_Handler not being defined.

Right now, I have to completely delete the TrueStudio project folder, then generate the code using CubeMX and then manually copy the Src and Inc folders back into the project.

After importing the project into TrueStudio and setting everything up again (change to C99, disable optimization), the program compiles and runs fine.

If I regenerate the code, the program won't compile any more and complains about Reset_Handler not being defined.

One oddity I noticed was in the linker script (using an F373R8 uC). The linker script defines RAM size as 16K although the datasheet says it's 32K - maybe that's part of the problem?

molnardavid84
Associate II
Posted on April 12, 2016 at 09:50

Agree

The first noticed problem was the reset handler for me too. I have checked the linker script. I have 128K and 96K defined. Strange but not a fatal issue.

Try my solution above lets see if it is working for you.

stm32cube-t
Senior III
Posted on April 12, 2016 at 15:38

Hello David,

Can you please check the following options when generating for Atollic:

- generate w/ option to generate under root ''checked'' (new with MX 4.14)

- generate w/ option to generate under root ''unchecked'' (same generation as MX 4.13 and prior)

and confirm one of the option works for you.

Thank you
molnardavid84
Associate II
Posted on April 12, 2016 at 17:48

Hi,

Generate under root is checked the error occurs.

If I uncheck Generate under root than I can compile my project successfully. Looks like this solved my problem. Tomorrow I will use cubeMX code generation this way and continue testing.

Dave

valentin
Senior
Posted on April 18, 2016 at 01:45

Interesting. I selected generate under root as well.

I'll try without!