mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Add board support for the Olimex EFM32G8809128 STK
This commit is contained in:
@@ -363,6 +363,13 @@ config ARCH_BOARD_NUTINY_NUC120
|
|||||||
Nuvoton NUC120 chip, specifically the NUC120LE3AN. See http://www.nuvoton.com/
|
Nuvoton NUC120 chip, specifically the NUC120LE3AN. See http://www.nuvoton.com/
|
||||||
for further information.
|
for further information.
|
||||||
|
|
||||||
|
config ARCH_BOARD_OLIMEX_EFM32G880F128_STK
|
||||||
|
bool "Olimex EFM32G880F128 STK"
|
||||||
|
depends on ARCH_CHIP_EFM32G880F128
|
||||||
|
select ARCH_HAVE_BUTTONS
|
||||||
|
---help---
|
||||||
|
This options selects the Olimex EFM32G880F128 STK
|
||||||
|
|
||||||
config ARCH_BOARD_OLIMEXLPC2378
|
config ARCH_BOARD_OLIMEXLPC2378
|
||||||
bool "Olimex-lpc2378 board"
|
bool "Olimex-lpc2378 board"
|
||||||
depends on ARCH_CHIP_LPC2378
|
depends on ARCH_CHIP_LPC2378
|
||||||
@@ -1002,6 +1009,7 @@ config ARCH_BOARD
|
|||||||
default "ntosd-dm320" if ARCH_BOARD_NTOSD_DM320
|
default "ntosd-dm320" if ARCH_BOARD_NTOSD_DM320
|
||||||
default "nucleus2g" if ARCH_BOARD_NUCLEUS2G
|
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-lpc1766stk" if ARCH_BOARD_LPC1766STK
|
default "olimex-lpc1766stk" if ARCH_BOARD_LPC1766STK
|
||||||
default "olimex-lpc2378" if ARCH_BOARD_OLIMEXLPC2378
|
default "olimex-lpc2378" if ARCH_BOARD_OLIMEXLPC2378
|
||||||
default "olimex-lpc-h3131" if ARCH_BOARD_OLIMEX_LPC_H3131
|
default "olimex-lpc-h3131" if ARCH_BOARD_OLIMEX_LPC_H3131
|
||||||
@@ -1224,6 +1232,9 @@ endif
|
|||||||
if ARCH_BOARD_NUTINY_NUC120
|
if ARCH_BOARD_NUTINY_NUC120
|
||||||
source "configs/nutiny-nuc120/Kconfig"
|
source "configs/nutiny-nuc120/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
if ARCH_BOARD_OLIMEX_EFM32G880F128_STK
|
||||||
|
source "configs/olimex-efm32g880f128-stk/Kconfig"
|
||||||
|
endif
|
||||||
if ARCH_BOARD_LPC1766STK
|
if ARCH_BOARD_LPC1766STK
|
||||||
source "configs/olimex-lpc1766stk/Kconfig"
|
source "configs/olimex-lpc1766stk/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -345,6 +345,10 @@ 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.
|
||||||
|
|
||||||
|
configs/olimex-efm32g880f128-stk
|
||||||
|
This is the port of NuttX to the Olimex EFM32G880F128-STK development
|
||||||
|
board.
|
||||||
|
|
||||||
configs/olimex-lpc1766stk
|
configs/olimex-lpc1766stk
|
||||||
This port uses the Olimex LPC1766-STK board and a GNU GCC toolchain* under
|
This port uses the Olimex LPC1766-STK board and a GNU GCC toolchain* under
|
||||||
Linux or Cygwin. STATUS: Complete and mature.
|
Linux or Cygwin. STATUS: Complete and mature.
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG
|
/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#
|
||||||
|
# For a description of the syntax of this configuration file,
|
||||||
|
# see misc/tools/kconfig-language.txt.
|
||||||
|
#
|
||||||
|
|
||||||
|
if ARCH_BOARD_OLIMEX_EFM32G880F128_STK
|
||||||
|
|
||||||
|
#comment "EFM32 G8XX STK Hardware Configuration"
|
||||||
|
|
||||||
|
endif # ARCH_BOARD_OLIMEX_EFM32G880F128_STK
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
README
|
||||||
|
======
|
||||||
|
|
||||||
|
This README file discusses the port of NuttX to the Olimex EFM32G880F128-STK
|
||||||
|
development board. This board features:
|
||||||
|
|
||||||
|
• EFM32G880F128
|
||||||
|
- 32 bit Cortex-M3™
|
||||||
|
- 128KiB Program Flash, 16KiB Bytes RAM
|
||||||
|
- 85 GPIO, 8 Channel DMA
|
||||||
|
- 12 bit ADC 1Msps
|
||||||
|
- 3xUART/SPI, 2x low power UART
|
||||||
|
- I2C
|
||||||
|
- 3x 16bit TIMERS
|
||||||
|
- 3x2 CC-PWM
|
||||||
|
- SSC
|
||||||
|
- RTC
|
||||||
|
- WDT
|
||||||
|
- Up to 32MHz operation
|
||||||
|
• 32.768 kHz crystal
|
||||||
|
• 32 MHz crystal
|
||||||
|
• LCD custom display
|
||||||
|
• DEBUG connector with ARM 2x10 pin layout for programming/debugging
|
||||||
|
with ARM-JTAG-EW
|
||||||
|
• UEXT connector
|
||||||
|
• EXT extension connector
|
||||||
|
• RS232 connector and driver
|
||||||
|
• Power jack
|
||||||
|
• Lithium coin battery holder
|
||||||
|
• RESET circuit , RESET button
|
||||||
|
• Four user buttons
|
||||||
|
• Buzzer
|
||||||
|
• On-board voltage regulator 3.3V with up to 800mA current
|
||||||
|
• Power supply filtering capacitor
|
||||||
|
• Extension headers for some of the uC ports + RST and power supply
|
||||||
|
|
||||||
|
LEDs
|
||||||
|
====
|
||||||
|
|
||||||
|
The EFM32G880F128-STK has no user controllable LEDs.
|
||||||
|
|
||||||
|
Serial Console
|
||||||
|
==============
|
||||||
|
|
||||||
|
Pin Availability
|
||||||
|
----------------
|
||||||
|
The EFM32G890F128 support the following options for serial output. NOTE
|
||||||
|
(1) that not all of these pins are available for use as a serial console,
|
||||||
|
however. And (2) not all pins made available by the board.
|
||||||
|
|
||||||
|
EFM32 PIN GPIO NOTES/CONFLICTS/AVAILABILITY
|
||||||
|
------- -- ---- ----------------------------------------------
|
||||||
|
US0_RX #0 PE11 SEG7 (LCD)
|
||||||
|
US0_RX #1 PE6 COM2 (LCD)
|
||||||
|
US0_RX #2 PC10 **AVAILABLE at EXT-12**
|
||||||
|
|
||||||
|
US0_TX #0 PE10 SEG6 (LCD)
|
||||||
|
US0_TX #1 PE7 COM3 (LCD)
|
||||||
|
US0_TX #2 PC11 **AVAILABLE at EXT-13**
|
||||||
|
------- -- ----
|
||||||
|
US1_RX #0 PC1 **AVAILABLE at EXT-5**
|
||||||
|
US1_RX #1 PD1 MISO1, Available at UEXT-7
|
||||||
|
|
||||||
|
US1_TX #0 PC0 **AVAILABLE at EXT-4**
|
||||||
|
US1_TX #1 PD0 MOSI1, Available at UEXT-8
|
||||||
|
------- -- ----
|
||||||
|
US2_RX #0 PC3 **AVAILABLE at EXT-7**
|
||||||
|
US2_RX #1 PB4 SEG21 (LCD)
|
||||||
|
|
||||||
|
US2_TX #0 PC2 **AVAILABLE at EXT-6**
|
||||||
|
US2_TX #1 PB3 SEG20 (LCD)
|
||||||
|
------- -- ----
|
||||||
|
U0_RX #0 PF7 SEG25 (LCD)
|
||||||
|
U0_RX #1 PE1 **AVAILABLE at EXT-19**
|
||||||
|
U0_RX #2 PA4 SEG18 (LCD)
|
||||||
|
U0_RX #3 PC15 DBG_SWV
|
||||||
|
|
||||||
|
U0_TX #0 PF6 SEG24 (LCD)
|
||||||
|
U0_TX #1 PE0 **AVAILABLE at EXT-18**
|
||||||
|
U0_TX #2 PA3 SEG17 (LCD)
|
||||||
|
U0_TX #3 PC14 **AVAILABLE at EXT-16**
|
||||||
|
------- -- ----
|
||||||
|
LEU0_RX #0 PD5 LEU0_RX, Available at UEXT-4
|
||||||
|
LEU0_RX #1 PB14 HFXTAL_N
|
||||||
|
LEU0_RX #2 PE15 SEG11 (LCD)
|
||||||
|
|
||||||
|
LEU0_TX #0 PD4 LEU0_TX, Available at UEXT-3
|
||||||
|
LEU0_TX #1 PB13 HFXTAL_P
|
||||||
|
LEU0_TX #2 PE14 SEG10 (LCD)
|
||||||
|
------- -- ----
|
||||||
|
LEU1_RX #0 PC7 LEU1_RX to DB-9 connector
|
||||||
|
LEU1_RX #1 PA6 SEG19 (LCD)
|
||||||
|
|
||||||
|
LEU1_TX #0 PC6 LEU1_TX to DB-9 connector
|
||||||
|
LEU1_TX #1 PA5 SEG18 (LCD)
|
||||||
|
------- -- ----
|
||||||
|
|
||||||
|
RS-232 Driver/DB-9 Connector
|
||||||
|
----------------------------
|
||||||
|
LEUART1 is available on through an RS232 driver on DB-9 connector.
|
||||||
|
Unfortunately, there is no LEUART serial driver available in NuttX as of
|
||||||
|
this writing.
|
||||||
|
|
||||||
|
Default Serial Console
|
||||||
|
----------------------
|
||||||
|
UART0 is configured as the default serial console at 115200 8N1
|
||||||
|
on pins PE0 and PE1.
|
||||||
|
|
||||||
|
Configurations
|
||||||
|
==============
|
||||||
|
Each EFM32G880F128-STK configuration is maintained in a sub-director
|
||||||
|
and can be selected as follow:
|
||||||
|
|
||||||
|
cd tools
|
||||||
|
./configure.sh olimex-efm32g880f128-stk/<subdir>
|
||||||
|
cd -
|
||||||
|
. ./setenv.sh
|
||||||
|
|
||||||
|
If this is a Windows native build, then configure.bat should be used
|
||||||
|
instead of configure.sh:
|
||||||
|
|
||||||
|
configure.bat olimex-efm32g880f128-stk\<subdir>
|
||||||
|
|
||||||
|
Where <subdir> is one of the following:
|
||||||
|
|
||||||
|
nsh:
|
||||||
|
---
|
||||||
|
Configures the NuttShell (nsh) located at apps/examples/nsh. The
|
||||||
|
Configuration enables the serial interfaces on UART0. Support for
|
||||||
|
builtin applications is enabled, but in the base configuration no
|
||||||
|
builtin applications are selected (see NOTES below).
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
|
||||||
|
1. This configuration uses the mconf-based configuration tool. To
|
||||||
|
change this configuration using that tool, you should:
|
||||||
|
|
||||||
|
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
||||||
|
and misc/tools/
|
||||||
|
|
||||||
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||||
|
reconfiguration process.
|
||||||
|
|
||||||
|
2. By default, this configuration uses the CodeSourcery toolchain
|
||||||
|
for Windows and builds under Cygwin (or probably MSYS). That
|
||||||
|
can easily be reconfigured, of course.
|
||||||
|
|
||||||
|
CONFIG_HOST_WINDOWS=y : Builds under Windows
|
||||||
|
CONFIG_WINDOWS_CYGWIN=y : Using Cygwin
|
||||||
|
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows
|
||||||
@@ -0,0 +1,226 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/olimex-efm32g880f128-stk/include/board.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 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_OLIMEX_EFM32G880F128_STK_INCLUDE_BOARD_H
|
||||||
|
#define __CONFIGS_OLIMEX_EFM32G880F128_STK_INCLUDE_BOARD_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "chip/efm32_cmu.h"
|
||||||
|
#include "chip/efm32_usart.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-Processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
/* Clocking *****************************************************************/
|
||||||
|
/* Clock Sources
|
||||||
|
* - 1-28 MHz High Frequency RC Oscillator (HFRCO)
|
||||||
|
* - 4-32 MHz High Frequency Crystal Oscillator (HFXO)
|
||||||
|
* - 32.768 kHz Low Frequency RC Oscillator (LFRCO)
|
||||||
|
* - 32.768 kHz Low Frequency Crystal Oscillator (LFXO)
|
||||||
|
*
|
||||||
|
* The device boots with 14 MHz HFRCO as the HFCLK source.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOARD_HAVE_HFXO 1 /* Have High frequency crystal oscillator */
|
||||||
|
#define BOARD_HAVE_LFXO 1 /* Have Loq frequency crystal oscillator */
|
||||||
|
|
||||||
|
#define BOARD_HFRCO_FREQUENCY 14000000 /* 14MHz on reset */
|
||||||
|
#define BOARD_HFXO_FREQUENCY 32000000 /* 32MHz crystal on board */
|
||||||
|
#define BOARD_LFRCO_FREQUENCY 32768 /* Low frequency oscillator */
|
||||||
|
#define BOARD_LFXO_FREQUENCY 32768 /* 32MHz crystal on board */
|
||||||
|
|
||||||
|
/* HFCLK - High Frequency Clock
|
||||||
|
*
|
||||||
|
* HFCLK is the selected High Frequency Clock. This clock is used by the CMU
|
||||||
|
* and drives the two prescalers that generate HFCORECLK and HFPERCLK. The
|
||||||
|
* HFCLK can be driven by a high-frequency oscillator (HFRCO or HFXO) or one
|
||||||
|
* of the low-frequency oscillators (LFRCO or LFXO). By default the HFRCO is
|
||||||
|
* selected.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOARD_HFCLKSEL _CMU_CMD_HFCLKSEL_HFXO
|
||||||
|
#define BOARD_HFCLKDIV 0 /* Does not apply to EFM32G */
|
||||||
|
#define BOARD_HFCLK_FREQUENCY BOARD_HFXO_FREQUENCY
|
||||||
|
|
||||||
|
/* HFCORECLK - High Frequency Core Clock
|
||||||
|
*
|
||||||
|
* HFCORECLK is a prescaled version of HFCLK. This clock drives the Core
|
||||||
|
* Modules, which consists of the CPU and modules that are tightly coupled
|
||||||
|
* to the CPU, e.g. MSC, DMA etc. The frequency of HFCORECLK is set using
|
||||||
|
* the CMU_HFCORECLKDIV register.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOARD_HFCORECLKDIV _CMU_HFCORECLKDIV_HFCORECLKDIV_DEFAULT
|
||||||
|
#define BOARD_HFCORECLK_FREQUENCY BOARD_HFXO_FREQUENCY
|
||||||
|
|
||||||
|
/* HFPERCLK - High Frequency Peripheral Clock
|
||||||
|
*
|
||||||
|
* Like HFCORECLK, HFPERCLK can also be a prescaled version of HFCLK. This
|
||||||
|
* clock drives the High-Frequency Peripherals. The frequency of HFPERCLK is
|
||||||
|
* set using the CMU_HFPERCLKDIV register.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOARD_HFPERCLKDIV _CMU_HFPERCLKDIV_HFPERCLKDIV_DEFAULT
|
||||||
|
#define BOARD_HFPERCLK_FREQUENCY BOARD_HFXO_FREQUENCY
|
||||||
|
|
||||||
|
/* LFACLK - Low Frequency A Clock
|
||||||
|
*
|
||||||
|
* LFACLK is the selected clock for the Low Energy A Peripherals. There are
|
||||||
|
* four selectable sources for LFACLK: LFRCO, LFXO, HFCORECLK/2 and ULFRCO.
|
||||||
|
* From reset, the LFACLK source is set to LFRCO. However, note that the
|
||||||
|
* LFRCO is disabled from reset. The selection is configured using the LFA
|
||||||
|
* field in CMU_LFCLKSEL. The HFCORECLK/2 setting allows the Low Energy A
|
||||||
|
* Peripherals to be used as high-frequency peripherals.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOARD_LFACLKSEL _CMU_LFCLKSEL_LFA_LFXO
|
||||||
|
#define BOARD_LFACLK_FREQUENCY BOARD_LFXO_FREQUENCY
|
||||||
|
|
||||||
|
/* LFBCLK - Low Frequency B Clock
|
||||||
|
*
|
||||||
|
* LFBCLK is the selected clock for the Low Energy B Peripherals. There are
|
||||||
|
* four selectable sources for LFBCLK: LFRCO, LFXO, HFCORECLK/2 and ULFRCO.
|
||||||
|
* From reset, the LFBCLK source is set to LFRCO. However, note that the
|
||||||
|
* LFRCO is disabled from reset. The selection is configured using the LFB
|
||||||
|
* field in CMU_LFCLKSEL. The HFCORECLK/2 setting allows the Low Energy B
|
||||||
|
* Peripherals to be used as high-frequency peripherals.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOARD_LFBCLKSEL _CMU_LFCLKSEL_LFB_LFXO
|
||||||
|
#define BOARD_LFBCLK_FREQUENCY BOARD_LFXO_FREQUENCY
|
||||||
|
|
||||||
|
/* PCNTnCLK - Pulse Counter n Clock
|
||||||
|
*
|
||||||
|
* Each available pulse counter is driven by its own clock, PCNTnCLK where
|
||||||
|
* n is the pulse counter instance number. Each pulse counter can be
|
||||||
|
* configured to use an external pin (PCNTn_S0) or LFACLK as PCNTnCLK.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* WDOGCLK - Watchdog Timer Clock
|
||||||
|
*
|
||||||
|
* The Watchdog Timer (WDOG) can be configured to use one of three different
|
||||||
|
* clock sources: LFRCO, LFXO or ULFRCO. ULFRCO (Ultra Low Frequency RC
|
||||||
|
* Oscillator) is a separate 1 kHz RC oscillator that also runs in EM3.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* AUXCLK - Auxiliary Clock
|
||||||
|
*
|
||||||
|
* AUXCLK is a 1-28 MHz clock driven by a separate RC oscillator, AUXHFRCO.
|
||||||
|
* This clock is used for flash programming and Serial Wire Output (SWO).
|
||||||
|
* During flash programming this clock will be active. If the AUXHFRCO has
|
||||||
|
* not been enabled explicitly by software, the MSC will automatically
|
||||||
|
* start and stop it. The AUXHFRCO is enabled by writing a 1 to AUXHFRCOEN
|
||||||
|
* in CMU_OSCENCMD. This explicit enabling is required when SWO is used.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* LEDs *********************************************************************/
|
||||||
|
/* The EFM32 Gecko Starter Kit supports 4 yellow LEDs. One side is grounded
|
||||||
|
* so these LEDs are illuminated by outputting a high value.
|
||||||
|
*
|
||||||
|
* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in
|
||||||
|
* any way. The following definitions are used to access individual LEDs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* LED index values for use with efm32_setled() */
|
||||||
|
|
||||||
|
#define BOARD_LED1 0
|
||||||
|
#define BOARD_LED2 1
|
||||||
|
#define BOARD_LED3 2
|
||||||
|
#define BOARD_LED4 3
|
||||||
|
#define BOARD_NLEDS 4
|
||||||
|
|
||||||
|
#define BOARD_LED_GREEN BOARD_LED1
|
||||||
|
#define BOARD_LED_ORANGE BOARD_LED2
|
||||||
|
#define BOARD_LED_RED BOARD_LED3
|
||||||
|
#define BOARD_LED_BLUE BOARD_LED4
|
||||||
|
|
||||||
|
/* LED bits for use with efm32_setleds() */
|
||||||
|
|
||||||
|
#define BOARD_LED1_BIT (1 << BOARD_LED1)
|
||||||
|
#define BOARD_LED2_BIT (1 << BOARD_LED2)
|
||||||
|
#define BOARD_LED3_BIT (1 << BOARD_LED3)
|
||||||
|
#define BOARD_LED4_BIT (1 << BOARD_LED4)
|
||||||
|
|
||||||
|
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 4 LEDs on
|
||||||
|
* board the EFM32 Gecko Starter Kit. The following definitions describe
|
||||||
|
* how NuttX controls the LEDs in this configuration:
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LED_STARTED 0 /* LED1 */
|
||||||
|
#define LED_HEAPALLOCATE 1 /* LED2 */
|
||||||
|
#define LED_IRQSENABLED 2 /* LED1 + LED2 */
|
||||||
|
#define LED_STACKCREATED 3 /* LED3 */
|
||||||
|
#define LED_INIRQ 4 /* LED1 + LED3 */
|
||||||
|
#define LED_SIGNAL 5 /* LED2 + LED3 */
|
||||||
|
#define LED_ASSERTION 6 /* LED1 + LED2 + LED3 */
|
||||||
|
#define LED_PANIC 7 /* N/C + N/C + N/C + LED4 */
|
||||||
|
|
||||||
|
/* Pin routing **************************************************************/
|
||||||
|
/* UART0:
|
||||||
|
*
|
||||||
|
* U0_RX #1 PE1 **AVAILABLE at TP130**
|
||||||
|
* U0_TX #1 PE0 **AVAILABLE at TP129**
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BOARD_UART0_ROUTE_LOCATION _USART_ROUTE_LOCATION_LOC1
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: efm32_ledinit, efm32_setled, and efm32_setleds
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
|
||||||
|
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the following interfaces
|
||||||
|
* are available to control the LEDs from user applications.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef CONFIG_ARCH_LEDS
|
||||||
|
void efm32_ledinit(void);
|
||||||
|
void efm32_setled(int led, bool ledon);
|
||||||
|
void efm32_setleds(uint8_t ledset);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __CONFIGS_EFM32_DK3650_INCLUDE_BOARD_H */
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/olimex-efm32g880f128-stk/nsh/Make.defs
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014 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}/arch/arm/src/armv7-m/Toolchain.defs
|
||||||
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
|
||||||
|
LDSCRIPT = ld.script
|
||||||
|
|
||||||
|
ifeq ($(WINTOOL),y)
|
||||||
|
# Windows-native toolchains
|
||||||
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mknulldeps.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/$(LDSCRIPT)}"
|
||||||
|
else
|
||||||
|
# Linux/Cygwin-native toolchain
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
|
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 -fno-rtti
|
||||||
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||||
|
ARCHWARNINGSXX = -Wall -Wshadow
|
||||||
|
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
|
||||||
|
|
||||||
|
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 -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
||||||
File diff suppressed because it is too large
Load Diff
+63
@@ -0,0 +1,63 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# configs/olimex-efm32g880f128-stk/nsh/setenv.sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014 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 [ "$_" = "$0" ] ; then
|
||||||
|
echo "You must source this script, not run it!" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
WD=`pwd`
|
||||||
|
if [ ! -x "setenv.sh" ]; then
|
||||||
|
echo "This script must be executed from the top-level NuttX build directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${PATH_ORIG}" ]; then
|
||||||
|
export PATH_ORIG="${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This is the Cygwin path to the location where I installed the CodeSourcery
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the CodeSourcery toolchain in any other location
|
||||||
|
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||||
|
#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||||
|
|
||||||
|
# This is the Cygwin path to the location where I build the buildroot
|
||||||
|
# toolchain.
|
||||||
|
#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
|
||||||
|
|
||||||
|
# Add the path to the toolchain to the PATH varialble
|
||||||
|
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||||
|
|
||||||
|
echo "PATH : ${PATH}"
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/olimex-efm32g880f128-stk/scripts/ld.script
|
||||||
|
*
|
||||||
|
* Copyright (C) 2012, 2014 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.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
flash (rx) : ORIGIN = 0x00000000, LENGTH = 131072
|
||||||
|
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 16384
|
||||||
|
}
|
||||||
|
|
||||||
|
OUTPUT_ARCH(arm)
|
||||||
|
EXTERN(_vectors)
|
||||||
|
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 : {
|
||||||
|
_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) }
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/.depend
|
||||||
|
/Make.dep
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/olimex-efm32g880f128-stk/src/Makefile
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014 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
|
||||||
|
|
||||||
|
CSRCS = efm32_boot.c
|
||||||
|
|
||||||
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||||
|
SRCS = $(ASRCS) $(CSRCS)
|
||||||
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
|
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
CFLAGS += -I$(ARCH_SRCDIR)\chip -I$(ARCH_SRCDIR)\common -I$(ARCH_SRCDIR)\armv7-m
|
||||||
|
else
|
||||||
|
ifeq ($(WINTOOL),y)
|
||||||
|
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
|
||||||
|
-I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
|
||||||
|
-I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
|
||||||
|
else
|
||||||
|
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
|
||||||
|
$(call COMPILE, $<, $@)
|
||||||
|
|
||||||
|
libboard$(LIBEXT): $(OBJS)
|
||||||
|
$(call ARCHIVE, $@, $(OBJS))
|
||||||
|
|
||||||
|
.depend: Makefile $(SRCS)
|
||||||
|
$(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||||
|
$(Q) touch $@
|
||||||
|
|
||||||
|
depend: .depend
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(call DELFILE, libboard$(LIBEXT))
|
||||||
|
$(call CLEAN)
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
$(call DELFILE, Make.dep)
|
||||||
|
$(call DELFILE, .depend)
|
||||||
|
|
||||||
|
-include Make.dep
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* configs/olimex-efm32g880f128-stk/src/efm32_boot.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 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 "efm32_start.h"
|
||||||
|
|
||||||
|
#include "efm32g880f128-stk.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: efm32_boardinitialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* All EFM32 architectures must provide the following entry point. This
|
||||||
|
* entry point is called early in the initialization before any devices
|
||||||
|
* have been initialized.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void efm32_boardinitialize(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* If CONFIG_BOARD_INITIALIZE is selected, then an additional
|
||||||
|
* initialization call will be performed in the boot-up sequence to a
|
||||||
|
* function called board_initialize(). board_initialize() will be
|
||||||
|
* called immediately after up_initialize() is called and just before the
|
||||||
|
* initial application is started. This additional initialization phase
|
||||||
|
* may be used, for example, to initialize board-specific device drivers.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_BOARD_INITIALIZE
|
||||||
|
void board_initialize(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/olimex-efm32g880f128-stk/src/efm32g880f128-stk.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2014 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_OLIMEX_EFM32G880F128_STK_SRC_EFM32G880F128_STK_H
|
||||||
|
#define __CONFIGS_OLIMEX_EFM32G880F128_STK_SRC_EFM32G880F128_STK_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* LEDs
|
||||||
|
*
|
||||||
|
* The EFM32 Gecko Start Kit has four yellow LEDs. These LEDs are connected
|
||||||
|
* as follows:
|
||||||
|
*
|
||||||
|
* ------------------------------------- --------------------
|
||||||
|
* EFM32 PIN BOARD SIGNALS
|
||||||
|
* ------------------------------------- --------------------
|
||||||
|
* C0/USART1_TX#0/PCNT0_S0IN#2/ACMP0_CH0 MCU_PC0 UIF_LED0
|
||||||
|
* C1/USART1_RX#0/PCNT0_S1IN#2/ACMP0_CH1 MCU_PC1 UIF_LED1
|
||||||
|
* C2/USART2_TX#0/ACMP0_CH2 MCU_PC2 UIF_LED2
|
||||||
|
* C3/USART2_RX#0/ACMP0_CH3 MCU_PC3 UIF_LED3
|
||||||
|
* ------------------------------------- --------------------
|
||||||
|
*
|
||||||
|
* All LEDs are grounded and so are illuminated by outputting a high
|
||||||
|
* value to the LED.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define GPIO_LED1 (GPIO_OUTPUT_WIREDOR_PULLDOWN|\
|
||||||
|
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN0)
|
||||||
|
#define GPIO_LED2 (GPIO_OUTPUT_WIREDOR_PULLDOWN|\
|
||||||
|
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN1)
|
||||||
|
#define GPIO_LED3 (GPIO_OUTPUT_WIREDOR_PULLDOWN|\
|
||||||
|
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN2)
|
||||||
|
#define GPIO_LED4 (GPIO_OUTPUT_WIREDOR_PULLDOWN|\
|
||||||
|
GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN3)
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#endif /* __CONFIGS_EFM32_DK3650_INCLUDE_BOARD_H */
|
||||||
Reference in New Issue
Block a user