1
\$\begingroup\$

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?

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

I've cross-compiled the uSTL package that you referred to. You can see my fork on GitHub. I built for the Xilinx Zynq in particular, but tried to make it generic enough to drop in two files for a new target platform.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.