From b55eb97656c92bbb5f7bce796de5084cbbc890c7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 26 Sep 2012 14:36:28 +0000 Subject: Fixes for clean compilation of NxWidgets/NxWM with Kconfig and changes to build system; Fixes to Shenzhou NxWM configuration for clean build git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5193 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/ChangeLog | 6 ++++ nuttx/Documentation/README.html | 9 +++--- nuttx/Makefile | 3 +- nuttx/arch/arm/src/stm32/Kconfig | 9 +----- nuttx/configs/shenzhou/nxwm/defconfig | 48 +++++++++++++++++----------- nuttx/configs/shenzhou/scripts/ld.script | 8 ++++- nuttx/configs/shenzhou/scripts/ld.script.dfu | 8 ++++- nuttx/configs/shenzhou/src/up_touchscreen.c | 7 ++-- nuttx/tools/cfgparser.c | 19 ++++++++--- 9 files changed, 76 insertions(+), 41 deletions(-) (limited to 'nuttx') diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index c64112ecb..3c4f142d1 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3407,3 +3407,9 @@ * configs/shenzhou/src/up_touchscreen.c: Add ADS7843E touchscreen support for the Shenzhou board. The initial check-in is untested and basically a clone of the the touchscreen support fro the SAM-3U. + * tools/cfgparser.c: There are some NxWidget configuration + settings that must be de-quoted. + * arch/arm/src/stm32/Kconfig: There is no SPI4. Some platforms + SPI3 and some do not (still not clear). + * nuttx/configs/shenzhou: Various fixes to build new NxWM + configuration. diff --git a/nuttx/Documentation/README.html b/nuttx/Documentation/README.html index 6d41a6f37..95102a004 100644 --- a/nuttx/Documentation/README.html +++ b/nuttx/Documentation/README.html @@ -8,7 +8,7 @@

NuttX README Files

-

Last Updated: September 12, 2012

+

Last Updated: September 25, 2012

