summaryrefslogtreecommitdiff
path: root/nuttx/examples/nxflat
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-21 16:58:58 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-21 16:58:58 +0000
commitae15cd5e53907a95e42586d1a96a24b71299349d (patch)
tree187cdab659238c72bca505dd07fec653cf640623 /nuttx/examples/nxflat
parent77c1a6ae19c1cbe5e2b7f1de0d73809885f11ed7 (diff)
downloadpx4-nuttx-ae15cd5e53907a95e42586d1a96a24b71299349d.tar.gz
px4-nuttx-ae15cd5e53907a95e42586d1a96a24b71299349d.tar.bz2
px4-nuttx-ae15cd5e53907a95e42586d1a96a24b71299349d.zip
Flesh out examples/nxflat build environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1921 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nxflat')
-rw-r--r--nuttx/examples/nxflat/Makefile8
-rw-r--r--nuttx/examples/nxflat/nxflat_main.c83
-rw-r--r--nuttx/examples/nxflat/tests/Make.defs46
-rw-r--r--nuttx/examples/nxflat/tests/errno/Makefile23
-rw-r--r--nuttx/examples/nxflat/tests/hello++/Makefile65
-rw-r--r--nuttx/examples/nxflat/tests/hello/Makefile23
-rw-r--r--nuttx/examples/nxflat/tests/longjmp/Makefile23
-rw-r--r--nuttx/examples/nxflat/tests/mutex/Makefile23
-rw-r--r--nuttx/examples/nxflat/tests/nxflat.ld172
-rw-r--r--nuttx/examples/nxflat/tests/pthread/Makefile23
-rw-r--r--nuttx/examples/nxflat/tests/signal/Makefile23
-rw-r--r--nuttx/examples/nxflat/tests/task/Makefile23
12 files changed, 227 insertions, 308 deletions
diff --git a/nuttx/examples/nxflat/Makefile b/nuttx/examples/nxflat/Makefile
index 5c9e4e5ce..d597b3b3f 100644
--- a/nuttx/examples/nxflat/Makefile
+++ b/nuttx/examples/nxflat/Makefile
@@ -38,7 +38,7 @@
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
-CSRCS =
+CSRCS = nxflat_main.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
@@ -47,6 +47,7 @@ OBJS = $(AOBJS) $(COBJS)
BIN = lib$(CONFIG_EXAMPLE)$(LIBEXT)
all: $(BIN)
+.PHONY: tests/romfs.h tests/dirlist.h clean distclean
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
@@ -54,7 +55,10 @@ $(AOBJS): %$(OBJEXT): %.S
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
-$(BIN): $(OBJS)
+headers:
+ @$(MAKE) -C tests TOPDIR=$(TOPDIR) CROSSDEV=$(CROSSDEV)
+
+$(BIN): headers $(OBJS)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
diff --git a/nuttx/examples/nxflat/nxflat_main.c b/nuttx/examples/nxflat/nxflat_main.c
new file mode 100644
index 000000000..3eddcb4a2
--- /dev/null
+++ b/nuttx/examples/nxflat/nxflat_main.c
@@ -0,0 +1,83 @@
+/****************************************************************************
+ * examples/nxflat/nxflat_main.c
+ *
+ * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <sys/types.h>
+
+#include <debug.h>
+
+#include "tests/romfs.h"
+#include "tests/dirlist.h"
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: user_initialize
+ ****************************************************************************/
+
+void user_initialize(void)
+{
+}
+
+/****************************************************************************
+ * Name: user_start
+ ****************************************************************************/
+
+int user_start(int argc, char *argv[])
+{
+ return 0;
+}
diff --git a/nuttx/examples/nxflat/tests/Make.defs b/nuttx/examples/nxflat/tests/Make.defs
deleted file mode 100644
index 9277ce9cb..000000000
--- a/nuttx/examples/nxflat/tests/Make.defs
+++ /dev/null
@@ -1,46 +0,0 @@
-############################################################################
-# examples/nxflat/Make.defs
-#
-# Copyright (C) 2009 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-NXFLATCC = $(CC)
-NXFLATCFLAGS = $(CPICFLAGS)
-NXFLATCXX = $(CXX)
-NXFLATCXXFLAGS = $(CXXPICFLAGS)
-
-NXFLATLD = $(LD)
-NXFLATLDFLAGS1 = -r -d -warn-common
-NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T $(TOPDIR)/examples/nxflat/tests/nxflat.ld -no-check-sections
-
-LDNXFLATFLAGS = -e main -s 2048
-
diff --git a/nuttx/examples/nxflat/tests/errno/Makefile b/nuttx/examples/nxflat/tests/errno/Makefile
index 40544a1e0..158768b85 100644
--- a/nuttx/examples/nxflat/tests/errno/Makefile
+++ b/nuttx/examples/nxflat/tests/errno/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN = errno
@@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
all: $(BIN)
$(R1OBJS): %.o: %.c
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(R2OBJ): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(BIN).r1: $(R1OBJS)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC): $(BIN).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN).r2: $(R2OBJ)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
$(BIN): $(BIN).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
install:
- install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+ @install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/nuttx/examples/nxflat/tests/hello++/Makefile b/nuttx/examples/nxflat/tests/hello++/Makefile
index f9419cf6c..e28281619 100644
--- a/nuttx/examples/nxflat/tests/hello++/Makefile
+++ b/nuttx/examples/nxflat/tests/hello++/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN1 = hello++1
BIN2 = hello++2
@@ -74,16 +73,18 @@ LIBSTDC_STUBS_LIB = $(LIBSTDC_STUBS_DIR)/liblibxx.a
all: $(BIN1) $(BIN2) $(BIN3) # $(BIN4)
$(R1CXXOBJS): %.o: %.cpp
- $(NXFLATCXX) -c $(NXFLATCXXFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CXX) -c $(CXXPICFLAGS) $< -o $@
$(R2AOBJS): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
# This contains libstdc++ stubs to that you can build C++ code
# without actually having libstdc++
$(LIBSTDC_STUBS_LIB):
- $(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR)
+ @$(MAKE) -C $(LIBSTDC_STUBS_DIR) TOPDIR=$(TOPDIR)
# BIN1 and BIN2 link just like C code because they contain no
# static constructors. BIN1 is equivalent to a C hello world;
@@ -91,28 +92,35 @@ $(LIBSTDC_STUBS_LIB):
# not statically initialized.
$(BIN1).r1: $(R1OBJS1)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC1): $(BIN1).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN1).r2: $(R2OBJ1)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS1) $(R2OBJ1)
$(BIN1): $(BIN1).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
$(BIN2).r1: $(R1OBJS2) $(LIBSTDC_STUBS_LIB)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC2): $(BIN2).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN2).r2: $(R2OBJ2)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2)
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS2) $(R2OBJ2)
-(BIN2): $(BIN2).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+$(BIN2): $(BIN2).r2
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
# BIN3 and BIN4 require that we include --cxx in the xflat-ld command.
# This will instruct xflat-ld that we want it to put togethe the correct
@@ -121,41 +129,48 @@ $(BIN2).r2: $(R2OBJ2)
# BIN3 is equivalent to BIN2 except that is uses static initializers
$(BIN3).r1: $(R1OBJS3) $(LIBSTDC_STUBS_LIB)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC3): $(BIN3).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN3).r2: $(R2OBJ3)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS3) $(R2OBJ3)
$(BIN3): $(BIN3).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
# BIN4 is similar to BIN3 except that it uses the streams code from libstdc++
#
# NOTE: libstdc++ is not available for XFLAT as of this writing
#
#$(BIN4).r1: $(R1OBJS4) $(LIBSTDC_STUBS_LIB)
-# $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+# @echo "LD: $<"
+# $(LD) $(NXFLATLDFLAGS1) -o $@ $^
#
#$(R2SRC4): $(BIN4).r1
+# @echo "MK: $<"
# $(MKNXFLAT) -o $@ $^
#
-#$(BIN4).r2: $(R2OBJ4)
-# $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS4) $(R2OBJ4)
+#$(BIN4).r2: $(R2OBJ4)# @echo "LD: $<"
+# $(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS4) $(R2OBJ4)
#
#$(BIN4): $(BIN4).r2
+# @echo "LD: $<"
# $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(ALL_BIN) $(DERIVED) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(ALL_BIN) $(DERIVED) *.o *.r1 *.r2 *~ .*.swp core
install: $(ALL_BIN)
- install -D $(BIN1) $(ROMFS_DIR)/$(BIN1)
- install -D $(BIN2) $(ROMFS_DIR)/$(BIN2)
- install -D $(BIN3) $(ROMFS_DIR)/$(BIN3)
-# install -D $(BIN4) $(ROMFS_DIR)/$(BIN4)
+ @install -D $(BIN1) $(ROMFS_DIR)/$(BIN1)
+ @install -D $(BIN2) $(ROMFS_DIR)/$(BIN2)
+ @install -D $(BIN3) $(ROMFS_DIR)/$(BIN3)
+# @install -D $(BIN4) $(ROMFS_DIR)/$(BIN4)
diff --git a/nuttx/examples/nxflat/tests/hello/Makefile b/nuttx/examples/nxflat/tests/hello/Makefile
index 7aea72240..ccde7a98f 100644
--- a/nuttx/examples/nxflat/tests/hello/Makefile
+++ b/nuttx/examples/nxflat/tests/hello/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN = hello
@@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
all: $(BIN)
$(R1OBJS): %.o: %.c
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(R2OBJ): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(BIN).r1: $(R1OBJS)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC): $(BIN).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN).r2: $(R2OBJ)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
$(BIN): $(BIN).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
install:
- install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+ @install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/nuttx/examples/nxflat/tests/longjmp/Makefile b/nuttx/examples/nxflat/tests/longjmp/Makefile
index 9ad186791..d0c93ebbd 100644
--- a/nuttx/examples/nxflat/tests/longjmp/Makefile
+++ b/nuttx/examples/nxflat/tests/longjmp/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN = longjmp
@@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
all: $(BIN)
$(R1OBJS): %.o: %.c
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(R2OBJ): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(BIN).r1: $(R1OBJS)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC): $(BIN).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN).r2: $(R2OBJ)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
$(BIN): $(BIN).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
install:
- install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+ @install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/nuttx/examples/nxflat/tests/mutex/Makefile b/nuttx/examples/nxflat/tests/mutex/Makefile
index f4b58987b..8c9fbb4a3 100644
--- a/nuttx/examples/nxflat/tests/mutex/Makefile
+++ b/nuttx/examples/nxflat/tests/mutex/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN = mutex
@@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
all: $(BIN)
$(R1OBJS): %.o: %.c
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(R2OBJ): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(BIN).r1: $(R1OBJS)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC): $(BIN).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN).r2: $(R2OBJ)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
$(BIN): $(BIN).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
install:
- install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+ @install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/nuttx/examples/nxflat/tests/nxflat.ld b/nuttx/examples/nxflat/tests/nxflat.ld
deleted file mode 100644
index 9a59c0ec0..000000000
--- a/nuttx/examples/nxflat/tests/nxflat.ld
+++ /dev/null
@@ -1,172 +0,0 @@
-/****************************************************************************
- * examples/nxflat/nxflat.ld
- *
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-MEMORY
-{
- ISPACE : ORIGIN = 0x0, LENGTH = 2097152
- DSPACE : ORIGIN = 0x0, LENGTH = 2097152
-}
-
-/****************************************************************************
- * The XFLAT program image is divided into two segments:
- *
- * (1) ISpace (Instruction Space). This is the segment that contains
- * code (.text). Everything in the segment should be fetch-able
- * machine PC instructions (jump, branch, call, etc.).
- * (2) DSpace (Data Space). This is the segment that contains both
- * read-write data (.data, .bss) as well as read-only data (.rodata).
- * Everything in this segment should be access-able with machine
- * with machine load and store instructions.
- ****************************************************************************/
-
-SECTIONS
-{
- .text 0x00000000 :
- {
- /* ISpace is located at address 0. Every (unrelocated) ISpace
- * address is an offset from the begining of this segment.
- */
-
- text_start = . ;
-
- *(.text)
- *(.text.*)
- *(.gnu.warning)
- *(.stub)
- *(.glue_7)
- *(.glue_7t)
- *(.jcr)
-
- /* C++ support: The .init and .fini sections contain XFLAT-
- * specific logic to manage static constructors and destructors.
- */
-
- *(.gnu.linkonce.t.*)
- *(.init)
- *(.fini)
-
- /* This is special code area at the end of the normal
- text section. It contains a small lookup table at
- the start followed by the code pointed to by entries
- in the lookup table. */
-
- . = ALIGN (4) ;
- PROVIDE(__ctbp = .);
- *(.call_table_data)
- *(.call_table_text)
-
- _etext = . ;
-
- } > ISPACE
-
- /* DSpace is also located at address 0. Every (unrelocated) DSpace
- * address is an offset from the begining of this segment.
- */
-
- .data 0x00000000 :
- {
- __data_start = . ;
- *(.rodata)
- *(.rodata1)
- *(.rodata.*)
- *(.gnu.linkonce.r*)
- *(.data)
- *(.data1)
- *(.data.*)
- *(.gnu.linkonce.d*)
- *(.data1)
- *(.eh_frame)
- *(.gcc_except_table)
-
- *(.gnu.linkonce.s.*)
- *(__libc_atexit)
- *(__libc_subinit)
- *(__libc_subfreeres)
- *(.note.ABI-tag)
-
- /* C++ support. For each global and static local C++ object,
- * GCC creates a small subroutine to construct the object. Pointers
- * to these routines (not the routines themselves) are stored as
- * simple, linear arrays in the .ctors section of the object file.
- * Similarly, pointers to global/static destructor routines are
- * stored in .dtors.
- */
-
- *(.gnu.linkonce.d.*)
-
- _ctors_start = . ;
- *(.ctors)
- _ctors_end = . ;
- _dtors_start = . ;
- *(.dtors)
- _dtors_end = . ;
-
- _edata = . ;
- edata = ALIGN( 0x10 ) ;
- } > DSPACE
-
- .bss :
- {
- __bss_start = _edata ;
- *(.dynsbss)
- *(.sbss)
- *(.sbss.*)
- *(.scommon)
- *(.dynbss)
- *(.bss)
- *(.bss.*)
- *(.bss*)
- *(.gnu.linkonce.b*)
- *(COMMON)
- end = ALIGN( 0x10 ) ;
- _end = ALIGN( 0x10 ) ;
- } > DSPACE
-
- .got 0 : { *(.got.plt) *(.got) }
- .junk 0 : { *(.rel*) *(.rela*) }
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_info 0 : { *(.debug_info) }
- .debug_line 0 : { *(.debug_line) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- .debug_aranges 0 : { *(.debug_aranges) }
-}
diff --git a/nuttx/examples/nxflat/tests/pthread/Makefile b/nuttx/examples/nxflat/tests/pthread/Makefile
index 7008ec776..27da42e7c 100644
--- a/nuttx/examples/nxflat/tests/pthread/Makefile
+++ b/nuttx/examples/nxflat/tests/pthread/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN = pthread
@@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
all: $(BIN)
$(R1OBJS): %.o: %.c
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(R2OBJ): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(BIN).r1: $(R1OBJS)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC): $(BIN).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN).r2: $(R2OBJ)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
$(BIN): $(BIN).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
install:
- install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+ @install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/nuttx/examples/nxflat/tests/signal/Makefile b/nuttx/examples/nxflat/tests/signal/Makefile
index c613cb0f1..d967fbf09 100644
--- a/nuttx/examples/nxflat/tests/signal/Makefile
+++ b/nuttx/examples/nxflat/tests/signal/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN = signal
@@ -48,26 +47,32 @@ R2OBJ = $(R2SRC:.S=.o)
all: $(BIN)
$(R1OBJS): %.o: %.c
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(R2OBJ): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(BIN).r1: $(R1OBJS)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC): $(BIN).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN).r2: $(R2OBJ)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
$(BIN): $(BIN).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
install:
- install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+ @install -D $(BIN) $(ROMFS_DIR)/$(BIN)
diff --git a/nuttx/examples/nxflat/tests/task/Makefile b/nuttx/examples/nxflat/tests/task/Makefile
index 07254dba1..0881d4717 100644
--- a/nuttx/examples/nxflat/tests/task/Makefile
+++ b/nuttx/examples/nxflat/tests/task/Makefile
@@ -35,7 +35,6 @@
-include $(TOPDIR)/.config # Current configuration
-include $(TOPDIR)/Make.defs # Basic make info
-include ../Make.defs # NXFLAT make info
BIN = task
@@ -48,27 +47,33 @@ R2OBJ = $(R2SRC:.S=.o)
all: $(BIN)
$(R1OBJS): %.o: %.c
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "CC: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(R2OBJ): %.o: %.S
- $(NXFLATCC) -c $(NXFLATCFLAGS) $< -o $@
+ @echo "AS: $<"
+ @$(CC) -c $(CPICFLAGS) $< -o $@
$(BIN).r1: $(R1OBJS)
- $(NXFLATLD) $(NXFLATLDFLAGS1) -o $@ $^
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS1) -o $@ $^
$(R2SRC): $(BIN).r1
- $(MKNXFLAT) -o $@ $^
+ @echo "MK: $<"
+ @$(MKNXFLAT) -o $@ $^
$(BIN).r2: $(R2OBJ)
- $(NXFLATLD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
+ @echo "LD: $<"
+ @$(LD) $(NXFLATLDFLAGS2) -o $@ $(R1OBJS) $(R2OBJ)
$(BIN): $(BIN).r2
- $(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
+ @echo "LD: $<"
+ @$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
clean:
- rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
+ @rm -f $(BIN) $(R2SRC) *.o *.r1 *.r2 *~ .*.swp core
install:
- install -D $(BIN) $(ROMFS_DIR)/$(BIN)
+ @install -D $(BIN) $(ROMFS_DIR)/$(BIN)