diff options
-rw-r--r-- | nuttx/arch/arm/src/sam34/chip/sam4l_usart.h | 3 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sam34/sam4s_gpio.h | 25 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/README.txt | 23 | ||||
-rw-r--r-- | nuttx/configs/sam4l-xplained/README.txt | 130 | ||||
-rw-r--r-- | nuttx/configs/sam4s-xplained/README.txt | 164 |
5 files changed, 193 insertions, 152 deletions
diff --git a/nuttx/arch/arm/src/sam34/chip/sam4l_usart.h b/nuttx/arch/arm/src/sam34/chip/sam4l_usart.h index feaf4b48c..08d2a8e74 100644 --- a/nuttx/arch/arm/src/sam34/chip/sam4l_usart.h +++ b/nuttx/arch/arm/src/sam34/chip/sam4l_usart.h @@ -284,7 +284,6 @@ * - Bits that provide interrupts with UART_INT_ * - Bits unique to the USART status register begin with UART_SR_ */ - #define UART_INT_RXRDY (1 << 0) /* Bit 0: RXRDY Interrupt */ #define UART_INT_TXRDY (1 << 1) /* Bit 1: TXRDY Interrupt */ #define UART_INT_RXBRK (1 << 2) /* Bit 2: Break Received/End of Break */ @@ -318,6 +317,8 @@ #define UART_INT_LINSTE (1 << 30) /* Bit 30: LIN Sync Tolerance Error */ #define UART_INT_LINHTE (1 << 31) /* Bit 31: LIN Header Time-out Error */ +#define UART_INT_ALLINTS 0xff0ff7e7 + /* USART Receiver Holding Register */ #define UART_RHR_RXCHR_SHIFT (0) /* Bits 0-8: Received Character */ diff --git a/nuttx/arch/arm/src/sam34/sam4s_gpio.h b/nuttx/arch/arm/src/sam34/sam4s_gpio.h index 2d9fd8bb5..2217a1648 100644 --- a/nuttx/arch/arm/src/sam34/sam4s_gpio.h +++ b/nuttx/arch/arm/src/sam34/sam4s_gpio.h @@ -56,7 +56,7 @@ /* 32-bit Encoding: * - * MMMC CCCC II.. VPPB BBBB + * MMMC CCCC III. VPPB BBBB */ /* Input/Output mode: @@ -90,17 +90,22 @@ /* Additional interrupt modes: * - * .... .... II.. .... .... + * .... .... III. .... .... */ -#define GPIO_INT_SHIFT (10) /* Bits 10-11: GPIO interrupt bits */ -#define GPIO_INT_MASK (3 << GPIO_INT_SHIFT) -# define GPIO_INT_LEVEL (1 << 10) /* Bit 10: Level detection interrupt */ -# define GPIO_INT_EDGE (0) /* (vs. Edge detection interrupt) */ -# define GPIO_INT_HIGHLEVEL (1 << 9) /* Bit 9: High level detection interrupt */ -# define GPIO_INT_LOWLEVEL (0) /* (vs. Low level detection interrupt) */ -# define GPIO_INT_RISING (1 << 9) /* Bit 9: Rising edge detection interrupt */ -# define GPIO_INT_FALLING (0) /* (vs. Falling edge detection interrupt) */ +#define GPIO_INT_SHIFT (9) /* Bits 9-11: GPIO interrupt bits */ +#define GPIO_INT_MASK (7 << GPIO_INT_SHIFT) +# define _GIO_INT_AIM (1 << 10) /* Bit 10: Additional Interrupt modes */ +# define _GPIO_INT_LEVEL (1 << 9) /* Bit 9: Level detection interrupt */ +# define _GPIO_INT_EDGE (0) /* (vs. Edge detection interrupt) */ +# define _GPIO_INT_RH (1 << 8) /* Bit 9: Rising edge/High level detection interrupt */ +# define _GPIO_INT_FL (0) /* (vs. Falling edge/Low level detection interrupt) */ + +# define GPIO_INT_HIGHLEVEL (_GIO_INT_AIM | _GPIO_INT_LEVEL | _GPIO_INT_RH) +# define GPIO_INT_LOWLEVEL (_GIO_INT_AIM | _GPIO_INT_LEVEL | _GPIO_INT_FL) +# define GPIO_INT_RISING (_GIO_INT_AIM | _GPIO_INT_EDGE | _GPIO_INT_RH) +# define GPIO_INT_FALLING (_GIO_INT_AIM | _GPIO_INT_EDGE | _GPIO_INT_FL) +# define GPIO_INT_BOTHEDGES (0) /* If the pin is an GPIO output, then this identifies the initial output value: * diff --git a/nuttx/configs/sam3u-ek/README.txt b/nuttx/configs/sam3u-ek/README.txt index fa89991bd..59aa65144 100644 --- a/nuttx/configs/sam3u-ek/README.txt +++ b/nuttx/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/nuttx/configs/sam4l-xplained/README.txt b/nuttx/configs/sam4l-xplained/README.txt index 6057223ec..bc4756f17 100644 --- a/nuttx/configs/sam4l-xplained/README.txt +++ b/nuttx/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) - - 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. - - 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: + 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_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 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 <some-dir>/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,19 +467,22 @@ Configurations b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. -Configuration sub-directories ------------------------------ + NOTES: - ostest: - This configuration directory performs a simple OS test using - examples/ostest. + 1. These configurations use the mconf-based configuration tool. To + change any of these configurations using that tool, you should: - NOTES: + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ - 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: + 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 @@ -489,35 +499,53 @@ Configuration sub-directories 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. + 3. Unless otherwise stated, the configurations are setup for + Linux (or any other POSIX environment like Cygwin under Windows): - nsh: - This configuration directory will built the NuttShell. + Build Setup: + CONFIG_HOST_LINUX=y : Linux or other POSIX environment - NOTES: + 4. These configurations use the older, OABI, buildroot toolchain. But + that is easily reconfigured: - 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 -> Toolchain: + CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot toolchain + CONFIG_ARMV7M_OABI_TOOLCHAIN=y : Older, OABI toolchain - System Type -> AT91SAM3/4 Peripheral Support - CONFIG_SAM_USART0=y - CONFIG_SAM_USART1=n + If you want to use the Atmel GCC toolchain, here are the steps to + do so: - Device Drivers -> Serial Driver Support -> Serial Console - CONFIG_USART0_SERIAL_CONSOLE=y + Build Setup: + CONFIG_HOST_WINDOWS=y : Windows + CONFIG_HOST_CYGWIN=y : Using Cygwin or other POSIX environment - 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 + 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. - 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. + 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. See NOTES above. + + NOTES: + + nsh: + This configuration directory will built the NuttShell. See NOTES above. diff --git a/nuttx/configs/sam4s-xplained/README.txt b/nuttx/configs/sam4s-xplained/README.txt index 536189ac0..0c6b46566 100644 --- a/nuttx/configs/sam4s-xplained/README.txt +++ b/nuttx/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) - - 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. - - 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: + 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_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 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 <some-dir>/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 <subdir> 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,48 +517,11 @@ Configurations b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. -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. - - 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: + 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 @@ -557,7 +530,7 @@ Configuration sub-directories Device Drivers -> Serial Driver Support -> Serial Console CONFIG_UART0_SERIAL_CONSOLE=y - Device Drivers -> Serial Driver Support -> USART0 Configuration + Device Drivers -> Serial Driver Support -> UART0 Configuration CONFIG_UART0_2STOP=0 CONFIG_UART0_BAUD=115200 CONFIG_UART0_BITS=8 @@ -565,35 +538,54 @@ Configuration sub-directories 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. + 3. Unless otherwise stated, the configurations are setup for + Linux (or any other POSIX environment like Cygwin under Windows): - nsh: - This configuration directory will built the NuttShell. + Build Setup: + CONFIG_HOST_LINUX=y : Linux or other POSIX environment - NOTES: + 4. These configurations use the older, OABI, buildroot toolchain. But + that is easily reconfigured: - 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 -> Toolchain: + CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot toolchain + CONFIG_ARMV7M_OABI_TOOLCHAIN=y : Older, OABI toolchain - System Type -> AT91SAM3/4 Peripheral Support - CONFIG_SAM_UART0=y - CONFIG_SAM_UART1=n + If you want to use the Atmel GCC toolchain, here are the steps to + do so: - Device Drivers -> Serial Driver Support -> Serial Console - CONFIG_UART0_SERIAL_CONSOLE=y + Build Setup: + CONFIG_HOST_WINDOWS=y : Windows + CONFIG_HOST_CYGWIN=y : Using Cygwin or other POSIX environment - 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 + System Type -> Toolchain: + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : General GCC EABI toolchain under windows - 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 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. See NOTES above. + + nsh: + This configuration directory will built the NuttShell. See NOTES above. + + nsh: + This configuration directory will built the NuttShell. See NOTES above. |