Skip to main content
g. lewis
Associate III
April 10, 2018
Question

C++ IDE?

  • April 10, 2018
  • 14 replies
  • 4017 views
Posted on April 10, 2018 at 06:06

Anyone has ever tried to install and play with an C++ arduino oriented  IDE that uses arduino libraries but implemented for STM32 micros?

Have you ever heard of Sloeber?

http://eclipse.baeyens.it/

 

Seems interesting!

    This topic has been closed for replies.

    14 replies

    Antonio Vilei
    ST Employee
    April 10, 2018
    Posted on April 10, 2018 at 11:33

    Hi,

    there is a project called STM32duino that adds Arduino support for STM32 and some other ST components.

    Here is the

    https://github.com/stm32duino

    .

    The forum is here: 

    http://www.stm32duino.com/

    Best regards,

    Antonio

    Andrew Neil
    Super User
    April 10, 2018
    Posted on April 10, 2018 at 12:42

    But STM32 is now directly supported in the Arduino IDE:

    https://community.st.com/community/stm32-community/blog/2017/07/13/stm32-cores-enabled-in-arduino-ide

     
    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Antonio Vilei
    ST Employee
    April 10, 2018
    Posted on April 10, 2018 at 16:37

    Hi Andrew,

    you're absolutely right: STM32 is now supported in the Arduino IDE.

    STM32duino GitHub and forum are the places where you can find the source code and discuss details.

    Best regards,

    Antonio

    AvaTar
    Senior III
    April 10, 2018
    Posted on April 10, 2018 at 11:58

    Considering the Arduino target audience (or the average user), the expression 'C++ arduino' seems an oxymoron.

    Andrew Neil
    Super User
    April 10, 2018
    Posted on April 10, 2018 at 12:45

    Anyone has ever tried to install and play with an C++ arduino oriented  IDE that uses arduino libraries but implemented for STM32 micros?

    What do you see as the driver for doing that? What issue(s) would you want it to address?

    Have you ever heard of Sloeber?

    Not before you mentioned it!

    SO I had a quick look.

    There is no debug support for STM32.

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    g. lewis
    g. lewisAuthor
    Associate III
    April 11, 2018
    Posted on April 11, 2018 at 08:45

    Andrew Neil wrote:

    There is no debug support for STM32.

    That is the problem!

    Not an expert here. Wonder if So could help out on how to make it build locally or even better advise Jantje directly to set it up on his Github repository?

    https://github.com/jantje/hardware/issues/11

     
    Tesla DeLorean
    Guru
    April 10, 2018
    Posted on April 10, 2018 at 16:49

    You really shouldn't need other peoples approval or validation to try things that interest you.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Bogdan Golab
    Lead
    April 10, 2018
    Posted on April 10, 2018 at 17:07

    Using arduino means using arduino API (aimed to simplify / unify things). But arduino API have another API 'under the hood' (HAL, SPL).

    So in case when something goes wrong you have two software layers to investigate. Also the code is is bigger (as far as I remember arduino API has additional built-in checks to resolve some conflicts and make the API more fool-proof). Also advanced features might not always be possible to use due to interaction with the arduino API (I am not sure but suspect it).

    Initially the idea of using arduino is tempting (theoretically no need to dig into the datasheets). Maybe worth trying just to see the difference.

    As usual it depends on what is the goal to achieve, or project to create.

    g. lewis
    g. lewisAuthor
    Associate III
    April 10, 2018
    Posted on April 10, 2018 at 19:07

    Hi Andrew,

    No just curious about this new implementation on C++ for eclipse and asking why C++ has not been used as standard for developping STM32 libraries which seems so convenient to write code...as opposed to HAL.

    Andrew Neil
    Super User
    April 10, 2018
    Posted on April 10, 2018 at 19:12

    There's nothing to stop you writing C++ code and using HAL.

    All of the current IDEs support C++

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    g. lewis
    g. lewisAuthor
    Associate III
    April 10, 2018
    Posted on April 10, 2018 at 20:21

    Right!

    Andrew Neil
    Super User
    April 11, 2018
    Posted on April 11, 2018 at 10:42

    I'm a bit confused about the objective here.

    C++ is already supported - and people do use it - in all the standard IDEs - TrueStudio, SW4STM32, MCU-ARM-Eclipse, Keil, and I can't imagine that IAR don't have it.

    So there's nothing new or special about that.

    The reasons for people sticking to C rather than moving to C++ are not for lack of IDEs.

    The 'USP' of Sloeber seems to be its particular focus on Arduino.

    So why would one want to use it in place of the actual Arduino IDE?

    The key reason would seem to be to get proper debugging - but that is not available for STM32.

    (the same question often arises regarding using Atmel Studio for the Atmel-based Arduinos, and the only clear advantage there seems to be for the debugging - which it does provide).

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    tbulsink9
    Visitor II
    April 14, 2018
    Posted on April 14, 2018 at 17:29

    Apart from debug support (which would certainly be nice), all the reasons there are to use a decent IDE are reasons to use Eclipse instead of the Arduino, erm, environment.

    I am working on a prototype for which someone wrote *cough* code for the Arduino that was used in the system. After a few hours pulling my hair out using the Arduino software i installed Sloeber and ported the project to that. Now I have refactoring, C++ indexing and all that to help me find the 'features' that are in the Arduino libraries .

    So yeah, for me there is some merit to this project. Now, if i could only stop people from using Arduino in their projects altogether ....

    g. lewis
    g. lewisAuthor
    Associate III
    April 11, 2018
    Posted on April 11, 2018 at 11:25

    Yes I know but there isn't any C++ libraries already writen to we can use for hardwares on TrueStudio, SW4STM32...

    Andrew Neil
    Super User
    April 11, 2018
    Posted on April 11, 2018 at 12:29

    Which is a library issue - not an IDE issue.

    But, again, you can easily use the 'C' libraries in C++.

    It's harder to use C++ libraries in a 'C' project.  'C' remains the majority, and ST need to support the maximum user base.

    Have you looked at mbed?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    g. lewis
    g. lewisAuthor
    Associate III
    April 11, 2018
    Posted on April 11, 2018 at 14:07

    Yes mbed is nice for that but not sure if efficient for debugging hardware and implentations. Plus all is online.

    Andrew Neil
    Super User
    April 11, 2018
    Posted on April 11, 2018 at 14:30

    g. lewis wrote:

    Yes mbed is nice for that but not sure if efficient for debugging hardware and implentations. 

    Well - certainly no less efficient than Arduino!

    And it is C++ - which is what you wanted?

    Plus all is online.

    No, that's not true.

    It's always been possible to export into 'traditional' IDEs.

    https://os.mbed.com/handbook/Exporting-to-offline-toolchains

      

    I note that Arduino have now cottoned-on to the idea of an online IDE...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.