From 9ab43366ef6906ee6c80699b651718ac6d8d70a6 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 30 Oct 2008 23:35:19 +0000 Subject: [PATCH] Adding more STR71x logic git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1105 42af7a65-404d-4744-a932-0658087f49c3 --- configs/mcu123-lpc214x/src/up_spi.c | 10 ++++---- configs/olimex-strp711/ostest/defconfig | 33 +++++++++++++++++++++++-- configs/olimex-strp711/ostest/ld.script | 4 +-- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/configs/mcu123-lpc214x/src/up_spi.c b/configs/mcu123-lpc214x/src/up_spi.c index 7a1789572e..86ed795796 100644 --- a/configs/mcu123-lpc214x/src/up_spi.c +++ b/configs/mcu123-lpc214x/src/up_spi.c @@ -133,7 +133,7 @@ static struct spi_dev_s g_spidev = { &g_spiops }; * ****************************************************************************/ -void spi_select(FAR struct spi_dev_s *dev, boolean selected) +static void spi_select(FAR struct spi_dev_s *dev, boolean selected) { uint32 bit = 1 << 20; @@ -181,7 +181,7 @@ void spi_select(FAR struct spi_dev_s *dev, boolean selected) * ****************************************************************************/ -uint32 spi_setfrequency(FAR struct spi_dev_s *dev, uint32 frequency) +static uint32 spi_setfrequency(FAR struct spi_dev_s *dev, uint32 frequency) { uint32 divisor = LPC214X_PCLKFREQ / frequency; @@ -213,7 +213,7 @@ uint32 spi_setfrequency(FAR struct spi_dev_s *dev, uint32 frequency) * ****************************************************************************/ -ubyte spi_status(FAR struct spi_dev_s *dev) +static ubyte spi_status(FAR struct spi_dev_s *dev) { /* I don't think there is anyway to determine these things on the mcu123.com * board. @@ -236,7 +236,7 @@ ubyte spi_status(FAR struct spi_dev_s *dev) * ****************************************************************************/ -ubyte spi_sndbyte(FAR struct spi_dev_s *dev, ubyte ch) +static ubyte spi_sndbyte(FAR struct spi_dev_s *dev, ubyte ch) { /* Wait while the TX FIFO is full */ @@ -270,7 +270,7 @@ ubyte spi_sndbyte(FAR struct spi_dev_s *dev, ubyte ch) * ****************************************************************************/ -void spi_sndblock(FAR struct spi_dev_s *dev, FAR const ubyte *buffer, size_t buflen) +static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const ubyte *buffer, size_t buflen) { ubyte sr; diff --git a/configs/olimex-strp711/ostest/defconfig b/configs/olimex-strp711/ostest/defconfig index cbd2c75800..e662dc0f93 100644 --- a/configs/olimex-strp711/ostest/defconfig +++ b/configs/olimex-strp711/ostest/defconfig @@ -63,12 +63,41 @@ CONFIG_ARCH_BOARD=olimex-strp711 CONFIG_ARCH_BOARD_OLIMEX_STRP711=y CONFIG_BOARD_LOOPSPERMSEC=3270 CONFIG_ARCH_LEDS=y -CONFIG_DRAM_SIZE=0x00008000 -CONFIG_DRAM_START=0x40000000 +CONFIG_DRAM_SIZE=0x00010000 +CONFIG_DRAM_START=0x20000000 CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE) CONFIG_ARCH_INTERRUPTSTACK=0 CONFIG_ARCH_STACKDUMP=y +# +# STR71x specific boot/build settings +# +# CONFIG_STR71X_BANK0, CONFIG_STR71X_BANK1, CONFIG_STR71X_BANK2, and CONFIG_STR71X_BANK3 +# Enable initialize of external memory banks 0-3. +# CONFIG_STR71X_BANK0_SIZE, CONFIG_STR71X_BANK1_SIZE, CONFIG_STR71X_BANK2_SIZE, and CONFIG_STR71X_BANK3_SIZE +# If a particular external memory bank is configured, then its width must be provided. +# 8 and 16 (bits) are the only valid options. +# CONFIG_STR71X_BANK0_WAITSTATES, CONFIG_STR71X_BANK1_WAITSTATES, CONFIG_STR71X_BANK2_WAITSTATES, and CONFIG_STR71X_BANK3_WAITSTATES +# If a particular external memory bank is configured, then the number of waistates +# for the bank must also be provided. Valid options are {0, .., 15} +# CONFIG_STR71X_BIGEXTMEM +# The default is to provide 20 bits of address for all external memory regions. If +# any memory region is larger than 1Mb, then this option should be selected. In this +# case, 24 bits of addressing will be used +CONFIG_STR71X_BANK0=n +CONFIG_STR71X_BANK0_SIZE=16 +CONFIG_STR71X_BANK0_WAITSTATES=0 +CONFIG_STR71X_BANK1=n +CONFIG_STR71X_BANK0_SIZE=16 +CONFIG_STR71X_BANK1_WAITSTATES=0 +CONFIG_STR71X_BANK2=n +CONFIG_STR71X_BANK0_SIZE=16 +CONFIG_STR71X_BANK3_WAITSTATES=0 +CONFIG_STR71X_BANK3=n +CONFIG_STR71X_BANK0_SIZE=16 +CONFIG_STR71X_BANK2_WAITSTATES=0 +CONFIG_STR71X_BIGEXTMEM=n + # # STR71x specific device driver settings # diff --git a/configs/olimex-strp711/ostest/ld.script b/configs/olimex-strp711/ostest/ld.script index 1d8211ad08..c2a1987914 100644 --- a/configs/olimex-strp711/ostest/ld.script +++ b/configs/olimex-strp711/ostest/ld.script @@ -38,12 +38,12 @@ ENTRY(_stext) SECTIONS { /* The str71x has 256Kb of non-volatile memory beginning at address - * 0x00000000 for program storage (Bank0, an addition 16Kb is avalable + * 0x40000000 for program storage (Bank0, an addition 16Kb is avalable * for data storage in Bank1). The OS entry point is via the reset vector * at address 0x00000000 where the FLASH is remapped at reset. */ - . = 0x00000000; + . = 0x40000000; .text : { _stext = ABSOLUTE(.); *(.text)