Using C++ on the MRM
I like programming in C++, so I created a small sample file which allows
C++ to be used on the MRM. As distributed, the
MotoRobots library gives a
couple of linker errors when trying to utilize C++.
Newlib (the C runtime library that is used) makes some calls to getpid and
kill as part of the exception handler which wraps the call to main.
Obviously these functions can't do anything useful if you aren't running
an OS on your MRM, so I wrote some simple stubs.
If you wish to use any functions from the standard C++ library, then add
to the EXE_LIBS, and add
NOTE: Adding a simple
cout << "Hello World\n";
to the main program causes the size of the .s19 file to increase by 200k,
so I've avoided using C++ streams.
Here are the files:
- Mini RoboMind
Copyright 2006 by Dave Hylands