Hi,
Sorry for the late answer. I thought Francis would answer, and he thought I would.
The compiler is GCC, which is able to compile and link C++. But the Ride debugger and the STM32 libraries from ST only handle C, and we think it is a bad idea to use C++ on the STM32. (not enough RAM, ...)
So you can compile in C++, and you will be able to download and execute the resulting binary to the STM32 flash, but you will not be able to debug (no watch on classes or class members, erratic HLL-stepping in class functions, 32K debug limitation exceeded with the simplest C++ example if you don't have the PRO primer, etc.) nor to use the ST firmware libraries. (although this last point could probably be worked around quite easily, but not by us )
This is why in the default configuration, the linker is configured for pure C. I admit that the printing on the box can be quite ambiguous, and it is probably a printing mistake from us to have mentionned C++. I will let our commercial department elaborate on this in the other post you wrote.
Here is how to tell the linker to include the C++ libraries:
You have to add the "cclib" and "lstdc++" linker options to the link command-line:
Note that the standard startup and linker script from Ride do initialize the heap. You only need to add the _sbrk function from syscalls.c. For this you can either include the "UART0 putchar" library (see the picture above), or take directly the code of the _sbrk function from this file:
C:\Program Files\Raisonance\Ride\Lib\ARM\io_putchar\syscalls.c
(but in this case you should remove the calls to _write and abort, as it will drag a lot of big and useless gcc things)
I hope it helps,
Vincent
Last edited by VincentC (2009-01-19 12:40:37)