Atollic C++ implementation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-22 4:20 AM
Hello Mr./Ms.
I need to implement some libraries e.g. Arduino or other open source code.
So I tried to import in Atollic a C++ librarie but returns an error when I instance a class.
It's possible to do that or only C moddules are supported?
I generate code using CubeMx tool.
Thanks in advance
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-22 6:21 AM
I thought Atollic used GCC ?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-22 6:28 AM
Last time I checked CubeMx was C only.
Atollic (and gcc) surely do support C++, and C++ projects.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-22 7:24 AM
Compiled libraries for Arduino - often have code for floating point double precision in emulation mode on eight-bit arithmetic. This is an abundance of macros that are simply not visible to the user. Using one variable in floating point mode - instantly includes the entire set of obscurantism from prehistoric dinosaurs. Do you really need it?
And further. Limit the use of compiled libraries of others in your projects. This will limit you to a lot of subtle problems.
For example, the most childish problem is switching the type of processor core in the macro body.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-22 7:34 AM
@AVI-crak - As @diego ambroggi spoke of "open source", I had assumed he was talking about source code.
But, yes - using ready-compiled libraries would raise issues of configuration, dependencies, etc.
@diego ambroggi - perhaps you could be more specific about what "error" you got - and what, exactly, you were doing to provoke it?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-22 11:13 PM
Hello everyone,
Yes Atollic use GCC compiler, is one of the options provided by CubeMx code generator.
Compiler error is simply due to "calss" call not recognized.
I tried to import an SPI EEPROM library from Arduino repository.
So, I can extrapolate individually functions but I think C++ libraries are powerfull.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-23 12:49 AM
That still doesn't tell us what "error", exactly, you got - and what, exactly, you were doing to provoke it.
So it doesn't help to resolve the issue.
You need to show the relevant part of the source code, and the full text of the error message.
Use copy & paste.
Use the 'Code Snippet' button for source code:
Have you told the compiler to compile as C++ ?
Usually, the source file extension - .c or .cpp - will select 'C' or C++ mode, but can be overridden by options...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-23 1:39 AM
Hello Andrew
I imported Arduino EEPROM_CAT25 files (.cpp .h) and I tried to instance EEPROM_CAT25 object.
Error is shown in jpeg file attached
Thanks in advance
Diego
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-23 1:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-10-23 1:46 AM
As I said, the .c extension on main.c tells the compiler to compile is as 'C' - not C++
Clearly, the 'class' keyword is not valid in 'C' !
If you're going to have part of your project in 'C', and part in C++, I think it's generally recommended to make your 'main' a C++ file.
This is general - not specific to STM32 or GCC.
A complex system designed from scratch never works and cannot be patched up to make it work.
