mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
Merged in alinjerpelea/nuttx (pull request #971)
codestyle fixes
* misoc: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* or1k: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* renesas: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* risc-v: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* sim: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* x86: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* xtensa: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z16: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
* z80: codestyle fixes
After the board restructuration is time for codestyle cleanup
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
committed by
Gregory Nutt
parent
c300f27130
commit
a06033df64
@@ -60,11 +60,11 @@ Buildroot Toolchain
|
||||
|
||||
CONFIG_LM3S_TOOLCHAIN_BUILDROOT=y
|
||||
|
||||
boards/misoc/include/generated
|
||||
boards/misoc/lm32/misoc/include/generated
|
||||
===============================
|
||||
|
||||
In order to build this configuration, you must provide the
|
||||
boards/misoc/include/generated directory. It contains the generated
|
||||
boards/misoc/lm32/misoc/include/generated directory. It contains the generated
|
||||
Misoc files and may be a symbolic link. The base configurtion will NOT
|
||||
build without this directory!
|
||||
|
||||
@@ -72,7 +72,7 @@ boards/misoc/include/generated
|
||||
If you want to do a test build without generating the architecture, then
|
||||
you can simply link this sample directory like:
|
||||
|
||||
$ ln -s boards/misoc/include/generated-sample boards/misoc/include/generated
|
||||
$ ln -s boards/misoc/lm32/misoc/include/generated-sample boards/misoc/lm32/misoc/include/generated
|
||||
|
||||
That should permit a test build.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/misoc/misoc/include/board.h
|
||||
* boards/misoc/m32/misoc/include/board.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -48,6 +48,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
/* Assume default CLKDIV8 fuse setting is overridden to CLKDIV1 */
|
||||
|
||||
#define BOARD_XTAL_FREQ 14745600 /* 14.7456MHz crystal */
|
||||
@@ -55,6 +56,7 @@
|
||||
#define BOARD_TOSCK_CLOCK 32768 /* TOSC = 32.768KHz */
|
||||
|
||||
/* LED definitions **********************************************************/
|
||||
|
||||
/* The Amber Web Server has a reset switch and four LEDs. The LEDs indicate
|
||||
* the status of power, programming state, Ethernet link status and reset
|
||||
* status (Active). None are available for software use.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/misoc/misoc/hello/script/ld.script
|
||||
* boards/misoc/m32/misoc/hello/script/ld.script
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/misoc/misoc/scripts/ld.script
|
||||
* boards/misoc/m32/misoc/scripts/ld.script
|
||||
*
|
||||
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/misoc/src/Makefile
|
||||
# boards/misoc/lm32/misoc/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/misoc/misoc/src/lm32_boot.c
|
||||
/****************************************************************************
|
||||
* boards/misoc/m32/misoc/src/lm32_boot.c
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -32,11 +32,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -44,24 +44,25 @@
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lm32_board_initialize
|
||||
*
|
||||
* Description:
|
||||
* All LM32 architectures must provide the following entry point. This entry
|
||||
* All LM32 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 lm32_board_initialize(void)
|
||||
{
|
||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
||||
* function atmega_spidev_initialize() has been brought into the link.
|
||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2)
|
||||
* the weak function atmega_spidev_initialize() has been brought into
|
||||
* the link.
|
||||
*/
|
||||
|
||||
/* Configure on-board LEDs if LED support has been selected. */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/misoc/misoc/src/misoc.h
|
||||
* boards/misoc/m32/misoc/src/misoc.h
|
||||
*
|
||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -34,8 +34,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_MISOC_MISOC_SRC_MISOC_H
|
||||
#define __BOARDS_MISOC_MISOC_SRC_MISOC_H
|
||||
#ifndef __BOARDS_MISOC_LM32_MISOC_SRC_MISOC_H
|
||||
#define __BOARDS_MISOC_LM32_MISOC_SRC_MISOC_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@@ -69,25 +69,25 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lm32_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the Amber Web Server.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2)
|
||||
void weak_function lm32_spidev_initialize(void);
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lm32_led_initialize
|
||||
*
|
||||
* Description:
|
||||
* Configure on-board LEDs if LED support has been selected.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
void lm32_led_initialize(void);
|
||||
@@ -99,4 +99,4 @@ void lm32_led_initialize(void);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_MISOC_MISOC_SRC_MISOC_H */
|
||||
#endif /* __BOARDS_MISOC_LM32_MISOC_SRC_MISOC_H */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/or1k/or1k/include/board.h
|
||||
* boards/or1k/mor1kx/or1k/include/board.h
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -33,8 +33,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_OR1K_OR1K_INCLUDE_BOARD_H
|
||||
#define __BOARDS_OR1K_OR1K_INCLUDE_BOARD_H
|
||||
#ifndef __BOARDS_OR1K_MOR1KX_OR1K_INCLUDE_BOARD_H
|
||||
#define __BOARDS_OR1K_MOR1KX_OR1K_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@@ -57,4 +57,4 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __BOARDS_OR1K_OR1K_INCLUDE_BOARD_H */
|
||||
#endif /* __BOARDS_OR1K_MOR1KX_OR1K_INCLUDE_BOARD_H */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/or1k/scripts/Make.defs
|
||||
# boards/or1k/mor1kx/or1k/scripts/Make.defs
|
||||
#
|
||||
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
# Author: Matt Thompson <matt@extent3d.com>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/or1k/or1k/scripts/ram.ld
|
||||
* boards/or1k/mor1kx/or1k/scripts/ram.ld
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/or1k/src/Makefile
|
||||
# boards/or1k/mor1kx/or1k/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/or1k/or1k/src/or1k.h
|
||||
/****************************************************************************
|
||||
* boards/or1k/mor1kx/or1k/src/or1k.h
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -31,14 +31,14 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_OR1K_OR1K_SRC_OR1K_H
|
||||
#define __BOARDS_OR1K_OR1K_SRC_OR1K_H
|
||||
#ifndef __BOARDS_OR1K_MOR1KX_OR1K_SRC_OR1K_H
|
||||
#define __BOARDS_OR1K_MOR1KX_OR1K_SRC_OR1K_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: or1k_bringup
|
||||
@@ -56,4 +56,4 @@
|
||||
|
||||
int or1k_bringup(void);
|
||||
|
||||
#endif /* __BOARDS_OR1K_OR1K_SRC_OR1K_H */
|
||||
#endif /* __BOARDS_OR1K_MOR1KX_OR1K_SRC_OR1K_H */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* config/or1kf4discovery/src/or1k_appinit.c
|
||||
* boards/or1k/mor1kx/or1k/src/or1k_appinit.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/or1k/or1k/src/or1k_autoled.c
|
||||
* boards/or1k/mor1kx/or1k/src/or1k_autoled.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/or1k/or1k/src/or1k_boot.c
|
||||
* boards/or1k/mor1kx/or1k/src/or1k_boot.c
|
||||
*
|
||||
* Copyright (C) 2018 Extent3D. All rights reserved.
|
||||
* Author: Matt Thompson <matt@extent3d.com>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* config/or1k/src/or1k_bringup.c
|
||||
* boards/or1k/mor1kx/or1k/src/or1k_bringup.c
|
||||
*
|
||||
* Copyright (C) 2018 Extent3D. All rights reserved.
|
||||
* Author: Matt Thompson <matt@extent3d.com>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
boards/skp16c26/README.txt
|
||||
boards/renesas/m32262f8/skp16c26/README.txt
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. The buildroot package can be used to build an M16C toolchain. The toolchain
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/renesas/skp16c26/include/board.h
|
||||
/****************************************************************************
|
||||
* boards/renesas/m32262f8/skp16c26/include/board.h
|
||||
* arch/board/board.h
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
@@ -32,25 +32,26 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_RENESAS_SKP16C26_INCLUDE_BOARD_H
|
||||
#define __BOARDS_RENESAS_SKP16C26_INCLUDE_BOARD_H
|
||||
#ifndef __BOARDS_RENESAS_M32262F8_SKP16C26_INCLUDE_BOARD_H
|
||||
#define __BOARDS_RENESAS_M32262F8_SKP16C26_INCLUDE_BOARD_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* User configuration checks ********************************************************/
|
||||
/* User configuration checks ************************************************/
|
||||
|
||||
/* According to SKP16C26 documention, "SIO/UART1 pins are used for communication
|
||||
* between the SKP16C26 board kernel and KD30 Debugger through the ICD. Do not
|
||||
* connect these pins to any other circuit, as UART1 cannot be used in the user
|
||||
* program. For details, please see ICD (RTA-FoUSB-MON) User Manual on Target M16C
|
||||
/* According to SKP16C26 documention, "SIO/UART1 pins are used for
|
||||
* communication between the SKP16C26 board kernel and KD30 Debugger through
|
||||
* the ICD. Do not connect these pins to any other circuit, as UART1 cannot
|
||||
* be used in the user program.
|
||||
* For details, please see ICD (RTA-FoUSB-MON) User Manual on Target M16C
|
||||
* ROM Monitor Resources or related ICD application notes."
|
||||
*
|
||||
* However, the schematic appears to show that SIO/UART2 is actual connection.
|
||||
@@ -61,13 +62,13 @@
|
||||
# error "UART1/2 should not be used on SKP16C26"
|
||||
#endif
|
||||
|
||||
/* Hardware defintitions ************************************************************/
|
||||
/* Hardware defintitions ****************************************************/
|
||||
|
||||
/* Xin Freq */
|
||||
|
||||
#define M16C_XIN_FREQ 20000000 /* 20MHz */
|
||||
|
||||
/* Interrupt Priority Levels ********************************************************/
|
||||
/* Interrupt Priority Levels ************************************************/
|
||||
|
||||
/* IPL settings */
|
||||
|
||||
@@ -117,18 +118,18 @@
|
||||
|
||||
/* *=FLASHING **=if INIRQ, SIGNAL, or ASSERTION will be flashing */
|
||||
|
||||
/* BUTTON definitions **************************************************************/
|
||||
/* BUTTON definitions *******************************************************/
|
||||
|
||||
#define SW1_PRESSED 0x01 /* Bit 0: 1=SW1 pressed */
|
||||
#define SW2_PRESSED 0x02 /* Bit 1: 1=SW2 pressed */
|
||||
#define SW3_PRESSED 0x04 /* Bit 2: 1=SW3 pressed */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __BOARDS_RENESAS_SKP16C26_INCLUDE_BOARD_H */
|
||||
#endif /* __BOARDS_RENESAS_M32262F8_SKP16C26_INCLUDE_BOARD_H */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/renesas/skp16c26/scripts/Make.defs
|
||||
# boards/renesas/m32262f8/skp16c26/scripts/Make.defs
|
||||
#
|
||||
# Copyright (C) 2009, 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/renesas/skp16c26/scripts/skp16c26.ld
|
||||
* boards/renesas/m32262f8/skp16c26/scripts/skp16c26.ld
|
||||
*
|
||||
* Copyright (C) 2009, 2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/renesas/skp16c26/src/Makefile
|
||||
# boards/renesas/m32262f8/skp16c26/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/renesas/skp16c26/src/m16c_buttons.c
|
||||
* boards/renesas/m32262f8/skp16c26/src/m16c_buttons.c
|
||||
*
|
||||
* Copyright (C) 2009, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/renesas/scp16c26/src/m16c_lcd.c
|
||||
/****************************************************************************
|
||||
* boards/renesas/m32262f8/scp16c26/src/m16c_lcd.c
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -49,16 +49,16 @@
|
||||
|
||||
#ifdef CONFIG_SLCD
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* LCD dimensions *******************************************************************/
|
||||
/* LCD dimensions ***********************************************************/
|
||||
|
||||
#define LCD_NLINES 2 /* Two lines */
|
||||
#define LCD_NCHARS 8 /* Eight characters per line */
|
||||
|
||||
/* LCD commands *********************************************************************/
|
||||
/* LCD commands *************************************************************/
|
||||
|
||||
#define LCD_CLEAR 0x01 /* Clear LCD display and home cursor */
|
||||
#define CURSOR_MODE_DEC 0x04 /* Cursor auto decrement after R/W */
|
||||
@@ -75,20 +75,20 @@
|
||||
#define LCD_HOME_L1 0x80 /* Move cursor to line 1 */
|
||||
#define LCD_HOME_L2 0xc0 /* Move cursor to line 2 */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static uint8_t g_nchars; /* Number of characters in lines 2 */
|
||||
static uint8_t g_line[LCD_NCHARS]; /* The content of lines 2 */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_lcddelay
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void up_lcddelay(uint16_t count)
|
||||
{
|
||||
@@ -99,9 +99,9 @@ static void up_lcddelay(uint16_t count)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_setrs
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static inline void up_setrs(bool data)
|
||||
{
|
||||
@@ -120,9 +120,9 @@ static inline void up_setrs(bool data)
|
||||
putreg8(regval, M16C_P6);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_seten
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static inline void up_seten(void)
|
||||
{
|
||||
@@ -133,9 +133,9 @@ static inline void up_seten(void)
|
||||
putreg8(regval, M16C_P6);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_clren
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static inline void up_clren(void)
|
||||
{
|
||||
@@ -146,9 +146,9 @@ static inline void up_clren(void)
|
||||
putreg8(regval, M16C_P6);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_enpluse
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static inline void up_enpulse(bool data)
|
||||
{
|
||||
@@ -159,16 +159,16 @@ static inline void up_enpulse(bool data)
|
||||
if (!data) up_lcddelay(0); /* Longer delay for control writes */
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_lcdwrite
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_lcdwrite(bool data, uint8_t ch)
|
||||
{
|
||||
up_setrs(data); /* Set RS appropriately */
|
||||
|
||||
/* Write upper nibble first. Only the lower 4 bits of P9 are valid. The upper four
|
||||
* bits are reserved and must be zero.
|
||||
/* Write upper nibble first. Only the lower 4 bits of P9 are valid.
|
||||
* The upper four bits are reserved and must be zero.
|
||||
*/
|
||||
|
||||
putreg8(ch >> 4, M16C_P9);
|
||||
@@ -180,9 +180,9 @@ void up_lcdwrite(bool data, uint8_t ch)
|
||||
up_enpulse(data);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_scroll
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void up_scroll(void)
|
||||
{
|
||||
@@ -206,13 +206,13 @@ static void up_scroll(void)
|
||||
g_nchars = 0;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_lcdinit
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_lcdinit(void)
|
||||
{
|
||||
@@ -255,9 +255,9 @@ void up_lcdinit(void)
|
||||
up_lcdwrite(false, LCD_HOME_L1);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_lcdputc
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_lcdputc(char ch)
|
||||
{
|
||||
@@ -268,8 +268,8 @@ void up_lcdputc(char ch)
|
||||
up_scroll();
|
||||
}
|
||||
|
||||
/* Should we wrap to truncate at the end of line??? Let's truncate. In either
|
||||
* case, let's ignore all other non-printable characters.
|
||||
/* Should we wrap to truncate at the end of line??? Let's truncate.
|
||||
* In either case, let's ignore all other non-printable characters.
|
||||
*/
|
||||
|
||||
else if (g_nchars < LCD_NCHARS && isprint(ch))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/renesas/scp16c26/src/m16c_lcdconsole.c
|
||||
/****************************************************************************
|
||||
* boards/renesas/m32262f8/scp16c26/src/m16c_lcdconsole.c
|
||||
*
|
||||
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -59,31 +59,31 @@
|
||||
#if !defined(HAVE_SERIALCONSOLE) && defined(CONFIG_SLCD) && \
|
||||
defined(CONFIG_SLCD_CONSOLE)
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_earlyconsoleinit
|
||||
*
|
||||
* Description:
|
||||
* Performs the low level UART initialization early in debug so that the serial
|
||||
* console will be available during bootup. This must be called before
|
||||
* up_consoleinit.
|
||||
* Performs the low level UART initialization early in debug so that the
|
||||
* serial console will be available during bootup.
|
||||
* This must be called before up_consoleinit.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef USE_EARLYSERIALINIT
|
||||
# warning "You probably need to define CONFIG_ARCH_LOWCONSOLE"
|
||||
@@ -93,14 +93,14 @@ void up_earlyconsoleinit(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_consoleinit
|
||||
*
|
||||
* Description:
|
||||
* Register serial console and serial ports. This assumes that
|
||||
* up_earlyconsoleinit was called previously.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if USE_SERIALDRIVER
|
||||
# warning "You probably need to define CONFIG_ARCH_LOWCONSOLE"
|
||||
@@ -108,30 +108,30 @@ void up_consoleinit(void)
|
||||
{
|
||||
/* There is probably a problem if we are here */
|
||||
|
||||
lowconsole_init();
|
||||
lowconsole_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_lowputc
|
||||
*
|
||||
* Description:
|
||||
* Output one character on the console
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_lowputc(char ch)
|
||||
{
|
||||
up_lcdputc(ch);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_putc
|
||||
*
|
||||
* Description:
|
||||
* Output one character on the console
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int up_putc(int ch)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/renesas/scp16c26/src/m16c_leds.c
|
||||
/****************************************************************************
|
||||
* boards/renesas/m32262f8/scp16c26/src/m16c_leds.c
|
||||
*
|
||||
* Copyright (C) 2009, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -50,11 +50,13 @@
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* The SKP62C26 has 3 LEDs control by bits 0 and 2 in port 7 and bit 0 in port 8. */
|
||||
/* The SKP62C26 has 3 LEDs control by bits
|
||||
* 0 and 2 in port 7 and bit 0 in port 8.
|
||||
*/
|
||||
|
||||
#define GREEN_LED (1 << 2) /* Bit 2, port 7 */
|
||||
#define YELLOW_LED (1 << 4) /* Bit 4, port 7 */
|
||||
@@ -80,13 +82,13 @@
|
||||
#define RED_LED_PORT M16C_P8
|
||||
#define RED_DIR_PORT M16C_PD8
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static const uint8_t g_ledstate[7] =
|
||||
{
|
||||
@@ -103,13 +105,13 @@ static const uint8_t g_ledstate[7] =
|
||||
static uint8_t g_prevled[3];
|
||||
static uint8_t g_nestlevel;
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: m16c_setleds
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void m16c_setleds(uint8_t gybits, uint8_t rbit)
|
||||
{
|
||||
@@ -126,13 +128,13 @@ static void m16c_setleds(uint8_t gybits, uint8_t rbit)
|
||||
putreg8(regval, RED_LED_PORT);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_initialize
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_initialize(void)
|
||||
{
|
||||
@@ -141,7 +143,7 @@ void board_autoled_initialize(void)
|
||||
/* Make sure that the LEDs are in the OFF state */
|
||||
|
||||
regval = getreg8(GREENYELLOW_LED_PORT);
|
||||
regval |= (GREEN_LED_OFF |YELLOW_LED_OFF);
|
||||
regval |= (GREEN_LED_OFF | YELLOW_LED_OFF);
|
||||
putreg8(regval, GREENYELLOW_LED_PORT);
|
||||
|
||||
regval = getreg8(RED_LED_PORT);
|
||||
@@ -151,7 +153,7 @@ void board_autoled_initialize(void)
|
||||
/* Set the direction to output */
|
||||
|
||||
regval = getreg8(GREENYELLOW_DIR_PORT);
|
||||
regval |= (GREEN_LED |YELLOW_LED);
|
||||
regval |= (GREEN_LED | YELLOW_LED);
|
||||
putreg8(regval, GREENYELLOW_DIR_PORT);
|
||||
|
||||
regval = getreg8(RED_DIR_PORT);
|
||||
@@ -159,16 +161,16 @@ void board_autoled_initialize(void)
|
||||
putreg8(regval, RED_DIR_PORT);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_on
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_on(int led)
|
||||
{
|
||||
uint8_t ledset;
|
||||
|
||||
/* If this is the ASSERTION led, preserve the Y&G bits from the last setting and
|
||||
* set the RED LED on.
|
||||
/* If this is the ASSERTION led, preserve the Y&G bits from the last setting
|
||||
* and set the RED LED on.
|
||||
*/
|
||||
|
||||
if (led == LED_ASSERTION)
|
||||
@@ -195,21 +197,24 @@ void board_autoled_on(int led)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_off
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_off(int led)
|
||||
{
|
||||
uint8_t ledset;
|
||||
|
||||
/* If this is the ASSERTION led then what we do depends on the previous state */
|
||||
/* If this is the ASSERTION led then what we do depends on
|
||||
* the previous state
|
||||
*/
|
||||
|
||||
if (led == LED_ASSERTION)
|
||||
{
|
||||
/* If the previous state was one of the nested states (INIRQ, SIGNAL, or ASSERTION),
|
||||
* then turn the green and yellow LEDs all off. That way we can distinguish
|
||||
* that case from the simple cases.
|
||||
/* If the previous state was one of the nested states
|
||||
* (INIRQ, SIGNAL, or ASSERTION),
|
||||
* then turn the green and yellow LEDs all off.
|
||||
* That way we can distinguish that case from the simple cases.
|
||||
*/
|
||||
|
||||
if (g_nestlevel > 0)
|
||||
@@ -225,7 +230,8 @@ void board_autoled_off(int led)
|
||||
}
|
||||
else if (led > 0 && led < LED_ASSERTION)
|
||||
{
|
||||
/* If this was one of the nested states, then we want to back to the LED setting
|
||||
/* If this was one of the nested states,
|
||||
* then we want to back to the LED setting
|
||||
* before entering that nested statel.
|
||||
*/
|
||||
|
||||
@@ -243,7 +249,7 @@ void board_autoled_off(int led)
|
||||
|
||||
ledset = g_ledstate[led];
|
||||
m16c_setleds(ledset & GREENYELLOW_LED_MASK, ledset & RED_LED_MASK);
|
||||
g_prevled[g_nestlevel]= led;
|
||||
g_prevled[g_nestlevel] = led;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/renesas/skp16c26/src/scp16c26.h
|
||||
/****************************************************************************
|
||||
* boards/renesas/m32262f8/skp16c26/src/scp16c26.h
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -31,33 +31,33 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_RENESAS_SKP16C26_SRC_SKP16C26_H
|
||||
#define __BOARDS_RENESAS_SKP16C26_SRC_SKP16C26_H
|
||||
#ifndef __BOARDS_RENESAS_M32262F8_SKP16C26_SRC_SKP16C26_H
|
||||
#define __BOARDS_RENESAS_M32262F8_SKP16C26_SRC_SKP16C26_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __BOARDS_RENESAS_SKP16C26_SRC_SKP16C26_H */
|
||||
#endif /* __BOARDS_RENESAS_M32262F8_SKP16C26_SRC_SKP16C26_H */
|
||||
|
||||
@@ -114,7 +114,7 @@ Architecture selection
|
||||
implemented in.
|
||||
CONFIG_ARCH_BOARD - identifies the boards/ subdirectory and, hence,
|
||||
the board that supports the particular chip or SoC. This
|
||||
should be us7032evb1 for (boards/us7032evb1).
|
||||
should be us7032evb1 for (boards/renesas/sh7032/us7032evb1).
|
||||
CONFIG_ARCH_BOARD_US7032EVB1 - for use in C code
|
||||
CONFIG_ENDIAN_BIG - the SH-1 usually runs big-endian
|
||||
CONFIG_ARCH_NOINTC - define if the architecture does not
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/renesas/us7032evb1/include/board.h
|
||||
* boards/renesas/sh7032/us7032evb1/include/board.h
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -33,8 +33,8 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _CONFIGS_US7032EVB1_BOARD_H
|
||||
#define _CONFIGS_US7032EVB1_BOARD_H
|
||||
#ifndef __BOARDS_RENESAS_SH7032_US7032EVB1_BOARD_H
|
||||
#define __BOARDS_RENESAS_SH7032_US7032EVB1_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
@@ -77,7 +77,8 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
@@ -92,4 +93,4 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _CONFIGS_US7032EVB1_BOARD_H */
|
||||
#endif /* __BOARDS_RENESAS_SH7032_US7032EVB1_BOARD_H */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
##############################################################################
|
||||
# boards/renesas/us7032evb1/scripts/Make.defs
|
||||
# boards/renesas/sh7032/us7032evb1/scripts/Make.defs
|
||||
#
|
||||
# Copyright (C) 2008, 2017 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/renesas/us7032evb1/nsh/ld.script
|
||||
* boards/renesas/sh7032/us7032evb1/nsh/ld.script
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/renesas/us7032evb1/shterm/Makefile
|
||||
# boards/renesas/sh7032/us7032evb1/shterm/Makefile
|
||||
#
|
||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/renesas/us7032evb1/shterm/shterm.c
|
||||
* boards/renesas/sh7032/us7032evb1/shterm/shterm.c
|
||||
*
|
||||
* Copyright(C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/
|
||||
# boards/renesas/sh7032/us7032evb1/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/
|
||||
* boards/renesas/sh7032/us7032evb1/src/sh1_leds.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/risc-v/gapuino/include/board.h
|
||||
/****************************************************************************
|
||||
* boards/risc-v/gap8/gapuino/include/board.h
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: hhuysqt <1020988872@qq.com>
|
||||
@@ -31,14 +31,14 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_RISC-V_GAPUINO_INCLUDE_BOARD_H
|
||||
#define __BOARDS_RISC-V_GAPUINO_INCLUDE_BOARD_H
|
||||
#ifndef __BOARDS_RISC-V_GAP8_GAPUINO_INCLUDE_BOARD_H
|
||||
#define __BOARDS_RISC-V_GAP8_GAPUINO_INCLUDE_BOARD_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@@ -65,13 +65,13 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_RISC-V_NR5M100_NEXYS4_INCLUDE_BOARD_H */
|
||||
#endif /* __BOARDS_RISC-V_GAP8_GAPUINO_INCLUDE_BOARD_H */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/risc-v/gapuino/scripts/Make.defs
|
||||
# boards/risc-v/gap8/gapuino/scripts/Make.defs
|
||||
#
|
||||
# Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/gapduino/scripts/ld.script
|
||||
* boards/risc-v/gap8/gapduino/scripts/ld.script
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: hhuysqt <1020988872@qq.com>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/gapduino/src/gapduino_appinit.c
|
||||
* boards/risc-v/gap8/gapduino/src/gapduino_appinit.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: hhuysqt <1020988872@qq.com>
|
||||
|
||||
@@ -1,3 +1,38 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/gap8/gapduino/src/gapduino_sysinit.c
|
||||
*
|
||||
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||
* Author: hhuysqt <1020988872@qq.com>
|
||||
*
|
||||
* 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
|
||||
****************************************************************************/
|
||||
@@ -79,7 +114,7 @@ uint32_t g_current_freq = 0;
|
||||
|
||||
void gapuino_sysinit(void)
|
||||
{
|
||||
SCBC->ICACHE_ENABLE = 0xFFFFFFFF;
|
||||
SCBC->ICACHE_ENABLE = 0xffffffff;
|
||||
gap8_setfreq(CONFIG_CORE_CLOCK_FREQ);
|
||||
|
||||
/* For debug usage */
|
||||
|
||||
@@ -148,7 +148,7 @@ Debugger
|
||||
./configure --enable-jlink --enable-maintainer-mode --enable-ftdi --prefix=~/riscv CFLAGS=-g
|
||||
|
||||
The configuration scripts for openocd and nr5m100-nexys4 have been provided in the
|
||||
nuttx/boards/nr5m100-nexys4/scripts directory. They are configured to use a J-LINK JTAG
|
||||
nuttx/boards/nr5m100/nr5m100-nexys4/scripts directory. They are configured to use a J-LINK JTAG
|
||||
probe and to search for the IQ-Analog (the company I work for) IDCODE and part number for
|
||||
the FPGA board (7a10 for Artix xc7a100 part on the Digilent Nexys4 board). With FPGA
|
||||
source directly from the nr5m100 github site (to be provided), this ID will match the
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/risc-v/nr5m100-nexys4/include/board.h
|
||||
/****************************************************************************
|
||||
* boards/risc-v/nr5m100/nr5m100-nexys4/include/board.h
|
||||
* include/arch/board/board.h
|
||||
*
|
||||
* Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved.
|
||||
@@ -37,14 +37,14 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_RISC-V_NR5M100_NEXYS4_INCLUDE_BOARD_H
|
||||
#define __BOARDS_RISC-V_NR5M100_NEXYS4_INCLUDE_BOARD_H
|
||||
#ifndef __BOARDS_RISC-V_NR5M100_NR5M100_NEXYS4_INCLUDE_BOARD_H
|
||||
#define __BOARDS_RISC-V_NR5M100_NR5M100_NEXYS4_INCLUDE_BOARD_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -54,24 +54,26 @@
|
||||
|
||||
#include "nr5.h"
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
/* Clocking *************************************************************************/
|
||||
/* The NR5M100_Nexys4 system uses a 100 MHz main oscillator */
|
||||
|
||||
#define NR5_HCLK_FREQUENCY 100000000ul
|
||||
#define NR5_SCLK_FREQUENCY 100000000ul
|
||||
|
||||
/* Timer Frequencies are the same as the HCLK frequency
|
||||
*/
|
||||
/* Timer Frequencies are the same as the HCLK frequency */
|
||||
|
||||
#define NR5_TIMER_FREQUENCY NR5_HCLK_FREQUENCY
|
||||
|
||||
/* LED definitions ******************************************************************/
|
||||
/* 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 definitions **********************************************************/
|
||||
|
||||
/* If CONFIG_ARCH_LEDS is not defined, then the user can control
|
||||
* the LEDs in any way.
|
||||
* The following definitions are used to access individual LEDs.
|
||||
*/
|
||||
|
||||
/* LED index values for use with stm32_setled() */
|
||||
@@ -97,8 +99,9 @@
|
||||
#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
|
||||
* stm32f4discovery. The following definitions describe how NuttX controls the LEDs:
|
||||
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 4 LEDs
|
||||
* on the board.
|
||||
* The following definitions describe how NuttX controls the LEDs:
|
||||
*/
|
||||
|
||||
#define LED_STARTED 0 /* LED1 */
|
||||
@@ -110,8 +113,7 @@
|
||||
#define LED_ASSERTION 6 /* LED1 + LED2 + LED3 */
|
||||
#define LED_PANIC 7 /* N/C + N/C + N/C + LED4 */
|
||||
|
||||
/* Button definitions ***************************************************************/
|
||||
/* The STM32F4 Discovery supports one button: */
|
||||
/* Button definitions *******************************************************/
|
||||
|
||||
#define BUTTON_USER 0
|
||||
|
||||
@@ -121,9 +123,9 @@
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@@ -136,19 +138,21 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: nr5_ledinit, nr5_setled, and nr5_setleds
|
||||
*
|
||||
* Description:
|
||||
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board LEDs. If
|
||||
* CONFIG_ARCH_LEDS is not defined, then the following interfacesare available to
|
||||
* If CONFIG_ARCH_LEDS is defined,
|
||||
* then NuttX will control the on-board LEDs.
|
||||
* If CONFIG_ARCH_LEDS is not defined,
|
||||
* then the following interfacesare available to
|
||||
* control the LEDs from user applications.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
void nr5_ledinit(void);
|
||||
@@ -161,5 +165,5 @@ void nr5_setleds(uint8_t ledset);
|
||||
}
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_RISC-V_NR5M100_NEXYS4_INCLUDE_BOARD_H */
|
||||
#endif /* __BOARDS_RISC-V_NR5M100_NR5M100_NEXYS4_INCLUDE_BOARD_H */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/risc-v/stm32f4discovery/nsh/Make.defs
|
||||
# boards/risc-v/nr5m100/nr5m100-nexys4/scripts/Make.defs
|
||||
#
|
||||
# Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v/nr5m100-nexys4/scripts/ld.script
|
||||
* boards/risc-v/nr5m100/nr5m100-nexys4/scripts/ld.script
|
||||
*
|
||||
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2016 Ken Pettit.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/risc-v/nr5m100-nexys4/scripts/nr5m1xx.cfg
|
||||
# boards/risc-v/nr5m100/nr5m100-nexys4/scripts/nr5m1xx.cfg
|
||||
#
|
||||
# Copyright (C) 2016 Ken Pettit. All rights reserved.
|
||||
# Author: Ken Pettit <pettitkd@gmail.com>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/risc-v/nr5m100-nexys4/scripts/openocd.cfg
|
||||
# boards/risc-v/nr5m100/nr5m100-nexys4/scripts/openocd.cfg
|
||||
#
|
||||
# Copyright (C) 2016 Ken Pettit. All rights reserved.
|
||||
# Author: Ken Pettit <pettitkd@gmail.com>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# boards/nr5m100-nexys4/src/Makefile
|
||||
# boards/risc-v/nr5m100/nr5m100-nexys4/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2016 Ken Pettit. All rights reserved.
|
||||
# Author: Ken Pettit <pettitkd@gmail.com>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/risc-v//nr5m100-nexys4/src/nr5_appinit.c
|
||||
* boards/risc-v/nr5m100/nr5m100-nexys4/src/nr5_appinit.c
|
||||
*
|
||||
* Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -81,6 +81,5 @@
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/risc-v/nr5m100_nexys4/src/nr5_autoleds.c
|
||||
/****************************************************************************
|
||||
* boards/risc-v/nr5m100/nr5m100_nexys4/src/nr5_autoleds.c
|
||||
*
|
||||
* Copyright (C) 2016 Ken Pettit. All rights reserved.
|
||||
* Author: Ken Pettit <pettitkd@gmail.com>
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -43,29 +43,29 @@
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: board_autoled_on
|
||||
*
|
||||
* Description:
|
||||
* All NR5 architectures must provide the following entry point. This entry point
|
||||
* is called early in the intitialization -- after all memory has been configured
|
||||
* and mapped but before any devices have been initialized.
|
||||
* All NR5 architectures must provide the following entry point.
|
||||
* This entry point is called early in the intitialization -- after all
|
||||
* memory has been configured and mapped but before any devices have been
|
||||
* initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void board_autoled_on(int led)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************************************
|
||||
* boards/risc-v/nr5m100_nexys4/src/nr5_boot.c
|
||||
/****************************************************************************
|
||||
* boards/risc-v/nr5m100/nr5m100_nexys4/src/nr5_boot.c
|
||||
*
|
||||
* Copyright (C) 2016 Ken Pettit. All rights reserved.
|
||||
* Author: Ken Pettit <pettitkd@gmail.com>
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -43,27 +43,28 @@
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: nr5_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
* All NR5 architectures must provide the following entry point. This entry point
|
||||
* is called early in the intitialization -- after all memory has been configured
|
||||
* and mapped but before any devices have been initialized.
|
||||
* All NR5 architectures must provide the following entry point.
|
||||
* This entry point is called early in the intitialization -- after all
|
||||
* memory has been configured and mapped but before any devices have been
|
||||
* initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void nr5_boardinitialize(void)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/****************************************************************************
|
||||
* boards/sim/sim/include/board.h
|
||||
* boards/sim/sim/sim/include/board.h
|
||||
****************************************************************************/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user