Makefile.gumstix.rtems 1.61 KB
Newer Older
julien.delange's avatar
julien.delange committed
1
2
## This file is a part of PolyORB-HI-C software.
## It sets some variables useful to compile generated
3
## code to the Gumstix platform with the RTEMS operating system.
julien.delange's avatar
julien.delange committed
4
5
6
7
8
9
10
11
12
13

## To use and compile RTEMS, visit http://www.rtems.com

MANAGERS = all

CC                           = arm-rtems4.10-gcc
CPP                          = arm-rtems4.10-g++

GPROF                        = arm-rtems4.10-gprof

14
TARGET_SOURCES               =
julien.delange's avatar
julien.delange committed
15
#TARGET_TRANSPORT_SOURCES     = $(RUNTIME_PATH)/config/leon-rtems/config.c
16
TARGET_TRANSPORT_SOURCES     =
julien.delange's avatar
julien.delange committed
17

18
TARGET_CFLAGS                = -DRTEMS_PURE -DGUMSTIX_RTEMS  -mstructure-size-boundary=8 -mcpu=xscale -mfpu=vfp -mfloat-abi=soft $(GCC_GENERIC_FLAGS)
19
20
21
22
TARGET_INCLUDE               =

LD                           = arm-rtems4.10-gcc
TARGET_LDFLAGS               =
julien.delange's avatar
julien.delange committed
23
24

target-clean:
25
26
	rm -f $(BINARY).ralf
	rm -f flash.img
julien.delange's avatar
julien.delange committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

-include $(RTEMS_MAKEFILE_PATH)/Makefile.inc

-include $(RTEMS_CUSTOM)
-include $(PROJECT_ROOT)/make/leaf.cfg

define bsp-link-c
   $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
      -o $(BINARY) $(LINK_OBJS) $(LINK_LIBS)
endef

define bsp-link-cxx
   $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
      -o $(BINARY) $(LINK_OBJS) $(LINK_LIBS)
endef

target-objects:

45
46
47
48
49
50
sim:
	rm -f flash.img && \
	dd of=flash.img bs=128k count=128 if=/dev/zero &&  \
	dd of=flash.img bs=128k conv=notrunc if=$(RUNTIME_PATH)/utils/gumstix-uboot.bin &&  \
	dd of=flash.img bs=1k conv=notrunc seek=4096 if=$(BINARY)  && \
	qemu-system-arm -M connex -m 289 -nographic -monitor null -pflash flash.img
julien.delange's avatar
julien.delange committed
51
52
53
54
55
56

define bsp-post-link
	$(NM) -g -n $@ > $(basename $@).num
	$(SIZE) $@
   cp $@ $(basename $@).ralf
endef