@@ -73,8 +73,8 @@ | | | |- src/README.txt | | | `- README.txt | | |- ekk-lm3s9b96/ - | | | `- README.txt - | | |- | | |- ez80f910200kitg/ + | | | `- README.txt + | | |- ez80f910200kitg/ | | | |- ostest/README.txt | | | `- README.txt | | |- ez80f910200zco/ @@ -93,7 +93,8 @@ | | | |- src/README.txt | | | `- README.txt | | |- lincoln60/ - | | | `- README.txt | | |- kwikstik-k40/ + | | | `- README.txt + | | |- kwikstik-k40/ | | | `- README.txt | | |- lm3s6432-s2e/ | | | |- include/README.txt diff --git a/nuttx/Makefile b/nuttx/Makefile index 3c6e9c198..7a058d88e 100644 --- a/nuttx/Makefile +++ b/nuttx/Makefile @@ -38,7 +38,8 @@ TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'} -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/Make.defs -# Control build verbosity. +# Control build verbosity + ifeq ($(V),1) export Q := else diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 26c4b20c9..8d93fb104 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -340,14 +340,7 @@ config STM32_SPI2 config STM32_SPI3 bool "SPI3" default n - depends on STM32_STM32F20XX || STM32_STM32F40XX - select SPI - select STM32_SPI - -config STM32_SPI4 - bool "SPI4" - default n - depends on STM32_STM32F10XX + depends on STM32_CONNECTIVITYLINE || STM32_STM32F20XX || STM32_STM32F40XX select SPI select STM32_SPI diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig index 805d54739..9889e887d 100644 --- a/nuttx/configs/shenzhou/nxwm/defconfig +++ b/nuttx/configs/shenzhou/nxwm/defconfig @@ -71,7 +71,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_HAVE_MPU=y # CONFIG_ARMV7M_MPU is not set CONFIG_ARCH_IRQPRIO=y -CONFIG_BOARD_LOOPSPERMSEC=10926 +CONFIG_BOARD_LOOPSPERMSEC=5483 # CONFIG_ARCH_CALIBRATION is not set # CONFIG_SERIAL_TERMIOS is not set # CONFIG_NET_MULTICAST is not set @@ -121,7 +121,7 @@ CONFIG_STM32_CODESOURCERYW=y # CONFIG_STM32_CRC is not set # CONFIG_STM32_DMA1 is not set # CONFIG_STM32_DMA2 is not set -# CONFIG_STM32_BKP is not set +CONFIG_STM32_BKP=y # CONFIG_STM32_CAN1 is not set # CONFIG_STM32_DAC1 is not set # CONFIG_STM32_DAC2 is not set @@ -132,7 +132,7 @@ CONFIG_STM32_I2C1=y CONFIG_STM32_PWR=y # CONFIG_STM32_SPI1 is not set # CONFIG_STM32_SPI2 is not set -# CONFIG_STM32_SPI4 is not set +CONFIG_STM32_SPI3=y # CONFIG_STM32_TIM1 is not set # CONFIG_STM32_TIM2 is not set # CONFIG_STM32_TIM3 is not set @@ -148,14 +148,16 @@ CONFIG_STM32_USART2=y # CONFIG_STM32_UART5 is not set # CONFIG_STM32_USB is not set # CONFIG_STM32_WWDG is not set +CONFIG_STM32_SPI=y CONFIG_STM32_I2C=y # # Alternate Pin Mapping # -# CONFIG_STM32_USART2_REMAP is not set +CONFIG_STM32_USART2_REMAP=y +CONFIG_STM32_SPI3_REMAP=y # CONFIG_STM32_I2C1_REMAP is not set -# CONFIG_STM32_ETH_REMAP is not set +CONFIG_STM32_ETH_REMAP=y # CONFIG_STM32_JTAG_DISABLE is not set CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set @@ -163,6 +165,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set + # # I2C Configuration # @@ -176,17 +184,19 @@ CONFIG_STM32_I2CTIMEOTICKS=500 # Ethernet MAC configuration # CONFIG_STM32_PHYADDR=0 -CONFIG_STM32_MII=y -CONFIG_STM32_MII_MCO=y -# CONFIG_STM32_MII_EXTCLK is not set +# CONFIG_STM32_MII is not set CONFIG_STM32_AUTONEG=y -CONFIG_STM32_PHYSR=16 -# CONFIG_STM32_PHYSR_ALTCONFIG is not set -CONFIG_STM32_PHYSR_SPEED=0x0002 -CONFIG_STM32_PHYSR_100MBPS=0x0000 -CONFIG_STM32_PHYSR_MODE=0x0004 -CONFIG_STM32_PHYSR_FULLDUPLEX=0x0004 +CONFIG_STM32_PHYSR=17 +CONFIG_STM32_PHYSR_ALTCONFIG=y +CONFIG_STM32_PHYSR_ALTMODE=0xf000 +CONFIG_STM32_PHYSR_10HD=0x1000 +CONFIG_STM32_PHYSR_100HD=0x4000 +CONFIG_STM32_PHYSR_10FD=0x2000 +CONFIG_STM32_PHYSR_100FD=0x8000 # CONFIG_STM32_ETH_PTP is not set +CONFIG_STM32_RMII=y +CONFIG_STM32_RMII_MCO=y +# CONFIG_STM32_RMII_EXTCLK is not set # # USB Host Configuration @@ -203,7 +213,7 @@ CONFIG_ARCH_STACKDUMP=y # Board Settings # CONFIG_DRAM_START=0x20000000 -CONFIG_DRAM_SIZE=196608 +CONFIG_DRAM_SIZE=65536 CONFIG_ARCH_HAVE_INTERRUPTSTACK=y CONFIG_ARCH_INTERRUPTSTACK=0 @@ -263,8 +273,8 @@ CONFIG_RR_INTERVAL=200 CONFIG_TASK_NAME_SIZE=0 # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 -CONFIG_START_MONTH=5 -CONFIG_START_DAY=28 +CONFIG_START_MONTH=9 +CONFIG_START_DAY=26 CONFIG_DEV_CONSOLE=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set @@ -339,7 +349,7 @@ CONFIG_SPI=y CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set CONFIG_RTC=y -CONFIG_RTC_DATETIME=y +# CONFIG_RTC_DATETIME is not set # CONFIG_RTC_ALARM is not set # CONFIG_WATCHDOG is not set # CONFIG_ANALOG is not set @@ -985,7 +995,7 @@ CONFIG_NSH_NESTDEPTH=3 # CONFIG_NSH_DISABLEBG is not set CONFIG_NSH_CONSOLE=y # CONFIG_NSH_CONDEV is not set -# CONFIG_NSH_ARCHINIT is not set +CONFIG_NSH_ARCHINIT=y CONFIG_NSH_TELNET=y CONFIG_NSH_TELNETD_PORT=23 CONFIG_NSH_TELNETD_DAEMONPRIO=100 diff --git a/nuttx/configs/shenzhou/scripts/ld.script b/nuttx/configs/shenzhou/scripts/ld.script index f07d4432d..c9140291c 100644 --- a/nuttx/configs/shenzhou/scripts/ld.script +++ b/nuttx/configs/shenzhou/scripts/ld.script @@ -63,10 +63,16 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) - } >flash + } > flash __exidx_end = ABSOLUTE(.); _eronly = ABSOLUTE(.); diff --git a/nuttx/configs/shenzhou/scripts/ld.script.dfu b/nuttx/configs/shenzhou/scripts/ld.script.dfu index b9d94c7a0..c6d0d76b8 100644 --- a/nuttx/configs/shenzhou/scripts/ld.script.dfu +++ b/nuttx/configs/shenzhou/scripts/ld.script.dfu @@ -65,10 +65,16 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) - } >flash + } > flash __exidx_end = ABSOLUTE(.); _eronly = ABSOLUTE(.); diff --git a/nuttx/configs/shenzhou/src/up_touchscreen.c b/nuttx/configs/shenzhou/src/up_touchscreen.c index 4ed34c0ec..92b057f5d 100644 --- a/nuttx/configs/shenzhou/src/up_touchscreen.c +++ b/nuttx/configs/shenzhou/src/up_touchscreen.c @@ -52,7 +52,7 @@ #include #include "stm32_internal.h" -#include "shenzhou_internal.h" +#include "shenzhou-internal.h" /**************************************************************************** * Pre-Processor Definitions @@ -159,13 +159,14 @@ static struct stm32_config_s g_tscinfo = * pendown - Return the state of the pen down GPIO input */ -static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t isr) +static int tsc_attach(FAR struct ads7843e_config_s *state, xcpt_t handler) { FAR struct stm32_config_s *priv = (FAR struct stm32_config_s *)state; /* Just save the handler for use when the interrupt is enabled */ priv->handler = handler; + return OK; } static void tsc_enable(FAR struct ads7843e_config_s *state, bool enable) @@ -256,7 +257,7 @@ int arch_tcinitialize(int minor) /* Initialize and register the SPI touschscreen device */ - ret = ads7843e_register(dev, &g_tscinfo, CONFIG_ADS7843E_DEVMINOR); + ret = ads7843e_register(dev, &g_tscinfo.dev, CONFIG_ADS7843E_DEVMINOR); if (ret < 0) { idbg("Failed to initialize SPI bus %d\n", CONFIG_ADS7843E_SPIDEV); diff --git a/nuttx/tools/cfgparser.c b/nuttx/tools/cfgparser.c index e49b29d5e..b1f189f6f 100644 --- a/nuttx/tools/cfgparser.c +++ b/nuttx/tools/cfgparser.c @@ -56,13 +56,24 @@ char line[LINESIZE+1]; ****************************************************************************/ /* These are configuration variable name that are quoted by configuration tool - * but which must be unquoated when used in C code. + * but which must be unquoted when used in C code. */ static const char *dequote_list[] = { - "CONFIG_USER_ENTRYPOINT", - NULL + /* NuttX */ + + "CONFIG_USER_ENTRYPOINT", /* Name of entry point function */ + + /* NxWidgets/NxWM */ + + "CONFIG_NXWM_BACKGROUND_IMAGE", /* Name of bitmap image class */ + "CONFIG_NXWM_STARTWINDOW_ICON", /* Name of bitmap image class */ + "CONFIG_NXWM_NXCONSOLE_ICON", /* Name of bitmap image class */ + "CONFIG_NXWM_CALIBRATION_ICON", /* Name of bitmap image class */ + "CONFIG_NXWM_HEXCALCULATOR_ICON", /* Name of bitmap image class */ + + NULL /* Marks the end of the list */ }; /**************************************************************************** @@ -239,7 +250,7 @@ static char *dequote_value(const char *varname, char *varval) /* Handle the case where nothing is left after dequoting */ - if (len < 0) + if (len <= 0) { dqval = NULL; } -- cgit v1.2.3