summaryrefslogtreecommitdiffstats
path: root/make/custom
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-04-16 18:32:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-04-16 18:32:09 +0000
commited1a900460c1959f0c94bfc24bfe1222ec8ec213 (patch)
tree432f26d7f31d8fad5711409e39a95584e95bda9c /make/custom
parent2008-04-16 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-ed1a900460c1959f0c94bfc24bfe1222ec8ec213.tar.bz2
2008-04-16 Matthieu Bucchianeri <mbucchia@gmail.com>
* custom/nds.cfg: New file.
Diffstat (limited to 'make/custom')
-rw-r--r--make/custom/nds.cfg44
1 files changed, 44 insertions, 0 deletions
diff --git a/make/custom/nds.cfg b/make/custom/nds.cfg
new file mode 100644
index 0000000000..72b3d4f0b8
--- /dev/null
+++ b/make/custom/nds.cfg
@@ -0,0 +1,44 @@
+##
+## Config file for Nintendo DS BSP.
+##
+## $Id$
+##
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=arm
+RTEMS_CPU_MODEL=arm9tdmi
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=nds
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL) -msoft-float -mstructure-size-boundary=8
+CPU_CFLAGS += -mthumb-interwork ## -D __THUMB_INTERWORK__ -mthumb
+
+# optimize flag: typically -O2
+#CFLAGS_OPTIMIZE_V = -O0 -ggdb
+CFLAGS_OPTIMIZE_V = -O2
+#CFLAGS_OPTIMIZE_V = -Os
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required.
+
+NDSTOOL = $(PROJECT_TOOLS)/ndstool
+
+ifeq ($(RTEMS_MAKEFILE_PATH),)
+ COPROC_ELF_PATH = $(abs_builddir)/../../../lib/libbsp/arm/nds/
+else
+ COPROC_ELF_PATH = $(RTEMS_MAKEFILE_PATH)/lib
+endif
+
+define bsp-post-link
+ $(default-bsp-post-link)
+ $(OBJCOPY) -O binary $(basename $@).exe $(basename $@).bin
+ $(NDSTOOL) -c $(basename $@).nds -9 $(basename $@).bin -7 $(COPROC_ELF_PATH)/coproc.bin
+ rm -f $(basename $@).bin
+endef
+
+# Miscellaneous additions go here