From 30ecf0ca4318f24c23a2ba287243396678eefb17 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 14 Jun 2013 08:54:24 -0600 Subject: [PATCH] Fixes for SAM4S and 4L due to recent changes to SAM3S; Updated README files --- configs/sam3u-ek/README.txt | 23 +++- configs/sam4l-xplained/README.txt | 160 ++++++++++++++----------- configs/sam4s-xplained/README.txt | 186 ++++++++++++++---------------- 3 files changed, 202 insertions(+), 167 deletions(-) diff --git a/configs/sam3u-ek/README.txt b/configs/sam3u-ek/README.txt index fa89991bd17..59aa651444c 100644 --- a/configs/sam3u-ek/README.txt +++ b/configs/sam3u-ek/README.txt @@ -431,7 +431,7 @@ Configurations reconfiguration process. 2. Unless stated otherwise, all configurations generate console - output of UART0 (J3). + output on UART0 (J3). 3. Unless otherwise stated, the configurations are setup for Linux (or any other POSIX environment like Cygwin under Windows): @@ -604,14 +604,29 @@ Configuration sub-directories CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output CONFIG_DEBUG_INPUT=y : Enable debug output from input devices - NOTE: - As of this writing, the touchscreen is not functional (no - interrupts). More work is needed. + STATUS: + 2013-6-14: The touchscreen is not functional. BUSY is initially + '0' when asserted says '1'. The pend down GPIO inputis always + '1' and there seems to be many spurious interrupts (but not so + many as to lock up the system). + + So there are GIO issues, but on the positive side, the driver + does appear to produce good touch data when touched but a lot + of clean-up is needed. nx: Configures to use examples/nx using the HX834x LCD hardware on the SAM3U-EK development board. + STATUS: + This configuration used to work well in an older NuttX version + on an older SAM3U-EK board (my old board was bricked and I got + another after a lapse of a couple of years). But now it no + longer works! There appears to be some bug, perhaps a memory + clobbering bug, that causes a variety of symptons: Hangs on + UART0 or hard faults. The LCD functionality is basically intact, + but not usable because of these problems. + ostest: This configuration directory, performs a simple OS test using examples/ostest. By default, this project assumes that you are diff --git a/configs/sam4l-xplained/README.txt b/configs/sam4l-xplained/README.txt index 6057223ec10..bc4756f1733 100644 --- a/configs/sam4l-xplained/README.txt +++ b/configs/sam4l-xplained/README.txt @@ -43,18 +43,25 @@ GNU Toolchain Options add one of the following configuration options to your .config (or defconfig) file: - CONFIG_SAM34_CODESOURCERYW=y : CodeSourcery under Windows - CONFIG_SAM34_CODESOURCERYL=y : CodeSourcery under Linux - CONFIG_SAM34_DEVKITARM=y : devkitARM under Windows - CONFIG_SAM34_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery under Linux + CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC=y : Atollic toolchain for Windos + CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM=y : devkitARM under Windows + CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y : Generic GCC ARM EABI toolchain for Linux + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : Generic GCC ARM EABI toolchain for Windows - If you are not using CONFIG_SAM34_BUILDROOT, then you may also have to modify - the PATH in the setenv.h file if your make cannot find the tools. + If you are not using CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT, then you may also + have to modify the PATH in the setenv.h file if your make cannot find the tools. - NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are - Windows native toolchains. The CodeSourcey (for Linux) and NuttX buildroot - toolchains are Cygwin and/or Linux native toolchains. There are several limitations - to using a Windows based toolchain in a Cygwin environment. The three biggest are: + NOTE about Windows native toolchains + ------------------------------------ + + The CodeSourcery (for Windows), Atollic, and devkitARM toolchains are + Windows native toolchains. The CodeSourcery (for Linux), NuttX buildroot, + and, perhaps, the generic GCC toolchains are Cygwin and/or Linux native + toolchains. There are several limitations to using a Windows based + toolchain in a Cygwin environment. The three biggest are: 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are performed automatically in the Cygwin makefiles using the 'cygpath' utility @@ -93,7 +100,7 @@ IDEs NuttX is built using command-line make. It can be used with an IDE, but some effort will be required to create the project (There is a simple RIDE project in the RIDE subdirectory). - + Makefile Build -------------- Under Eclipse, it is pretty easy to set up an "empty makefile project" and @@ -190,7 +197,7 @@ NXFLAT Toolchain tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can be downloaded from the NuttX SourceForge download site (https://sourceforge.net/projects/nuttx/files/). - + This GNU toolchain builds and executes in the Linux or Cygwin environment. 1. You must have already configured Nuttx in /nuttx. @@ -249,9 +256,9 @@ Serial Consoles USART0 ------ - USART is available on connectors EXT1 and EXT4 + USART0 is available on connectors EXT1 and EXT4 - EXT1 TXT4 GPIO Function + EXT1 EXT4 GPIO Function ---- ---- ------ ----------- 13 13 PB00 USART0_RXD 14 14 PB01 USART0_TXD @@ -460,64 +467,85 @@ Configurations b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. + NOTES: + + 1. These configurations use the mconf-based configuration tool. To + change any of these configurations using that tool, you should: + + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ + + b. Execute 'make menuconfig' in nuttx/ in order to start the + reconfiguration process. + + 2. Unless stated otherwise, all configurations generate console + output of on USART0 which is available on EXT1 or EXT4 (see the + section "Serial Consoles" above). The virtual COM port could + be used, instead, by reconfiguring to use USART1 instead of + USART0: + + System Type -> AT91SAM3/4 Peripheral Support + CONFIG_SAM_USART0=y + CONFIG_SAM_USART1=n + + Device Drivers -> Serial Driver Support -> Serial Console + CONFIG_USART0_SERIAL_CONSOLE=y + + Device Drivers -> Serial Driver Support -> USART0 Configuration + CONFIG_USART0_2STOP=0 + CONFIG_USART0_BAUD=115200 + CONFIG_USART0_BITS=8 + CONFIG_USART0_PARITY=0 + CONFIG_USART0_RXBUFSIZE=256 + CONFIG_USART0_TXBUFSIZE=256 + + 3. Unless otherwise stated, the configurations are setup for + Linux (or any other POSIX environment like Cygwin under Windows): + + Build Setup: + CONFIG_HOST_LINUX=y : Linux or other POSIX environment + + 4. These configurations use the older, OABI, buildroot toolchain. But + that is easily reconfigured: + + System Type -> Toolchain: + CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot toolchain + CONFIG_ARMV7M_OABI_TOOLCHAIN=y : Older, OABI toolchain + + If you want to use the Atmel GCC toolchain, here are the steps to + do so: + + Build Setup: + CONFIG_HOST_WINDOWS=y : Windows + CONFIG_HOST_CYGWIN=y : Using Cygwin or other POSIX environment + + System Type -> Toolchain: + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : General GCC EABI toolchain under windows + + This re-configuration should be done before making NuttX or else the + subsequent 'make' will fail. If you have already attempted building + NuttX then you will have to 1) 'make distclean' to remove the old + configuration, 2) 'cd tools; ./configure.sh sam3u-ek/ksnh' to start + with a fresh configuration, and 3) perform the configuration changes + above. + + Also, make sure that your PATH variable has the new path to your + Atmel tools. Try 'which arm-none-eabi-gcc' to make sure that you + are selecting the right tool. setenv.sh is available for you to + use to set or PATH variable. The path in the that file may not, + however, be correct for your installation. + + See also the "NOTE about Windows native toolchains" in the section call + "GNU Toolchain Options" above. + Configuration sub-directories ----------------------------- ostest: This configuration directory performs a simple OS test using - examples/ostest. + examples/ostest. See NOTES above. NOTES: - 1. This configuration provides test output on USART0 which is available - on EXT1 or EXT4 (see the section "Serial Consoles" above). The - virtual COM port could be used, instead, by reconfiguring to use - USART1 instead of USART0: - - System Type -> AT91SAM3/4 Peripheral Support - CONFIG_SAM_USART0=y - CONFIG_SAM_USART1=n - - Device Drivers -> Serial Driver Support -> Serial Console - CONFIG_USART0_SERIAL_CONSOLE=y - - Device Drivers -> Serial Driver Support -> USART0 Configuration - CONFIG_USART0_2STOP=0 - CONFIG_USART0_BAUD=115200 - CONFIG_USART0_BITS=8 - CONFIG_USART0_PARITY=0 - CONFIG_USART0_RXBUFSIZE=256 - CONFIG_USART0_TXBUFSIZE=256 - - 2. This configuration is set up to use the NuttX OABI toolchain (see - above). Of course this can be reconfigured if you prefer a different - toolchain. - nsh: - This configuration directory will built the NuttShell. - - NOTES: - - 1. This configuration provides test output on USART0 which is available - on EXT1 or EXT4 (see the section "Serial Consoles" above). The - virtual COM port could be used, instead, by reconfiguring to use - USART1 instead of USART0: - - System Type -> AT91SAM3/4 Peripheral Support - CONFIG_SAM_USART0=y - CONFIG_SAM_USART1=n - - Device Drivers -> Serial Driver Support -> Serial Console - CONFIG_USART0_SERIAL_CONSOLE=y - - Device Drivers -> Serial Driver Support -> USART0 Configuration - CONFIG_USART0_2STOP=0 - CONFIG_USART0_BAUD=115200 - CONFIG_USART0_BITS=8 - CONFIG_USART0_PARITY=0 - CONFIG_USART0_RXBUFSIZE=256 - CONFIG_USART0_TXBUFSIZE=256 - - 2. This configuration is set up to use the NuttX OABI toolchain (see - above). Of course this can be reconfigured if you prefer a different - toolchain. + This configuration directory will built the NuttShell. See NOTES above. diff --git a/configs/sam4s-xplained/README.txt b/configs/sam4s-xplained/README.txt index 536189ac066..0c6b4656607 100644 --- a/configs/sam4s-xplained/README.txt +++ b/configs/sam4s-xplained/README.txt @@ -93,18 +93,26 @@ GNU Toolchain Options add one of the following configuration options to your .config (or defconfig) file: - CONFIG_SAM34_CODESOURCERYW=y : CodeSourcery under Windows - CONFIG_SAM34_CODESOURCERYL=y : CodeSourcery under Linux - CONFIG_SAM34_DEVKITARM=y : devkitARM under Windows - CONFIG_SAM34_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows + CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery under Linux + CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC=y : Atollic toolchain for Windos + CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM=y : devkitARM under Windows + CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default) + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y : Generic GCC ARM EABI toolchain for Linux + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : Generic GCC ARM EABI toolchain for Windows - If you are not using CONFIG_SAM34_BUILDROOT, then you may also have to modify - the PATH in the setenv.h file if your make cannot find the tools. + If you are not using CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT, then you may also + have to modify the PATH in the setenv.h file if your make cannot find the + tools. - NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are - Windows native toolchains. The CodeSourcey (for Linux) and NuttX buildroot - toolchains are Cygwin and/or Linux native toolchains. There are several limitations - to using a Windows based toolchain in a Cygwin environment. The three biggest are: + NOTE about Windows native toolchains + ------------------------------------ + + The CodeSourcery (for Windows), Atollic, and devkitARM toolchains are + Windows native toolchains. The CodeSourcery (for Linux), NuttX buildroot, + and, perhaps, the generic GCC toolchains are Cygwin and/or Linux native + toolchains. There are several limitations to using a Windows based + toolchain in a Cygwin environment. The three biggest are: 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are performed automatically in the Cygwin makefiles using the 'cygpath' utility @@ -143,7 +151,7 @@ IDEs NuttX is built using command-line make. It can be used with an IDE, but some effort will be required to create the project (There is a simple RIDE project in the RIDE subdirectory). - + Makefile Build -------------- Under Eclipse, it is pretty easy to set up an "empty makefile project" and @@ -240,7 +248,7 @@ NXFLAT Toolchain tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can be downloaded from the NuttX SourceForge download site (https://sourceforge.net/projects/nuttx/files/). - + This GNU toolchain builds and executes in the Linux or Cygwin environment. 1. You must have already configured Nuttx in /nuttx. @@ -275,7 +283,7 @@ Buttons and LEDs connected to the SAM4S reset line and the other is a generic user configurable button labeled BP2 and connected to GPIO PA5. When a button is pressed it will drive the I/O line to GND. - + LEDs ---- @@ -286,7 +294,7 @@ Buttons and LEDs ---------------- ----- D9 Yellow LED PC10 D10 Yellow LED PC17 - + Both can be illuminated by driving the GPIO output to ground (low). These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is @@ -498,8 +506,10 @@ Configurations The that is provided above as an argument to the tools/configure.sh must be is one of the following. - NOTE: These configurations use the mconf-based configuration tool. To - change any of these configurations using that tool, you should: + NOTES: + + 1. These configurations use the mconf-based configuration tool. To + change any of these configurations using that tool, you should: a. Build and install the kconfig-mconf tool. See nuttx/README.txt and misc/tools/ @@ -507,93 +517,75 @@ Configurations b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. + 2. Unless stated otherwise, all configurations generate console + output on UART1 which is available on J1 or J4 (see the + section "Serial Consoles" above). USART1 or the virtual COM + port on UART0 are options. The virtual COM port could + be used, for example, by reconfiguring to use UART0 like: + + System Type -> AT91SAM3/4 Peripheral Support + CONFIG_SAM_UART0=y + CONFIG_SAM_UART1=n + + Device Drivers -> Serial Driver Support -> Serial Console + CONFIG_UART0_SERIAL_CONSOLE=y + + Device Drivers -> Serial Driver Support -> UART0 Configuration + CONFIG_UART0_2STOP=0 + CONFIG_UART0_BAUD=115200 + CONFIG_UART0_BITS=8 + CONFIG_UART0_PARITY=0 + CONFIG_UART0_RXBUFSIZE=256 + CONFIG_UART0_TXBUFSIZE=256 + + 3. Unless otherwise stated, the configurations are setup for + Linux (or any other POSIX environment like Cygwin under Windows): + + Build Setup: + CONFIG_HOST_LINUX=y : Linux or other POSIX environment + + 4. These configurations use the older, OABI, buildroot toolchain. But + that is easily reconfigured: + + System Type -> Toolchain: + CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot toolchain + CONFIG_ARMV7M_OABI_TOOLCHAIN=y : Older, OABI toolchain + + If you want to use the Atmel GCC toolchain, here are the steps to + do so: + + Build Setup: + CONFIG_HOST_WINDOWS=y : Windows + CONFIG_HOST_CYGWIN=y : Using Cygwin or other POSIX environment + + System Type -> Toolchain: + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : General GCC EABI toolchain under windows + + This re-configuration should be done before making NuttX or else the + subsequent 'make' will fail. If you have already attempted building + NuttX then you will have to 1) 'make distclean' to remove the old + configuration, 2) 'cd tools; ./configure.sh sam3u-ek/ksnh' to start + with a fresh configuration, and 3) perform the configuration changes + above. + + Also, make sure that your PATH variable has the new path to your + Atmel tools. Try 'which arm-none-eabi-gcc' to make sure that you + are selecting the right tool. setenv.sh is available for you to + use to set or PATH variable. The path in the that file may not, + however, be correct for your installation. + + See also the "NOTE about Windows native toolchains" in the section call + "GNU Toolchain Options" above. + Configuration sub-directories ----------------------------- ostest: This configuration directory performs a simple OS test using - examples/ostest. - - NOTES: - - 1. This configuration provides test output on USART0 which is available - on EXT1 or EXT4 (see the section "Serial Consoles" above). The - virtual COM port could be used, instead, by reconfiguring to use - USART1 instead of USART0: - - System Type -> AT91SAM3/4 Peripheral Support - CONFIG_SAM_USART0=y - CONFIG_SAM_USART1=n - - Device Drivers -> Serial Driver Support -> Serial Console - CONFIG_USART0_SERIAL_CONSOLE=y - - Device Drivers -> Serial Driver Support -> USART0 Configuration - CONFIG_USART0_2STOP=0 - CONFIG_USART0_BAUD=115200 - CONFIG_USART0_BITS=8 - CONFIG_USART0_PARITY=0 - CONFIG_USART0_RXBUFSIZE=256 - CONFIG_USART0_TXBUFSIZE=256 - - 2. This configuration is set up to use the NuttX OABI toolchain (see - above). Of course this can be reconfigured if you prefer a different - toolchain. + examples/ostest. See NOTES above. nsh: - This configuration directory will built the NuttShell. - - NOTES: - - 1. This configuration provides test output on UART1 which is available - on J3 or J4 (see the section "Serial Consoles" above). The - virtual COM port could be used, instead, by reconfiguring to use - UART0 instead of UART1: - - System Type -> AT91SAM3/4 Peripheral Support - CONFIG_SAM_UART0=y - CONFIG_SAM_UART1=n - - Device Drivers -> Serial Driver Support -> Serial Console - CONFIG_UART0_SERIAL_CONSOLE=y - - Device Drivers -> Serial Driver Support -> USART0 Configuration - CONFIG_UART0_2STOP=0 - CONFIG_UART0_BAUD=115200 - CONFIG_UART0_BITS=8 - CONFIG_UART0_PARITY=0 - CONFIG_UART0_RXBUFSIZE=256 - CONFIG_UART0_TXBUFSIZE=256 - - 2. This configuration is set up to use the NuttX OABI toolchain (see - above). Of course this can be reconfigured if you prefer a different - toolchain. + This configuration directory will built the NuttShell. See NOTES above. nsh: - This configuration directory will built the NuttShell. - - NOTES: - - 1. This configuration provides test output on UART1 which is available - on J3 or J4 (see the section "Serial Consoles" above). The - virtual COM port could be used, instead, by reconfiguring to use - UART0 instead of UART1: - - System Type -> AT91SAM3/4 Peripheral Support - CONFIG_SAM_UART0=y - CONFIG_SAM_UART1=n - - Device Drivers -> Serial Driver Support -> Serial Console - CONFIG_UART0_SERIAL_CONSOLE=y - - Device Drivers -> Serial Driver Support -> USART0 Configuration - CONFIG_UART0_2STOP=0 - CONFIG_UART0_BAUD=115200 - CONFIG_UART0_BITS=8 - CONFIG_UART0_PARITY=0 - CONFIG_UART0_RXBUFSIZE=256 - CONFIG_UART0_TXBUFSIZE=256 - - 2. This configuration is set up to use the NuttX OABI toolchain (see - above). Of course this can be reconfigured if you prefer a different - toolchain. + This configuration directory will built the NuttShell. See NOTES above.