You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/08 14:47:33 UTC

[incubator-nuttx] branch pr231 updated: Rename board_lcd.c to up_lcd.c like other sim code

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch pr231
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/pr231 by this push:
     new f02a23e  Rename board_lcd.c to up_lcd.c like other sim code
f02a23e is described below

commit f02a23e1fd008124c4fb0edc03c190b11492a743
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Feb 6 20:29:26 2020 +0800

    Rename board_lcd.c to up_lcd.c like other sim code
    
    and compile up_spiflash.c and up_qspiflash.c conditionally
    
    Change-Id: Ice45c2e47141bb47d5332e7fcc2e7eb279b3be84
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/Makefile                      | 49 ++++++++++++++----------------
 arch/sim/src/sim/{board_lcd.c => up_lcd.c} |  2 +-
 2 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index f513d47..6e05767 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -41,6 +41,14 @@ CPPFLAGS += -I$(ARCH_SRCDIR)/chip -I$(TOPDIR)/sched $(EXTRADEFINES)
 CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(TOPDIR)/sched $(EXTRADEFINES)
 CXXFLAGS += -I$(ARCH_SRCDIR)/chip -I$(TOPDIR)/sched $(EXTRADEFINES)
 
+# Determine which objects are required in the link.The
+# up_head object normally draws in all that is needed, but
+# there are a fews that must be included because they
+# are called only from the host OS-specific logic(HOSTOBJS)
+
+LINKOBJS = up_head$(OBJEXT)
+REQUIREDOBJS = $(LINKOBJS)
+
 ASRCS =
 
 ifeq ($(CONFIG_HOST_X86_64),y)
@@ -60,8 +68,8 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
 CSRCS  = up_initialize.c up_idle.c up_interruptcontext.c up_initialstate.c
 CSRCS += up_createstack.c up_usestack.c up_releasestack.c up_stackframe.c
 CSRCS += up_unblocktask.c up_blocktask.c up_releasepending.c
-CSRCS += up_reprioritizertr.c up_exit.c up_schedulesigaction.c up_spiflash.c
-CSRCS += up_allocateheap.c up_qspiflash.c
+CSRCS += up_reprioritizertr.c up_exit.c up_schedulesigaction.c
+CSRCS += up_allocateheap.c
 
 VPATH = sim
 DEPPATH = $(patsubst %,--dep-path %,$(subst :, ,$(VPATH)))
@@ -82,6 +90,7 @@ endif
 
 ifeq ($(CONFIG_SMP),y)
   CSRCS += up_smpsignal.c up_smphook.c up_cpuidlestack.c
+  REQUIREDOBJS += up_smpsignal$(OBJEXT) up_smphook$(OBJEXT)
   HOSTCFLAGS += -DCONFIG_SMP=1 -DCONFIG_SMP_NCPUS=$(CONFIG_SMP_NCPUS)
   HOSTSRCS += up_simsmp.c
   STDLIBS += -lpthread
@@ -113,13 +122,15 @@ ifeq ($(CONFIG_SCHED_CRITMONITOR),y)
 endif
 
 ifeq ($(CONFIG_NX_LCDDRIVER),y)
-  CSRCS += board_lcd.c
+  CSRCS += up_lcd.c
 else
   CSRCS += up_framebuffer.c
 ifeq ($(CONFIG_SIM_X11FB),y)
   HOSTSRCS += up_x11framebuffer.c
+  STDLIBS += -lX11 -lXext
 ifeq ($(CONFIG_SIM_TOUCHSCREEN),y)
   CSRCS += up_touchscreen.c
+  REQUIREDOBJS += up_touchscreen$(OBJEXT)
   HOSTSRCS += up_x11eventloop.c
 else
 ifeq ($(CONFIG_SIM_AJOYSTICK),y)
@@ -134,6 +145,14 @@ ifeq ($(CONFIG_SIM_IOEXPANDER),y)
   CSRCS += up_ioexpander.c
 endif
 
+ifeq ($(CONFIG_SIM_SPIFLASH),y)
+  CSRCS += up_spiflash.c
+endif
+
+ifeq ($(CONFIG_SIM_QSPIFLASH),y)
+  CSRCS += up_qspiflash.c
+endif
+
 ifeq ($(CONFIG_FS_FAT),y)
   CSRCS += up_blockdevice.c up_deviceimage.c
   STDLIBS += -lz
@@ -189,12 +208,6 @@ HOSTOBJS = $(HOSTSRCS:.c=$(OBJEXT))
 SRCS = $(ASRCS) $(CSRCS) $(HOSTSRCS)
 OBJS = $(AOBJS) $(COBJS) $(HOSTOBJS)
 
-# Determine which standard libraries will need to be linked in
-
-ifeq ($(CONFIG_SIM_X11FB),y)
-  STDLIBS += -lX11 -lXext
-endif
-
 # Override in Make.defs if linker is not 'ld'
 
 ifeq ($(HOSTOS),Darwin)
@@ -210,24 +223,6 @@ endif
 EXTRA_LIBS ?=
 EXTRA_LIBPATHS ?=
 
-# Determine which objects are required in the link.  The
-# up_head object normally draws in all that is needed, but
-# there are a fews that must be included because they
-# are called only from the host OS-specific logic (HOSTOBJS)
-
-LINKOBJS = up_head$(OBJEXT)
-REQUIREDOBJS = $(LINKOBJS)
-
-ifeq ($(CONFIG_SIM_X11FB),y)
-ifeq ($(CONFIG_SIM_TOUCHSCREEN),y)
-  REQUIREDOBJS += up_touchscreen$(OBJEXT)
-endif
-endif
-
-ifeq ($(CONFIG_SMP),y)
-  REQUIREDOBJS += up_smpsignal$(OBJEXT) up_smphook$(OBJEXT)
-endif
-
 # Determine which NuttX libraries will need to be linked in
 # Most are provided by LINKLIBS on the MAKE command line
 
diff --git a/arch/sim/src/sim/board_lcd.c b/arch/sim/src/sim/up_lcd.c
similarity index 99%
rename from arch/sim/src/sim/board_lcd.c
rename to arch/sim/src/sim/up_lcd.c
index eed24a2..2a0151e 100644
--- a/arch/sim/src/sim/board_lcd.c
+++ b/arch/sim/src/sim/up_lcd.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/sim/src/sim/board_lcd.c
+ * arch/sim/src/sim/up_lcd.c
  *
  *   Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt <gn...@nuttx.org>