configs/nucleus2g: Remove this board from the configs/ directory. A snapshot is still available in the Obsoleted repository

This commit is contained in:
Gregory Nutt
2016-04-12 12:19:30 -06:00
parent 99d981c3fc
commit 91686e671c
48 changed files with 20 additions and 5321 deletions
+7
View File
@@ -11622,3 +11622,10 @@
POSIX programming but the name signal() probably has the better POSIX programming but the name signal() probably has the better
credentials. sigset() is now relegated to a #define in signal.h that credentials. sigset() is now relegated to a #define in signal.h that
makes it equivalent to signal() (2016-04-10). makes it equivalent to signal() (2016-04-10).
* configs/nucleus2g: Removed the Nucleus2G configuration. There has
not been any activity with the commercial board in a few years and it
no longer appears to be available from the 2g-eng.com website.
Since the board is commercial and no longer publically available, it
no longer qualifies for inclusion in the open source repositories.
The code as of this data is still available in the Obsoleted
repository at configs/nucleus2g (2016-04-12).
+7 -1
View File
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4"> <tr align="center" bgcolor="#e4e4e4">
<td> <td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: March 27, 2016</p> <p>Last Updated: April 12, 2016</p>
</td> </td>
</tr> </tr>
</table> </table>
@@ -3302,6 +3302,12 @@ nsh>
However, due to some technical reasons, neither the SPI nor the USB device drivers are fully verified. However, due to some technical reasons, neither the SPI nor the USB device drivers are fully verified.
(Although they have since been verified on other platforms; this needs to be revisited on the Nucleus2G). (Although they have since been verified on other platforms; this needs to be revisited on the Nucleus2G).
</p> </p>
<p><b>Obsoleted</b>.
Support for the Nucleus2G board was terminated on 2016-04-12.
There has not been any activity with the commercial board in a few years and it no longer appears to be available from the 2g-eng.com website.
Since the board is commercial and no longer publically available, it no longer qualifies for inclusion in the open source repositories.
A snapshot of the code is still available in the <a href="https://bitbucket.org/nuttx/obsoleted/src/master/configs/nucleus2g">Obsoleted repository</a> and can easily be <i>reconstitued</i> if needed.
</p>
</li> </li>
<li> <li>
<p><b>mbed LPC1768</b></p> <p><b>mbed LPC1768</b></p>
+1 -2
View File
@@ -5483,8 +5483,7 @@ int kbd_decode(FAR struct lib_instream_s *stream, FAR struct kbd_getstate_s *sta
</p> </p>
<p> <p>
<b>Examples</b>: <b>Examples</b>:
The function <code>nsh_waiter()</code> in the file <code>configs/nucleus2g/src/lpc17_appinit.c</code> and The function <code>nsh_waiter()</code> in the file <code>configs/olimex-lpc1766stk/src/lpc17_appinit.c</code>.
the function <code>nsh_waiter()</code> in the file <code>configs/olimex-lpc1766stk/src/lpc17_appinit.c</code>.
</p> </p>
</li> </li>
<li> <li>
+1 -3
View File
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4"> <tr align="center" bgcolor="#e4e4e4">
<td> <td>
<h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
<p>Last Updated: April 8, 2016</p> <p>Last Updated: April 12, 2016</p>
</td> </td>
</tr> </tr>
</table> </table>
@@ -159,8 +159,6 @@ nuttx/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/configs/src/master/ntosd-dm320/README.txt" target="_blank"><b><i>README.txt</i></b></a> | | `- <a href="https://bitbucket.org/nuttx/nuttx/configs/src/master/ntosd-dm320/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- nucleo-f4x1re/ | |- nucleo-f4x1re/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/configs/src/master/nucleo-f4x1re/README.txt" target="_blank"><b><i>README.txt</i></b></a> | | `- <a href="https://bitbucket.org/nuttx/nuttx/configs/src/master/nucleo-f4x1re/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- nucleus2g/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/configs/src/master/nucleus2g/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- nutiny-nuc120/ | |- nutiny-nuc120/
| | `- <a href="https://bitbucket.org/nuttx/nuttx/configs/src/master/nutiny-nuc120/README.txt" target="_blank"><b><i>README.txt</i></b></a> | | `- <a href="https://bitbucket.org/nuttx/nuttx/configs/src/master/nutiny-nuc120/README.txt" target="_blank"><b><i>README.txt</i></b></a>
| |- olimex-efm32g880f129-stk/ | |- olimex-efm32g880f129-stk/
-2
View File
@@ -1319,8 +1319,6 @@ nuttx/
| | `- README.txt | | `- README.txt
| |- nucleo-f4x1re/ | |- nucleo-f4x1re/
| | `- README.txt | | `- README.txt
| |- nucleus2g/
| | `- README.txt
| |- nutiny-nuc120/ | |- nutiny-nuc120/
| | `- README.txt | | `- README.txt
| |- olimex-efm32g880f129-stk/ | |- olimex-efm32g880f129-stk/
-13
View File
@@ -414,15 +414,6 @@ config ARCH_BOARD_NTOSD_DM320
STATUS: This port is code complete, verified, and included in the STATUS: This port is code complete, verified, and included in the
NuttX 0.2.1 release. NuttX 0.2.1 release.
config ARCH_BOARD_NUCLEUS2G
bool "Nucleus 2G board"
depends on ARCH_CHIP_LPC1768
select ARCH_HAVE_LEDS
---help---
This port uses the Nucleus 2G board (with Babel CAN board). This board
features an NXP LPC1768 processor. See the 2G website (http://www.2g-eng.com/)
for more information about the Nucleus 2G.
config ARCH_BOARD_LPC1766STK config ARCH_BOARD_LPC1766STK
bool "Olimex LPC1766-STK board" bool "Olimex LPC1766-STK board"
depends on ARCH_CHIP_LPC1766 depends on ARCH_CHIP_LPC1766
@@ -1354,7 +1345,6 @@ config ARCH_BOARD
default "mx1ads" if ARCH_BOARD_MX1ADS default "mx1ads" if ARCH_BOARD_MX1ADS
default "ne64badge" if ARCH_BOARD_NE64BADGE default "ne64badge" if ARCH_BOARD_NE64BADGE
default "ntosd-dm320" if ARCH_BOARD_NTOSD_DM320 default "ntosd-dm320" if ARCH_BOARD_NTOSD_DM320
default "nucleus2g" if ARCH_BOARD_NUCLEUS2G
default "nutiny-nuc120" if ARCH_BOARD_NUTINY_NUC120 default "nutiny-nuc120" if ARCH_BOARD_NUTINY_NUC120
default "olimex-efm32g880f128-stk" if ARCH_BOARD_OLIMEX_EFM32G880F128_STK default "olimex-efm32g880f128-stk" if ARCH_BOARD_OLIMEX_EFM32G880F128_STK
default "olimex-lpc1766stk" if ARCH_BOARD_LPC1766STK default "olimex-lpc1766stk" if ARCH_BOARD_LPC1766STK
@@ -1626,9 +1616,6 @@ endif
if ARCH_BOARD_NTOSD_DM320 if ARCH_BOARD_NTOSD_DM320
source "configs/ntosd-dm320/Kconfig" source "configs/ntosd-dm320/Kconfig"
endif endif
if ARCH_BOARD_NUCLEUS2G
source "configs/nucleus2g/Kconfig"
endif
if ARCH_BOARD_NUTINY_NUC120 if ARCH_BOARD_NUTINY_NUC120
source "configs/nutiny-nuc120/Kconfig" source "configs/nutiny-nuc120/Kconfig"
endif endif
-5
View File
@@ -401,11 +401,6 @@ configs/nucleo-f4x1re
configs/nucleo-f303re configs/nucleo-f303re
STMicro ST Nucleo F303RE board. Contributed by Paul Alexander Patience. STMicro ST Nucleo F303RE board. Contributed by Paul Alexander Patience.
configs/nucleus2g
This port uses the Nucleus 2G board (with Babel CAN board). This board
features an NXP LPC1768 processor. See the 2G website (http://www.2g-eng.com/)
for more information about the Nucleus 2G.
configs/nutiny-nuc120 configs/nutiny-nuc120
This is the port of NuttX to the NuvoTon NuTiny-SDK-NUC120 board. This This is the port of NuttX to the NuvoTon NuTiny-SDK-NUC120 board. This
board has the NUC120LE3AN chip with a built-in NuLink debugger. board has the NUC120LE3AN chip with a built-in NuLink debugger.
@@ -272,7 +272,6 @@ CONFIG_RAM_SIZE=32768
# #
CONFIG_ARCH_BOARD_LPCXPRESSO=y CONFIG_ARCH_BOARD_LPCXPRESSO=y
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD="lpcxpresso-lpc1768"
-1
View File
@@ -276,7 +276,6 @@ CONFIG_RAM_SIZE=32768
# #
CONFIG_ARCH_BOARD_LPCXPRESSO=y CONFIG_ARCH_BOARD_LPCXPRESSO=y
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD="lpcxpresso-lpc1768"
-1
View File
@@ -261,7 +261,6 @@ CONFIG_RAM_SIZE=32768
# #
CONFIG_ARCH_BOARD_LPCXPRESSO=y CONFIG_ARCH_BOARD_LPCXPRESSO=y
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD="lpcxpresso-lpc1768"
@@ -272,7 +272,6 @@ CONFIG_RAM_SIZE=32768
# #
CONFIG_ARCH_BOARD_LPCXPRESSO=y CONFIG_ARCH_BOARD_LPCXPRESSO=y
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD="lpcxpresso-lpc1768"
@@ -272,7 +272,6 @@ CONFIG_RAM_SIZE=32768
# #
CONFIG_ARCH_BOARD_LPCXPRESSO=y CONFIG_ARCH_BOARD_LPCXPRESSO=y
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="lpcxpresso-lpc1768" CONFIG_ARCH_BOARD="lpcxpresso-lpc1768"
-1
View File
@@ -249,7 +249,6 @@ CONFIG_RAM_SIZE=32768
# #
# CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_LPCXPRESSO is not set
CONFIG_ARCH_BOARD_MBED=y CONFIG_ARCH_BOARD_MBED=y
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="mbed" CONFIG_ARCH_BOARD="mbed"
-1
View File
@@ -259,7 +259,6 @@ CONFIG_RAM_SIZE=32768
# #
# CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_LPCXPRESSO is not set
CONFIG_ARCH_BOARD_MBED=y CONFIG_ARCH_BOARD_MBED=y
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="mbed" CONFIG_ARCH_BOARD="mbed"
+1 -1
View File
@@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* configs/nucleus2g/mbed/ld.script * configs/mbed/scripts/ld.script
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
-7
View File
@@ -1,7 +0,0 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
if ARCH_BOARD_NUCLEUS2G
endif
File diff suppressed because it is too large Load Diff
-291
View File
@@ -1,291 +0,0 @@
/************************************************************************************
* configs/nucleus2g/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Clocking *************************************************************************/
/* NOTE: The following definitions require lpc17_syscon.h. It is not included here
* because the including C file may not have that file in its include path.
*/
#define BOARD_XTAL_FREQUENCY (12000000) /* XTAL oscillator frequency */
#define BOARD_OSCCLK_FREQUENCY BOARD_XTAL_FREQUENCY /* Main oscillator frequency */
#define BOARD_RTCCLK_FREQUENCY (32000) /* RTC oscillator frequency */
#define BOARD_INTRCOSC_FREQUENCY (4000000) /* Internal RC oscillator frequency */
/* This is the clock setup we configure for:
*
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6
*/
#define LPC17_CCLK 80000000 /* 80Mhz */
/* Select the main oscillator as the frequency source. SYSCLK is then the frequency
* of the main oscillator.
*/
#undef CONFIG_LPC17_MAINOSC
#define CONFIG_LPC17_MAINOSC 1
#define BOARD_SCS_VALUE SYSCON_SCS_OSCEN
/* Select the main oscillator and CCLK divider. The output of the divider is CCLK.
* The input to the divider (PLLCLK) will be determined by the PLL output.
*/
#define BOARD_CCLKCFG_DIVIDER 6
#define BOARD_CCLKCFG_VALUE ((BOARD_CCLKCFG_DIVIDER-1) << SYSCON_CCLKCFG_SHIFT)
/* PLL0. PLL0 is used to generate the CPU clock divider input (PLLCLK).
*
* Source clock: Main oscillator
* PLL0 Multiplier value (M): 20
* PLL0 Pre-divider value (N): 1
*
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz
*/
#undef CONFIG_LPC17_PLL0
#define CONFIG_LPC17_PLL0 1
#define BOARD_CLKSRCSEL_VALUE SYSCON_CLKSRCSEL_MAIN
#define BOARD_PLL0CFG_MSEL 20
#define BOARD_PLL0CFG_NSEL 1
#define BOARD_PLL0CFG_VALUE \
(((BOARD_PLL0CFG_MSEL-1) << SYSCON_PLL0CFG_MSEL_SHIFT) | \
((BOARD_PLL0CFG_NSEL-1) << SYSCON_PLL0CFG_NSEL_SHIFT))
/* PLL1 -- Not used. */
#undef CONFIG_LPC17_PLL1
#define BOARD_PLL1CFG_MSEL 36
#define BOARD_PLL1CFG_NSEL 1
#define BOARD_PLL1CFG_VALUE \
(((BOARD_PLL1CFG_MSEL-1) << SYSCON_PLL1CFG_MSEL_SHIFT) | \
((BOARD_PLL1CFG_NSEL-1) << SYSCON_PLL1CFG_NSEL_SHIFT))
/* USB divider. This divider is used when PLL1 is not enabled to get the
* USB clock from PLL0:
*
* USBCLK = PLL0CLK / 10 = 48MHz
*/
#define BOARD_USBCLKCFG_VALUE SYSCON_USBCLKCFG_DIV10
/* FLASH Configuration */
#undef CONFIG_LPC17_FLASH
#define CONFIG_LPC17_FLASH 1
#define BOARD_FLASHCFG_VALUE 0x0000303a
/* LED definitions ******************************************************************/
/* The Nucleus2G has 3 LEDs... two on the Babel CAN board and a "heartbeat" LED."
* The LEDs on the Babel CAN board are capabl of OFF/GREEN/RED/AMBER status.
* In normal usage, the two LEDs on the Babel CAN board would show CAN status, but if
* CONFIG_ARCH_LEDS is defined, these LEDs will be controlled as follows for NuttX
* debug functionality (where NC means "No Change").
*
* During the boot phases. LED1 and LED2 will show boot status.
*/
/* LED1 LED2 HEARTBEAT */
#define LED_STARTED 0 /* OFF OFF OFF */
#define LED_HEAPALLOCATE 1 /* GREEN OFF OFF */
#define LED_IRQSENABLED 2 /* OFF GREEN OFF */
#define LED_STACKCREATED 3 /* OFF OFF OFF */
/* After the system is booted, this logic will no longer use LEDs 1 and 2. They
* are available for use the application software using lpc17_led1() and lpc17_led2()
* (prototyped below)
*/
/* LED1 LED2 HEARTBEAT */
#define LED_INIRQ 4 /* NC NC ON (momentary) */
#define LED_SIGNAL 5 /* NC NC ON (momentary) */
#define LED_ASSERTION 6 /* NC NC ON (momentary) */
#define LED_PANIC 7 /* NC NC ON (1Hz flashing) */
/* Alternate pin selections *********************************************************/
/* UART1 -- Not connected */
#define GPIO_UART1_TXD GPIO_UART1_TXD_1
#define GPIO_UART1_RXD GPIO_UART1_RXD_1
#define GPIO_UART1_CTS GPIO_UART1_CTS_1
#define GPIO_UART1_DCD GPIO_UART1_DCD_1
#define GPIO_UART1_DSR GPIO_UART1_DSR_1
#define GPIO_UART1_DTR GPIO_UART1_DTR_1
#define GPIO_UART1_RI GPIO_UART1_RI_1
#define GPIO_UART1_RTS GPIO_UART1_RTS_1
/* UART2 -- Not connected */
#define GPIO_UART2_TXD GPIO_UART2_TXD_1
#define GPIO_UART2_RXD GPIO_UART2_RXD_1
/* UART3 -- Not connected */
#define GPIO_UART3_TXD GPIO_UART3_TXD_3
#define GPIO_UART3_RXD GPIO_UART3_RXD_3
/* Either SPI or SSP0 can drive the MMC/SD slot (SSP0 alternate pin settings are
* not connected)
*/
#define GPIO_SSP0_SCK GPIO_SSP0_SCK_1
#define GPIO_SSP0_SSEL GPIO_SSP0_SSEL_1
#define GPIO_SSP0_MISO GPIO_SSP0_MISO_1
#define GPIO_SSP0_MOSI GPIO_SSP0_MOSI_1
/* SSP1 */
#define GPIO_SSP1_SCK GPIO_SSP1_SCK_1
/* Can bus config */
/* CAN1 GPIO PIN SIGNAL NAME
* -------------------------------- ---- --------------
* P0[0]/RD1/TXD3/SDA1 46 RD1
* P0[1]/TD1/RXD3/SCL1 47 TD1
*/
#define GPIO_CAN1_RD GPIO_CAN1_RD_1
#define GPIO_CAN1_TD GPIO_CAN1_TD_1
/* Suppy default CAN BAUD (can be overridden in the .config file) */
#ifndef CONFIG_CAN1_BAUD
# define CONFIG_CAN1_BAUD 1000000
#endif
#ifndef CONFIG_CAN2_BAUD
# define CONFIG_CAN2_BAUD 1000000
#endif
/************************************************************************************
* Public Types
************************************************************************************/
#ifndef __ASSEMBLY__
#ifdef CONFIG_ARCH_LEDS
enum lpc17_ledstate_e
{
LPC17_LEDSTATE_OFF = 0,
LPC17_LEDSTATE_GREEN = 1,
LPC17_LEDSTATE_RED = 2,
LPC17_LEDSTATE_AMBER = (LPC17_LEDSTATE_GREEN|LPC17_LEDSTATE_RED),
};
#endif
enum output_state
{
RELAY_OPEN = 0,
RELAY_CLOSED = 1,
RELAY_TOGGLE = 2,
};
/************************************************************************************
* Public Data
************************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/************************************************************************************
* Public Function Prototypes
************************************************************************************/
/************************************************************************************
* Name: lpc17_boardinitialize
*
* Description:
* All LPC17xx architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
void lpc17_boardinitialize(void);
/************************************************************************************
* Name: lpc17_led1 and 2
*
* Description:
* Once the system has booted, these functions can be used to control LEDs 1 and 2
*
************************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void lpc17_led1(enum lpc17_ledstate_e state);
void lpc17_led2(enum lpc17_ledstate_e state);
#endif
/************************************************************************************
* Name: nucleus_bms_relay 1-4
*
* Description:
* once booted these functions control the 4 isolated FET outputs from the
* master BMS controller
*
************************************************************************************/
#ifdef CONFIG_ARCH_BOARD_NUCLEUS2G_BMS
void nucleus_bms_relay1(enum output_state state);
void nucleus_bms_relay2(enum output_state state);
void nucleus_bms_relay3(enum output_state state);
void nucleus_bms_relay4(enum output_state state);
#endif
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_BOARD_BOARD_H */
-111
View File
@@ -1,111 +0,0 @@
############################################################################
# configs/nucleus2g/nsh/Make.defs
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
else
# Linux/Cygwin-native toolchain
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
endif
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048
ASMEXT = .S
OBJEXT = .o
LIBEXT = .a
EXEEXT =
ifneq ($(CROSSDEV),arm-nuttx-elf-)
LDFLAGS += -nostartfiles -nodefaultlibs
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g
endif
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
HOSTLDFLAGS =
File diff suppressed because it is too large Load Diff
-47
View File
@@ -1,47 +0,0 @@
#!/bin/bash
# configs/nucleus2g/nsh/setenv.sh
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
if [ "$(basename $0)" = "setenv.sh" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
export LPCTOOL_DIR="${WD}/configs/nucleus2g/tools"
export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
-115
View File
@@ -1,115 +0,0 @@
/****************************************************************************
* configs/nucleus2g/scripts/ld.script
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The LPC1768 has 512Kb of FLASH beginning at address 0x0000:0000 and
* 64Kb of total SRAM: 32Kb of SRAM in the CPU block beginning at address
* 0x10000000 and 32Kb of AHB SRAM in two banks of 16Kb beginning at addresses
* 0x20070000 and 0x20080000. Here we assume that .data and .bss will all fit
* into the 32Kb CPU SRAM address range.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x00000000, LENGTH = 512K
sram (rwx) : ORIGIN = 0x10000000, LENGTH = 32K
}
OUTPUT_ARCH(arm)
ENTRY(_stext)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.glue_7)
*(.glue_7t)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
} > flash
.init_section : {
_sinit = ABSOLUTE(.);
*(.init_array .init_array.*)
_einit = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : { /* BSS */
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
-2
View File
@@ -1,2 +0,0 @@
/.depend
/Make.dep
-49
View File
@@ -1,49 +0,0 @@
############################################################################
# configs/nucleus2g/src/Makefile
#
# Copyright (C) 2010-2012, 2015 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
-include $(TOPDIR)/Make.defs
ASRCS =
CSRCS = lpc17_boot.c lpc17_leds.c lpc17_ssp.c lpc17_outputs.c
ifeq ($(CONFIG_LIB_BOARDCTL),y)
CSRCS += lpc17_appinit.c
endif
ifeq ($(CONFIG_USBMSC),y)
CSRCS += lpc17_usbmsc.c
endif
include $(TOPDIR)/configs/Board.mk
-163
View File
@@ -1,163 +0,0 @@
/****************************************************************************
* config/nucleus2g/src/lpc17_appinit.c
*
* Copyright (C) 2010-2011, 2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdio.h>
#include <syslog.h>
#include <errno.h>
#include <nuttx/board.h>
#include <nuttx/spi/spi.h>
#include <nuttx/mmcsd.h>
#include "lpc17_ssp.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
#define HAVE_USBDEV 1
#define HAVE_MMCSD 1
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_NSH_ARCHINIT
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The Nucleus-2G MMC/SD is on SSP0"
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 0
# endif
# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0
# error "The Nucleus-2G MMC/SD is only one slot (0)"
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0
# endif
# ifndef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0
# endif
#else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 0
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0
# undef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0
#endif
/* Can't support USB device features if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef HAVE_USBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#ifdef HAVE_MMCSD
# ifndef CONFIG_LPC17_SSP0
# warning "CONFIG_LPC17_SSP0 is require for MMC/SD support"
# undef HAVE_MMCSD
# endif
# ifdef CONFIG_DISABLE_MOUNTPOINT
# warning "No MMC/SD support. Mountpoints disabled (CONFIG_DISABLE_MOUNTPOINT)"
# undef HAVE_MMCSD
# endif
#endif
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
int board_app_initialize(void)
{
#ifdef HAVE_MMCSD
FAR struct spi_dev_s *ssp;
int ret;
/* Get the SSP port */
ssp = lpc17_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
if (!ssp)
{
syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
CONFIG_NSH_MMCSDSPIPORTNO);
return -ENODEV;
}
syslog(LOG_INFO, "Successfully initialized SSP port %d\n",
CONFIG_NSH_MMCSDSPIPORTNO);
/* Bind the SSP port to the slot */
ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, CONFIG_NSH_MMCSDSLOTNO, ssp);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n",
CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
return ret;
}
syslog(LOG_INFO, "Successfuly bound SSP port %d to MMC/SD slot %d\n",
CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
#endif
return OK;
}
-117
View File
@@ -1,117 +0,0 @@
/************************************************************************************
* configs/nucleus2g/src/lpc17_boot.c
*
* Copyright (C) 2010, 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <debug.h>
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "up_arch.h"
#include "up_internal.h"
#include "lpc17_ssp.h"
#include "lpc17_gpio.h"
#include "nucleus2g.h"
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: lpc17_boardinitialize
*
* Description:
* All LPC17xx architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
void lpc17_boardinitialize(void)
{
/* Enable +5V needed for CAN */
#if defined(CONFIG_LPC17_CAN1) || defined(CONFIG_LPC17_CAN2)
lpc17_configgpio(NUCLEUS2G_5V_ENABLE);
#else
lpc17_configgpio(NUCLEUS2G_5V_DISABLE);
#endif
/* If UART0 is used, enabled the MAX232 driver */
#ifdef CONFIG_LPC17_UART0
lpc17_configgpio(NUCLEUS2G_232_ENABLE);
#else
lpc17_configgpio(NUCLEUS2G_232_POWERSAVE);
#endif
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
* function nucleus2g_sspdev_initialize() has been brought into the link.
*/
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
if (nucleus2g_sspdev_initialize)
{
nucleus2g_sspdev_initialize();
}
#endif
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
board_autoled_initialize();
#endif
/* Configure the relay outptus for use on the BMS master board */
#ifdef CONFIG_ARCH_BOARD_NUCLEUS2G_BMS
up_relayinit();
#endif
}
-231
View File
@@ -1,231 +0,0 @@
/****************************************************************************
* configs/nucleus2g/src/lpc17_leds.c
*
* Copyright (C) 2010, 2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <stdbool.h>
#include <debug.h>
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "chip.h"
#include "up_arch.h"
#include "up_internal.h"
#include "lpc17_gpio.h"
#include "nucleus2g.h"
#ifdef CONFIG_ARCH_LEDS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG
* with CONFIG_DEBUG_VERBOSE too)
*/
#ifdef CONFIG_DEBUG_LEDS
# define leddbg lldbg
# ifdef CONFIG_DEBUG_VERBOSE
# define ledvdbg lldbg
# else
# define ledvdbg(x...)
# endif
#else
# define leddbg(x...)
# define ledvdbg(x...)
#endif
/* Dump GPIO registers */
#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_LEDS)
# define led_dumpgpio(m) lpc17_dumpgpio(NUCLEUS2G_LED1_A, m)
#else
# define led_dumpgpio(m)
#endif
/****************************************************************************
* Private Data
****************************************************************************/
/* The Nucleus2G has 3 LEDs... two on the Babel CAN board and a "heartbeat" LED."
* The LEDs on the Babel CAN board are capabl of OFF/GREEN/RED/AMBER status.
* In normal usage, the two LEDs on the Babel CAN board would show CAN status, but if
* CONFIG_ARCH_LEDS is defined, these LEDs will be controlled as follows for NuttX
* debug functionality (where NC means "No Change").
*
* LED1 LED2 HEARTBEAT
* +------- ------ -----------------------
* LED_STARTED | OFF OFF OFF
* LED_HEAPALLOCATE | GREEN OFF OFF
* LED_IRQSENABLED | OFF GREEN OFF
* LED_STACKCREATED | OFF OFF OFF
* LED_INIRQ | NC NC ON (momentary)
* LED_SIGNAL | NC NC ON (momentary)
* LED_ASSERTION | NC NC ON (momentary)
* LED_PANIC | NC NC ON (1Hz flashing)
*/
static bool g_initialized;
static int g_nestcount;
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_autoled_initialize
****************************************************************************/
void board_autoled_initialize(void)
{
/* Configure all LED GPIO lines */
led_dumpgpio("board_autoled_initialize() Entry)");
lpc17_configgpio(NUCLEUS2G_LED1_A);
lpc17_configgpio(NUCLEUS2G_LED1_B);
lpc17_configgpio(NUCLEUS2G_LED2_A);
lpc17_configgpio(NUCLEUS2G_LED2_B);
lpc17_configgpio(NUCLEUS2G_HEARTBEAT);
lpc17_configgpio(NUCLEUS2G_EXTRA_LED);
led_dumpgpio("board_autoled_initialize() Exit");
}
/****************************************************************************
* Name: board_autoled_on
****************************************************************************/
void board_autoled_on(int led)
{
/* We will control LED1 and LED2 not yet completed the boot sequence. */
if (!g_initialized)
{
enum lpc17_ledstate_e led1 = LPC17_LEDSTATE_OFF;
enum lpc17_ledstate_e led2 = LPC17_LEDSTATE_OFF;
switch (led)
{
case LED_STACKCREATED:
g_initialized = true;
case LED_STARTED:
default:
break;
case LED_HEAPALLOCATE:
led1 = LPC17_LEDSTATE_GREEN;
break;
case LED_IRQSENABLED:
led2 = LPC17_LEDSTATE_GREEN;
}
lpc17_led1(led1);
lpc17_led2(led2);
}
/* We will always control the HB LED */
switch (led)
{
default:
break;
case LED_INIRQ:
case LED_SIGNAL:
case LED_ASSERTION:
case LED_PANIC:
lpc17_gpiowrite(NUCLEUS2G_HEARTBEAT, false);
g_nestcount++;
}
}
/****************************************************************************
* Name: board_autoled_off
****************************************************************************/
void board_autoled_off(int led)
{
/* In all states, OFF can only mean turning off the HB LED */
if (g_nestcount <= 1)
{
lpc17_gpiowrite(NUCLEUS2G_HEARTBEAT, true);
g_nestcount = 0;
}
else
{
g_nestcount--;
}
}
/************************************************************************************
* Name: lpc17_led1 and 2
*
* Description:
* Once the system has booted, these functions can be used to control LEDs 1 and 2
*
************************************************************************************/
void lpc17_led1(enum lpc17_ledstate_e state)
{
bool red = (((unsigned int)state & LPC17_LEDSTATE_RED) != 0);
bool green = (((unsigned int)state & LPC17_LEDSTATE_GREEN) != 0);
lpc17_gpiowrite(NUCLEUS2G_LED1_A, red);
lpc17_gpiowrite(NUCLEUS2G_LED1_B, green);
}
void lpc17_led2(enum lpc17_ledstate_e state)
{
bool red = (((unsigned int)state & LPC17_LEDSTATE_RED) != 0);
bool green = (((unsigned int)state & LPC17_LEDSTATE_GREEN) != 0);
lpc17_gpiowrite(NUCLEUS2G_LED2_A, red);
lpc17_gpiowrite(NUCLEUS2G_LED2_B, green);
}
#endif /* CONFIG_ARCH_LEDS */
-128
View File
@@ -1,128 +0,0 @@
/****************************************************************************
* configs/nucleus2g/src/lpc17_outputs.c
*
* Copyright (C) 2012 Hal Glenn. All rights reserved.
* Author: Hal Glenn <hglenn@2g-eng.com>
*
* This file is part of NuttX:
*
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <stdbool.h>
#include <debug.h>
#include <arch/board/board.h>
#include "chip.h"
#include "up_arch.h"
#include "up_internal.h"
#include "lpc17_gpio.h"
#include "nucleus2g.h"
#ifdef CONFIG_ARCH_BOARD_NUCLEUS2G_BMS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: nucleus_bms_relay 1-4
*
* Description:
* Once booted these functions control the 4 isolated FET outputs from the
* master BMS controller
*
****************************************************************************/
void nucleus_bms_relay1(enum output_state state)
{
bool value = (state == (enum output_state)RELAY_OPEN);
lpc17_gpiowrite(NUCLEUS_BMS_RELAY1, value);
}
void nucleus_bms_relay2(enum output_state state)
{
bool value = (state == (enum output_state)RELAY_OPEN);
lpc17_gpiowrite(NUCLEUS_BMS_RELAY2, value);
}
void nucleus_bms_relay3(enum output_state state)
{
bool value = (state == (enum output_state)RELAY_OPEN);
lpc17_gpiowrite(NUCLEUS_BMS_RELAY3, value);
}
void nucleus_bms_relay4(enum output_state state)
{
bool value = (state == (enum output_state)RELAY_OPEN);
lpc17_gpiowrite(NUCLEUS_BMS_RELAY4, value);
}
/****************************************************************************
* Name: up_relayinit
*
* Description:
* This function is called on boot to init the GPIO for relay control
*
****************************************************************************/
void up_relayinit(void)
{
lpc17_configgpio(NUCLEUS_BMS_RELAY1);
lpc17_configgpio(NUCLEUS_BMS_RELAY2);
lpc17_configgpio(NUCLEUS_BMS_RELAY3);
lpc17_configgpio(NUCLEUS_BMS_RELAY4);
}
#endif /* CONFIG_ARCH_BOARD_NUCLEUS2G_BMS */
-183
View File
@@ -1,183 +0,0 @@
/************************************************************************************
* configs/nucleus2g/src/lpc17_ssp.c
*
* Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <stdint.h>
#include <stdbool.h>
#include <debug.h>
#include <nuttx/spi/spi.h>
#include <arch/board/board.h>
#include "up_arch.h"
#include "chip.h"
#include "lpc17_gpio.h"
#include "lpc17_ssp.h"
#include "nucleus2g.h"
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1)
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Enables debug output from this file (needs CONFIG_DEBUG too) */
#undef SSP_DEBUG /* Define to enable debug */
#undef SSP_VERBOSE /* Define to enable verbose debug */
#ifdef SSP_DEBUG
# define sspdbg lldbg
# ifdef SSP_VERBOSE
# define sspvdbg lldbg
# else
# define sspvdbg(x...)
# endif
#else
# undef SSP_VERBOSE
# define sspdbg(x...)
# define sspvdbg(x...)
#endif
/* Dump GPIO registers */
#ifdef SSP_VERBOSE
# define ssp_dumpgpio(m) lpc17_dumpgpio(SDCCS_GPIO, m)
#else
# define ssp_dumpgpio(m)
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: nucleus2g_sspdev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the Nucleus 2G.
*
************************************************************************************/
void weak_function nucleus2g_sspdev_initialize(void)
{
/* Configure the SPI-based microSD CS GPIO */
ssp_dumpgpio("nucleus2g_sspdev_initialize() Entry)");
/* SSP0 connects only to the MMC/SD slot on the Nucleus 1G board.
* P0[15]/TXD1/SCK0/SCK MMC_CLK
* P0[16]/RXD1/SSEL0/SSEL MMC_CD
* P0[17]/CTS1/MISO0/MISO MMC_DATA0
* P0[18]/DCD1/MOSI0/MOSI MMC_MISO
*
* In SPI mode the MMC/SD DATA3/CD functions as the SPI chip select.
*/
#ifdef CONFIG_LPC17_SSP0
lpc17_configgpio(NUCLEUS2G_MMCSD_CS);
#endif
/* SSP1 goes off the Nucleus 2G board to the Babel CAN board along with 3 chip
* select pins. However, it is currently not used on that board.
*/
#ifdef CONFIG_LPC17_SSP1
# warning "SSP1 chip selects not known"
#endif
ssp_dumpgpio("nucleus2g_sspdev_initialize() Exit");
}
/************************************************************************************
* Name: lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
*
* Description:
* The external functions, lpc17_ssp0/ssp1select and lpc17_ssp0/ssp1status
* must be provided by board-specific logic. They are implementations of the select
* and status methods of the SPI interface defined by struct spi_ops_s (see
* include/nuttx/spi/spi.h). All other methods (including lpc17_sspbus_initialize())
* are provided by common LPC17xx logic. To use this common SPI logic on your
* board:
*
* 1. Provide logic in lpc17_boardinitialize() to configure SPI/SSP chip select
* pins.
* 2. Provide lpc17_ssp0/ssp1select() and lpc17_ssp0/ssp1status() functions
* in your board-specific logic. These functions will perform chip selection
* and status operations using GPIOs in the way your board is configured.
* 3. Add a calls to lpc17_sspbus_initialize() in your low level application
* initialization logic
* 4. The handle returned by lpc17_sspbus_initialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver).
*
************************************************************************************/
#ifdef CONFIG_LPC17_SSP0
void lpc17_ssp0select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
sspdbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
ssp_dumpgpio("lpc17_ssp0select() Entry");
if (devid == SPIDEV_MMCSD)
{
/* Assert the CS pin to the card */
lpc17_gpiowrite(NUCLEUS2G_MMCSD_CS, !selected);
}
ssp_dumpgpio("lpc17_ssp0select() Exit");
}
uint8_t lpc17_ssp0status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
{
sspdbg("Returning SPI_STATUS_PRESENT\n");
return SPI_STATUS_PRESENT;
}
#endif
#ifdef CONFIG_LPC17_SSP1
# warning "SSP1 chip selects not known"
#endif
#endif /* CONFIG_LPC17_SSP0 || CONFIG_LPC17_SSP1 */
-127
View File
@@ -1,127 +0,0 @@
/****************************************************************************
* configs/nucleus2g/src/lpc17_usbmsc.c
*
* Copyright (C) 2010, 2013, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Configure and register the LPC17xx MMC/SD SPI block driver.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdio.h>
#include <syslog.h>
#include <errno.h>
#include <nuttx/board.h>
#include <nuttx/mmcsd.h>
#include <nuttx/spi/spi.h>
#include "lpc17_ssp.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
#ifndef CONFIG_SYSTEM_USBMSC_DEVMINOR1
# define CONFIG_SYSTEM_USBMSC_DEVMINOR1 0
#endif
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_NUCLEUS2G
# undef LPC17XX_MMCSDSPIPORTNO
# define LPC17XX_MMCSDSPIPORTNO 1
# undef LPC17XX_MMCSDSLOTNO
# define LPC17XX_MMCSDSLOTNO 0
#else
/* Add configuration for new LPC17xx boards here */
# error "Unrecognized LPC17xx board"
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_usbmsc_initialize
*
* Description:
* Perform architecture specific initialization of the USB MSC device.
*
****************************************************************************/
int board_usbmsc_initialize(int port)
{
FAR struct spi_dev_s *spi;
int ret;
/* Get the SPI port */
syslog(LOG_INFO, "Initializing SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
spi = lpc17_sspbus_initialize(LPC17XX_MMCSDSPIPORTNO);
if (!spi)
{
syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
return -ENODEV;
}
syslog(LOG_INFO, "Successfully initialized SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
/* Bind the SPI port to the slot */
syslog(LOG_INFO, "Binding SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
ret = mmcsd_spislotinitialize(CONFIG_SYSTEM_USBMSC_DEVMINOR1,
LPC17XX_MMCSDSLOTNO, spi);
if (ret < 0)
{
syslog(LOG_ERR,
"ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret);
return ret;
}
syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
return OK;
}
-155
View File
@@ -1,155 +0,0 @@
/************************************************************************************
* configs/nucleus2g/src/nucleus2g.h
*
* Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
#ifndef _CONFIGS_NUCLEUS2G_SRC_NUCLEUS2G_H
#define _CONFIGS_NUCLEUS2G_SRC_NUCLEUS2G_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* NUCLEUS-2G GPIO Pin Definitions **************************************************/
/* Board GPIO Usage:
*
* P0[0]/RD1/TXD3/SDA1 P0[0]/CAN_RX1
* P0[1]/TD1/RXD3/SCL P0[1]/CAN_TX1
* P0[2]/TXD0/AD0[7] TX0
* P0[3]/RXD0/AD0[6] RX0
* P0[4] P0[4]/CAN1_STB
* P0[5] P0[5]/CAN2_STB
* P0[6]/I2SRX_SDA/SSEL1/MAT2[0] GPI/O_CS1
* P0[7]/I2STX_CLK/SCK1/MAT2[1] SCLK1
* P0[8]/I2STX_WS/MISO1/MAT2[2] MISO1
* P0[9]/I2STX_SDA/MOSI1/MAT2[3] MOSI1
* P0[10] P0[10]/CAN1_TERM
* P0[11] P0[11]/CAN2_TERM
* P0[15]/TXD1/SCK0/SCK MMC_CLK
* P0[16]/RXD1/SSEL0/SSEL MMC_CD
* P0[17]/CTS1/MISO0/MISO MMC_DATA0
* P0[18]/DCD1/MOSI0/MOSI MMC_MISO
* P0[19]/DSR1/SDA1 GPI/O_CS2
* P0[20]/DTR1/SCL1 GPI/O_CS3
* P0[21]/RI1/MCIPWR/RD1 P0[21]
* P0[22]/RTS1/TD1 P0[22]
* P0[23]/AD0[0]/I2SRX_CLK/CAP3[0] AD0
* P0[24]/AD0[1]/I2SRX_WS/CAP3[1] AD1
* P0[25]/AD0[2]/I2SRX_SDA/TXD3 AD2
* P0[26]/AD0[3]/AOUT/RXD3 AD3
* P0[27]/SDA0/USB_SDA SDA
* P0[28]/SCL0 SCL
* P0[29]/USB_D+ USB+
* P0[30]/USB_D- USB-
*
* P1[0] - P1[17] Not connected
* P1[18]/USB_UP_LED/PWM1[1]/CAP1[0] USB_LINK
* P1[19]-P[29] P[19]-P[29]
* P1[30]/VBUS/AD0[4] USB_+5
* P1[31]/SCK1/AD0[5] AD5
*
* P2[0] P2[0]/LED1_A
* P2[1] P2[1]/LED1_B
* P2[2] P2[2]/LED2_A
* P2[3] P2[3]/LED2_B
* P2[4] P2[4]
* P2[5]/PWM1[6]/DTR1/TRACEDATA[0] 232_POWERAVE
* P2[6]/PCAP1[0]/RI1/TRACECLK 232_VALID
* P2[7]/RD2/RTS1 P2[7]/CAN_RX2
* P2[8]/TD2/TXD2 P2[8]/CAN_TX2
* P2[9]/USB_CONNECT/RXD2 USB_CONNECT
* P2[10]/EINT0/NMI BOOTLOADER
* P2[11]/EINT1/I2STX_CLK HEARTBEAT
* P2[12]/EINT2/I2STX_WS EXTRA_LED
* P2[13]/EINT3/I2STX_SDA 5V_ENABLE
*
* P3[25]-P3[26] Not connected
*
* P4[28]-P4[29] P4[28]-P4[29]
*/
#define NUCLEUS2G_LED1_A (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN0)
#define NUCLEUS2G_LED1_B (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN1)
#define NUCLEUS2G_LED2_A (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN2)
#define NUCLEUS2G_LED2_B (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN3)
#define NUCLEUS2G_232_ENABLE (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT2 | GPIO_PIN5)
#define NUCLEUS2G_232_POWERSAVE (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN5)
#define NUCLEUS2G_232_VALID (GPIO_INPUT | GPIO_PULLUP | GPIO_PORT2 | GPIO_PIN5)
#define NUCLEUS2G_HEARTBEAT (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT2 | GPIO_PIN11)
#define NUCLEUS2G_EXTRA_LED (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN12)
#define NUCLEUS2G_5V_ENABLE (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT2 | GPIO_PIN13)
#define NUCLEUS2G_5V_DISABLE (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT2 | GPIO_PIN13)
#define NUCLEUS2G_MMCSD_CS (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT0 | GPIO_PIN16)
#define NUCLEUS_BMS_RELAY1 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN20)
#define NUCLEUS_BMS_RELAY2 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN21)
#define NUCLEUS_BMS_RELAY3 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN22)
#define NUCLEUS_BMS_RELAY4 (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN23)
/************************************************************************************
* Public Types
************************************************************************************/
/************************************************************************************
* Public data
************************************************************************************/
#ifndef __ASSEMBLY__
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: nucleus2g_sspdev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the NUCLEUS-2G board.
*
************************************************************************************/
void weak_function nucleus2g_sspdev_initialize(void);
void up_relayinit(void);
#endif /* __ASSEMBLY__ */
#endif /* _CONFIGS_NUCLEUS2G_SRC_NUCLEUS2G_H */
-61
View File
@@ -1,61 +0,0 @@
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15ba 0x002a
# NXP LPC1768 Cortex-M3 with 512kB Flash and 32kB+32kB Local On-Chip SRAM, clocked with 4MHz internal RC oscillator
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc1768
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x4ba00477
}
#delays on reset lines
jtag_nsrst_delay 200
jtag_ntrst_delay 200
# LPC2000 & LPC1700 -> SRST causes TRST
reset_config trst_and_srst srst_pulls_trst
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
# LPC1768 has 32kB of SRAM on its main system bus (so-called Local On-Chip SRAM)
$_TARGETNAME configure -work-area-phys 0x10000000 -work-area-size 0x8000 -work-area-backup 0
# REVISIT is there any good reason to have this reset-init event handler??
# Normally they should set up (board-specific) clocking then probe the flash...
$_TARGETNAME configure -event reset-init {
# Force NVIC.VTOR to point to flash at 0 ...
# WHY? This is it's reset value; we run right after reset!!
mwb 0xE000ED08 0x00
}
# LPC1768 has 512kB of user-available FLASH (bootloader is located in separate dedicated region).
# flash bank lpc1700 <base> <size> 0 0 <target#> <variant> <cclk> [calc_checksum]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x80000 0 0 $_TARGETNAME lpc1700 80000 calc_checksum
# 4MHz / 6 = 666kHz, so use 500
jtag_khz 500
-62
View File
@@ -1,62 +0,0 @@
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
# NXP LPC1768 Cortex-M3 with 512kB Flash and 32kB+32kB Local On-Chip SRAM, clocked with 4MHz internal RC oscillator
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc1768
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x4ba00477
}
#delays on reset lines
jtag_nsrst_delay 200
jtag_ntrst_delay 200
# LPC2000 & LPC1700 -> SRST causes TRST
reset_config trst_and_srst srst_pulls_trst
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
# LPC1768 has 32kB of SRAM on its main system bus (so-called Local On-Chip SRAM)
$_TARGETNAME configure -work-area-phys 0x10000000 -work-area-size 0x8000 -work-area-backup 0
# REVISIT is there any good reason to have this reset-init event handler??
# Normally they should set up (board-specific) clocking then probe the flash...
$_TARGETNAME configure -event reset-init {
# Force NVIC.VTOR to point to flash at 0 ...
# WHY? This is it's reset value; we run right after reset!!
mwb 0xE000ED08 0x00
}
# LPC1768 has 512kB of user-available FLASH (bootloader is located in separate dedicated region).
# flash bank lpc1700 <base> <size> 0 0 <target#> <variant> <cclk> [calc_checksum]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x80000 0 0 $_TARGETNAME lpc1700 80000 calc_checksum
# 4MHz / 6 = 666kHz, so use 500
jtag_khz 100
-49
View File
@@ -1,49 +0,0 @@
#!/bin/sh
TOPDIR=$1
CFGFILE=$2
USAGE="$0 <TOPDIR> [-d]"
if [ -z "${TOPDIR}" ]; then
echo "Missing argument"
echo $USAGE
exit 1
fi
if [ -z "${CFGFILE}" ]; then
echo "Using olimex.cfg"
CFGFILE=olimex.cfg
fi
OPENOCD_PATH="/cygdrive/c/OpenOCD/openocd-0.4.0/src"
OPENOCD_EXE=openocd.exe
OPENOCD_CFG="${TOPDIR}/configs/nucleus2g/tools/${CFGFILE}"
OPENOCD_ARGS="-f `cygpath -w ${OPENOCD_CFG}`"
if [ "X$2" = "X-d" ]; then
OPENOCD_ARGS=$OPENOCD_ARGS" -d3"
set -x
fi
if [ ! -d ${OPENOCD_PATH} ]; then
echo "OpenOCD path does not exist: ${OPENOCD_PATH}"
exit 1
fi
if [ ! -x ${OPENOCD_PATH}/${OPENOCD_EXE} ]; then
echo "OpenOCD does not exist: ${OPENOCD_PATH}/${OPENOCD_EXE}"
exit 1
fi
if [ ! -f ${OPENOCD_CFG} ]; then
echo "OpenOCD config file does not exist: ${OPENOCD_CFG}"
exit 1
fi
echo "Starting OpenOCD"
${OPENOCD_PATH}/${OPENOCD_EXE} ${OPENOCD_ARGS} &
echo "OpenOCD daemon started"
ps -ef | grep openocd
echo "In GDB: target remote localhost:3333"
-63
View File
@@ -1,63 +0,0 @@
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "usbScarab A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x0403 0xbbe0
# NXP LPC1768 Cortex-M3 with 512kB Flash and 32kB+32kB Local On-Chip SRAM, clocked with 4MHz internal RC oscillator
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME lpc1768
}
if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
set _ENDIAN little
}
if { [info exists CPUTAPID ] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x4ba00477
}
#delays on reset lines
jtag_nsrst_delay 200
jtag_ntrst_delay 200
# LPC2000 & LPC1700 -> SRST causes TRST
reset_config trst_and_srst srst_pulls_trst
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
# LPC1768 has 32kB of SRAM on its main system bus (so-called Local On-Chip SRAM)
$_TARGETNAME configure -work-area-phys 0x10000000 -work-area-size 0x8000 -work-area-backup 0
# REVISIT is there any good reason to have this reset-init event handler??
# Normally they should set up (board-specific) clocking then probe the flash...
$_TARGETNAME configure -event reset-init {
# Force NVIC.VTOR to point to flash at 0 ...
# WHY? This is it's reset value; we run right after reset!!
mwb 0xE000ED08 0x00
}
# LPC1768 has 512kB of user-available FLASH (bootloader is located in separate dedicated region).
# flash bank lpc1700 <base> <size> 0 0 <target#> <variant> <cclk> [calc_checksum]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME lpc2000 0x0 0x80000 0 0 $_TARGETNAME lpc1700 80000 calc_checksum
# 4MHz / 6 = 666kHz, so use 500
jtag_khz 100
#jtag_rclk 1000
-25
View File
@@ -1,25 +0,0 @@
https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf
Repair procedure for ARM-USB-OCD drivers
1. Uninstalling ARM-USB-OCD drivers
-------------------------------------
1.1. Connect your programmer/debugger to your computer, open Device Manager
and uninstall the drivers for ARM-USB-OCD.
1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager,
disconnect the programmer from your computer.
1.3. Now you should download FTClean.exe from here:
http://www.ftdichip.com/Support/Utilities/FTClean.zip.
1.4. After download is complete extract the "*.zip" file, open folder FTClean,
and run FTClean.exe
1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba
and "PID (Hex)" with 0004.
1.6. Press "Clean System" button. Make sure that all FTDI devices are
disconnected. (My require administrator privileges).
2. Re-installing the ARM-USB-OCD driver
---------------------------------------
2.1 Connect the programmer/debugger to the computer.
2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER
directory and install. (A different driver is required for OpenOCD
0.4.0. That driver is available from the olimex.com web site).
-111
View File
@@ -1,111 +0,0 @@
############################################################################
# configs/nucleus2g/usbmsc/Make.defs
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
else
# Linux/Cygwin-native toolchain
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
endif
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048
ASMEXT = .S
OBJEXT = .o
LIBEXT = .a
EXEEXT =
ifneq ($(CROSSDEV),arm-nuttx-elf-)
LDFLAGS += -nostartfiles -nodefaultlibs
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g
endif
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
HOSTLDFLAGS =
File diff suppressed because it is too large Load Diff
-47
View File
@@ -1,47 +0,0 @@
#!/bin/bash
# configs/nucleus2g/usbmsc/setenv.sh
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
if [ "$(basename $0)" = "setenv.sh" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
export LPCTOOL_DIR="${WD}/configs/nucleus2g/tools"
export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
-111
View File
@@ -1,111 +0,0 @@
############################################################################
# configs/nucleus2g/usbserial/Make.defs
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
else
# Linux/Cygwin-native toolchain
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
endif
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
ARCHCFLAGS = -fno-builtin
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048
ASMEXT = .S
OBJEXT = .o
LIBEXT = .a
EXEEXT =
ifneq ($(CROSSDEV),arm-nuttx-elf-)
LDFLAGS += -nostartfiles -nodefaultlibs
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g
endif
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
HOSTLDFLAGS =
File diff suppressed because it is too large Load Diff
-47
View File
@@ -1,47 +0,0 @@
#!/bin/bash
# configs/nucleus2g/usbserial/setenv.sh
#
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
if [ "$(basename $0)" = "setenv.sh" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
export LPCTOOL_DIR="${WD}/configs/nucleus2g/tools"
export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
export PATH="${BUILDROOT_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
+3
View File
@@ -31,6 +31,9 @@ that case).
There is a lot of testing that could be done but, unfortunately, I still There is a lot of testing that could be done but, unfortunately, I still
have no i.MX6 hardware to test on. have no i.MX6 hardware to test on.
In additional to the unexpected issues, I do expect to run into some
cache coherency issues when I get to testing an SMP configuration.
2016-03-28: I now have a used MCIMX6Q-SDB which is similar to the target 2016-03-28: I now have a used MCIMX6Q-SDB which is similar to the target
configuration described below except that it does not have the 10.1" LVDS configuration described below except that it does not have the 10.1" LVDS
display. Next step: Figure out how to run a copy of NuttX using U-Boot. display. Next step: Figure out how to run a copy of NuttX using U-Boot.
-1
View File
@@ -319,7 +319,6 @@ CONFIG_RAM_SIZE=32768
# #
# CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_LPCXPRESSO is not set
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
CONFIG_ARCH_BOARD_U_BLOX_C027=y CONFIG_ARCH_BOARD_U_BLOX_C027=y
# CONFIG_ARCH_BOARD_ZKITARM is not set # CONFIG_ARCH_BOARD_ZKITARM is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
-1
View File
@@ -273,7 +273,6 @@ CONFIG_RAM_SIZE=32768
# #
# CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_LPCXPRESSO is not set
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
CONFIG_ARCH_BOARD_ZKITARM=y CONFIG_ARCH_BOARD_ZKITARM=y
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="zkit-arm-1769" CONFIG_ARCH_BOARD="zkit-arm-1769"
-1
View File
@@ -277,7 +277,6 @@ CONFIG_RAM_SIZE=32768
# #
# CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_LPCXPRESSO is not set
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
CONFIG_ARCH_BOARD_ZKITARM=y CONFIG_ARCH_BOARD_ZKITARM=y
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="zkit-arm-1769" CONFIG_ARCH_BOARD="zkit-arm-1769"
-1
View File
@@ -277,7 +277,6 @@ CONFIG_RAM_SIZE=32768
# #
# CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_LPCXPRESSO is not set
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
CONFIG_ARCH_BOARD_ZKITARM=y CONFIG_ARCH_BOARD_ZKITARM=y
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="zkit-arm-1769" CONFIG_ARCH_BOARD="zkit-arm-1769"
-1
View File
@@ -273,7 +273,6 @@ CONFIG_RAM_SIZE=32768
# #
# CONFIG_ARCH_BOARD_LPCXPRESSO is not set # CONFIG_ARCH_BOARD_LPCXPRESSO is not set
# CONFIG_ARCH_BOARD_MBED is not set # CONFIG_ARCH_BOARD_MBED is not set
# CONFIG_ARCH_BOARD_NUCLEUS2G is not set
CONFIG_ARCH_BOARD_ZKITARM=y CONFIG_ARCH_BOARD_ZKITARM=y
# CONFIG_ARCH_BOARD_CUSTOM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="zkit-arm-1769" CONFIG_ARCH_BOARD="zkit-arm-1769"