sparc-rtems4.11-gcc for C++
Luca Cinquepalmi
cinquepalmi at planetek.it
Tue Oct 30 08:47:00 UTC 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20121030/0ab60f00/attachment-0001.html>
More information about the users
mailing list