Electronic – Using STL with ARM microcontrollers

armcmicrocontroller

I have an NXP LPC1769 which features an ARM Cortex M3.

I understand how to program it and have had success building both C and C++ programs for it.

I have some code that I want to port from Windows. The problem is that the code relies heavily on STL features, specifically std::vector. I am aware of the potential overhead introduced by building programs with the STL.

(1) Are there any (free) toolchains that simply support using the STL?

(2) Would it be reasonable to build a small port of the STL (uSTL, for example) for the M3 and then link the port into my program?

Best Answer

You should be able to do this with GCC, either in the form of an ARM-maintained version or Yagarto. I believe all the normal STL is available; most of it is in the form of templates rather than libraries, anyway. You may need to sort out a platform definition and get malloc()/new working, depending on your exact platform.

Related Topic