2018-08-03 05:57 AM
Hello,
I am trying to convert a project generated by CubeMX to a C++ project in Atollic True Studio.
From various sources, I got hints how to do. I fail when trying to copy the symbols e.g. processor type to C++ because the input pane is missing. Here is in detail what I tried so far:
When I create a C++-Project directly using Atollic, there are entries for GNU C++ on both the includes and the symbols tab.
I tried to figure out what was the difference between both .project and .cproject files.
In both .project-files, the org.eclipse.cdt.core.ccnature is present
In the .cproject of the native Atollic-project, I see the entry for my symbol:
<tool id="com.atollic.truestudio.exe.debug.toolchain.gpp.165402641" name="C++ Compiler" superClass="com.atollic.truestudio.exe.debug.toolchain.gpp">
<option id="com.atollic.truestudio.gpp.symbols.defined.287854650" name="Defined symbols" superClass="com.atollic.truestudio.gpp.symbols.defined" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32H743xx"/>
</option>
In the project migrated from CubeMX, I see the same options, however they are populated with nonsense values and they seem to be ignored:
<tool id="com.atollic.truestudio.exe.debug.toolchain.gpp.981298185" name="C++ Compiler" superClass="com.atollic.truestudio.exe.debug.toolchain.gpp">
<option id="com.atollic.truestudio.gpp.symbols.defined.1619552487" name="Defined symbols" superClass="com.atollic.truestudio.gpp.symbols.defined" valueType="stringList">
<listOptionValue builtIn="false" value="STM32F10X_MD"/>
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
</option>
Does anyone has any clue why Atollic does neither display those values nor use the during compilation?
Best regards
Axel Jäger
2018-08-08 01:58 PM
They should make their way to command line defines for the compiler ie -DSTM32H743xx
Not familiar with Atollic, and whether this is the appropriate place for these, or under the next tab down for the "Preprocessor"
@ST Community Perhaps some ST-Atollic staff could respond to this
2018-08-10 12:19 AM
Hi,
at least for the projects generated by CubeMX, Symbols is the way to go as this is how they do it for plain C projects.
In the meantime, I went one step further: You already see in my post that for example the block for C++ looks different, i.e. valueType is "stringList" for the C++-block, whereas valueType is "definedSymbols" for the C-block. I tried to change this without success, however, just copying the C-block and change all gcc to gpp got me a working project. I further digged into this and found out that CubeMX generates this block already although this is not a C++ project and it looks like this block present confuses Atollic during the convert to C++ and later on.
So far I have not found out whether simply ommiting this block in the CubeMX-template would be sufficient to prevent this issue. If this was the case, this would be a fix that ST should definitely consider for the next release.
2018-10-21 09:05 PM
Hi,
To edit the symbols for the C++ language go to:
then copy the exact symbols from C Compiler.
After I did this my project compiled correctly.
I hope it helps.
Regards,
Andrés Cuaycal