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
This commit is contained in:
patacongo
2012-11-09 22:37:52 +00:00
parent 80f8563f4d
commit de47b5e4cf
4 changed files with 218 additions and 149 deletions
+19 -1
View File
@@ -53,10 +53,28 @@ config WINDOWS_MSYS
bool "MSYS" bool "MSYS"
config WINDOWS_OTHER config WINDOWS_OTHER
bool "Other" bool "Other POSIX-like environment"
endchoice 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" menu "Build Configuration"
config APPS_DIR config APPS_DIR
+77 -71
View File
@@ -286,7 +286,7 @@ endif
ifeq ($(NEED_MATH_H),y) ifeq ($(NEED_MATH_H),y)
include/math.h: include/nuttx/math.h 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 else
include/math.h: include/math.h:
endif endif
@@ -299,7 +299,7 @@ endif
ifeq ($(CONFIG_ARCH_FLOAT_H),y) ifeq ($(CONFIG_ARCH_FLOAT_H),y)
include/float.h: include/nuttx/float.h 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 else
include/float.h: include/float.h:
endif endif
@@ -311,7 +311,7 @@ endif
ifeq ($(CONFIG_ARCH_STDARG_H),y) ifeq ($(CONFIG_ARCH_STDARG_H),y)
include/stdarg.h: include/nuttx/stdarg.h 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 else
include/stdarg.h: include/stdarg.h:
endif endif
@@ -321,27 +321,27 @@ endif
# tools/mkversion tool is built and used to create include/nuttx/version.h # tools/mkversion tool is built and used to create include/nuttx/version.h
tools/mkversion: tools/mkversion:
@$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkversion $(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkversion
$(TOPDIR)/.version: $(TOPDIR)/.version:
@if [ ! -f .version ]; then \ $(Q) if [ ! -f .version ]; then \
echo "No .version file found, creating one"; \ echo "No .version file found, creating one"; \
tools/version.sh -v 0.0 -b 0 .version; \ tools/version.sh -v 0.0 -b 0 .version; \
chmod 755 .version; \ chmod 755 .version; \
fi fi
include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion 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 # Targets used to build include/nuttx/config.h. Creation of config.h is
# part of the overall NuttX configuration sequence. Notice that the # 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 tool is built and used to create include/nuttx/config.h
tools/mkconfig: 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 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 # dirlinks, and helpers
# #
@@ -353,7 +353,8 @@ include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
include/apps: Make.defs include/apps: Make.defs
ifneq ($(APPDIR),) 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; \ $(DIRLINK) $(TOPDIR)/$(APPDIR)/include include/apps; \
fi fi
endif endif
@@ -361,30 +362,35 @@ endif
# Link the arch/<arch-name>/include directory to include/arch # Link the arch/<arch-name>/include directory to include/arch
include/arch: Make.defs 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 # Link the configs/<board-name>/include directory to include/arch/board
include/arch/board: include/arch Make.defs include/arch 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 # Link the configs/<board-name>/src dir to arch/<arch-name>/src/board
$(ARCH_SRC)/board: Make.defs $(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 # Link arch/<arch-name>/include/<chip-name> to arch/<arch-name>/include/chip
$(ARCH_SRC)/chip: Make.defs $(ARCH_SRC)/chip: Make.defs
ifneq ($(CONFIG_ARCH_CHIP),) 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 endif
# Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip # Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip
include/arch/chip: include/arch Make.defs include/arch/chip: include/arch Make.defs
ifneq ($(CONFIG_ARCH_CHIP),) 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 endif
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip include/apps 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. # 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 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; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" context; \
done 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. # and symbolic links created by the context target.
clean_context: clean_context:
@rm -f include/nuttx/config.h $(Q) rm -f include/nuttx/config.h
@rm -f include/nuttx/version.h $(Q) rm -f include/nuttx/version.h
@rm -f include/math.h $(Q) rm -f include/math.h
@rm -f include/stdarg.h $(Q) rm -f include/stdarg.h
@$(DIRUNLINK) include/arch/board $(Q) $(DIRUNLINK) include/arch/board
@$(DIRUNLINK) include/arch/chip $(Q) $(DIRUNLINK) include/arch/chip
@$(DIRUNLINK) include/arch $(Q) $(DIRUNLINK) include/arch
@$(DIRUNLINK) $(ARCH_SRC)/board $(Q) $(DIRUNLINK) $(ARCH_SRC)/board
@$(DIRUNLINK) $(ARCH_SRC)/chip $(Q) $(DIRUNLINK) $(ARCH_SRC)/chip
@$(DIRUNLINK) include/apps $(Q) $(DIRUNLINK) include/apps
# check_context # check_context
# #
@@ -426,7 +432,7 @@ clean_context:
# configuration files have been installed and that NuttX is ready to be built. # configuration files have been installed and that NuttX is ready to be built.
check_context: 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 "" ; echo "Nuttx has not been configured:" ; \
echo " cd tools; ./configure.sh <target>" ; echo "" ; \ echo " cd tools; ./configure.sh <target>" ; echo "" ; \
exit 1 ; \ exit 1 ; \
@@ -440,53 +446,53 @@ check_context:
# Possible kernel-mode builds # Possible kernel-mode builds
lib/libklib$(LIBEXT): context 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 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 $(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 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 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 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 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 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 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 # Possible user-mode builds
lib/libulib$(LIBEXT): context lib/libulib$(LIBEXT): context
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" libulib$(LIBEXT) $(Q) $(MAKE) -C lib TOPDIR="$(TOPDIR)" libulib$(LIBEXT)
libxx/liblibxx$(LIBEXT): context libxx/liblibxx$(LIBEXT): context
@$(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT) $(Q) $(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT)
mm/libmm$(LIBEXT): context 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 $(APPDIR)/libapps$(LIBEXT): context
@$(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)" libapps$(LIBEXT) $(Q) $(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)" libapps$(LIBEXT)
syscall/libproxies$(LIBEXT): context syscall/libproxies$(LIBEXT): context
@$(MAKE) -C syscall TOPDIR="$(TOPDIR)" libproxies$(LIBEXT) $(Q) $(MAKE) -C syscall TOPDIR="$(TOPDIR)" libproxies$(LIBEXT)
# Possible non-kernel builds # Possible non-kernel builds
lib/liblib$(LIBEXT): context lib/liblib$(LIBEXT): context
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT) $(Q) $(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
# pass1 and pass2 # pass1 and pass2
# #
@@ -502,46 +508,46 @@ pass1deps: context pass1dep $(USERLIBS)
pass1: pass1deps pass1: pass1deps
ifeq ($(CONFIG_BUILD_2PASS),y) 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"; \ echo "ERROR: CONFIG_PASS1_BUILDIR not defined"; \
exit 1; \ exit 1; \
fi fi
@if [ ! -d "$(CONFIG_PASS1_BUILDIR)" ]; then \ $(Q) if [ ! -d "$(CONFIG_PASS1_BUILDIR)" ]; then \
echo "ERROR: CONFIG_PASS1_BUILDIR does not exist"; \ echo "ERROR: CONFIG_PASS1_BUILDIR does not exist"; \
exit 1; \ exit 1; \
fi fi
@if [ ! -f "$(CONFIG_PASS1_BUILDIR)/Makefile" ]; then \ $(Q) if [ ! -f "$(CONFIG_PASS1_BUILDIR)/Makefile" ]; then \
echo "ERROR: No Makefile in CONFIG_PASS1_BUILDIR"; \ echo "ERROR: No Makefile in CONFIG_PASS1_BUILDIR"; \
exit 1; \ exit 1; \
fi 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 endif
pass2deps: context pass2dep $(NUTTXLIBS) pass2deps: context pass2dep $(NUTTXLIBS)
pass2: pass2deps pass2: pass2deps
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" EXTRA_OBJS="$(EXTRA_OBJS)" LINKLIBS="$(NUTTXLIBS)" EXTRADEFINES=$(KDEFINE) $(BIN) $(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" EXTRA_OBJS="$(EXTRA_OBJS)" LINKLIBS="$(NUTTXLIBS)" EXTRADEFINES=$(KDEFINE) $(BIN)
@if [ -w /tftpboot ] ; then \ $(Q) if [ -w /tftpboot ] ; then \
cp -f $(BIN) /tftpboot/$(BIN).${CONFIG_ARCH}; \ cp -f $(BIN) /tftpboot/$(BIN).${CONFIG_ARCH}; \
fi fi
ifeq ($(CONFIG_RRLOAD_BINARY),y) ifeq ($(CONFIG_RRLOAD_BINARY),y)
@echo "MK: $(BIN).rr" @echo "MK: $(BIN).rr"
@$(TOPDIR)/tools/mkimage.sh --Prefix $(CROSSDEV) $(BIN) $(BIN).rr $(Q) $(TOPDIR)/tools/mkimage.sh --Prefix $(CROSSDEV) $(BIN) $(BIN).rr
@if [ -w /tftpboot ] ; then \ $(Q) if [ -w /tftpboot ] ; then \
cp -f $(BIN).rr /tftpboot/$\(BIN).rr.$(CONFIG_ARCH); \ cp -f $(BIN).rr /tftpboot/$\(BIN).rr.$(CONFIG_ARCH); \
fi fi
endif endif
ifeq ($(CONFIG_INTELHEX_BINARY),y) ifeq ($(CONFIG_INTELHEX_BINARY),y)
@echo "CP: $(BIN).hex" @echo "CP: $(BIN).hex"
@$(OBJCOPY) $(OBJCOPYARGS) -O ihex $(BIN) $(BIN).hex $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex $(BIN) $(BIN).hex
endif endif
ifeq ($(CONFIG_MOTOROLA_SREC),y) ifeq ($(CONFIG_MOTOROLA_SREC),y)
@echo "CP: $(BIN).srec" @echo "CP: $(BIN).srec"
@$(OBJCOPY) $(OBJCOPYARGS) -O srec $(BIN) $(BIN).srec $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O srec $(BIN) $(BIN).srec
endif endif
ifeq ($(CONFIG_RAW_BINARY),y) ifeq ($(CONFIG_RAW_BINARY),y)
@echo "CP: $(BIN).bin" @echo "CP: $(BIN).bin"
@$(OBJCOPY) $(OBJCOPYARGS) -O binary $(BIN) $(BIN).bin $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary $(BIN) $(BIN).bin
endif endif
# $(BIN) # $(BIN)
@@ -568,12 +574,12 @@ download: $(BIN)
# pass2dep: Create pass2 build dependencies # pass2dep: Create pass2 build dependencies
pass1dep: context pass1dep: context
@for dir in $(USERDEPDIRS) ; do \ $(Q) for dir in $(USERDEPDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
done done
pass2dep: context pass2dep: context
@for dir in $(KERNDEPDIRS) ; do \ $(Q) for dir in $(KERNDEPDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" EXTRADEFINES=$(KDEFINE) depend; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" EXTRADEFINES=$(KDEFINE) depend; \
done done
@@ -585,13 +591,13 @@ pass2dep: context
# misc/tools/README.txt for additional information. # misc/tools/README.txt for additional information.
config: config:
@APPSDIR=${CONFIG_APPS_DIR} conf Kconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} conf Kconfig
oldconfig: oldconfig:
@APPSDIR=${CONFIG_APPS_DIR} conf --oldconfig Kconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} conf --oldconfig Kconfig
menuconfig: menuconfig:
@APPSDIR=${CONFIG_APPS_DIR} mconf Kconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} mconf Kconfig
# export # export
# #
@@ -602,7 +608,7 @@ menuconfig:
# that the archiver is 'ar' # that the archiver is 'ar'
export: pass2deps 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. # General housekeeping targets: dependencies, cleaning, etc.
# #
@@ -617,23 +623,23 @@ export: pass2deps
depend: pass1dep pass2dep depend: pass1dep pass2dep
subdir_clean: subdir_clean:
@for dir in $(CLEANDIRS) ; do \ $(Q) for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \ if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean ; \
fi \ fi \
done done
@$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" clean
@$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
ifeq ($(CONFIG_BUILD_2PASS),y) ifeq ($(CONFIG_BUILD_2PASS),y)
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" clean
endif endif
clean: subdir_clean clean: subdir_clean
@rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~ $(Q) rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~
@rm -f nuttx-export* $(Q) rm -f nuttx-export*
subdir_distclean: subdir_distclean:
@for dir in $(CLEANDIRS) ; do \ $(Q) for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \ if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" distclean ; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" distclean ; \
fi \ fi \
@@ -641,9 +647,9 @@ subdir_distclean:
distclean: clean subdir_distclean clean_context distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y) ifeq ($(CONFIG_BUILD_2PASS),y)
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif 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 housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps/ directory is included with NuttX, # application directory. A sample apps/ directory is included with NuttX,
@@ -663,19 +669,19 @@ endif
apps_clean: apps_clean:
ifneq ($(APPDIR),) ifneq ($(APPDIR),)
@$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" clean $(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" clean
endif endif
apps_distclean: apps_distclean:
ifneq ($(APPDIR),) ifneq ($(APPDIR),)
@if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \ $(Q) if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \
cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \ cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \
{ echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } \ { echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } \
else \ else \
rm -f _SAVED_APPS_config; \ rm -f _SAVED_APPS_config; \
fi fi
@$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean $(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
@if [ -r _SAVED_APPS_config ]; then \ $(Q) if [ -r _SAVED_APPS_config ]; then \
mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \ mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \
{ echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \ { echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \
fi fi
+25
View File
@@ -153,6 +153,8 @@
# undef CONFIG_LCD_PORTRAIT # undef CONFIG_LCD_PORTRAIT
# undef CONFIG_LCD_RLANDSCAPE # undef CONFIG_LCD_RLANDSCAPE
# undef CONFIG_LCD_RPORTRAIT # undef CONFIG_LCD_RPORTRAIT
#elif defined(CONFIG_LCD_RLANDSCAPE)
# warning "Reverse landscape mode is untested and, hence, probably buggy"
#endif #endif
/* SH1101A Commands *******************************************************************/ /* 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); fbmask = 1 << (row & 7);
fbptr = &priv->fb[page * UG2864AMBAG01_XRES + col]; fbptr = &priv->fb[page * UG2864AMBAG01_XRES + col];
#ifdef CONFIG_LCD_RLANDSCAPE
ptr = fbptr + pixlen - 1;
#else
ptr = fbptr; ptr = fbptr;
#endif
#ifdef CONFIG_NX_PACKEDMSFIRST #ifdef CONFIG_NX_PACKEDMSFIRST
usrmask = MS_BIT; usrmask = MS_BIT;
#else #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 */ /* Set or clear the corresponding bit */
#ifdef CONFIG_LCD_RLANDSCAPE
if ((*buffer & usrmask) != 0)
{
*ptr-- |= fbmask;
}
else
{
*ptr-- &= ~fbmask;
}
#else
if ((*buffer & usrmask) != 0) if ((*buffer & usrmask) != 0)
{ {
*ptr++ |= fbmask; *ptr++ |= fbmask;
@@ -593,6 +609,7 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_
{ {
*ptr++ &= ~fbmask; *ptr++ &= ~fbmask;
} }
#endif
/* Inc/Decrement to the next source pixel */ /* 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); 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]; fbptr = &priv->fb[page * UG2864AMBAG01_XRES + col];
#endif
#ifdef CONFIG_NX_PACKEDMSFIRST #ifdef CONFIG_NX_PACKEDMSFIRST
usrmask = MS_BIT; usrmask = MS_BIT;
#else #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 */ /* Set or clear the corresponding bit */
#ifdef CONFIG_LCD_RLANDSCAPE
uint8_t byte = *fbptr--;
#else
uint8_t byte = *fbptr++; uint8_t byte = *fbptr++;
#endif
if ((byte & fbmask) != 0) if ((byte & fbmask) != 0)
{ {
*buffer |= usrmask; *buffer |= usrmask;
+43 -23
View File
@@ -100,18 +100,36 @@ if [ ! -d "${configpath}" ]; then
exit 3 exit 3
fi fi
if [ ! -r "${configpath}/Make.defs" ]; then src_makedefs="${configpath}/Make.defs"
echo "File \"${configpath}/Make.defs\" does not exist" dest_makedefs="${TOPDIR}/Make.defs"
if [ ! -r "${src_makedefs}" ]; then
echo "File \"${src_makedefs}\" does not exist"
exit 4 exit 4
fi fi
if [ ! -r "${configpath}/setenv.sh" ]; then src_setenv="${configpath}/setenv.sh"
echo "File \"${configpath}/setenv.sh\" does not exist" unset have_setenv
exit 5
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 fi
if [ ! -r "${configpath}/defconfig" ]; then src_config="${configpath}/defconfig"
echo "File \"${configpath}/defconfig\" does not exist" tmp_config="${TOPDIR}/.configX"
dest_config="${TOPDIR}/.config"
if [ ! -r "${src_config}" ]; then
echo "File \"${src_config}\" does not exist"
exit 6 exit 6
fi fi
@@ -121,11 +139,11 @@ fi
# (2) The CONFIG_APPS_DIR to see if there is a configured location for the # (2) The CONFIG_APPS_DIR to see if there is a configured location for the
# application directory. # application directory.
newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f2` newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${src_config}" | cut -d'=' -f2`
defappdir=y defappdir=y
if [ -z "${appdir}" ]; then 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 if [ ! -z "${appdir}" ]; then
appdir=`echo ${quoted} | sed -e "s/\"//g"` appdir=`echo ${quoted} | sed -e "s/\"//g"`
defappdir=n defappdir=n
@@ -167,24 +185,26 @@ fi
# Okay... Everything looks good. Setup the configuration # Okay... Everything looks good. Setup the configuration
install -C "${configpath}/Make.defs" "${TOPDIR}/." || \ install -C "${src_makedefs}" "${dest_makedefs}" || \
{ echo "Failed to copy ${configpath}/Make.defs" ; exit 7 ; } { echo "Failed to copy \"${src_makedefs}\"" ; exit 7 ; }
install -C "${configpath}/setenv.sh" "${TOPDIR}/." || \ if [ "X${have_setenv}" = "Xy" ]; then
{ echo "Failed to copy ${configpath}/setenv.sh" ; exit 8 ; } install -C "${src_setenv}" "${dest_setenv}" || \
chmod 755 "${TOPDIR}/setenv.sh" { echo "Failed to copy ${src_setenv}" ; exit 8 ; }
install -C "${configpath}/defconfig" "${TOPDIR}/.configX" || \ chmod 755 "${dest_setenv}"
{ echo "Failed to copy ${configpath}/defconfig" ; exit 9 ; } 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, # 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 # then append the correct application information to the tail of the .config
# file # file
if [ "X${defappdir}" = "Xy" ]; then if [ "X${defappdir}" = "Xy" ]; then
sed -i -e "/^CONFIG_APPS_DIR/d" "${TOPDIR}/.configX" sed -i -e "/^CONFIG_APPS_DIR/d" "${tmp_config}"
echo "" >> "${TOPDIR}/.configX" echo "" >> "${tmp_config}"
echo "# Application configuration" >> "${TOPDIR}/.configX" echo "# Application configuration" >> "${tmp_config}"
echo "" >> "${TOPDIR}/.configX" echo "" >> "${tmp_config}"
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX" echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${tmp_config}"
fi fi
# Copy appconfig file. The appconfig file will be copied to ${appdir}/.config # 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 # install the final .configX only if it differs from any existing
# .config file. # .config file.
install -C "${TOPDIR}/.configX" "${TOPDIR}/.config" install -C "${tmp_config}" "${dest_config}"
rm -f "${TOPDIR}/.configX" rm -f "${tmp_config}"