Skip to content

Add support for STM32 MCU based boards and fix issues with gcc 6 tool… #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

cparata
Copy link

@cparata cparata commented Aug 10, 2017

Dear Mike,
I would like to apply this patch to have the possibility to use this library also with STM32 based boards (like Nucleo boards supported in stm32duino) and to solve some compilation issues that I have found when I have used new gcc toolchains (version 6) like the ones used on stm32duino for Nucleo boards. The patch for the new gcc toolchains should be compatible also with old gcc toolchains.
Best Regards,

Carlo

@mike-matera
Copy link
Owner

Thanks! Question: what parts of ArduinoSTL do you want to use? I installed support for Arduino Star OTTO and was able to compile vectors natively. But,

#include <iostream>

Causes errors.

@cparata
Copy link
Author

cparata commented Aug 11, 2017

Hi Mike, I'm using vector and algorithm of ArduinoSTL without any issue. I have never used iostream on Arduino STAR Otto. Could you provide a sample sketch that causes your issues on Arduino STAR Otto?
Thanks and Regards, Carlo

@fpistm
Copy link

fpistm commented Oct 2, 2017

Hi @mike-matera ,
any update on this PR?
Thanks

@mike-matera
Copy link
Owner

mike-matera commented Oct 2, 2017

@fpistm I don't think my library is necessary on this platform. On Arduino Star OTTO you can use the native STL by simply including the headers.

@fpistm
Copy link

fpistm commented Oct 27, 2017

Hi @mike-matera,
I've added the STL c++ to the Arduino_Core_STM32
FYI: stm32duino/Arduino_Core_STM32#129
So, Arduino STL library is no more needed.
Thanks for your support.
I let @cparata comment and close this PR if he want.

@mike-matera
Copy link
Owner

@fpistm Great! Thank you! I'm glad to see the native support on STM32.

Thanks again!

@chrisco484
Copy link

chrisco484 commented Jan 22, 2021

@mike-matera

Hi @mike-matera,
I've added the STL c++ to the Arduino_Core_STM32
FYI: stm32duino/Arduino_Core_STM32#129
So, Arduino STL library is no more needed.
Thanks for your support.
I let @cparata comment and close this PR if he want.

I'm not so sure ArduinoSTL is not needed for STM32 - not because "standard" STL doesn't exist in STM32 land but because the default STL that comes with the gcc compiler seems to add an instant ~158kb to your executable.

158kb is prohibitive on some of the smaller STM32 blue pills etc., with only 64kb of Flash.

To test this on a Nucleo F446RE:

  • I made a simple "hello world" with printf only => executable size 13kb
  • I then changed the printf to cout << ".." and included iostream => executable size 171kb!!!!!

That's a 158kb difference and means I can't use the standard STL on STM32 blue pills.

My theory is that ArduinoSTL, being tailored for much smaller resources like AVRs, would probably fit quite easily into the smaller STM32 devices.

I have been uploading a large app (<32kb) in 328p chips with ArduinoSTL with no problem. Now with STM32 (which I needed for speed and extra RAM) I can't even upload the app because, with GCC's STL, the executable is almost double a Blue Pill's 64kb Flash before I've even added any of my code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants