Remove the configs/ directory

This commit is contained in:
Gregory Nutt
2015-06-29 13:12:29 -06:00
parent 35892cb17f
commit d1ab9c2e0a
2708 changed files with 3 additions and 665742 deletions
-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_PCDUINO_A10
endif # ARCH_BOARD_PCDUINO_A10
-406
View File
@@ -1,406 +0,0 @@
README
======
This directory contains the port of NuttX to the pcDuino v1 board
See http://www.pcduino.com/ for information about pcDuino Lite, v1,
and v2. These boards are based around the Allwinner A10 Cortex-A8 CPU.
I have not compared these boards in detail, but I believe that the
differences are cosmetic. This port was developed on the v1 board, but
the others may be compatible:
pcDuino Lite (See http://www.pcduino.com/?page_id=1707)
ITEMS DETAILS
-------------------- ---------------------------------------------------
CPU 1GHz ARM Cortex A8
GPU OpenGL ES2.0, OpenVG 1.1 Mali 400 core
DRAM 512B
Onboard Storage NO Flash, microSD card (TF) slot for up to 32GB
Video Output HDMI
Extension Interface 2.54mm Headers
Network interface 10/100Mbps RJ45 and USB WiFi extension (not included)
Power 5V, 2000mA
Overall Size 125mm X 52mm
pcDuino v1 (http://www.pcduino.com/?page_id=12)
ITEMS DETAILS
-------------------- ---------------------------------------------------
Items Details
CPU 1GHz ARM Cortex A8
GPU OpenGL ES2.0, OpenVG 1.1 Mali 400 core
* DRAM 1GB
* Onboard Storage 2GB Flash, microSD card (TF) slot for up to 32GB
Video Output HDMI
Extension Interface 2.54mm Headers
Network interface 10/100Mbps RJ45 and USB WiFi extension (not included)
Power 5V, 2000mA
Overall Size 125mm X 52mm
pcDuino v2 (http://www.pcduino.com/?page_id=1618)
ITEMS DETAILS
-------------------- ---------------------------------------------------
Items Details
CPU 1GHz ARM Cortex A8
GPU OpenGL ES2.0, OpenVG 1.1 Mali 400 core
DRAM 1GB
Onboard Storage 2GB Flash, microSD card (TF) slot for up to 32GB
Video Output HDMI
* Extension Interface Arduino Headers
* Network interface 10/100Mbps RJ45 and on-board WiFi module
Power 5V, 2000mA
Overall Size 125mm X 52mm
Main features of the Allwinner A10
(See http://www.allwinnertech.com/en/product/a10.html):
CPU
- ARM Cortex™-A8
- 32KB I-Cache
- 32KB D-Cache
- 256KB L2 Cache
GPU
- ARM Mali-400
Video
- UHD 2160P video decoding
- 3D video decoding
- Support various video decoding formats, including VP8, AVS, H. 264
MVC, VC-1, MPEG-1,2,4, etc
- H.264 HP video encoding up to 1080p @ 30 fps or dual-channel 720p @ 30
fps
Display
- Multi-channel HD display
- Integrated HDMI 1.4
- YPbPr, CVBS, VGA
- Multiple LCD interfaces, including CPU, RGB, LVDS up to Full HD
Memory
- 32-bit DDR2/DDR3
- Memory capacity up to 16G bits
- SLC/MLC/TLC/DDR NAND
- 8 flash chips, 64-bit ECC
Memory capacity up to 64GB
Support NAND of 5xnm, 4xnm, 3xnm, 2xnm, etc
Support NAND of Samsung, Toshiba, Hynix, etc
Boot Devices
- NAND Flash
- SPI NOR Flash
- SD Card
- USB
Contents
========
- pcDuino v1 Connectors
- Serial Console
- LEDs
- Buttons
- JTAG
- Booting NuttX from an SD card
- Configurations
pcDuino v1 Connectors
=====================
TOP
---
- HDMI
- RJ45
- USB Host (2)
- J11
1. UART-Rx / GPIO0 UART2_RX
2. UART-Tx / GPIO1 UART2_TX
3. GPIO3 / GPIO2 GPIO2
4. PWM0 / GPIO3 PWM0
5. GPIO4 GPIO3
6. PWM1 / GPIO5 PWM1
7. PWM2 /GPIO6 PWM2
8. GPIO7 GPIO4
- J8
1. GPIO8 GPIO5
2. PWM3 / GPIO9 PWM3
3. SPI_CS / GPIO10 / PWM4 SPI0_CS
4. SPI_MOSI / GPIO11 / PWM5 SPI0_MOSI
5. SPI_MISO / GPIO12 SPI0_MISO
6. SPI_CLK / GPIO13 SPI0_CLK
7. Gnd
8. ARef
9. I2C-SDA TWI2_SDA
10. I2C-SCK TWI2_SCK
- J12
1. ADC0
2. ADC1
3. ADC2
4. ADC3
5. ADC4
6. ADC5
- J9
1. 5V
2. Gnd
3. Gnd
4. 5V
5. 3.3V
6. Reset
7. 5V
8. NC
- J5 Debug Port
1. Rx UART0-RX
2. Gnd GND
3. Tx UART0-TX
- J6 SPI2
1. SPI2_MISO
2. DC_5V
3. SPI2_CLK
4. SPI2_MOSI
5. RESET#
6. GND
- J7 SPI0
1. SPI0_MISO
2. DC_5V
3. SPI0_CLK
4. SPI0_MOSI
5. RESET#
6. GND
- J10
1. GPIO6
2. GPIO8
3. GPIO7
4. GPIO9
Bottom
------
- USB OTG
- DC Power IN (USB)
- microSD card slot
Serial Console
==============
1. UART0 is available on J5 Debug Port.
J15 Pin 1 Rx UART0-RX UART0_RX/IR1_RX/PB23
J15 Pin 3 Tx UART0-TX UART0_TX/IR1_TX/PB22
2. UART2 is available on J11
J11 Pin1 UART-Rx / GPIO0 UART2_RX EINT31/SPI1_MISO/UART2_RX/PI19
J11 Pin2 UART-Tx / GPIO1 UART2_TX EINT30/SPI1_MOSI/UART2_TX/PI18
By default, the serial console will be provided on UART0 in all of these
configurations.
LEDs
====
The pcDuino v1 has four green LEDs; three can be controlled from software.
Two are tied to ground and, hence, illuminated by driving the output pins
to a high value:
1. LED1 SPI0_CLK SPI0_CLK/UART5_RX/EINT23/PI11
2. LED5 IPSOUT From the PMU (not controllable by software)
And two are pull high and, hence, illuminated by grounding the output:
3. LED3 RX_LED LCD1_D16/ATAD12/KP_IN6/SMC_DET/EINT16/CSI1_D16/PH16
4. LED4 TX_LED LCD1_D15/ATAD11/KP_IN5/SMC_VPPPP/EINT15/CSI1_D15/PH15
These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
defined. In that case, the usage by the board port is defined in
include/board.h and src/stm32_leds.c. The LEDs are used to encode OS-related
events as follows:
SYMBOL Meaning LED state
LED1 LED3 LED4
----------------- ----------------------- ---- ---- ------------
LED_STARTED NuttX has been started ON OFF OFF
LED_HEAPALLOCATE Heap has been allocated OFF ON OFF
LED_IRQSENABLED Interrupts enabled ON ON OFF
LED_STACKCREATED Idle stack created ON ON OFF
LED_INIRQ In an interrupt N/C N/C Soft glow
LED_SIGNAL In a signal handler N/C N/C Soft glow
LED_ASSERTION An assertion failed N/C N/C Soft glow
LED_PANIC The system has crashed N/C N/C 2Hz Flashing
LED_IDLE MCU is is sleep mode Not used
After booting, LED1 and 3 are not longer used by the system and can be used for
other purposes by the application (Of course, all LEDs are available to the
application if CONFIG_ARCH_LEDS is not defined.
Buttons
=======
There are a total of five switches on-board. All pulled high and, hence,
will be sensed as low when closed.
SW1 Reset (not available to software)
SW2 UBOOT UBOOT_SEL (?)
SW3 Key_Back LCD1_D17/ATAD13/KP_IN7/SMC_VCCEN/EINT17/CSI1_D17/PH17
SW4 Key_Home LCD1_D18/ATAD14/KP_OUT0/SMC_SLK/EINT18/CSI1_D18/PH18
SW5 Key_Menu LCD1_D19/ATAD15/KP_OUT1/SMC_SDA/EINT19/CSI1_D19/PH19
JTAG
====
A. I didn't get success testing J-Link with pcDuino, it is reading TDI
always as 1.
I think the main problem is because pcDuino JTAG doesn't have RESET
(no trst or srst). I tried to connect the JTAG reset to Power_Reset
of pcDuino, but it didn't work.
B. Notice that the OlinuxIno JTAG does have a reset line called RESET_N.
But it is nothing special. It just connects to the RESET# pin C14 on
the A10. The pcDuino also brings out the RESET# on several connectors.
So it seems like you could get the reset line if you need it, just not
from the set of JTAG pads.
A. I discovered the issue in the JTAG, it was not working because
JTAG_SEL was not tied to GND.
I compared the Olimex schematic with pcDuino and noticed there is a
R64 resister that is not placed in the board.
It was a little bit difficult to find this resistor, because it is
"hidden" among the capacitors in the bottom of the board.
After short circuiting the resistor PADs the JTAG started to work,
well, JLinkExe now recognize it, but OpenOCD is not working yet.
Booting NuttX from an SD card
=============================
These are the steps to get U-Boot booting from SD Card:
1. Get the U-Boot sources for the pcDuino
$ git clone https://github.com/yuq/u-boot-sunxi.git
2. Build U-Boot. We really only want the SPL program; this builds
the whole thing:
$ cd u-boot-sunxi
$ make pcduino CROSS_COMPILE=arm-none-eabi-
At the conclusion of a success bin, you will find the u-boot binary
at ./u-boot.bin and the SPL binary at ./spl/sunxi-spl.bin
NOTES:
a. You may need to use a different tool prefix for the CROSS_COMPILE=
value, depending upon what toolchain you have installed and upon
which platform your are working.
b. When I try this on Cygwin, I get a make failure that is, apparently,
due to some script incompatibility.
3. Insert a FLASH stick. Use dmesg to get the name of the new USB
device. Make sure that it is not mounted, then (assuming that the
USB device is /dev/sdb):
$ sudo dd if=./spl/sunxi-spl.bin of=/dev/sdb bs=1024 seek=8
$ sudo dd if=nuttx.bin of=/dev/sdb bs=1024 seek=32
4. Remove the FLASH stick from the host pc. Insert into the pcDuino
microSD slot. Reset the pcDuino and NuttX should be running.
Reference: https://www.olimex.com/wiki/Bare_Metal_programming_A13#Stand_alone_program_running_with_uboot
Configurations
==============
Information Common to All Configurations
----------------------------------------
Each pcDuino configuration is maintained in a sub-directory and
can be selected as follow:
cd tools
./configure.sh pcduino-a10/<subdir>
cd -
. ./setenv.sh
Before sourcing the setenv.sh file above, you should examine it and perform
edits as necessary so that TOOLCHAIN_BIN is the correct path to the directory
than holds your toolchain binaries.
And then build NuttX by simply typing the following. At the conclusion of
the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
make
The <subdir> that is provided above as an argument to the tools/configure.sh
must be is one of the following.
NOTES:
1. These configurations use the mconf-based configuration tool. To
change any of these configurations using that tool, you should:
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
see additional README.txt files in the NuttX tools repository.
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
2. Unless stated otherwise, all configurations generate console
output on UART0.
3. All of these configurations use the Code Sourcery for Windows toolchain
(unless stated otherwise in the description of the configuration). That
toolchain selection can easily be reconfigured using 'make menuconfig'.
Here are the relevant current settings:
Build Setup:
CONFIG_HOST_WINDOWS=y : Microsoft Windows
CONFIG_WINDOWS_CYGWIN=y : Using Cygwin or other POSIX environment
System Type -> Toolchain:
CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows
The setenv.sh file is available for you to use to set the PATH
variable. The path in the that file may not, however, be correct
for your installation. Try 'which arm-none-eabi-gcc' to make sure that
you are selecting the right tool.
Configuration Sub-directories
-----------------------------
nsh:
This configuration directory provide the NuttShell (NSH). There are
STATUS:
This configuration builds and runs, but only if the patch at
nuttx/configs/pcduino-a10/nsh/pcduino-140107.patch is applied. This patchfile
contains some fixes that are as-of-yet not well understood and so cannot be checked
in. Below is a summary of the kludges currently in this patch file:
a) nuttx/arch/arm/src/armv7-a/arm_head.S: Initializes the MMU so that A10
peripherals can be accessed very early. This is not normally necessary, but
is required because of certain debug statements that seem to be necessary
in a1x_boot.c (see the next item).
b) nuttx/arch/arm/src/a1x/a1x_boot.c: This file contains several arbitrary
statements that just output debug information. Some of these can be removed,
but if you remove all of the debug output, the pcDuino will not boot. No
idea yet why.
c) nuttx/arch/arm/src/armv7-a/arm_mmu.c: After setting a page table entry
for the MMU, the MMU's TLBs are flushed for that memory region. That
flushing must currently be commented out. Why? I am not sure, but I
think that this is because TLBs are being flushed why they are in use. For
the pcDuino, we are executing out of SDRAM so when the TLBs for the SDRAM
region are invalidated that cause a crash. That has not been proven,
however.
-210
View File
@@ -1,210 +0,0 @@
/************************************************************************************
* configs/pcduino-a10/include/board.h
*
* Copyright (C) 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.
*
************************************************************************************/
#ifndef __CONFIGS_PCDUINO_A10_INCLUDE_BOARD_H
#define __CONFIGS_PCDUINO_A10_INCLUDE_BOARD_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include "chip/a1x_piocfg.h"
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Clocking *************************************************************************/
/* Since NuttX is booted from a loader on the A10, clocking should already be setup
* when NuttX starts.
*/
/* LED definitions ******************************************************************/
/* The pcDuino v1 has four green LEDs; three can be controlled from software. Two
* are tied to ground and, hence, illuminated by driving the output pins to a high
* value:
*
* 1. LED1 SPI0_CLK SPI0_CLK/UART5_RX/EINT23/PI11
* 2. LED5 IPSOUT From the PMU (not controllable by software)
*
* And two are pull high and, hence, illuminated by grounding the output:
*
* 3. LED3 RX_LED LCD1_D16/ATAD12/KP_IN6/SMC_DET/EINT16/CSI1_D16/PH16
* 4. LED4 TX_LED LCD1_D15/ATAD11/KP_IN5/SMC_VPPPP/EINT15/CSI1_D15/PH15
*/
/* LED index values for use with a1x_setled() */
#define BOARD_LED1 0
#define BOARD_LED3 1
#define BOARD_LED4 2
#define BOARD_NLEDS 3
/* LED bits for use with a1x_setleds() */
#define BOARD_LED1_BIT (1 << BOARD_LED1)
#define BOARD_LED3_BIT (1 << BOARD_LED3)
#define BOARD_LED4_BIT (1 << BOARD_LED4)
/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
* defined. In that case, the usage by the board port is defined in
* include/board.h and src/a1x_leds.c. The LEDs are used to encode OS-related
* events as follows:
*
* SYMBOL Value Meaning LED state
* LED1 LED3 LED4
* ----------------- ----- ----------------------- ---- ---- ------------ */
#define LED_STARTED 0 /* NuttX has been started ON OFF OFF */
#define LED_HEAPALLOCATE 1 /* Heap has been allocated OFF ON OFF */
#define LED_IRQSENABLED 2 /* Interrupts enabled ON ON OFF */
#define LED_STACKCREATED 2 /* Idle stack created ON ON OFF */
#define LED_INIRQ 3 /* In an interrupt N/C N/C Soft glow */
#define LED_SIGNAL 3 /* In a signal handler N/C N/C Soft glow */
#define LED_ASSERTION 3 /* An assertion failed N/C N/C Soft glow */
#define LED_PANIC 3 /* The system has crashed N/C N/C 2Hz Flashing */
/* LED_IDLE --- /* MCU is is sleep mode Not used
*
* After booting, LED1 and 3 are not longer used by the system and can be used for
* other purposes by the application (Of course, all LEDs are available to the
* application if CONFIG_ARCH_LEDS is not defined.
*/
/* Button definitions ***************************************************************/
/* There are a total of five switches on-board. All pulled high and, hence, will be
* sensed as low when closed.
*
* SW1 Reset (not available to software)
* SW2 UBOOT UBOOT_SEL (?)
* SW3 Key_Back LCD1_D17/ATAD13/KP_IN7/SMC_VCCEN/EINT17/CSI1_D17/PH17
* SW4 Key_Home LCD1_D18/ATAD14/KP_OUT0/SMC_SLK/EINT18/CSI1_D18/PH18
* SW5 Key_Menu LCD1_D19/ATAD15/KP_OUT1/SMC_SDA/EINT19/CSI1_D19/PH19
*/
#define BUTTON_KEY_BACK 0
#define BUTTON_KEY_HOME 1
#define BUTTON_KEY_MENU 2
#define NUM_BUTTONS 3
#define BUTTON_KEY_BACK_BIT (1 << BUTTON_KEY_BACK)
#define BUTTON_KEY_HOME_BIT (1 << BUTTON_KEY_HOME)
#define BUTTON_KEY_MENU_BIT (1 << BUTTON_KEY_MENU)
/* NAND *****************************************************************************/
/* GPIO pin disambiguation **********************************************************/
/* UARTs ****************************************************************************/
/* Two UART connections are available:
*
* 1. UART0 is available on J5 Debug Port.
*
* J15 Pin 1 Rx UART0-RX UART0_RX/IR1_RX/PB23
* J15 Pin 2 Tx UART0-TX UART0_TX/IR1_TX/PB22
*
* 2. UART2 is available on J11
*
* J11 Pin1 UART-Rx / GPIO0 UART2_RX EINT31/SPI1_MISO/UART2_RX/PI19
* J11 Pin2 UART-Tx / GPIO1 UART2_TX EINT30/SPI1_MOSI/UART2_TX/PI18
*/
#define PIO_UART0_RX PIO_UART0_RX_1
#define PIO_UART0_TX PIO_UART0_TX_1
#define PIO_UART2_RX PIO_UART2_RX_1
#define PIO_UART2_TX PIO_UART2_TX_1
/************************************************************************************
* Assembly Language Macros
************************************************************************************/
#ifdef __ASSEMBLY__
.macro config_sdram
.endm
#endif /* __ASSEMBLY__ */
/************************************************************************************
* Public Data
************************************************************************************/
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
#else
#define EXTERN extern
#endif
/************************************************************************************
* Public Function Prototypes
************************************************************************************/
/************************************************************************************
* Name: a1x_boardinitialize
*
* Description:
* All A1X architectures must provide the following entry point. This entry
* point point is called early in the initialization -- after all memory has been
* configured and mapped but before any devices have been initialized.
*
************************************************************************************/
void a1x_boardinitialize(void);
/************************************************************************************
* Name: a1x_setled, and a1x_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 a1x_setled(int led, bool ledon);
void a1x_setleds(uint8_t ledset);
#endif
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* !__ASSEMBLY__ */
#endif /* __CONFIGS_PCDUINO_A10_INCLUDE_BOARD_H */
@@ -1,73 +0,0 @@
/************************************************************************************
* configs/pcduino-a10/include/board_memorymap.h
*
* Copyright (C) 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.
*
************************************************************************************/
#ifndef __CONFIGS_PCDUINO_A10_INCLUDE_BOARD_MEMORYMAP_H
#define __CONFIGS_PCDUINO_A10_INCLUDE_BOARD_MEMORYMAP_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Public Data
************************************************************************************/
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
#else
#define EXTERN extern
#endif
/************************************************************************************
* Public Function Prototypes
************************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_PCDUINO_A10_INCLUDE_BOARD_MEMORYMAP_H */
-120
View File
@@ -1,120 +0,0 @@
############################################################################
# configs/pcduino-a10/nsh/Make.defs
#
# Copyright (C) 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.
#
############################################################################
include ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
include ${TOPDIR}$(DELIM)arch$(DELIM)arm$(DELIM)src$(DELIM)armv7-a$(DELIM)Toolchain.defs
LDSCRIPT = sdram.ld
ifeq ($(WINTOOL),y)
# Windows-native toolchains
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include$(DELIM)cxx}"
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
else
# Linux/Cygwin-native toolchain
ARCHINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include -isystem $(TOPDIR)$(DELIM)include$(DELIM)cxx
ARCHSCRIPT = -T$(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
endif
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(ARCROSSDEV)ar rcs
NM = $(ARCROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
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
ARCHCPUFLAGS = -mcpu=cortex-a8 -mfpu=vfpv4-d16
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)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)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 =
ifeq ($(CONFIG_HOST_WINDOWS),y)
HOSTEXEEXT = .exe
else
HOSTEXEEXT =
endif
ifeq ($(WINTOOL),y)
# Windows-native host tools
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
else
# Linux/Cygwin-native host tools
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mkdeps$(HOSTEXEEXT)
endif
File diff suppressed because it is too large Load Diff
@@ -1,93 +0,0 @@
diff --git a/nuttx/arch/arm/src/a1x/a1x_boot.c b/nuttx/arch/arm/src/a1x/a1x_boot.c
index 3cc6323..ad42790 100644
--- a/nuttx/arch/arm/src/a1x/a1x_boot.c
+++ b/nuttx/arch/arm/src/a1x/a1x_boot.c
@@ -312,12 +312,14 @@ void up_boot(void)
* for all IO regions (Including the vector region).
*/
+lowsyslog(LOG_INFO, "Calling a1x_setupmappings\n"); // REMOVE ME
a1x_setupmappings();
/* Provide a special mapping for the IRAM interrupt vector positioned in
* high memory.
*/
+lowsyslog(LOG_INFO, "Calling a1x_vectormapping\n"); // REMOVE ME
a1x_vectormapping();
#endif /* CONFIG_ARCH_ROMPGTABLE */
@@ -326,16 +328,19 @@ void up_boot(void)
* arm_vector.S
*/
+lowsyslog(LOG_INFO, "Calling a1x_copyvectorblock\n"); // REMOVE ME
a1x_copyvectorblock();
/* Initialize the FPU */
#ifdef CONFIG_ARCH_FPU
+lowsyslog(LOG_INFO, "Calling arm_fpuconfig\n"); // REMOVE ME
arm_fpuconfig();
#endif
/* Perform common, low-level chip initialization (might do nothing) */
+lowsyslog(LOG_INFO, "Calling a1x_lowsetup\n"); // REMOVE ME
a1x_lowsetup();
/* Perform early serial initialization if we are going to use the serial
@@ -343,6 +348,7 @@ void up_boot(void)
*/
#ifdef USE_EARLYSERIALINIT
+lowsyslog(LOG_INFO, "Calling up_earlyserialinit\n"); // REMOVE ME
up_earlyserialinit();
#endif
@@ -353,6 +359,7 @@ void up_boot(void)
*/
#ifdef CONFIG_BUILD_PROTECTED
+lowsyslog(LOG_INFO, "Calling a1x_userspace\n"); // REMOVE ME
a1x_userspace();
#endif
@@ -362,5 +369,7 @@ void up_boot(void)
* - Configuration of board specific resources (PIOs, LEDs, etc).
*/
+lowsyslog(LOG_INFO, "Calling a1x_boardinitialize\n"); // REMOVE ME
a1x_boardinitialize();
+lowsyslog(LOG_INFO, "Returning\n"); // REMOVE ME
}
diff --git a/nuttx/arch/arm/src/armv7-a/arm_head.S b/nuttx/arch/arm/src/armv7-a/arm_head.S
index bce82d5..924bd24 100644
--- a/nuttx/arch/arm/src/armv7-a/arm_head.S
+++ b/nuttx/arch/arm/src/armv7-a/arm_head.S
@@ -220,6 +220,12 @@ __start:
teq r0, r2
bne .Lpgtableclear
+ movw r1, #0x0416 // REMOVE ME
+ movt r1, #0x01c0
+ movw r2, #0x4070
+ movt r2, #0x0000
+ str r1, [r2]
+
#ifdef ARMV7A_PGTABLE_MAPPING
/* If the page table does not lie in the same address space as does the
* mapped RAM in either case. So we will need to create a special
diff --git a/nuttx/arch/arm/src/armv7-a/arm_mmu.c b/nuttx/arch/arm/src/armv7-a/arm_mmu.c
index f82490c..5c16e48 100644
--- a/nuttx/arch/arm/src/armv7-a/arm_mmu.c
+++ b/nuttx/arch/arm/src/armv7-a/arm_mmu.c
@@ -94,7 +94,7 @@ void mmu_l1_setentry(uint32_t paddr, uint32_t vaddr, uint32_t mmuflags)
/* Invalidate the TLB cache associated with virtual address range */
- mmu_invalidate_region(vaddr, 1024*1024);
+// mmu_invalidate_region(vaddr, 1024*1024);
}
#endif
-77
View File
@@ -1,77 +0,0 @@
#!/bin/bash
# configs/pcduino-a10/nsh/setenv.sh
#
# Copyright (C) 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.
#
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 Atmel GCC
# toolchain under Windows. You will also have to edit this if you install
# this toolchain in any other location
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin"
# 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/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
# These are the Cygwin paths to the locations where I installed the Atollic
# toolchain under windows. You will also have to edit this if you install
# the Atollic toolchain in any other location. /usr/bin is added before
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
# at those locations as well.
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
# This is the Cygwin path to the location where I build the buildroot
# toolchain.
#export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm/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}"
-118
View File
@@ -1,118 +0,0 @@
/****************************************************************************
* configs/pcduino-a10/scripts/sdram.ld
*
* Copyright (C) 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.
*
****************************************************************************/
/* The pcDuino and 1GB of SDRAM beginning at virtual address 0x4000:0000.
* Execution begins at address 0x4a00000, leaving 864MB for NuttX.
*/
MEMORY
{
sdram (W!RX) : ORIGIN = 0x4a000000, LENGTH = 864M
}
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(entry)
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.*)
*(.ARM.extab*)
*(.gnu.linkonce.armextab.*)
_etext = ABSOLUTE(.);
} > sdram
.init_section : {
_sinit = ABSOLUTE(.);
*(.init_array .init_array.*)
_einit = ABSOLUTE(.);
} > sdram
.ARM.extab : {
*(.ARM.extab*)
} > sdram
/* .ARM.exidx is sorted, so has to go in its own output section. */
PROVIDE_HIDDEN (__exidx_start = .);
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > sdram
PROVIDE_HIDDEN (__exidx_end = .);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sdram
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
_ebss = ABSOLUTE(.);
} > sdram
/* 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) }
}
-98
View File
@@ -1,98 +0,0 @@
############################################################################
# configs/pcduino-a10/src/Makefile
#
# Copyright (C) 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.
#
############################################################################
-include $(TOPDIR)/Make.defs
CFLAGS += -I$(TOPDIR)/sched
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = a1x_boot.c a1x_leds.c
ifeq ($(CONFIG_HAVE_CXX),y)
CSRCS += a1x_cxxinitialize.c
endif
ifeq ($(CONFIG_NSH_ARCHINIT),y)
CSRCS += a1x_nsh.c
endif
ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += a1x_buttons.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
ifeq ($(WINTOOL),y)
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}"
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/common}"
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-a}"
else
CFLAGS += -I$(ARCH_SRCDIR)/chip
CFLAGS += -I$(ARCH_SRCDIR)/common
CFLAGS += -I$(ARCH_SRCDIR)/armv7-a
endif
all: libboard$(LIBEXT)
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
$(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
-102
View File
@@ -1,102 +0,0 @@
/************************************************************************************
* configs/pcduino-a10/src/a1x_boot.c
*
* Copyright (C) 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 <debug.h>
#include <nuttx/board.h>
#include "pcduino_a10.h"
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: a1x_boardinitialize
*
* Description:
* All A1x 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 a1x_boardinitialize(void)
{
/* Configure on-board LEDs. */
a1x_led_initialize();
}
/****************************************************************************
* 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_intiialize() 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)
{
/* Perform NSH initialization here instead of from the NSH. This
* alternative NSH initialization is necessary when NSH is ran in user-space
* but the initialization function must run in kernel space.
*/
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
(void)board_app_initialize();
#endif
}
#endif /* CONFIG_BOARD_INITIALIZE */
-156
View File
@@ -1,156 +0,0 @@
/****************************************************************************
* configs/pcduino-a10/src/a1x_buttons.c
*
* Copyright (C) 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 <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <arch/irq.h>
#include <arch/board/board.h>
#include "pcduino_a10.h"
#ifdef CONFIG_ARCH_BUTTONS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS
static xcpt_t g_irqbutton[BOARD_NBUTTONS];
#endif
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_button_initialize
*
* Description:
* board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all
* buttons or board_button_irq() may be called to register button interrupt
* handlers.
*
****************************************************************************/
void board_button_initialize(void)
{
# warning Missing logic
}
/****************************************************************************
* Name: board_buttons
*
* Description:
* After board_button_initialize() has been called, board_buttons() may be called to
* collect the state of all buttons. board_buttons() returns an 8-bit bit set
* with each bit associated with a button. See the BUTTON* definitions
* above for the meaning of each bit in the returned value.
*
****************************************************************************/
uint8_t board_buttons(void)
{
# warning Missing logic
}
/****************************************************************************
* Name: board_button_irq
*
* Description:
* This function may be called to register an interrupt handler that will
* be called when a button is depressed or released. The ID value is one
* of the BUTTON* definitions provided above. The previous interrupt
* handler address isreturned (so that it may restored, if so desired).
*
* Configuration Notes:
* Configuration CONFIG_ARCH_IRQBUTTONS must be selected to enable the
* overall GPIO IRQ feature.
*
****************************************************************************/
#ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t board_button_irq(int id, xcpt_t irqhandler)
{
xcpt_t oldhandler = NULL;
if (id < BOARD_NBUTTONS)
{
irqstate_t flags;
/* Disable interrupts until we are done. This guarantees that the
* following operations are atomic.
*/
flags = irqsave();
/* Get the old button interrupt handler and save the new one */
oldhandler = g_irqbutton[id];
g_irqbutton[id] = irqhandler;
/* Configure the interrupt */
a1x_pioirq(xxx);
(void)irq_attach(xxx, irqhandler);
a1x_pioirqenable(xxx);
irqrestore(flags);
}
/* Return the old button handler (so that it can be restored) */
return oldhandler;
}
#endif
#endif /* CONFIG_ARCH_BUTTONS */
-152
View File
@@ -1,152 +0,0 @@
/************************************************************************************
* configs/pcduino-a10/src/a1x_cxxinitialize.c
*
* Copyright (C) 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 <debug.h>
#include <nuttx/arch.h>
#include "up_internal.h"
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Debug ****************************************************************************/
/* Non-standard debug that may be enabled just for testing the static constructors */
#ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_CXX
#endif
#ifdef CONFIG_DEBUG_CXX
# define cxxdbg dbg
# define cxxlldbg lldbg
# ifdef CONFIG_DEBUG_VERBOSE
# define cxxvdbg vdbg
# define cxxllvdbg llvdbg
# else
# define cxxvdbg(x...)
# define cxxllvdbg(x...)
# endif
#else
# define cxxdbg(x...)
# define cxxlldbg(x...)
# define cxxvdbg(x...)
# define cxxllvdbg(x...)
#endif
/************************************************************************************
* Private Types
************************************************************************************/
/* This type defines one entry in initialization array */
typedef void (*initializer_t)(void);
/************************************************************************************
* External references
************************************************************************************/
/* _sinit and _einit are symbols exported by the linker script that mark the
* beginning and the end of the C++ initialization section.
*/
extern initializer_t _sinit;
extern initializer_t _einit;
/* _stext and _etext are symbols exported by the linker script that mark the
* beginning and the end of text.
*/
extern uint32_t _stext;
extern uint32_t _etext;
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Name: up_cxxinitialize
*
* Description:
* If C++ and C++ static constructors are supported, then this function
* must be provided by board-specific logic in order to perform
* initialization of the static C++ class instances.
*
* This function should then be called in the application-specific
* user_start logic in order to perform the C++ initialization. NOTE
* that no component of the core NuttX RTOS logic is involved; This
* function defintion only provides the 'contract' between application
* specific C++ code and platform-specific toolchain support
*
***************************************************************************/
void up_cxxinitialize(void)
{
initializer_t *initp;
cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
&_sinit, &_einit, &_stext, &_etext);
/* Visit each entry in the initialzation table */
for (initp = &_sinit; initp != &_einit; initp++)
{
initializer_t initializer = *initp;
cxxdbg("initp: %p initializer: %p\n", initp, initializer);
/* Make sure that the address is non-NULL and lies in the text region
* defined by the linker script. Some toolchains may put NULL values
* or counts in the initialization table
*/
if ((void*)initializer > (void*)&_stext && (void*)initializer < (void*)&_etext)
{
cxxdbg("Calling %p\n", initializer);
initializer();
}
}
}
#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */
-269
View File
@@ -1,269 +0,0 @@
/****************************************************************************
* configs/pcduino-a10/src/a1x_leds.c
*
* Copyright (C) 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 "pcduino_a10.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* The pcDuino v1 has four green LEDs; three can be controlled from software.
* Two are tied to ground and, hence, illuminated by driving the output pins
* to a high value:
*
* 1. LED1 SPI0_CLK SPI0_CLK/UART5_RX/EINT23/PI11
* 2. LED5 IPSOUT From the PMU (not controllable by software)
*
* And two are pull high and, hence, illuminated by grounding the output:
*
* 3. LED3 RX_LED LCD1_D16/ATAD12/KP_IN6/SMC_DET/EINT16/CSI1_D16/PH16
* 4. LED4 TX_LED LCD1_D15/ATAD11/KP_IN5/SMC_VPPPP/EINT15/CSI1_D15/PH15
* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
* defined. In that case, the usage by the board port is defined in
* include/board.h and src/stm32_leds.c. The LEDs are used to encode OS-related
* events as follows:
*
* SYMBOL Meaning LED state
* LED1 LED3 LED4
* ----------------- ----------------------- ---- ---- ---- ------------
* LED_STARTED NuttX has been started ON OFF OFF
* LED_HEAPALLOCATE Heap has been allocated OFF ON OFF
* LED_IRQSENABLED Interrupts enabled ON ON OFF
* LED_STACKCREATED Idle stack created ON ON OFF
* LED_INIRQ In an interrupt N/C N/C Soft glow
* LED_SIGNAL In a signal handler N/C N/C Soft glow
* LED_ASSERTION An assertion failed N/C N/C Soft glow
* LED_PANIC The system has crashed N/C N/C 2Hz Flashing
* LED_IDLE MCU is is sleep mode Not used
*
* After booting, LED1 and 3 are not longer used by the system and can be used for
* other purposes by the application (Of course, all LEDs are available to the
* application if CONFIG_ARCH_LEDS is not defined.
*/
/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG
* with CONFIG_DEBUG_VERBOSE too)
*/
#ifdef CONFIG_DEBUG_LEDS
# define leddbg lldbg
# define ledvdbg llvdbg
#else
# define leddbg(x...)
# define ledvdbg(x...)
#endif
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: a1x_led_initialize
*
* Description:
* Configure LEDs. LEDs are left in the OFF state.
*
****************************************************************************/
void a1x_led_initialize(void)
{
a1x_pio_config(PIO_LED1);
a1x_pio_config(PIO_LED3);
a1x_pio_config(PIO_LED4);
}
/****************************************************************************
* Name: board_led_on
*
* Description:
* Select the "logical" ON state:
*
* SYMBOL Value Meaning LED state
* LED1 LED3 LED4
* ----------------- ----- ----------------------- ---- ---- ------------
* LED_STARTED 0 NuttX has been started ON OFF OFF
* LED_HEAPALLOCATE 1 Heap has been allocated OFF ON OFF
* LED_IRQSENABLED 2 Interrupts enabled ON ON OFF
* LED_STACKCREATED 2 Idle stack created ON ON OFF
* LED_INIRQ 3 In an interrupt N/C N/C Soft glow
* LED_SIGNAL 3 In a signal handler N/C N/C Soft glow
* LED_ASSERTION 3 An assertion failed N/C N/C Soft glow
* LED_PANIC 3 The system has crashed N/C N/C 2Hz Flashing
* LED_IDLE --- MCU is is sleep mode Not used
*
* LED1 is illuminated by driving the output pins to a high value
* LED3 and LED 4 are illuminated by taking the output to ground.
*
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void board_led_on(int led)
{
switch (led)
{
case 0:
a1x_pio_write(PIO_LED1, true);
a1x_pio_write(PIO_LED3, true);
a1x_pio_write(PIO_LED4, true);
break;
case 1:
a1x_pio_write(PIO_LED1, false);
a1x_pio_write(PIO_LED3, false);
a1x_pio_write(PIO_LED4, true);
break;
case 2:
a1x_pio_write(PIO_LED1, false);
a1x_pio_write(PIO_LED3, true);
a1x_pio_write(PIO_LED4, true);
break;
case 3:
a1x_pio_write(PIO_LED4, false);
break;
}
}
#endif
/****************************************************************************
* Name: board_led_off
*
* Description:
* Select the "logical" OFF state:
*
* SYMBOL Value Meaning LED state
* LED1 LED3 LED4
* ----------------- ----- ----------------------- ---- ---- ------------
* LED_STARTED 0 NuttX has been started ON OFF OFF
* LED_HEAPALLOCATE 1 Heap has been allocated OFF ON OFF
* LED_IRQSENABLED 2 Interrupts enabled ON ON OFF
* LED_STACKCREATED 2 Idle stack created ON ON OFF
* LED_INIRQ 3 In an interrupt N/C N/C Soft glow
* LED_SIGNAL 3 In a signal handler N/C N/C Soft glow
* LED_ASSERTION 3 An assertion failed N/C N/C Soft glow
* LED_PANIC 3 The system has crashed N/C N/C 2Hz Flashing
* LED_IDLE --- MCU is is sleep mode Not used
*
* LED1 is illuminated by driving the output pins to a high value
* LED3 and LED 4 are illuminated by taking the output to ground.
*
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void board_led_off(int led)
{
switch (led)
{
case 0:
case 1:
case 2:
break;
case 3:
a1x_pio_write(PIO_LED4, true);
break;
}
}
#endif
/************************************************************************************
* Name: a1x_setled and a1x_setleds
*
* Description:
* These interfaces allow user control of the board LEDs.
*
* If CONFIG_ARCH_LEDS is defined, then NuttX will control both on-board LEDs up
* until the completion of boot. The it will continue to control LED2; LED1 is
* avaiable for application use.
*
* If CONFIG_ARCH_LEDS is not defined, then both LEDs are available for application
* use.
*
************************************************************************************/
void a1x_setled(int led, bool ledon)
{
switch (led)
{
case BOARD_LED1:
a1x_pio_write(PIO_LED1, ledon);
break;
case BOARD_LED3:
a1x_pio_write(PIO_LED3, !ledon);
break;
#ifndef CONFIG_ARCH_LEDS
case BOARD_LED4:
a1x_pio_write(PIO_LED4, !ledon);
break;
#endif
}
}
void a1x_setleds(uint8_t ledset)
{
a1x_setled(BOARD_LED1, (ledset & BOARD_LED1) != 0);
a1x_setled(BOARD_LED3, (ledset & BOARD_LED3) != 0);
#ifndef CONFIG_ARCH_LEDS
a1x_setled(BOARD_LED4, (ledset & BOARD_LED4) != 0);
#endif
}
-159
View File
@@ -1,159 +0,0 @@
/************************************************************************************
* configs/pcduino-a10/src/pcduino-a10.h
*
* Copyright (C) 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.
*
************************************************************************************/
#ifndef __CONFIGS_PCDUINO_A10_PCDUINO_A10_H
#define __CONFIGS_PCDUINO_A10_PCDUINO_A10_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#include <nuttx/compiler.h>
#include <stdint.h>
#include <arch/irq.h>
#include <nuttx/irq.h>
#include "a1x_pio.h"
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* Configuration ********************************************************************/
/* LEDs *****************************************************************************/
/* The pcDuino v1 has four green LEDs; three can be controlled from software. Two
* are tied to ground and, hence, illuminated by driving the output pins to a high
* value:
*
* 1. LED1 SPI0_CLK SPI0_CLK/UART5_RX/EINT23/PI11
* 2. LED5 IPSOUT From the PMU (not controllable by software)
*/
#define PIO_LED1 (PIO_OUTPUT | PIO_PULL_NONE | PIO_DRIVE_MEDLOW | PIO_INT_NONE | \
PIO_OUTPUT_CLEAR | PIO_PORT_PIOI | PIO_PIN11)
/* And two are pull high and, hence, illuminated by grounding the output:
*
* 3. LED3 RX_LED LCD1_D16/ATAD12/KP_IN6/SMC_DET/EINT16/CSI1_D16/PH16
* 4. LED4 TX_LED LCD1_D15/ATAD11/KP_IN5/SMC_VPPPP/EINT15/CSI1_D15/PH15
*/
#define PIO_LED3 (PIO_OUTPUT | PIO_PULL_NONE | PIO_DRIVE_MEDLOW | PIO_INT_NONE | \
PIO_OUTPUT_SET | PIO_PORT_PIOH | PIO_PIN16)
#define PIO_LED4 (PIO_OUTPUT | PIO_PULL_NONE | PIO_DRIVE_MEDLOW | PIO_INT_NONE | \
PIO_OUTPUT_SET | PIO_PORT_PIOH | PIO_PIN15)
/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
* defined. In that case, the usage by the board port is defined in
* include/board.h and src/stm32_leds.c. The LEDs are used to encode OS-related
* events as follows:
*
* SYMBOL Meaning LED state
* LED1 LED3 LED4
* ----------------- ----------------------- ---- ---- ---- ------------
* LED_STARTED NuttX has been started ON OFF OFF
* LED_HEAPALLOCATE Heap has been allocated OFF ON OFF
* LED_IRQSENABLED Interrupts enabled ON ON OFF
* LED_STACKCREATED Idle stack created ON ON OFF
* LED_INIRQ In an interrupt N/C N/C Soft glow
* LED_SIGNAL In a signal handler N/C N/C Soft glow
* LED_ASSERTION An assertion failed N/C N/C Soft glow
* LED_PANIC The system has crashed N/C N/C 2Hz Flashing
* LED_IDLE MCU is is sleep mode Not used
*
* After booting, LED1 and 3 are not longer used by the system and can be used for
* other purposes by the application (Of course, all LEDs are available to the
* application if CONFIG_ARCH_LEDS is not defined.
*/
/* Buttons **************************************************************************/
/* There are a total of five switches on-board. All pulled high and, hence, will be
* sensed as low when closed.
*
* SW1 Reset (not available to software)
* SW2 UBOOT UBOOT_SEL (?)
* SW3 Key_Back LCD1_D17/ATAD13/KP_IN7/SMC_VCCEN/EINT17/CSI1_D17/PH17
* SW4 Key_Home LCD1_D18/ATAD14/KP_OUT0/SMC_SLK/EINT18/CSI1_D18/PH18
* SW5 Key_Menu LCD1_D19/ATAD15/KP_OUT1/SMC_SDA/EINT19/CSI1_D19/PH19
*/
#ifdef CONFIG_A1X_PIO_IRQ
# define PIO_KEY_BACK (PIO_EINT | PIO_PULL_NONE | PIO_DRIVE_NONE | \
PIO_INT_BOTHEDGES | IO_PORT_PIOH | PIO_PIN17)
# define PIO_KEY_HOME (PIO_EINT | PIO_PULL_NONE | PIO_DRIVE_NONE | \
PIO_INT_BOTHEDGES | IO_PORT_PIOH | PIO_PIN18)
# define PIO_KEY_MENU (PIO_EINT | PIO_PULL_NONE | PIO_DRIVE_NONE | \
PIO_INT_BOTHEDGES | IO_PORT_PIOH | PIO_PIN19)
#else
# define PIO_KEY_BACK (PIO_INPUT | PIO_PULL_NONE | PIO_DRIVE_NONE | \
PIO_INT_NONE | IO_PORT_PIOH | PIO_PIN17)
# define PIO_KEY_HOME (PIO_INPUT | PIO_PULL_NONE | PIO_DRIVE_NONE | \
PIO_INT_NONE | IO_PORT_PIOH | PIO_PIN18)
# define PIO_KEY_MENU (PIO_INPUT | PIO_PULL_NONE | PIO_DRIVE_NONE | \
PIO_INT_NONE | IO_PORT_PIOH | PIO_PIN19)
#endif
/* SPI Chip Selects *****************************************************************/
/************************************************************************************
* Public Types
************************************************************************************/
/************************************************************************************
* Public data
************************************************************************************/
#ifndef __ASSEMBLY__
/************************************************************************************
* Public Functions
************************************************************************************/
/****************************************************************************
* Name: a1x_led_initialize
*
* Description:
* Configure LEDs. LEDs are left in the OFF state.
*
****************************************************************************/
void a1x_led_initialize(void);
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_PCDUINO_A10_PCDUINO_A10_H */