sparc-rtems4.11-gcc for C++

Mick Davis mickd at goanna.iinet.net.au
Tue Oct 30 09:19:05 UTC 2012


Hi

Are you using a line in your makefile like

C_PIECES=init

I think it should be

CC_PIECES=init

Otherwise, I think we need a bit more detail on your problem.

On 30/10/12 16:47, Luca Cinquepalmi wrote:
> Here I post a simple rtems C++ code (template.cc) which works if
> compiled as a C source file but not as a C++ file.
> I'm using sparc-rtems4.11-g++ compiler. Are there particular compilation
> flags I have to use? Is C++ template different from C one? Thanks a lot
>
>       Luca
> -------------------------------------------------------------------------------------------------------------------------
> #define CONFIGURE_INIT
> #include "system.h"
> #include <cstdlib>
>
>
> extern "C" {
>    rtems_task Init(
>      rtems_task_argument arg
>    );
> };
>
> /* Declare rtems tasks */
> rtems_task Init (rtems_task_argument argument);                 /*
> Declare entry point */
>
> #include "define.h"
> #include "leon.h"
> #include "utils.h"
> #include "printSerial.h"
>
> rtems_task Init (rtems_task_argument argument)
> {
>      printf("MY NAME IS LUCA!\n\r");
>      rtems_task_delete(RTEMS_SELF);
> }
> -------------------------------------------------------------------------------------------------------------------------
> My Makefile flags:
>
> CXX = sparc-rtems4.11-g++
> BSP_PATH = /opt/$(INSTALL_POINT)/sparc-$(CCOMP)/leon2/lib
> SPECS_PATH = $(BSP_PATH)/bsp_specs
>
> LD_LIBS += -lgcc -lm -msoft-float -lrtems++ -lstdc++
> LD_PATH += -I../../include/leon -I../include -B$(BSP_PATH) -specs
> $(SPECS_PATH)
> LDFLAGS += -mcpu=v8 -qrtems
> CXXFLAGS += -msoft-float -mcpu=v8 $(LD_PATH) -Wno-write-strings
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>

-- 

Mick Davis
Goanna Technologies Pty Ltd
+61 8 9444 2634



More information about the users mailing list