Forum: ARM programming with GCC/GNU tools can anyone show me a simple C++ example on lpc1768?

Author: b1 k1 (bo0k)
Posted on:

Rate this post
0 useful
not useful
I have tried 3 days, switch compilers, linking scripts ...
to make a simple C++ program working on LPC1768 with G++, but failed.
#include <iostream>
#include <string>
using namespace std;
int main()
    std::string str = "foo";
    std::cout << str << std::endl;
    return 0;
Anymore can show me the right version of cm3 files/linking scripts/gcc 
and ld option to make this program succeed return? I got this program 
compiled but hang while string assignment. And I need using G++ 
toolchains sourcery or yagarto or linaro with G++ version 4.6+.

Author: artjom7111 qwe (Company: Noname) (artjom7111)
Posted on:

Rate this post
0 useful
not useful



It is rtos Written on C++. You can get from samples for LPC17 makefile 
and ld-file and used it.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.