Commit 37bedd85 authored by yoogx's avatar yoogx

* Add an RTEMS target, configures it to use the Ravenscar

          profile

          For openaadl/ocarina#113
parent 82c9f419
...@@ -9,14 +9,14 @@ CFLAGS +=-DGNAT_MAIN_STACKSPACE=100 ...@@ -9,14 +9,14 @@ CFLAGS +=-DGNAT_MAIN_STACKSPACE=100
# CFLAGS +=-DMAIN_USE_NETWORKING=1 # CFLAGS +=-DMAIN_USE_NETWORKING=1
SPECFLAGS =-B${RTEMS_MAKEFILE_PATH}/lib/ -specs=bsp_specs -qrtems SPECFLAGS =-B${RTEMS_MAKEFILE_PATH}/lib/ -specs=bsp_specs -qrtems
CFLAGS = $(CPU_CFLAGS) CFLAGS = $(CPU_CFLAGS)
DEFINES += -D$(RTEMS_BSP) DEFINES += -D$(RTEMS_BSP)
CFLAGS += $(DEFINES) CFLAGS += $(DEFINES)
GCC=$(CC) GCC=$(CC)
# changed by ttsiodras: we dont want -mcpu=... stuff here! # changed by ttsiodras: we dont want -mcpu=... stuff here!
# EXTRA_OBJS=$(C_OBJECTS) $(EXTERNAL_OBJECTS) # EXTRA_OBJS=$(C_OBJECTS) $(EXTERNAL_OBJECTS)
EXTRA_OBJS=$(C_OBJECTS) $(filter-out -%, $(EXTERNAL_OBJECTS)) EXTRA_OBJS=$(C_OBJECTS) $(filter-out -%, $(EXTERNAL_OBJECTS))
RTS= --RTS=$(shell $(CC) -print-multi-directory $(CFLAGS)) RTS= --RTS=$(shell $(CC) -print-multi-directory $(CFLAGS))
...@@ -25,7 +25,7 @@ all: compile-c-files $(PROGRAM).exe ...@@ -25,7 +25,7 @@ all: compile-c-files $(PROGRAM).exe
$(PROGRAM).exe: rtems_init.o $(EXTRA_OBJS) $(PROGRAM).exe: rtems_init.o $(EXTRA_OBJS)
$(AS:as=gnatmake) -x -g -v $(EXTRA_GNATFLAGS) \ $(AS:as=gnatmake) -x -g -v $(EXTRA_GNATFLAGS) \
-I$(RTEMS_MAKEFILE_PATH)/lib/include/adainclude \ -I$(RTEMS_MAKEFILE_PATH)/lib/include/adainclude -XTARGET=RTEMS \
-O -gnata -gnatE -gnato -P $(PROGRAM).gpr -o $(@) \ -O -gnata -gnatE -gnato -P $(PROGRAM).gpr -o $(@) \
-bargs -Mgnat_main \ -bargs -Mgnat_main \
-largs $(SPECFLAGS) $(CFLAGS) $(LINKARGS) \ -largs $(SPECFLAGS) $(CFLAGS) $(LINKARGS) \
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
project PolyORB_HI is project PolyORB_HI is
type Target_Type is type Target_Type is
("NATIVE", "LEON_ORK", "LEON_GNAT", "ERC32", "MARTEOS", "GNAT_Runtime"); ("NATIVE", "LEON_ORK", "LEON_GNAT", "ERC32", "MARTEOS", "GNAT_Runtime",
"RTEMS");
Target : Target_Type := external ("TARGET", "NATIVE"); Target : Target_Type := external ("TARGET", "NATIVE");
type Build_Type is ("Debug", "Release", "Analyzable"); type Build_Type is ("Debug", "Release", "Analyzable");
...@@ -127,7 +128,7 @@ project PolyORB_HI is ...@@ -127,7 +128,7 @@ project PolyORB_HI is
when "NATIVE" | "MARTEOS" => when "NATIVE" | "MARTEOS" =>
for Local_Configuration_Pragmas use "native.adc"; for Local_Configuration_Pragmas use "native.adc";
when "LEON_ORK" | "LEON_GNAT" | "ERC32" => when "LEON_ORK" | "LEON_GNAT" | "ERC32" | "RTEMS" =>
for Local_Configuration_Pragmas use "hi-e.adc"; for Local_Configuration_Pragmas use "hi-e.adc";
when "GNAT_Runtime" => when "GNAT_Runtime" =>
...@@ -190,7 +191,7 @@ project PolyORB_HI is ...@@ -190,7 +191,7 @@ project PolyORB_HI is
for Default_Switches ("ada") use ("-g"); for Default_Switches ("ada") use ("-g");
end case; end case;
when "Release" => when "Release" | "Analyzable" =>
null; null;
end case; end case;
end Linker; end Linker;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment