summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-09 22:37:52 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-09 22:37:52 +0000
commit1ac3cb8a10935e866f6edc6eb294a1f1a33c5e74 (patch)
tree0b6bd4900f94f1c05bdac8acc492c4197ae925f3
parent332cf8e16d4b3ade203b6f886c152a25c1972591 (diff)
downloadnuttx-1ac3cb8a10935e866f6edc6eb294a1f1a33c5e74.tar.gz
nuttx-1ac3cb8a10935e866f6edc6eb294a1f1a33c5e74.tar.bz2
nuttx-1ac3cb8a10935e866f6edc6eb294a1f1a33c5e74.zip
Misc changes to accept setenv.bat; Add UG-2864AMBAG01 reverse landscape support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5326 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/Kconfig20
-rw-r--r--nuttx/Makefile256
-rw-r--r--nuttx/drivers/lcd/ug-2864ambag01.c25
-rwxr-xr-xnuttx/tools/configure.sh66
4 files changed, 218 insertions, 149 deletions
diff --git a/nuttx/Kconfig b/nuttx/Kconfig
index b647a49f8..90fe74f25 100644
--- a/nuttx/Kconfig
+++ b/nuttx/Kconfig
@@ -53,10 +53,28 @@ config WINDOWS_MSYS
bool "MSYS"
config WINDOWS_OTHER
- bool "Other"
+ bool "Other POSIX-like environment"
endchoice
+config WINDOWS_MKLINK
+ bool "Use mklink"
+ default y
+ depends on HOST_WINDOWS
+ ---help---
+ Use the mklink command to set up symbolic links when NuttX is
+ configured. Otherwise, configuration directories will be copied to
+ establish the configuration.
+
+ If directories are copied, then some confusion can result ("Which
+ version of the file did I modify?"). In that case, it is recommended
+ that you re-build using 'make clean_context all'. That will cause the
+ configured directories to be recopied on each build.
+
+ NOTE: This option also (1) that you have administrator privileges, (2)
+ that you are using Windows 2000 or better, and (3) that you are using
+ the NTFS file system. Select 'n' is that is not the case.
+
menu "Build Configuration"
config APPS_DIR
diff --git a/nuttx/Makefile b/nuttx/Makefile
index 0813098c6..8235854fd 100644
--- a/nuttx/Makefile
+++ b/nuttx/Makefile
@@ -33,7 +33,7 @@
#
############################################################################
-TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'}
+TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'}
-include ${TOPDIR}/.config
-include ${TOPDIR}/tools/Config.mk
-include ${TOPDIR}/Make.defs
@@ -49,21 +49,21 @@ endif
# Default tools
ifeq ($(DIRLINK),)
-DIRLINK = $(TOPDIR)/tools/link.sh
-DIRUNLINK = $(TOPDIR)/tools/unlink.sh
+DIRLINK = $(TOPDIR)/tools/link.sh
+DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif
# This define is passed as EXTRADEFINES for kernel-mode builds. It is also passed
# during PASS1 (but not PASS2) context and depend targets.
-KDEFINE = ${shell $(TOPDIR)/tools/define.sh $(CC) __KERNEL__}
+KDEFINE = ${shell $(TOPDIR)/tools/define.sh $(CC) __KERNEL__}
# Process architecture and board-specific directories
-ARCH_DIR = arch/$(CONFIG_ARCH)
-ARCH_SRC = $(ARCH_DIR)/src
-ARCH_INC = $(ARCH_DIR)/include
-BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
+ARCH_DIR = arch/$(CONFIG_ARCH)
+ARCH_SRC = $(ARCH_DIR)/src
+ARCH_INC = $(ARCH_DIR)/include
+BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
# Add-on directories. These may or may not be in place in the
# NuttX source tree (they must be specifically installed)
@@ -74,22 +74,22 @@ BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
# a Makefile is found at the path provided by CONFIG_APPS_DIR
ifeq ($(CONFIG_APPS_DIR),)
-CONFIG_APPS_DIR = ../apps
+CONFIG_APPS_DIR = ../apps
endif
-APPDIR := ${shell if [ -r $(CONFIG_APPS_DIR)/Makefile ]; then echo "$(CONFIG_APPS_DIR)"; fi}
+APPDIR := ${shell if [ -r $(CONFIG_APPS_DIR)/Makefile ]; then echo "$(CONFIG_APPS_DIR)"; fi}
# All add-on directories.
#
# NUTTX_ADDONS is the list of directories built into the NuttX kernel.
# USER_ADDONS is the list of directories that will be built into the user application
-NUTTX_ADDONS := $(NX_DIR)
-USER_ADDONS :=
+NUTTX_ADDONS := $(NX_DIR)
+USER_ADDONS :=
ifeq ($(CONFIG_NUTTX_KERNEL),y)
-USER_ADDONS += $(APPDIR)
+USER_ADDONS += $(APPDIR)
else
-NUTTX_ADDONS += $(APPDIR)
+NUTTX_ADDONS += $(APPDIR)
endif
# Lists of build directories.
@@ -106,37 +106,37 @@ endif
# be cleaned to prevent garbarge from collecting in them when changing
# configurations.
-NONFSDIRS = sched $(ARCH_SRC) $(NUTTX_ADDONS)
-FSDIRS = fs drivers binfmt
-CONTEXTDIRS = $(APPDIR)
-USERDIRS =
+NONFSDIRS = sched $(ARCH_SRC) $(NUTTX_ADDONS)
+FSDIRS = fs drivers binfmt
+CONTEXTDIRS = $(APPDIR)
+USERDIRS =
ifeq ($(CONFIG_NUTTX_KERNEL),y)
-NONFSDIRS += syscall
-CONTEXTDIRS += syscall
-USERDIRS += syscall lib mm $(USER_ADDONS)
+NONFSDIRS += syscall
+CONTEXTDIRS += syscall
+USERDIRS += syscall lib mm $(USER_ADDONS)
ifeq ($(CONFIG_HAVE_CXX),y)
-USERDIRS += libxx
+USERDIRS += libxx
endif
else
-NONFSDIRS += lib mm
-OTHERDIRS += syscall $(USER_ADDONS)
+NONFSDIRS += lib mm
+OTHERDIRS += syscall $(USER_ADDONS)
ifeq ($(CONFIG_HAVE_CXX),y)
-NONFSDIRS += libxx
+NONFSDIRS += libxx
else
-OTHERDIRS += libxx
+OTHERDIRS += libxx
endif
endif
ifeq ($(CONFIG_NX),y)
-NONFSDIRS += graphics
-CONTEXTDIRS += graphics
+NONFSDIRS += graphics
+CONTEXTDIRS += graphics
else
-OTHERDIRS += graphics
+OTHERDIRS += graphics
endif
# CLEANDIRS are the directories that will clean in. These are
@@ -147,29 +147,29 @@ endif
# USERDEPDIRS. If NuttX and applications are built separately (CONFIG_NUTTX_KERNEL),
# then this holds only the directories containing user files.
-CLEANDIRS = $(NONFSDIRS) $(FSDIRS) $(USERDIRS) $(OTHERDIRS)
-KERNDEPDIRS = $(NONFSDIRS)
-USERDEPDIRS = $(USERDIRS)
+CLEANDIRS = $(NONFSDIRS) $(FSDIRS) $(USERDIRS) $(OTHERDIRS)
+KERNDEPDIRS = $(NONFSDIRS)
+USERDEPDIRS = $(USERDIRS)
# Add file system directories to KERNDEPDIRS (they are already in CLEANDIRS)
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifeq ($(CONFIG_NET),y)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
-KERNDEPDIRS += fs
+KERNDEPDIRS += fs
endif
-KERNDEPDIRS += drivers
+KERNDEPDIRS += drivers
endif
else
-KERNDEPDIRS += $(FSDIRS)
+KERNDEPDIRS += $(FSDIRS)
endif
# Add networking directories to KERNDEPDIRS and CLEANDIRS
ifeq ($(CONFIG_NET),y)
-KERNDEPDIRS += net
+KERNDEPDIRS += net
endif
-CLEANDIRS += net
+CLEANDIRS += net
#
# Extra objects used in the final link.
@@ -179,7 +179,7 @@ CLEANDIRS += net
# be created). If the pass1 obect is an archive, it could go anywhere.
ifeq ($(CONFIG_BUILD_2PASS),y)
-EXTRA_OBJS += $(CONFIG_PASS1_OBJECT)
+EXTRA_OBJS += $(CONFIG_PASS1_OBJECT)
endif
# NUTTXLIBS is the list of NuttX libraries that is passed to the
@@ -189,18 +189,18 @@ endif
# USERLIBS is the list of libraries used to build the final user-space
# application
-NUTTXLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT)
-USERLIBS =
+NUTTXLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT)
+USERLIBS =
# Add libraries for syscall support. The C library will be needed by
# both the kernel- and user-space builds. For now, the memory manager (mm)
# is placed in user space (only).
ifeq ($(CONFIG_NUTTX_KERNEL),y)
-NUTTXLIBS += syscall/libstubs$(LIBEXT) lib/libklib$(LIBEXT)
-USERLIBS += syscall/libproxies$(LIBEXT) lib/libulib$(LIBEXT) mm/libmm$(LIBEXT)
+NUTTXLIBS += syscall/libstubs$(LIBEXT) lib/libklib$(LIBEXT)
+USERLIBS += syscall/libproxies$(LIBEXT) lib/libulib$(LIBEXT) mm/libmm$(LIBEXT)
else
-NUTTXLIBS += mm/libmm$(LIBEXT) lib/liblib$(LIBEXT)
+NUTTXLIBS += mm/libmm$(LIBEXT) lib/liblib$(LIBEXT)
endif
# Add libraries for C++ support. CXX, CXXFLAGS, and COMPILEXX must
@@ -208,9 +208,9 @@ endif
ifeq ($(CONFIG_HAVE_CXX),y)
ifeq ($(CONFIG_NUTTX_KERNEL),y)
-USERLIBS += libxx/liblibxx$(LIBEXT)
+USERLIBS += libxx/liblibxx$(LIBEXT)
else
-NUTTXLIBS += libxx/liblibxx$(LIBEXT)
+NUTTXLIBS += libxx/liblibxx$(LIBEXT)
endif
endif
@@ -218,44 +218,44 @@ endif
ifneq ($(APPDIR),)
ifeq ($(CONFIG_NUTTX_KERNEL),y)
-USERLIBS += $(APPDIR)/libapps$(LIBEXT)
+USERLIBS += $(APPDIR)/libapps$(LIBEXT)
else
-NUTTXLIBS += $(APPDIR)/libapps$(LIBEXT)
+NUTTXLIBS += $(APPDIR)/libapps$(LIBEXT)
endif
endif
# Add libraries for network support
ifeq ($(CONFIG_NET),y)
-NUTTXLIBS += net/libnet$(LIBEXT)
+NUTTXLIBS += net/libnet$(LIBEXT)
endif
# Add libraries for file system support
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
-NUTTXLIBS += fs/libfs$(LIBEXT)
+NUTTXLIBS += fs/libfs$(LIBEXT)
endif
ifeq ($(CONFIG_NET),y)
-NUTTXLIBS += drivers/libdrivers$(LIBEXT)
+NUTTXLIBS += drivers/libdrivers$(LIBEXT)
endif
else
-NUTTXLIBS += fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT) binfmt/libbinfmt$(LIBEXT)
+NUTTXLIBS += fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT) binfmt/libbinfmt$(LIBEXT)
endif
# Add libraries for the NX graphics sub-system
ifneq ($(NX_DIR),)
-NUTTXLIBS += $(NX_DIR)/libnx$(LIBEXT)
+NUTTXLIBS += $(NX_DIR)/libnx$(LIBEXT)
endif
ifeq ($(CONFIG_NX),y)
-NUTTXLIBS += graphics/libgraphics$(LIBEXT)
+NUTTXLIBS += graphics/libgraphics$(LIBEXT)
endif
# This is the name of the final target (relative to the top level directorty)
-BIN = nuttx$(EXEEXT)
+BIN = nuttx$(EXEEXT)
all: $(BIN)
.PHONY: context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean
@@ -286,7 +286,7 @@ endif
ifeq ($(NEED_MATH_H),y)
include/math.h: include/nuttx/math.h
- @cp -f include/nuttx/math.h include/math.h
+ $(Q) cp -f include/nuttx/math.h include/math.h
else
include/math.h:
endif
@@ -299,7 +299,7 @@ endif
ifeq ($(CONFIG_ARCH_FLOAT_H),y)
include/float.h: include/nuttx/float.h
- @cp -f include/nuttx/float.h include/float.h
+ $(Q) cp -f include/nuttx/float.h include/float.h
else
include/float.h:
endif
@@ -311,7 +311,7 @@ endif
ifeq ($(CONFIG_ARCH_STDARG_H),y)
include/stdarg.h: include/nuttx/stdarg.h
- @cp -f include/nuttx/stdarg.h include/stdarg.h
+ $(Q) cp -f include/nuttx/stdarg.h include/stdarg.h
else
include/stdarg.h:
endif
@@ -321,27 +321,27 @@ endif
# tools/mkversion tool is built and used to create include/nuttx/version.h
tools/mkversion:
- @$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkversion
+ $(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkversion
$(TOPDIR)/.version:
- @if [ ! -f .version ]; then \
+ $(Q) if [ ! -f .version ]; then \
echo "No .version file found, creating one"; \
tools/version.sh -v 0.0 -b 0 .version; \
chmod 755 .version; \
fi
include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion
- @tools/mkversion $(TOPDIR) > include/nuttx/version.h
+ $(Q) tools/mkversion $(TOPDIR) > include/nuttx/version.h
# Targets used to build include/nuttx/config.h. Creation of config.h is
# part of the overall NuttX configuration sequence. Notice that the
# tools/mkconfig tool is built and used to create include/nuttx/config.h
tools/mkconfig:
- @$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkconfig
+ $(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkconfig
include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
- @tools/mkconfig $(TOPDIR) > include/nuttx/config.h
+ $(Q) tools/mkconfig $(TOPDIR) > include/nuttx/config.h
# dirlinks, and helpers
#
@@ -353,7 +353,8 @@ include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
include/apps: Make.defs
ifneq ($(APPDIR),)
- @if [ -d $(TOPDIR)/$(APPDIR)/include ]; then \
+ @echo "LN: include/apps -> $(APPDIR)/include"
+ $(Q) if [ -d $(TOPDIR)/$(APPDIR)/include ]; then \
$(DIRLINK) $(TOPDIR)/$(APPDIR)/include include/apps; \
fi
endif
@@ -361,30 +362,35 @@ endif
# Link the arch/<arch-name>/include directory to include/arch
include/arch: Make.defs
- @$(DIRLINK) $(TOPDIR)/$(ARCH_DIR)/include include/arch
+ @echo "LN: include/arch -> $(TOPDIR)/$(ARCH_DIR)/include"
+ $(Q) $(DIRLINK) $(TOPDIR)/$(ARCH_DIR)/include include/arch
# Link the configs/<board-name>/include directory to include/arch/board
include/arch/board: include/arch Make.defs include/arch
- @$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
+ @echo "LN: include/arch/board -> $(TOPDIR)/$(BOARD_DIR)/include"
+ $(Q) $(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
# Link the configs/<board-name>/src dir to arch/<arch-name>/src/board
$(ARCH_SRC)/board: Make.defs
- @$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
+ @echo "LN: $(ARCH_SRC)/board -> $(TOPDIR)/$(BOARD_DIR)/src"
+ $(Q) $(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
# Link arch/<arch-name>/include/<chip-name> to arch/<arch-name>/include/chip
$(ARCH_SRC)/chip: Make.defs
ifneq ($(CONFIG_ARCH_CHIP),)
- @$(DIRLINK) $(TOPDIR)/$(ARCH_SRC)/$(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
+ @echo "LN: $(ARCH_SRC)/chip -> $(TOPDIR)\$(ARCH_SRC)/$(CONFIG_ARCH_CHIP)"
+ $(Q) $(DIRLINK) $(TOPDIR)/$(ARCH_SRC)/$(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
endif
# Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip
include/arch/chip: include/arch Make.defs
ifneq ($(CONFIG_ARCH_CHIP),)
- @$(DIRLINK) $(TOPDIR)/$(ARCH_INC)/$(CONFIG_ARCH_CHIP) include/arch/chip
+ @echo "LN: include/arch/chip -> $(TOPDIR)/$(ARCH_INC)/$(CONFIG_ARCH_CHIP)"
+ $(Q) $(DIRLINK) $(TOPDIR)/$(ARCH_INC)/$(CONFIG_ARCH_CHIP) include/arch/chip
endif
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip include/apps
@@ -397,7 +403,7 @@ dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(
# the establishment of symbolic links to configured directories.
context: check_context include/nuttx/config.h include/nuttx/version.h include/math.h include/float.h include/stdarg.h dirlinks
- @for dir in $(CONTEXTDIRS) ; do \
+ $(Q) for dir in $(CONTEXTDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" context; \
done
@@ -407,16 +413,16 @@ context: check_context include/nuttx/config.h include/nuttx/version.h include/ma
# and symbolic links created by the context target.
clean_context:
- @rm -f include/nuttx/config.h
- @rm -f include/nuttx/version.h
- @rm -f include/math.h
- @rm -f include/stdarg.h
- @$(DIRUNLINK) include/arch/board
- @$(DIRUNLINK) include/arch/chip
- @$(DIRUNLINK) include/arch
- @$(DIRUNLINK) $(ARCH_SRC)/board
- @$(DIRUNLINK) $(ARCH_SRC)/chip
- @$(DIRUNLINK) include/apps
+ $(Q) rm -f include/nuttx/config.h
+ $(Q) rm -f include/nuttx/version.h
+ $(Q) rm -f include/math.h
+ $(Q) rm -f include/stdarg.h
+ $(Q) $(DIRUNLINK) include/arch/board
+ $(Q) $(DIRUNLINK) include/arch/chip
+ $(Q) $(DIRUNLINK) include/arch
+ $(Q) $(DIRUNLINK) $(ARCH_SRC)/board
+ $(Q) $(DIRUNLINK) $(ARCH_SRC)/chip
+ $(Q) $(DIRUNLINK) include/apps
# check_context
#
@@ -426,7 +432,7 @@ clean_context:
# configuration files have been installed and that NuttX is ready to be built.
check_context:
- @if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \
+ $(Q) if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \
echo "" ; echo "Nuttx has not been configured:" ; \
echo " cd tools; ./configure.sh <target>" ; echo "" ; \
exit 1 ; \
@@ -440,53 +446,53 @@ check_context:
# Possible kernel-mode builds
lib/libklib$(LIBEXT): context
- @$(MAKE) -C lib TOPDIR="$(TOPDIR)" libklib$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C lib TOPDIR="$(TOPDIR)" libklib$(LIBEXT) EXTRADEFINES=$(KDEFINE)
sched/libsched$(LIBEXT): context
- @$(MAKE) -C sched TOPDIR="$(TOPDIR)" libsched$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C sched TOPDIR="$(TOPDIR)" libsched$(LIBEXT) EXTRADEFINES=$(KDEFINE)
$(ARCH_SRC)/libarch$(LIBEXT): context
- @$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) EXTRADEFINES=$(KDEFINE)
net/libnet$(LIBEXT): context
- @$(MAKE) -C net TOPDIR="$(TOPDIR)" libnet$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C net TOPDIR="$(TOPDIR)" libnet$(LIBEXT) EXTRADEFINES=$(KDEFINE)
fs/libfs$(LIBEXT): context
- @$(MAKE) -C fs TOPDIR="$(TOPDIR)" libfs$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C fs TOPDIR="$(TOPDIR)" libfs$(LIBEXT) EXTRADEFINES=$(KDEFINE)
drivers/libdrivers$(LIBEXT): context
- @$(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT) EXTRADEFINES=$(KDEFINE)
binfmt/libbinfmt$(LIBEXT): context
- @$(MAKE) -C binfmt TOPDIR="$(TOPDIR)" libbinfmt$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C binfmt TOPDIR="$(TOPDIR)" libbinfmt$(LIBEXT) EXTRADEFINES=$(KDEFINE)
graphics/libgraphics$(LIBEXT): context
- @$(MAKE) -C graphics TOPDIR="$(TOPDIR)" libgraphics$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C graphics TOPDIR="$(TOPDIR)" libgraphics$(LIBEXT) EXTRADEFINES=$(KDEFINE)
syscall/libstubs$(LIBEXT): context
- @$(MAKE) -C syscall TOPDIR="$(TOPDIR)" libstubs$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C syscall TOPDIR="$(TOPDIR)" libstubs$(LIBEXT) EXTRADEFINES=$(KDEFINE)
# Possible user-mode builds
lib/libulib$(LIBEXT): context
- @$(MAKE) -C lib TOPDIR="$(TOPDIR)" libulib$(LIBEXT)
+ $(Q) $(MAKE) -C lib TOPDIR="$(TOPDIR)" libulib$(LIBEXT)
libxx/liblibxx$(LIBEXT): context
- @$(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT)
+ $(Q) $(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT)
mm/libmm$(LIBEXT): context
- @$(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+ $(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT) EXTRADEFINES=$(KDEFINE)
$(APPDIR)/libapps$(LIBEXT): context
- @$(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)" libapps$(LIBEXT)
+ $(Q) $(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)" libapps$(LIBEXT)
syscall/libproxies$(LIBEXT): context
- @$(MAKE) -C syscall TOPDIR="$(TOPDIR)" libproxies$(LIBEXT)
+ $(Q) $(MAKE) -C syscall TOPDIR="$(TOPDIR)" libproxies$(LIBEXT)
# Possible non-kernel builds
lib/liblib$(LIBEXT): context
- @$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
+ $(Q) $(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
# pass1 and pass2
#
@@ -502,46 +508,46 @@ pass1deps: context pass1dep $(USERLIBS)
pass1: pass1deps
ifeq ($(CONFIG_BUILD_2PASS),y)
- @if [ -z "$(CONFIG_PASS1_BUILDIR)" ]; then \
+ $(Q) if [ -z "$(CONFIG_PASS1_BUILDIR)" ]; then \
echo "ERROR: CONFIG_PASS1_BUILDIR not defined"; \
exit 1; \
fi
- @if [ ! -d "$(CONFIG_PASS1_BUILDIR)" ]; then \
+ $(Q) if [ ! -d "$(CONFIG_PASS1_BUILDIR)" ]; then \
echo "ERROR: CONFIG_PASS1_BUILDIR does not exist"; \
exit 1; \
fi
- @if [ ! -f "$(CONFIG_PASS1_BUILDIR)/Makefile" ]; then \
+ $(Q) if [ ! -f "$(CONFIG_PASS1_BUILDIR)/Makefile" ]; then \
echo "ERROR: No Makefile in CONFIG_PASS1_BUILDIR"; \
exit 1; \
fi
- @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" LINKLIBS="$(NUTTXLIBS)" USERLIBS="$(USERLIBS)" "$(CONFIG_PASS1_TARGET)"
+ $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" LINKLIBS="$(NUTTXLIBS)" USERLIBS="$(USERLIBS)" "$(CONFIG_PASS1_TARGET)"
endif
pass2deps: context pass2dep $(NUTTXLIBS)
pass2: pass2deps
- @$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" EXTRA_OBJS="$(EXTRA_OBJS)" LINKLIBS="$(NUTTXLIBS)" EXTRADEFINES=$(KDEFINE) $(BIN)
- @if [ -w /tftpboot ] ; then \
+ $(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" EXTRA_OBJS="$(EXTRA_OBJS)" LINKLIBS="$(NUTTXLIBS)" EXTRADEFINES=$(KDEFINE) $(BIN)
+ $(Q) if [ -w /tftpboot ] ; then \
cp -f $(BIN) /tftpboot/$(BIN).${CONFIG_ARCH}; \
fi
ifeq ($(CONFIG_RRLOAD_BINARY),y)
@echo "MK: $(BIN).rr"
- @$(TOPDIR)/tools/mkimage.sh --Prefix $(CROSSDEV) $(BIN) $(BIN).rr
- @if [ -w /tftpboot ] ; then \
+ $(Q) $(TOPDIR)/tools/mkimage.sh --Prefix $(CROSSDEV) $(BIN) $(BIN).rr
+ $(Q) if [ -w /tftpboot ] ; then \
cp -f $(BIN).rr /tftpboot/$\(BIN).rr.$(CONFIG_ARCH); \
fi
endif
ifeq ($(CONFIG_INTELHEX_BINARY),y)
@echo "CP: $(BIN).hex"
- @$(OBJCOPY) $(OBJCOPYARGS) -O ihex $(BIN) $(BIN).hex
+ $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex $(BIN) $(BIN).hex
endif
ifeq ($(CONFIG_MOTOROLA_SREC),y)
@echo "CP: $(BIN).srec"
- @$(OBJCOPY) $(OBJCOPYARGS) -O srec $(BIN) $(BIN).srec
+ $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O srec $(BIN) $(BIN).srec
endif
ifeq ($(CONFIG_RAW_BINARY),y)
@echo "CP: $(BIN).bin"
- @$(OBJCOPY) $(OBJCOPYARGS) -O binary $(BIN) $(BIN).bin
+ $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary $(BIN) $(BIN).bin
endif
# $(BIN)
@@ -568,12 +574,12 @@ download: $(BIN)
# pass2dep: Create pass2 build dependencies
pass1dep: context
- @for dir in $(USERDEPDIRS) ; do \
+ $(Q) for dir in $(USERDEPDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
done
pass2dep: context
- @for dir in $(KERNDEPDIRS) ; do \
+ $(Q) for dir in $(KERNDEPDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" EXTRADEFINES=$(KDEFINE) depend; \
done
@@ -585,13 +591,13 @@ pass2dep: context
# misc/tools/README.txt for additional information.
config:
- @APPSDIR=${CONFIG_APPS_DIR} conf Kconfig
+ $(Q) APPSDIR=${CONFIG_APPS_DIR} conf Kconfig
oldconfig:
- @APPSDIR=${CONFIG_APPS_DIR} conf --oldconfig Kconfig
+ $(Q) APPSDIR=${CONFIG_APPS_DIR} conf --oldconfig Kconfig
menuconfig:
- @APPSDIR=${CONFIG_APPS_DIR} mconf Kconfig
+ $(Q) APPSDIR=${CONFIG_APPS_DIR} mconf Kconfig
# export
#
@@ -602,7 +608,7 @@ menuconfig:
# that the archiver is 'ar'
export: pass2deps
- @tools/mkexport.sh -w$(WINTOOL) -t "$(TOPDIR)" -l "$(NUTTXLIBS)"
+ $(Q) tools/mkexport.sh -w$(WINTOOL) -t "$(TOPDIR)" -l "$(NUTTXLIBS)"
# General housekeeping targets: dependencies, cleaning, etc.
#
@@ -617,23 +623,23 @@ export: pass2deps
depend: pass1dep pass2dep
subdir_clean:
- @for dir in $(CLEANDIRS) ; do \
+ $(Q) for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean ; \
fi \
done
- @$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" clean
- @$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
+ $(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" clean
+ $(Q) $(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
ifeq ($(CONFIG_BUILD_2PASS),y)
- @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" clean
+ $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" clean
endif
clean: subdir_clean
- @rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~
- @rm -f nuttx-export*
+ $(Q) rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~
+ $(Q) rm -f nuttx-export*
subdir_distclean:
- @for dir in $(CLEANDIRS) ; do \
+ $(Q) for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" distclean ; \
fi \
@@ -641,9 +647,9 @@ subdir_distclean:
distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y)
- @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
+ $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif
- @rm -f Make.defs setenv.sh .config .config.old
+ $(Q) rm -f Make.defs setenv.sh .config .config.old
# Application housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps/ directory is included with NuttX,
@@ -663,19 +669,19 @@ endif
apps_clean:
ifneq ($(APPDIR),)
- @$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" clean
+ $(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" clean
endif
apps_distclean:
ifneq ($(APPDIR),)
- @if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \
+ $(Q) if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \
cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \
{ echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } \
else \
rm -f _SAVED_APPS_config; \
fi
- @$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
- @if [ -r _SAVED_APPS_config ]; then \
+ $(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
+ $(Q) if [ -r _SAVED_APPS_config ]; then \
mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \
{ echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \
fi
diff --git a/nuttx/drivers/lcd/ug-2864ambag01.c b/nuttx/drivers/lcd/ug-2864ambag01.c
index aa50abaed..e133f3901 100644
--- a/nuttx/drivers/lcd/ug-2864ambag01.c
+++ b/nuttx/drivers/lcd/ug-2864ambag01.c
@@ -153,6 +153,8 @@
# undef CONFIG_LCD_PORTRAIT
# undef CONFIG_LCD_RLANDSCAPE
# undef CONFIG_LCD_RPORTRAIT
+#elif defined(CONFIG_LCD_RLANDSCAPE)
+# warning "Reverse landscape mode is untested and, hence, probably buggy"
#endif
/* SH1101A Commands *******************************************************************/
@@ -574,7 +576,11 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_
fbmask = 1 << (row & 7);
fbptr = &priv->fb[page * UG2864AMBAG01_XRES + col];
+#ifdef CONFIG_LCD_RLANDSCAPE
+ ptr = fbptr + pixlen - 1;
+#else
ptr = fbptr;
+#endif
#ifdef CONFIG_NX_PACKEDMSFIRST
usrmask = MS_BIT;
#else
@@ -585,6 +591,16 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_
{
/* Set or clear the corresponding bit */
+#ifdef CONFIG_LCD_RLANDSCAPE
+ if ((*buffer & usrmask) != 0)
+ {
+ *ptr-- |= fbmask;
+ }
+ else
+ {
+ *ptr-- &= ~fbmask;
+ }
+#else
if ((*buffer & usrmask) != 0)
{
*ptr++ |= fbmask;
@@ -593,6 +609,7 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_
{
*ptr++ &= ~fbmask;
}
+#endif
/* Inc/Decrement to the next source pixel */
@@ -748,7 +765,11 @@ static int ug2864ambag01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buf
*/
fbmask = 1 << (row & 7);
+#ifdef CONFIG_LCD_RLANDSCAPE
+ fbptr = &priv->fb[page * (UG2864AMBAG01_XRES-1) + col + pixlen];
+#else
fbptr = &priv->fb[page * UG2864AMBAG01_XRES + col];
+#endif
#ifdef CONFIG_NX_PACKEDMSFIRST
usrmask = MS_BIT;
#else
@@ -760,7 +781,11 @@ static int ug2864ambag01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buf
{
/* Set or clear the corresponding bit */
+#ifdef CONFIG_LCD_RLANDSCAPE
+ uint8_t byte = *fbptr--;
+#else
uint8_t byte = *fbptr++;
+#endif
if ((byte & fbmask) != 0)
{
*buffer |= usrmask;
diff --git a/nuttx/tools/configure.sh b/nuttx/tools/configure.sh
index 3b68fe3f6..1cba7805f 100755
--- a/nuttx/tools/configure.sh
+++ b/nuttx/tools/configure.sh
@@ -100,18 +100,36 @@ if [ ! -d "${configpath}" ]; then
exit 3
fi
-if [ ! -r "${configpath}/Make.defs" ]; then
- echo "File \"${configpath}/Make.defs\" does not exist"
+src_makedefs="${configpath}/Make.defs"
+dest_makedefs="${TOPDIR}/Make.defs"
+
+if [ ! -r "${src_makedefs}" ]; then
+ echo "File \"${src_makedefs}\" does not exist"
exit 4
fi
-if [ ! -r "${configpath}/setenv.sh" ]; then
- echo "File \"${configpath}/setenv.sh\" does not exist"
- exit 5
+src_setenv="${configpath}/setenv.sh"
+unset have_setenv
+
+if [ -r "${src_setenv}" ]; then
+ dest_setenv=${TOPDIR}/setenv.sh
+ have_setenv=y
+else
+ src_setenv="${configpath}/setenv.bat"
+ if [ -r "${src_setenv}" ]; then
+ dest_setenv=${TOPDIR}/setenv.bat
+ have_setenv=y
+ else
+ unset src_setenv
+ fi
fi
-if [ ! -r "${configpath}/defconfig" ]; then
- echo "File \"${configpath}/defconfig\" does not exist"
+src_config="${configpath}/defconfig"
+tmp_config="${TOPDIR}/.configX"
+dest_config="${TOPDIR}/.config"
+
+if [ ! -r "${src_config}" ]; then
+ echo "File \"${src_config}\" does not exist"
exit 6
fi
@@ -121,11 +139,11 @@ fi
# (2) The CONFIG_APPS_DIR to see if there is a configured location for the
# application directory.
-newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f2`
+newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${src_config}" | cut -d'=' -f2`
defappdir=y
if [ -z "${appdir}" ]; then
- quoted=`grep "^CONFIG_APPS_DIR=" "${configpath}/defconfig" | cut -d'=' -f2`
+ quoted=`grep "^CONFIG_APPS_DIR=" "${src_config}" | cut -d'=' -f2`
if [ ! -z "${appdir}" ]; then
appdir=`echo ${quoted} | sed -e "s/\"//g"`
defappdir=n
@@ -167,24 +185,26 @@ fi
# Okay... Everything looks good. Setup the configuration
-install -C "${configpath}/Make.defs" "${TOPDIR}/." || \
- { echo "Failed to copy ${configpath}/Make.defs" ; exit 7 ; }
-install -C "${configpath}/setenv.sh" "${TOPDIR}/." || \
- { echo "Failed to copy ${configpath}/setenv.sh" ; exit 8 ; }
-chmod 755 "${TOPDIR}/setenv.sh"
-install -C "${configpath}/defconfig" "${TOPDIR}/.configX" || \
- { echo "Failed to copy ${configpath}/defconfig" ; exit 9 ; }
+install -C "${src_makedefs}" "${dest_makedefs}" || \
+ { echo "Failed to copy \"${src_makedefs}\"" ; exit 7 ; }
+if [ "X${have_setenv}" = "Xy" ]; then
+ install -C "${src_setenv}" "${dest_setenv}" || \
+ { echo "Failed to copy ${src_setenv}" ; exit 8 ; }
+ chmod 755 "${dest_setenv}"
+fi
+install -C "${src_config}" "${tmp_config}" || \
+ { echo "Failed to copy \"${src_config}\"" ; exit 9 ; }
# If we did not use the CONFIG_APPS_DIR that was in the defconfig config file,
# then append the correct application information to the tail of the .config
# file
if [ "X${defappdir}" = "Xy" ]; then
- sed -i -e "/^CONFIG_APPS_DIR/d" "${TOPDIR}/.configX"
- echo "" >> "${TOPDIR}/.configX"
- echo "# Application configuration" >> "${TOPDIR}/.configX"
- echo "" >> "${TOPDIR}/.configX"
- echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX"
+ sed -i -e "/^CONFIG_APPS_DIR/d" "${tmp_config}"
+ echo "" >> "${tmp_config}"
+ echo "# Application configuration" >> "${tmp_config}"
+ echo "" >> "${tmp_config}"
+ echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${tmp_config}"
fi
# Copy appconfig file. The appconfig file will be copied to ${appdir}/.config
@@ -203,6 +223,6 @@ fi
# install the final .configX only if it differs from any existing
# .config file.
-install -C "${TOPDIR}/.configX" "${TOPDIR}/.config"
-rm -f "${TOPDIR}/.configX"
+install -C "${tmp_config}" "${dest_config}"
+rm -f "${tmp_config}"