diff options
-rw-r--r-- | nuttx/ChangeLog | 2 | ||||
-rw-r--r-- | nuttx/Documentation/NuttX.html | 88 | ||||
-rwxr-xr-x | nuttx/configs/olimex-lpc1766stk/include/board.h | 8 | ||||
-rwxr-xr-x | nuttx/configs/stm3240g-eval/include/board.h | 39 | ||||
-rw-r--r-- | nuttx/configs/stm3240g-eval/src/Makefile | 12 | ||||
-rw-r--r-- | nuttx/configs/stm3240g-eval/src/up_autoleds.c (renamed from nuttx/configs/stm3240g-eval/src/up_leds.c) | 7 |
6 files changed, 107 insertions, 49 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 12a9b155b..4707247c8 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -2344,3 +2344,5 @@ * arch/arm/src/lm3s: Add support for the LM3S6432S2E (Contributed by Mike Smith) * configs/lm3s6432-s2: Add support for the TI RDK-S2E (LM3S6432S2E) board (Contributed by Mike Smith) + * configs/stm3240g-eval/src: Add APIs support to support user access to the + LEDs diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index 473c22122..6957f1efb 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -1642,16 +1642,18 @@ Refer to the <a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=KWIKSTIK-K40">Freescale web site</a> for further information about this board. The Kwikstik is used with the FreeScale Tower System (mostly just to provide a simple UART connection) </p> - <p> - <b>STATUS:</b> - The unverified KwikStik K40 first appeared in NuttX-6.8 - As of this writing, the basic port is complete but I accidentally locked my board during the initial bringup. - Further development is stalled unless I learn how to unlock the device (or until I get another K40). - Additional work remaining includes, among other things: (1) complete the basic bring-up, - (2) bring up the NuttShell NSH, (3) develop support for the SDHC-based SD card, - (4) develop support for USB host and device, and (2) develop an LCD driver. - NOTE: Some of these remaining tasks are shared with the K60 work described below. - </p> + <ul> + <p> + <b>STATUS:</b> + The unverified KwikStik K40 first appeared in NuttX-6.8 + As of this writing, the basic port is complete but I accidentally locked my board during the initial bringup. + Further development is stalled unless I learn how to unlock the device (or until I get another K40). + Additional work remaining includes, among other things: (1) complete the basic bring-up, + (2) bring up the NuttShell NSH, (3) develop support for the SDHC-based SD card, + (4) develop support for USB host and device, and (2) develop an LCD driver. + NOTE: Some of these remaining tasks are shared with the K60 work described below. + </p> + </ul> </td> </tr> <tr> @@ -1667,18 +1669,20 @@ Refer to the <a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=TWR-K60N512-KIT">Freescale web site</a> for further information about this board. The TWR-K60N51 includes with the FreeScale Tower System which provides (among other things) a DBP UART connection. </p> - <p> - <b>STATUS:</b> - As of this writing, the basic port is complete and passes the NuttX OS test. - An additional, validated configuration exists for the NuttShell (NSH, see the - <a href="http://www.nuttx.org/NuttShell.html">NSH User Guide</a>). - This basic TWR-K60N512 first appeared in NuttX-6.8. - Ethernet and SD card (SDHC) drivers also exist: - The SDHC driver is partially integrated in to the NSH configuration but has some outstanding issues; - the Ethernet driver is completely untested. - Additional work remaining includes: (1) integrate the Ethernet and SDHC drivers, and (2) develop support for USB host and device. - NOTE: Most of these remaining tasks (excluding the Ethernet driver) are the same as the pending K40 tasks described above. - </p> + <ul> + <p> + <b>STATUS:</b> + As of this writing, the basic port is complete and passes the NuttX OS test. + An additional, validated configuration exists for the NuttShell (NSH, see the + <a href="http://www.nuttx.org/NuttShell.html">NSH User Guide</a>). + This basic TWR-K60N512 first appeared in NuttX-6.8. + Ethernet and SD card (SDHC) drivers also exist: + The SDHC driver is partially integrated in to the NSH configuration but has some outstanding issues; + the Ethernet driver is completely untested. + Additional work remaining includes: (1) integrate the Ethernet and SDHC drivers, and (2) develop support for USB host and device. + NOTE: Most of these remaining tasks (excluding the Ethernet driver) are the same as the pending K40 tasks described above. + </p> + </ul> </td> </tr> <tr> @@ -1693,18 +1697,20 @@ This port uses the Freescale STMicro STM3240G-EVAL board featuring the STM32F407IGH6 MCU. Refer to the <a href="http://www.st.com/internet/evalboard/product/252216.jsp">STMicro web site</a> for further information about this board. </p> - <p> - <b>STATUS:</b> - As of this writing, the basic port is complete and first appeared in NuttX-6.12. - The port passes the NuttX OS test and includes a validated configuration for the NuttShell (NSH, see the - <a href="http://www.nuttx.org/NuttShell.html">NSH User Guide</a>). - Additional drivers and configurations were added in NuttX 6.13. - Drivers include an Ethernet driver, ADC driver, DAC driver, PWM driver, CAN driver, F4 RTC driver - (most of these are compatible with the F1 family as well). - That release also included F4 DMA support and logic for saving/restoring F4 FPU registers in context switches. - Networking intensions include support for Telnet NSH sessions and new configurations for DHPCD and the networking test (nettest). - A more complete port would include support for SDIO and USB OTG which are not available in NuttX 6.13. - </p> + <ul> + <p> + <b>STATUS:</b> + As of this writing, the basic port is complete and first appeared in NuttX-6.12. + The port passes the NuttX OS test and includes a validated configuration for the NuttShell (NSH, see the + <a href="http://www.nuttx.org/NuttShell.html">NSH User Guide</a>). + Additional drivers and configurations were added in NuttX 6.13. + Drivers include an Ethernet driver, ADC driver, DAC driver, PWM driver, CAN driver, F4 RTC driver + (most of these are compatible with the F1 family as well). + That release also included F4 DMA support and logic for saving/restoring F4 FPU registers in context switches. + Networking intensions include support for Telnet NSH sessions and new configurations for DHPCD and the networking test (nettest). + A more complete port would include support for SDIO and USB OTG which are not available in NuttX 6.13. + </p> + </ul> </td> </tr> <tr> @@ -1720,11 +1726,13 @@ It will used the STMicor STM32F4-Discovery board featuring the STM32F407VGT6 MCU. Refer to the <a href="http://www.st.com/internet/evalboard/product/252419.jsp">STMicro web site</a> for further information about this board. </p> - <p> - <b>STATUS:</b> - This is really a vapor ware, pre-announcement. - I have the hardware and the motivation and I expect to announce the availability of support the STM32F4-Discovery in a later NuttX release. - </p> + <ul> + <p> + <b>STATUS:</b> + This is really a vapor ware, pre-announcement. + I have the hardware and the motivation and I expect to announce the availability of support the STM32F4-Discovery in a later NuttX release. + </p> + </ul> </td> </tr> <tr> @@ -1738,7 +1746,7 @@ <b>Development Environments:</b> 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU Cortex-M3 or 4toolchain, or 3) Cygwin with Windows native GNU Cortex-M3 or M4 toolchain (CodeSourcery or devkitARM). A DIY toolchain for Linux or Cygwin is provided by the NuttX <a href="http://sourceforge.net/projects/nuttx/files/buildroot/">buildroot</a> package. - I use FreeScale's <i>CodeWarrior</i> IDE only to work with the JTAG debugger built into the boards. + I use FreeScale's <i>CodeWarrior</i> IDE only to work with the JTAG debugger built into the Kinetis boards. </p> </td> </tr> diff --git a/nuttx/configs/olimex-lpc1766stk/include/board.h b/nuttx/configs/olimex-lpc1766stk/include/board.h index 3ad2191f3..94fd74fee 100755 --- a/nuttx/configs/olimex-lpc1766stk/include/board.h +++ b/nuttx/configs/olimex-lpc1766stk/include/board.h @@ -383,14 +383,14 @@ extern "C" { EXTERN void lpc17_boardinitialize(void); /************************************************************************************ - * Name: lpc17_ledinit and lpc17_setled + * Name: lpc17_ledinit, lpc17_setled, and lpc17_setleds * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board LEDs. If * CONFIG_ARCH_LEDS is not defined, then the following interfacesare available to * control the LEDs from user applications. * - ****************************************************************************/ + ************************************************************************************/ #ifndef CONFIG_ARCH_LEDS EXTERN void lpc17_ledinit(void); @@ -406,7 +406,7 @@ EXTERN void lpc17_setleds(uint8_t ledset); * up_buttons() may be called to collect the current state of all buttons or * up_irqbutton() may be called to register button interrupt handlers. * - ****************************************************************************/ + ************************************************************************************/ #ifdef CONFIG_ARCH_BUTTONS EXTERN void up_buttoninit(void); @@ -423,7 +423,7 @@ EXTERN void up_buttoninit(void); * associated with a button. See the BOARD_BUTTON_*_BIT and BOARD_JOYSTICK_*_BIT * definitions above for the meaning of each bit. * - ****************************************************************************/ + ************************************************************************************/ EXTERN uint8_t up_buttons(void); diff --git a/nuttx/configs/stm3240g-eval/include/board.h b/nuttx/configs/stm3240g-eval/include/board.h index 6c3b32497..80ac9a809 100755 --- a/nuttx/configs/stm3240g-eval/include/board.h +++ b/nuttx/configs/stm3240g-eval/include/board.h @@ -212,7 +212,28 @@ #endif /* LED definitions ******************************************************************/ -/* The STM3240G-EVAL board has 4 LEDs that we will encode as: */ +/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any + * way. The following definitions are used to access individual LEDs. + */ + +/* LED index values for use with stm32_setled() */ + +#define BOARD_LED1 0 +#define BOARD_LED2 1 +#define BOARD_LED3 2 +#define BOARD_LED4 3 +#define BOARD_NLEDS 4 + +/* LED bits for use with stm32_setleds() */ + +#define BOARD_LED1_BIT (1 << BOARD_LED1) +#define BOARD_LED2_BIT (1 << BOARD_LED2) +#define BOARD_LED3_BIT (1 << BOARD_LED3) +#define BOARD_LED4_BIT (1 << BOARD_LED4) + +/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 4 LEDs on board the + * STM3240G-EVAL. The following definitions describe how NuttX controls the LEDs: + */ #define LED_STARTED 0 /* LED1 */ #define LED_HEAPALLOCATE 1 /* LED2 */ @@ -357,6 +378,22 @@ extern "C" { EXTERN void stm32_boardinitialize(void); /************************************************************************************ + * Name: stm32_ledinit, stm32_setled, and stm32_setleds + * + * Description: + * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board LEDs. If + * CONFIG_ARCH_LEDS is not defined, then the following interfacesare available to + * control the LEDs from user applications. + * + ************************************************************************************/ + +#ifndef CONFIG_ARCH_LEDS +EXTERN void stm32_ledinit(void); +EXTERN void stm32_setled(int led, bool ledon); +EXTERN void stm32_setleds(uint8_t ledset); +#endif + +/************************************************************************************ * Button support. * * Description: diff --git a/nuttx/configs/stm3240g-eval/src/Makefile b/nuttx/configs/stm3240g-eval/src/Makefile index 6cda7250d..8ddca49e1 100644 --- a/nuttx/configs/stm3240g-eval/src/Makefile +++ b/nuttx/configs/stm3240g-eval/src/Makefile @@ -40,7 +40,17 @@ CFLAGS += -I$(TOPDIR)/sched ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = up_boot.c up_leds.c up_buttons.c up_spi.c +CSRCS = up_boot.c up_spi.c + +ifeq ($(CONFIG_ARCH_LEDS),y) +CSRCS += up_autoleds.c +else +CSRCS += up_userleds.c +endif + +ifeq ($(CONFIG_ARCH_BUTTONS),y) +CSRCS += up_buttons.c +endif ifeq ($(CONFIG_ADC),y) CSRCS += up_adc.c diff --git a/nuttx/configs/stm3240g-eval/src/up_leds.c b/nuttx/configs/stm3240g-eval/src/up_autoleds.c index f7635f54c..6c2cba455 100644 --- a/nuttx/configs/stm3240g-eval/src/up_leds.c +++ b/nuttx/configs/stm3240g-eval/src/up_autoleds.c @@ -1,6 +1,6 @@ /**************************************************************************** - * configs/stm3240g_eval/src/up_leds.c - * arch/arm/src/board/up_leds.c + * configs/stm3240g_eval/src/up_autoleds.c + * arch/arm/src/board/up_autoleds.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -52,6 +52,8 @@ #include "stm32_internal.h" #include "stm3240g-internal.h" +#ifdef CONFIG_ARCH_LEDS + /**************************************************************************** * Definitions ****************************************************************************/ @@ -227,7 +229,6 @@ static void led_setonoff(unsigned int bits) * Name: up_ledinit ****************************************************************************/ -#ifdef CONFIG_ARCH_LEDS void up_ledinit(void) { /* Configure LED1-4 GPIOs for output */ |