sparc-rtems4.11-gcc for C++

Luca Cinquepalmi cinquepalmi at planetek.it
Tue Oct 30 09:23:03 UTC 2012


Mick,
thanks a lot for your answer. I didn't use this line... what is its 
function?
I have no compilation problem. Code is compiled without any problems, but
printf doesn't plot any message... This essentially is my problem...
However I'll try your suggestion...
Do you have some working examples you compiled? Thanks

      Luca

On 10/30/2012 10:19 AM, Mick Davis wrote:
> 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
>>
>




More information about the users mailing list