mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Add initial support for the MakerLisp eZ80 board. Ref: https://makerlisp.com/
Squashed commit of the following:
configs/makerlisp: Update comments about use of serial console.
configs/makerlisp: Add LED support, remove vestiges of button support (the board has no user buttons). Add support for SPI-based MMC/SD card slot.
arch/z80/src/ez80: Fix some link problems.
libs/libc/syslog/lib_syslog.c: The ZDS-II toolchain does not declare va_coy in stdarg.h. I think that the use of va_copy in vsyslog() is no necessary.
configs/makerlisp: Initial configuration directories cloned from ez80f910200zco with little more than naming changes.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<tr align="center" bgcolor="#e4e4e4">
|
<tr align="center" bgcolor="#e4e4e4">
|
||||||
<td>
|
<td>
|
||||||
<h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
|
<h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
|
||||||
<p>Last Updated: April 22, 2019</p>
|
<p>Last Updated: June 4, 2019</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -159,6 +159,8 @@ nuttx/
|
|||||||
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/lpcxpresso-lpc1768/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/lpcxpresso-lpc1768/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
||||||
| |- lpcxpresso-lpc54628/
|
| |- lpcxpresso-lpc54628/
|
||||||
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/lpcxpresso-lpc54628/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/lpcxpresso-lpc54628/README.txt" target="_blank"><b><i>README.txt</i></b></a>
|
||||||
|
| |- makerlisp/
|
||||||
|
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/makerlisp/README.txt" target="_blank"><b><i>README.txt</i></b></a>\
|
||||||
| |- maple/
|
| |- maple/
|
||||||
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/maple/README.txt" target="_blank"><b><i>README.txt</i></b></a>\
|
| | `- <a href="https://bitbucket.org/nuttx/nuttx/src/master/configs/maple/README.txt" target="_blank"><b><i>README.txt</i></b></a>\
|
||||||
| |- max32660-evsys/
|
| |- max32660-evsys/
|
||||||
|
|||||||
@@ -1833,6 +1833,8 @@ nuttx/
|
|||||||
| | `- README.txt
|
| | `- README.txt
|
||||||
| |- lpcxpresso-lpc54628/
|
| |- lpcxpresso-lpc54628/
|
||||||
| | `- README.txt
|
| | `- README.txt
|
||||||
|
| |- makerlisp/
|
||||||
|
| | `- README.txt
|
||||||
| |- maple/
|
| |- maple/
|
||||||
| | `- README.txt
|
| | `- README.txt
|
||||||
| |- max32660-evsys/
|
| |- max32660-evsys/
|
||||||
|
|||||||
@@ -46,22 +46,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Types
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Inline functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ endif
|
|||||||
CHIP_SSRCS =
|
CHIP_SSRCS =
|
||||||
CHIP_CSRCS = ez80_clock.c ez80_initialstate.c ez80_irq.c ez80_copystate.c
|
CHIP_CSRCS = ez80_clock.c ez80_initialstate.c ez80_irq.c ez80_copystate.c
|
||||||
CHIP_CSRCS += ez80_schedulesigaction.c ez80_sigdeliver.c ez80_lowuart.c
|
CHIP_CSRCS += ez80_schedulesigaction.c ez80_sigdeliver.c ez80_lowuart.c
|
||||||
CHIP_CSRCS += ez80_serial.c ez80_registerdump.c
|
CHIP_CSRCS += ez80_timerisr.c ez80_serial.c ez80_registerdump.c
|
||||||
|
|
||||||
ifneq ($(CONFIG_EZ80_I2C),y)
|
ifneq ($(CONFIG_EZ80_I2C),y)
|
||||||
CHIP_CSRCS += ez80_i2c.c
|
CHIP_CSRCS += ez80_i2c.c
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
#define EZ80_Z_FLAG 0x40 /* Bit 5: Zero flag */
|
#define EZ80_Z_FLAG 0x40 /* Bit 5: Zero flag */
|
||||||
#define EZ80_S_FLAG 0x80 /* Bit 7: Sign flag */
|
#define EZ80_S_FLAG 0x80 /* Bit 7: Sign flag */
|
||||||
|
|
||||||
/* Include chip-specific regiser definitions */
|
/* Include chip-specific register definitions */
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_CHIP_EZ80F91)
|
#if defined(CONFIG_ARCH_CHIP_EZ80F91)
|
||||||
# include "ez80f91.h"
|
# include "ez80f91.h"
|
||||||
|
|||||||
@@ -38,11 +38,12 @@
|
|||||||
;**************************************************************************
|
;**************************************************************************
|
||||||
|
|
||||||
;**************************************************************************
|
;**************************************************************************
|
||||||
; Global Symbols Expported
|
; Global Symbols Exported
|
||||||
;**************************************************************************
|
;**************************************************************************
|
||||||
|
|
||||||
xdef _up_irq_save
|
xdef _up_irq_save
|
||||||
xdef _up_irq_restore
|
xdef _up_irq_restore
|
||||||
|
xdef _up_irq_enable
|
||||||
|
|
||||||
;**************************************************************************
|
;**************************************************************************
|
||||||
; Code
|
; Code
|
||||||
@@ -93,7 +94,7 @@ _disabled:
|
|||||||
;*
|
;*
|
||||||
;**************************************************************************
|
;**************************************************************************
|
||||||
|
|
||||||
up_irq_enable:
|
_up_irq_enable:
|
||||||
ld a, i ; AF = interrupt state
|
ld a, i ; AF = interrupt state
|
||||||
ei ; Interrupts are enabled (does not affect F)
|
ei ; Interrupts are enabled (does not affect F)
|
||||||
push af ; Transfer to HL via the stack
|
push af ; Transfer to HL via the stack
|
||||||
|
|||||||
@@ -46,6 +46,8 @@
|
|||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
|
#include <arch/irq.h>
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
#include "chip/switch.h"
|
#include "chip/switch.h"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/z80/src/ez80/ez80f91_spi.h
|
* arch/z80/src/ez80/ez80f91_spi.h
|
||||||
* arch/z80/src/chip/ez80f91_spi.h
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2015 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -61,7 +60,7 @@
|
|||||||
* No bit definitions -- These two 8-bit registers set the 16-bit BRG divider value
|
* No bit definitions -- These two 8-bit registers set the 16-bit BRG divider value
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* SPI Control (CTL} Register Definitions */
|
/* SPI Control (CTL) Register Definitions */
|
||||||
|
|
||||||
#define SPI_CTL_IRQEN (1 << 7) /* Bit 7: 1=SPI system interrupt is enabled */
|
#define SPI_CTL_IRQEN (1 << 7) /* Bit 7: 1=SPI system interrupt is enabled */
|
||||||
#define SPI_CTL_SPIEN (1 << 5) /* Bit 5: 1=SPI is enabled */
|
#define SPI_CTL_SPIEN (1 << 5) /* Bit 5: 1=SPI is enabled */
|
||||||
|
|||||||
@@ -611,6 +611,17 @@ config ARCH_BOARD_LPC1766STK
|
|||||||
This port uses the Olimex LPC1766-STK board and a GNU GCC toolchain* under
|
This port uses the Olimex LPC1766-STK board and a GNU GCC toolchain* under
|
||||||
Linux or Cygwin. STATUS: Complete and mature.
|
Linux or Cygwin. STATUS: Complete and mature.
|
||||||
|
|
||||||
|
config ARCH_BOARD_MAKERLISP
|
||||||
|
bool "MakerLisp"
|
||||||
|
depends on ARCH_CHIP_EZ80F91
|
||||||
|
select ARCH_HAVE_LEDS
|
||||||
|
---help---
|
||||||
|
ez80Acclaim! Microcontroller. This port use the MakerLips machine
|
||||||
|
based on an eZ80F091 part, and the Zilog ZDS-II Windows command line
|
||||||
|
tools. The development environment is Cygwin under Windows. A
|
||||||
|
Windows native development environment is available but has not
|
||||||
|
been verified.
|
||||||
|
|
||||||
config ARCH_BOARD_MAPLE
|
config ARCH_BOARD_MAPLE
|
||||||
bool "maple board"
|
bool "maple board"
|
||||||
depends on ARCH_CHIP_STM32F103RB || ARCH_CHIP_STM32F103CB
|
depends on ARCH_CHIP_STM32F103RB || ARCH_CHIP_STM32F103CB
|
||||||
@@ -1870,6 +1881,7 @@ config ARCH_BOARD
|
|||||||
default "lpcxpresso-lpc1768" if ARCH_BOARD_LPCXPRESSO
|
default "lpcxpresso-lpc1768" if ARCH_BOARD_LPCXPRESSO
|
||||||
default "lpcxpresso-lpc54628" if ARCH_BOARD_LPCXPRESSO_LPC54628
|
default "lpcxpresso-lpc54628" if ARCH_BOARD_LPCXPRESSO_LPC54628
|
||||||
default "maple" if ARCH_BOARD_MAPLE
|
default "maple" if ARCH_BOARD_MAPLE
|
||||||
|
default "makerlisp" if ARCH_BOARD_MAKERLISP
|
||||||
default "max32660-evsys" if ARCH_BOARD_MAX32660_EVSYS
|
default "max32660-evsys" if ARCH_BOARD_MAX32660_EVSYS
|
||||||
default "mbed" if ARCH_BOARD_MBED
|
default "mbed" if ARCH_BOARD_MBED
|
||||||
default "mcb1700" if ARCH_BOARD_MCB1700
|
default "mcb1700" if ARCH_BOARD_MCB1700
|
||||||
@@ -2169,6 +2181,9 @@ endif
|
|||||||
if ARCH_BOARD_LPCXPRESSO_LPC54628
|
if ARCH_BOARD_LPCXPRESSO_LPC54628
|
||||||
source "configs/lpcxpresso-lpc54628/Kconfig"
|
source "configs/lpcxpresso-lpc54628/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
if ARCH_BOARD_MAKERLISP
|
||||||
|
source "configs/makerlisp/Kconfig"
|
||||||
|
endif
|
||||||
if ARCH_BOARD_MAPLE
|
if ARCH_BOARD_MAPLE
|
||||||
source "configs/maple/Kconfig"
|
source "configs/maple/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -368,6 +368,12 @@ configs/lpc4370-link2
|
|||||||
LPC4370FET100 MCU. Based on the LPC4300 Xplorer port and provided by
|
LPC4370FET100 MCU. Based on the LPC4300 Xplorer port and provided by
|
||||||
Lok Tep.
|
Lok Tep.
|
||||||
|
|
||||||
|
configs/makerlisp
|
||||||
|
This port use the MakerLips machine based on an eZ80F091 ez80Acclaim!
|
||||||
|
Microcontroller, and the Zilog ZDS-II Windows command line tools. The
|
||||||
|
development environment is Cygwin under Windows. A Windows native
|
||||||
|
development environment is available but has not been verified.
|
||||||
|
|
||||||
configs/maple
|
configs/maple
|
||||||
NuttX support for the LeafLab's Maple and Maple Mini boards. These boards
|
NuttX support for the LeafLab's Maple and Maple Mini boards. These boards
|
||||||
are based on the STM32F103RBT6 chip for the standard version and on the
|
are based on the STM32F103RBT6 chip for the standard version and on the
|
||||||
|
|||||||
@@ -89,13 +89,17 @@ Version 5.3.0
|
|||||||
The consequence is, of course, that these interfaces will not be available
|
The consequence is, of course, that these interfaces will not be available
|
||||||
to applications.
|
to applications.
|
||||||
|
|
||||||
Another issue is that the ZDS-II version of stdarg.h does not provide
|
Alternatively, you can use 'make -i' to build the system. The above
|
||||||
va_copy(). This affects libs/libc/lib_sysloc.c.
|
errors will occur, but will not stop the build (unless the failed build
|
||||||
|
objects are brought into the link). The has the negative side effects
|
||||||
|
that (1) the archives will always be rebuild in the directories where
|
||||||
|
the error occur, and (2) you might miss other, real compilation error
|
||||||
|
since these will no longer stop the compilation.
|
||||||
|
|
||||||
Other Versions
|
Other Versions
|
||||||
If you use any version of ZDS-II other than 5.1.1, 5.2.1, or 5.3.0 or
|
If you use any version of ZDS-II other than 5.1.1, 5.2.1, or 5.3.0 or
|
||||||
if you install ZDS-II at any location other than the default location,
|
if you install ZDS-II at any location other than the default location,
|
||||||
you will have to modify one or three files: (1) arch/arm/z80/src/ez80Kconfig,
|
you will have to modify three files: (1) arch/arm/z80/src/ez80/Kconfig,
|
||||||
(2) configs/ez80f910200kitg/scripts/Make.defs and, perhaps, (3)
|
(2) configs/ez80f910200kitg/scripts/Make.defs and, perhaps, (3)
|
||||||
arch/z80/src/ez80/Toolchain.defs.
|
arch/z80/src/ez80/Toolchain.defs.
|
||||||
|
|
||||||
|
|||||||
@@ -97,13 +97,17 @@ Version 5.3.0
|
|||||||
The consequence is, of course, that these interfaces will not be available
|
The consequence is, of course, that these interfaces will not be available
|
||||||
to applications.
|
to applications.
|
||||||
|
|
||||||
Another issue is that the ZDS-II version of stdarg.h does not provide
|
Alternatively, you can use 'make -i' to build the system. The above
|
||||||
va_copy(). This affects libs/libc/lib_sysloc.c.
|
errors will occur, but will not stop the build (unless the failed build
|
||||||
|
objects are brought into the link). The has the negative side effects
|
||||||
|
that (1) the archives will always be rebuild in the directories where
|
||||||
|
the error occur, and (2) you might miss other, real compilation error
|
||||||
|
since these will no longer stop the compilation.
|
||||||
|
|
||||||
Other Versions
|
Other Versions
|
||||||
If you use any version of ZDS-II other than 5.1.1, 5.2.1, or 5.3.0 or
|
If you use any version of ZDS-II other than 5.1.1, 5.2.1, or 5.3.0 or
|
||||||
if you install ZDS-II at any location other than the default location,
|
if you install ZDS-II at any location other than the default location,
|
||||||
you will have to modify one or three files: (1) arch/arm/z80/src/ez80Kconfig,
|
you will have to modify three files: (1) arch/arm/z80/src/ez80/Kconfig,
|
||||||
(2) configs/ez80f910200zco/scripts/Make.defs and, perhaps, (3)
|
(2) configs/ez80f910200zco/scripts/Make.defs and, perhaps, (3)
|
||||||
arch/z80/src/ez80/Toolchain.defs.
|
arch/z80/src/ez80/Toolchain.defs.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# For a description of the syntax of this configuration file,
|
||||||
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||||
|
#
|
||||||
|
|
||||||
|
if ARCH_BOARD_MAKERLISP
|
||||||
|
|
||||||
|
endif # ARCH_BOARD_MAKERLISP
|
||||||
@@ -0,0 +1,227 @@
|
|||||||
|
README.txt
|
||||||
|
==========
|
||||||
|
|
||||||
|
The MakerLisp machine is a portable, modular computer system, designed to
|
||||||
|
recapture the feel of classic computing, with modern hardware.
|
||||||
|
|
||||||
|
The machine centers on a 2" x 3.5" business card-sized CPU, which can be used
|
||||||
|
stand-alone, or plugged in to a 2" x 8" main board, for expansion into a full
|
||||||
|
computer system. A laser-cut wood enclosure holds a small keyboard, an LCD
|
||||||
|
monitor, the circuit boards, and a prototyping area with a breadboard for
|
||||||
|
electronics experimentation and development.
|
||||||
|
|
||||||
|
The CPU is a Zilog eZ80 running at 50 MHz, with up to 16 Mb of zero-wait state
|
||||||
|
RAM. A VGA display adapter provides an IBM PC-like color text-mode display. A
|
||||||
|
USB Host Controller supports a USB keyboard and other USB communications.
|
||||||
|
Data storage and interchange is accomplished by a micro-SD card supporting the
|
||||||
|
FAT file system. All four of these circuit boards (shown on the web site's cover
|
||||||
|
page) are new MakerLisp products, and will be available as part of the first
|
||||||
|
product offering
|
||||||
|
|
||||||
|
Contents
|
||||||
|
========
|
||||||
|
|
||||||
|
o ZDS-II Compiler Versions
|
||||||
|
o Serial Console
|
||||||
|
- UARTs
|
||||||
|
- Serial Keyboard and VGA Display
|
||||||
|
o LEDs and Buttons
|
||||||
|
- LEDs
|
||||||
|
- Buttons
|
||||||
|
o Configurations
|
||||||
|
- Common Configuration Notes
|
||||||
|
- Configuration Subdirectories
|
||||||
|
|
||||||
|
ZDS-II Compiler Versions
|
||||||
|
========================
|
||||||
|
|
||||||
|
Version 5.3.0
|
||||||
|
|
||||||
|
The initial bring-up of the MakerLisp board used the ZiLOG ZDS-II 5.3.0
|
||||||
|
toolchain. To use this toolchain, I had to suppress the gmtime() and
|
||||||
|
gmtimer() because these were causing an internal compiler error:
|
||||||
|
|
||||||
|
time\lib_gmtimer.c
|
||||||
|
P2: Internal Error(0xB47E59):
|
||||||
|
Please contact Technical Support
|
||||||
|
|
||||||
|
This is the change to suppress building these files:
|
||||||
|
|
||||||
|
diff --git a/libs/libc/time/Make.defs b/libs/libc/time/Make.defs
|
||||||
|
index 5c9b746778..8327e287f4 100644
|
||||||
|
--- a/libs/libc/time/Make.defs
|
||||||
|
+++ b/libs/libc/time/Make.defs
|
||||||
|
@@ -44,7 +44,7 @@ ifdef CONFIG_LIBC_LOCALTIME
|
||||||
|
CSRCS += lib_localtime.c lib_asctime.c lib_asctimer.c lib_ctime.c
|
||||||
|
CSRCS += lib_ctimer.c
|
||||||
|
else
|
||||||
|
-CSRCS += lib_mktime.c lib_gmtime.c lib_gmtimer.c
|
||||||
|
+CSRCS += lib_mktime.c # lib_gmtime.c lib_gmtimer.c
|
||||||
|
ifdef CONFIG_TIME_EXTENDED
|
||||||
|
CSRCS += lib_dayofweek.c lib_asctime.c lib_asctimer.c lib_ctime.c
|
||||||
|
CSRCS += lib_ctimer.c
|
||||||
|
|
||||||
|
And there is also this:
|
||||||
|
|
||||||
|
stdlib\lib_strtof.c
|
||||||
|
stdlib\lib_strtof.c (76,36) : WARNING (32) Division by zero encountered
|
||||||
|
stdlib\lib_strtof.c (102,36) : WARNING (32) Division by zero encountered
|
||||||
|
|
||||||
|
Which can be worked around by removing it from the build
|
||||||
|
|
||||||
|
The consequence is, of course, that these interfaces will not be available
|
||||||
|
to applications.
|
||||||
|
|
||||||
|
Alternatively, you can use 'make -i' to build the system. The above
|
||||||
|
errors will occur, but will not stop the build (unless the failed build
|
||||||
|
objects are brought into the link). The has the negative side effects
|
||||||
|
that (1) the archives will always be rebuild in the directories where
|
||||||
|
the error occur, and (2) you might miss other, real compilation error
|
||||||
|
since these will no longer stop the compilation.
|
||||||
|
|
||||||
|
Other Versions
|
||||||
|
If you use any version of ZDS-II other than 5.3.0 or if you install ZDS-II
|
||||||
|
at any location other than the default location, you will have to modify
|
||||||
|
three files: (1) arch/arm/z80/src/ez80/Kconfig, (2)
|
||||||
|
configs/makerlisp/scripts/Make.defs and, perhaps, (3)
|
||||||
|
arch/z80/src/ez80/Toolchain.defs.
|
||||||
|
|
||||||
|
Serial Console
|
||||||
|
==============
|
||||||
|
|
||||||
|
There are two options for a serial console: (1) A UART connected to a
|
||||||
|
terminal program or (2) the MakerLisp Serial Keyboard and VGA display.
|
||||||
|
|
||||||
|
UARTs
|
||||||
|
-----
|
||||||
|
|
||||||
|
The eZ80 has two UART peripherals:
|
||||||
|
|
||||||
|
UART 0: All of Port D pins can support UART0 functions when configured
|
||||||
|
for the alternate function 7. For typical configurations only RXD and TXD
|
||||||
|
need be configured.
|
||||||
|
|
||||||
|
eZ80 PIN BOARD SIGNAL CN1 ACCESS
|
||||||
|
=======================================
|
||||||
|
PD0/TXD1/IR_IXD CN1_TX0 Pin 61
|
||||||
|
PD1/RXD1/IR_RXD CN1_RX0 Pin 59
|
||||||
|
PD2/RTS1 CN1_RTS0 Pin 63
|
||||||
|
PD3/CTS1 CN1_CTS0 Pin 65
|
||||||
|
PD4/DTR1 CN1_DTR0 Pin 67
|
||||||
|
PD5/DSR1 CN1_DSR0 Pin 69
|
||||||
|
PD6/DCD1 CN1_DCD0 Pin 71
|
||||||
|
PD7/RIO1 CN1_RI0 Pin 73
|
||||||
|
|
||||||
|
UART 0: All of Port C pins can support UART1 functions when configured
|
||||||
|
for the alternate function 7. For typical configurations only RXD and TXD
|
||||||
|
need be configured.
|
||||||
|
|
||||||
|
eZ80 PIN BOARD SIGNAL CN1 ACCESS
|
||||||
|
=======================================
|
||||||
|
PC0/TXD1 CN1_TX1 Pin 62
|
||||||
|
PC1/RXD1 CN1_RX1 Pin 60
|
||||||
|
PC2/RTS1 CN1_RTS1 Pin 64
|
||||||
|
PC3/CTS1 CN1_CTS1 Pin 66
|
||||||
|
PC4/DTR1 CN1_DTR1 Pin 68
|
||||||
|
PC5/DSR1 CN1_DSR1 Pin 70
|
||||||
|
PC6/DCD1 CN1_DCD1 Pin 72
|
||||||
|
PC7/RIO1 CN1_RI1 Pin 74
|
||||||
|
|
||||||
|
Serial Keyboard and VGA Display
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
The serial console can also be implemented using the MakerLisp USB
|
||||||
|
Keyboard Controller Board and VGA Display Controller. These are accessed
|
||||||
|
via the two UART ports.
|
||||||
|
|
||||||
|
[more to be provided]
|
||||||
|
|
||||||
|
LEDs and Buttons
|
||||||
|
================
|
||||||
|
|
||||||
|
LEDs
|
||||||
|
----
|
||||||
|
|
||||||
|
Three LEDs are available on the CPU Card, but none are available for
|
||||||
|
general use by applications:
|
||||||
|
|
||||||
|
D2 RED: CPU Card power. Not under eZ80 control
|
||||||
|
D3 GREEN: Driven by CPU GPI/O pin. However, it has some additional
|
||||||
|
properties:
|
||||||
|
|
||||||
|
1. On input, it will be '1' if the I/O expansion board is
|
||||||
|
present.
|
||||||
|
2. Setting it to an output of '0' will generate a system reset.
|
||||||
|
3. Setting it to an output of '1' will not only illuminate the
|
||||||
|
LED take the card out of reset and enable power to the SD
|
||||||
|
card slot.
|
||||||
|
|
||||||
|
As a consequence, the GREEN LED will not be illuminated if
|
||||||
|
SD card support or SPI is disabled. The only effect of
|
||||||
|
CONFIG_ARCH_LEDS is that the GREEN LED will turned off in
|
||||||
|
the event of a crash.
|
||||||
|
|
||||||
|
D1 AMBER: Controlled by the on-board MCP2221A USB bridge and provides USB
|
||||||
|
enumeration status. Not under eZ80 control.
|
||||||
|
|
||||||
|
Buttons
|
||||||
|
-------
|
||||||
|
|
||||||
|
The MakerLisp CPU board has no on-board buttons that can be sensed by the
|
||||||
|
eZ80.
|
||||||
|
|
||||||
|
Configurations
|
||||||
|
==============
|
||||||
|
|
||||||
|
Common Configuration Notes
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
1. src/ and include/
|
||||||
|
|
||||||
|
These directories contain common logic for all MakerLisp
|
||||||
|
configurations.
|
||||||
|
|
||||||
|
2. Variations on the basic MakerLisp configuration are maintained
|
||||||
|
in subdirectories. To configure any specific configuration, do the
|
||||||
|
following steps:
|
||||||
|
|
||||||
|
tools/configure.sh [OPTIONS] makerlisp/<sub-directory>
|
||||||
|
make
|
||||||
|
|
||||||
|
Where <sub-directory> is the specific board configuration that you
|
||||||
|
wish to build. Use 'tools/configure.sh -h' to see the possible
|
||||||
|
options. Typical options are:
|
||||||
|
|
||||||
|
-l Configure for a Linux host
|
||||||
|
-c Configure for a Windows Cygwin host
|
||||||
|
-g Configure for a Windows MYS2 host
|
||||||
|
|
||||||
|
Use configure.bat instead of configure.sh if you are building in a
|
||||||
|
native Windows environment.
|
||||||
|
|
||||||
|
The available board-specific configurations are summarized in the
|
||||||
|
following paragraphs.
|
||||||
|
|
||||||
|
3. This configuration uses the mconf-based configuration tool. To
|
||||||
|
change this 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.
|
||||||
|
|
||||||
|
Configuration Subdirectories
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
nsh:
|
||||||
|
|
||||||
|
This configuration builds the NuttShell (NSH). That code can be
|
||||||
|
found in examples/nsh. For more information see: examples/nsh/README.txt
|
||||||
|
and Documentation/NuttShell.html.
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
|
||||||
|
1. A serial console is provided on UART0. It will be necessary to
|
||||||
|
connect either a TTL-to-RS232 or a TTL-to-USB Serial adapter to CN1
|
||||||
|
pins 59 and 61.
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* arch/makerlisp/include/board.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 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_MAKERLISP_INCLUDE_BOARD_H
|
||||||
|
#define __CONFIGS_MAKERLISP_INCLUDE_BOARD_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Clocking */
|
||||||
|
|
||||||
|
#define EZ80_SYS_CLK_FREQ 50000000
|
||||||
|
|
||||||
|
/* LEDs */
|
||||||
|
|
||||||
|
/* The D3 GREEN LED is driven by an eZ80 GPI/O pin. However, it has some
|
||||||
|
* additional properties:
|
||||||
|
*
|
||||||
|
* 1. On input, it will be '1' if the I/O expansion board is present.
|
||||||
|
* 2. Setting it to an output of '0' will generate a system reset.
|
||||||
|
* 3. Setting it to an output of '1' will not only illuminate the LED
|
||||||
|
* take the card out of reset and enable power to the SD card slot.
|
||||||
|
*
|
||||||
|
* As a consequence, the GREEN LED will not be illuminated if SD card
|
||||||
|
* support or SPI is disabled. The only effect of CONFIG_ARCH_LEDS is that
|
||||||
|
* the GREEN LED will turned off in the event of a crash.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LED_STARTED 0
|
||||||
|
#define LED_HEAPALLOCATE 0
|
||||||
|
#define LED_IRQSENABLED 0
|
||||||
|
#define LED_STACKCREATED 0
|
||||||
|
#define LED_IDLE 0
|
||||||
|
#define LED_INIRQ 0
|
||||||
|
#define LED_ASSERTION 1
|
||||||
|
#define LED_SIGNAL 0
|
||||||
|
#define LED_PANIC 1
|
||||||
|
|
||||||
|
/* Button definitions
|
||||||
|
* The MakerLisp CPU board has no on-board buttons that can be sensed by the
|
||||||
|
* eZ80.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EXTERN extern "C"
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
#define EXTERN extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __CONFIGS_MAKERLISP_INCLUDE_BOARD_H */
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
nsh.hex
|
||||||
|
nsh.map
|
||||||
|
nsh.lod
|
||||||
|
nsh.wsp
|
||||||
|
*.asm
|
||||||
|
Debug
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
README.txt
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
nsh.zdsproj is a simple ZDS-II project that will allow you
|
||||||
|
to use the ZDS-II debugger.
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#
|
||||||
|
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||||
|
#
|
||||||
|
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||||
|
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||||
|
# modifications.
|
||||||
|
#
|
||||||
|
# CONFIG_NSH_DISABLE_IFCONFIG is not set
|
||||||
|
# CONFIG_NSH_DISABLE_PS is not set
|
||||||
|
CONFIG_ARCH="z80"
|
||||||
|
CONFIG_ARCH_BOARD="makerlisp"
|
||||||
|
CONFIG_ARCH_BOARD_MAKERLISP=y
|
||||||
|
CONFIG_ARCH_CHIP_EZ80=y
|
||||||
|
CONFIG_ARCH_CHIP_EZ80F91=y
|
||||||
|
CONFIG_ARCH_LEDS=y
|
||||||
|
CONFIG_ARCH_Z80=y
|
||||||
|
CONFIG_BOARD_LOOPSPERMSEC=1250
|
||||||
|
CONFIG_DISABLE_MQUEUE=y
|
||||||
|
CONFIG_EZ80_UART0=y
|
||||||
|
CONFIG_HOST_WINDOWS=y
|
||||||
|
CONFIG_MAX_TASKS=16
|
||||||
|
CONFIG_MAX_WDOGPARMS=2
|
||||||
|
CONFIG_NFILE_DESCRIPTORS=8
|
||||||
|
CONFIG_NFILE_STREAMS=8
|
||||||
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
|
CONFIG_NSH_LINELEN=64
|
||||||
|
CONFIG_NSH_READLINE=y
|
||||||
|
CONFIG_PREALLOC_TIMERS=4
|
||||||
|
CONFIG_PREALLOC_WDOGS=8
|
||||||
|
CONFIG_PTHREAD_STACK_DEFAULT=1024
|
||||||
|
CONFIG_RAM_SIZE=65536
|
||||||
|
CONFIG_RR_INTERVAL=200
|
||||||
|
CONFIG_SCHED_HPWORK=y
|
||||||
|
CONFIG_SDCLONE_DISABLE=y
|
||||||
|
CONFIG_START_DAY=14
|
||||||
|
CONFIG_START_MONTH=3
|
||||||
|
CONFIG_START_YEAR=2009
|
||||||
|
CONFIG_SYSTEM_NSH=y
|
||||||
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
|
CONFIG_UART0_BAUD=57600
|
||||||
|
CONFIG_UART0_BITS=0
|
||||||
|
CONFIG_UART0_RXBUFSIZE=192
|
||||||
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
|
CONFIG_UART0_TXBUFSIZE=64
|
||||||
|
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_WDOG_INTRESERVE=1
|
||||||
@@ -0,0 +1,247 @@
|
|||||||
|
<project type="Executable" project-type="Standard" configuration="Debug" created-by="c:4.11:07071801" modified-by="c:4.11:08011102">
|
||||||
|
<cpu>eZ80F91</cpu>
|
||||||
|
|
||||||
|
<!-- file information -->
|
||||||
|
<files>
|
||||||
|
<file filter-key="flash">..\..\..\nuttx.hex</file>
|
||||||
|
</files>
|
||||||
|
|
||||||
|
<!-- configuration information -->
|
||||||
|
<configurations>
|
||||||
|
<configuration name="Debug" >
|
||||||
|
<tools>
|
||||||
|
<tool name="Assembler">
|
||||||
|
<options>
|
||||||
|
<option name="define" type="string" change-action="assemble">_EZ80ACCLAIM!=1</option>
|
||||||
|
<option name="include" type="string" change-action="assemble"></option>
|
||||||
|
<option name="list" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="listmac" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="name" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="pagelen" type="integer" change-action="none">56</option>
|
||||||
|
<option name="pagewidth" type="integer" change-action="none">80</option>
|
||||||
|
<option name="quiet" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="sdiopt" type="boolean" change-action="compile">true</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Compiler">
|
||||||
|
<options>
|
||||||
|
<option name="define" type="string" change-action="compile">_DEBUG,_EZ80F91,_EZ80ACCLAIM!</option>
|
||||||
|
<option name="genprintf" type="boolean" change-action="compile">false</option>
|
||||||
|
<option name="keepasm" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="keeplst" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="list" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="listinc" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="modsect" type="boolean" change-action="compile">false</option>
|
||||||
|
<option name="optspeed" type="boolean" change-action="compile">false</option>
|
||||||
|
<option name="promote" type="boolean" change-action="compile">true</option>
|
||||||
|
<option name="reduceopt" type="boolean" change-action="compile">false</option>
|
||||||
|
<option name="stdinc" type="string" change-action="compile"></option>
|
||||||
|
<option name="usrinc" type="string" change-action="compile"></option>
|
||||||
|
<option name="watch" type="boolean" change-action="none">false</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Debugger">
|
||||||
|
<options>
|
||||||
|
<option name="target" type="string" change-action="rebuild">eZ80DevPlatform_F91_Flash</option>
|
||||||
|
<option name="debugtool" type="string" change-action="none">USBSmartCable</option>
|
||||||
|
<option name="usepageerase" type="boolean" change-action="none">true</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="FlashProgrammer">
|
||||||
|
<options>
|
||||||
|
<option name="erasebeforeburn" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="eraseinfopage" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="enableinfopage" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="includeserial" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="offset" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snenable" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="sn" type="string" change-action="none">000000000000000000000000</option>
|
||||||
|
<option name="snsize" type="integer" change-action="none">1</option>
|
||||||
|
<option name="snstep" type="integer" change-action="none">000000000000000000000000</option>
|
||||||
|
<option name="snstepformat" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snaddress" type="string" change-action="none">0</option>
|
||||||
|
<option name="snformat" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snbigendian" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="singleval" type="string" change-action="none">0</option>
|
||||||
|
<option name="singlevalformat" type="integer" change-action="none">0</option>
|
||||||
|
<option name="usepageerase" type="boolean" change-action="none">false</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="General">
|
||||||
|
<options>
|
||||||
|
<option name="warn" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="debug" type="boolean" change-action="assemble">true</option>
|
||||||
|
<option name="debugcache" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="igcase" type="boolean" change-action="assemble">false</option>
|
||||||
|
<option name="outputdir" type="string" change-action="compile">Debug\</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Librarian">
|
||||||
|
<options>
|
||||||
|
<option name="outfile" type="string" change-action="build">.\Debug\nsh.lib</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Linker">
|
||||||
|
<options>
|
||||||
|
<option name="directives" type="string" change-action="build"></option>
|
||||||
|
<option name="createnew" type="boolean" change-action="build">true</option>
|
||||||
|
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
|
||||||
|
<option name="linkctlfile" type="string" change-action="build"></option>
|
||||||
|
<option name="map" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="maxhexlen" type="integer" change-action="build">64</option>
|
||||||
|
<option name="objlibmods" type="string" change-action="build"></option>
|
||||||
|
<option name="of" type="string" change-action="build">..\..\..\nuttx</option>
|
||||||
|
<option name="quiet" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="relist" type="boolean" change-action="build">false</option>
|
||||||
|
<option name="startuptype" type="string" change-action="build">Included</option>
|
||||||
|
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
|
||||||
|
<option name="usecrun" type="boolean" change-action="build">false</option>
|
||||||
|
<option name="warnoverlap" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="xref" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="undefisfatal" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="warnisfatal" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="sort" type="string" change-action="none">ADDRESS</option>
|
||||||
|
<option name="padhex" type="boolean" change-action="build">false</option>
|
||||||
|
<option name="fplib" type="string" change-action="build">Real</option>
|
||||||
|
<option name="useadddirectives" type="boolean" change-action="build">false</option>
|
||||||
|
<option name="linkconfig" type="string" change-action="build">Standard</option>
|
||||||
|
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
|
||||||
|
<option name="ram" type="string" change-action="build">B80000-BfFFFF</option>
|
||||||
|
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
|
||||||
|
<option name="extio" type="string" change-action="build">000000-00FFFF</option>
|
||||||
|
<option name="intio" type="string" change-action="build">000000-0000FF</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Middleware">
|
||||||
|
<options>
|
||||||
|
<option name="usezsl" type="boolean" change-action="rebuild">false</option>
|
||||||
|
<option name="zslports" type="string" change-action="rebuild"></option>
|
||||||
|
<option name="zsluarts" type="string" change-action="rebuild"></option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
</tools>
|
||||||
|
</configuration>
|
||||||
|
<configuration name="Release" >
|
||||||
|
<tools>
|
||||||
|
<tool name="Assembler">
|
||||||
|
<options>
|
||||||
|
<option name="define" type="string" change-action="assemble">_EZ80ACCLAIM!=1,_SIMULATE=1</option>
|
||||||
|
<option name="include" type="string" change-action="assemble"></option>
|
||||||
|
<option name="list" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="listmac" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="name" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="pagelen" type="integer" change-action="none">56</option>
|
||||||
|
<option name="pagewidth" type="integer" change-action="none">80</option>
|
||||||
|
<option name="quiet" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="sdiopt" type="boolean" change-action="compile">true</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Compiler">
|
||||||
|
<options>
|
||||||
|
<option name="define" type="string" change-action="compile">NDEBUG,_EZ80F91,_EZ80ACCLAIM!,_SIMULATE</option>
|
||||||
|
<option name="genprintf" type="boolean" change-action="compile">true</option>
|
||||||
|
<option name="keepasm" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="keeplst" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="list" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="listinc" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="modsect" type="boolean" change-action="compile">false</option>
|
||||||
|
<option name="optspeed" type="boolean" change-action="compile">false</option>
|
||||||
|
<option name="promote" type="boolean" change-action="compile">true</option>
|
||||||
|
<option name="reduceopt" type="boolean" change-action="compile">false</option>
|
||||||
|
<option name="stdinc" type="string" change-action="compile"></option>
|
||||||
|
<option name="usrinc" type="string" change-action="compile"></option>
|
||||||
|
<option name="watch" type="boolean" change-action="none">false</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Debugger">
|
||||||
|
<options>
|
||||||
|
<option name="target" type="string" change-action="rebuild">eZ80DevPlatform_F91_Flash</option>
|
||||||
|
<option name="debugtool" type="string" change-action="none">Simulator</option>
|
||||||
|
<option name="usepageerase" type="boolean" change-action="none">true</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="FlashProgrammer">
|
||||||
|
<options>
|
||||||
|
<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="eraseinfopage" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="enableinfopage" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="includeserial" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="offset" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snenable" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="sn" type="string" change-action="none">0</option>
|
||||||
|
<option name="snsize" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snstep" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snstepformat" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snaddress" type="string" change-action="none">0</option>
|
||||||
|
<option name="snformat" type="integer" change-action="none">0</option>
|
||||||
|
<option name="snbigendian" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="singleval" type="string" change-action="none">0</option>
|
||||||
|
<option name="singlevalformat" type="integer" change-action="none">0</option>
|
||||||
|
<option name="usepageerase" type="boolean" change-action="none">false</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="General">
|
||||||
|
<options>
|
||||||
|
<option name="warn" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="debug" type="boolean" change-action="assemble">false</option>
|
||||||
|
<option name="debugcache" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="igcase" type="boolean" change-action="assemble">false</option>
|
||||||
|
<option name="outputdir" type="string" change-action="compile">.\Release\</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Librarian">
|
||||||
|
<options>
|
||||||
|
<option name="outfile" type="string" change-action="build">.\Release\nsh.lib</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Linker">
|
||||||
|
<options>
|
||||||
|
<option name="directives" type="string" change-action="build"></option>
|
||||||
|
<option name="createnew" type="boolean" change-action="build">true</option>
|
||||||
|
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
|
||||||
|
<option name="linkctlfile" type="string" change-action="build"></option>
|
||||||
|
<option name="map" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="maxhexlen" type="integer" change-action="build">64</option>
|
||||||
|
<option name="objlibmods" type="string" change-action="build"></option>
|
||||||
|
<option name="of" type="string" change-action="build">.\Release\nsh</option>
|
||||||
|
<option name="quiet" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="relist" type="boolean" change-action="build">false</option>
|
||||||
|
<option name="startuptype" type="string" change-action="build">Included</option>
|
||||||
|
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
|
||||||
|
<option name="usecrun" type="boolean" change-action="build">true</option>
|
||||||
|
<option name="warnoverlap" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="xref" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="undefisfatal" type="boolean" change-action="none">true</option>
|
||||||
|
<option name="warnisfatal" type="boolean" change-action="none">false</option>
|
||||||
|
<option name="sort" type="string" change-action="none">name</option>
|
||||||
|
<option name="padhex" type="boolean" change-action="build">false</option>
|
||||||
|
<option name="fplib" type="string" change-action="build">Real</option>
|
||||||
|
<option name="useadddirectives" type="boolean" change-action="build">false</option>
|
||||||
|
<option name="linkconfig" type="string" change-action="build">Standard</option>
|
||||||
|
<option name="flashinfo" type="string" change-action="build">000000-0001FF</option>
|
||||||
|
<option name="ram" type="string" change-action="build">B7E000-B7FFFF</option>
|
||||||
|
<option name="rom" type="string" change-action="build">000000-03FFFF</option>
|
||||||
|
<option name="extio" type="string" change-action="build">000000-00FFFF</option>
|
||||||
|
<option name="intio" type="string" change-action="build">000000-0000FF</option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
<tool name="Middleware">
|
||||||
|
<options>
|
||||||
|
<option name="usezsl" type="boolean" change-action="rebuild">false</option>
|
||||||
|
<option name="zslports" type="string" change-action="rebuild"></option>
|
||||||
|
<option name="zsluarts" type="string" change-action="rebuild"></option>
|
||||||
|
</options>
|
||||||
|
</tool>
|
||||||
|
</tools>
|
||||||
|
</configuration>
|
||||||
|
</configurations>
|
||||||
|
|
||||||
|
<!-- watch information -->
|
||||||
|
<watch-elements>
|
||||||
|
</watch-elements>
|
||||||
|
|
||||||
|
<!-- breakpoint information -->
|
||||||
|
<breakpoints>
|
||||||
|
</breakpoints>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/makerlisp/nsh/Make.defs
|
||||||
|
#
|
||||||
|
# Copyright (C) 2019 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
|
||||||
|
|
||||||
|
# These are the default directories where the ZDS-II toolchain is installed.
|
||||||
|
# NOTE that short 8.3 path names are used in order to avoid spaces. On my
|
||||||
|
# machine I have:
|
||||||
|
#
|
||||||
|
# Versions 5.1.1 and 5.2.1
|
||||||
|
# C:\PROGRA~1\ = C:\Program Files\
|
||||||
|
# C:\PROGRA~2\ = C:\Program Files (x86)\
|
||||||
|
#
|
||||||
|
# Your PC may be configured differently.
|
||||||
|
#
|
||||||
|
# Version 5.3.0, the default install location is C:\ZiLOG
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_EZ80_ZDSII_V511),y)
|
||||||
|
INSTALLROOT = C:/PROGRA~2/ZiLOG
|
||||||
|
ZDSVERSION := 5.1.1
|
||||||
|
else ifeq ($(CONFIG_EZ80_ZDSII_V521),y)
|
||||||
|
INSTALLROOT = C:/PROGRA~2/ZiLOG
|
||||||
|
ZDSVERSION := 5.2.1
|
||||||
|
else ifeq ($(CONFIG_EZ80_ZDSII_V530),y)
|
||||||
|
INSTALLROOT = C:/ZiLOG
|
||||||
|
ZDSVERSION := 5.3.0
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION)
|
||||||
|
INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"}
|
||||||
|
ZDSBINDIR := $(INSTALLDIR)\bin
|
||||||
|
ZDSSTDINCDIR := $(INSTALLDIR)\include\std
|
||||||
|
ZDSZILOGINCDIR := $(INSTALLDIR)\include\zilog
|
||||||
|
ZDSSTDLIBDIR := $(INSTALLDIR)\lib\std
|
||||||
|
ZDSZILOGLIBDIR := $(INSTALLDIR)\lib\zilog
|
||||||
|
|
||||||
|
# CFLAGs
|
||||||
|
|
||||||
|
ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
ARCHUSRINCLUDES = -usrinc:.
|
||||||
|
else
|
||||||
|
WINTOOL := y
|
||||||
|
ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION)
|
||||||
|
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
|
||||||
|
ZDSBINDIR := $(INSTALLDIR)/bin
|
||||||
|
ZDSSTDINCDIR := $(INSTALLDIR)/include/std
|
||||||
|
ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
|
||||||
|
ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
|
||||||
|
ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
|
||||||
|
|
||||||
|
# These are the same directories but with the directory separator
|
||||||
|
# character swapped as needed by the ZDS-II compiler
|
||||||
|
|
||||||
|
WTOPDIR := ${shell cygpath -w "$(TOPDIR)"}
|
||||||
|
WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"}
|
||||||
|
WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
|
||||||
|
WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
|
||||||
|
WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
|
||||||
|
|
||||||
|
# Escaped versions
|
||||||
|
|
||||||
|
ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
|
||||||
|
# CFLAGs
|
||||||
|
|
||||||
|
ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
||||||
|
EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
|
||||||
|
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
||||||
|
ARCHUSRINCLUDES = -usrinc:'.'
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Assembler definitions
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
|
||||||
|
ARCHCPU = eZ80F91
|
||||||
|
ARCHCPUDEF = _EZ80F91
|
||||||
|
ARCHFAMILY = _EZ80ACCLAIM!
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
ARCHASMOPTIMIZATION = -debug -NOsdiopt
|
||||||
|
else
|
||||||
|
ARCHASMOPTIMIZATION = -nodebug -NOsdiopt
|
||||||
|
endif
|
||||||
|
|
||||||
|
ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase
|
||||||
|
ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
|
||||||
|
ARCHASMWARNINGS = -warn
|
||||||
|
ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__
|
||||||
|
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
|
||||||
|
|
||||||
|
# Compiler definitions
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
ARCHOPTIMIZATION = -debug
|
||||||
|
else
|
||||||
|
ARCHOPTIMIZATION = -nodebug
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DEBUG_NOOPT),y)
|
||||||
|
ARCHOPTIMIZATION += -reduceopt
|
||||||
|
else
|
||||||
|
ARCHOPTIMIZATION += -optsize
|
||||||
|
endif
|
||||||
|
|
||||||
|
ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \
|
||||||
|
-asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
|
||||||
|
ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm
|
||||||
|
ARCHPICFLAGS =
|
||||||
|
ARCHWARNINGS = -warn
|
||||||
|
ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF)
|
||||||
|
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
|
||||||
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
|
|
||||||
|
CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__
|
||||||
|
CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
|
||||||
|
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
|
||||||
|
|
||||||
|
# Librarian definitions
|
||||||
|
|
||||||
|
ARFLAGS = -quiet -warn
|
||||||
|
|
||||||
|
# Linker definitions
|
||||||
|
|
||||||
|
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)makerlisp$(DELIM)scripts$(DELIM)makerlisp.linkcmd
|
||||||
|
|
||||||
|
# Tool names/paths.
|
||||||
|
|
||||||
|
CROSSDEV =
|
||||||
|
CC = $(ZDSBINDIR)$(DELIM)ez80cc.exe
|
||||||
|
CPP = gcc -E
|
||||||
|
LD = $(ZDSBINDIR)$(DELIM)ez80link.exe
|
||||||
|
AS = $(ZDSBINDIR)$(DELIM)ez80asm.exe
|
||||||
|
AR = $(ZDSBINDIR)$(DELIM)ez80lib.exe
|
||||||
|
|
||||||
|
# File extensions
|
||||||
|
|
||||||
|
ASMEXT = .asm
|
||||||
|
OBJEXT = .obj
|
||||||
|
LIBEXT = .lib
|
||||||
|
EXEEXT = .lod
|
||||||
|
HEXEXT = .hex
|
||||||
|
|
||||||
|
# These are the macros that will be used in the NuttX make system
|
||||||
|
# to compile and assembly source files and to insert the resulting
|
||||||
|
# object files into an archive
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
|
||||||
|
define PREPROCESS
|
||||||
|
@echo CPP: $1->$2
|
||||||
|
$(Q) $(CPP) $(CPPFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILE
|
||||||
|
$(Q) $(CC) $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ASSEMBLE
|
||||||
|
$(Q) $(AS) $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||||
|
endef
|
||||||
|
|
||||||
|
define MOVEOBJ
|
||||||
|
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||||
|
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||||
|
$(call MOVEFILE, "$1.src", "$2$(DELIM)$1.src")
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ARCHIVE
|
||||||
|
@echo AR: $2
|
||||||
|
$(Q) for %%G in ($(2)) do ( $(AR) $(ARFLAGS) $1=-+%%G )
|
||||||
|
endef
|
||||||
|
|
||||||
|
define CLEAN
|
||||||
|
$(Q) if exist *.obj (del /f /q *.obj)
|
||||||
|
$(Q) if exist *.src (del /f /q *.src)
|
||||||
|
$(Q) if exist *.lib (del /f /q *.lib)
|
||||||
|
$(Q) if exist *.hex (del /f /q *.hex)
|
||||||
|
$(Q) if exist *.lod (del /f /q *.lod)
|
||||||
|
$(Q) if exist *.lst (del /f /q *.lst)
|
||||||
|
endef
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
define PREPROCESS
|
||||||
|
@echo "CPP: $1->$2"
|
||||||
|
$(Q) $(CPP) $(CPPFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILE
|
||||||
|
$(Q) $(CC) $(CFLAGS) `cygpath -w "$1"`
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ASSEMBLE
|
||||||
|
$(Q) $(AS) $(AFLAGS) `cygpath -w "$1"`
|
||||||
|
endef
|
||||||
|
|
||||||
|
define MOVEOBJ
|
||||||
|
$(call MOVEFILE, "$1.obj", "$2$(DELIM)$1.obj")
|
||||||
|
$(call MOVEFILE, "$1.lst", "$2$(DELIM)$1.lst")
|
||||||
|
$(call MOVEFILE, "$1.src", "$2$(DELIM)$1.src")
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ARCHIVE
|
||||||
|
$(Q) for __obj in $(2) ; do \
|
||||||
|
echo "AR: $$__obj"; \
|
||||||
|
$(AR) $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
|
||||||
|
done
|
||||||
|
endef
|
||||||
|
|
||||||
|
define CLEAN
|
||||||
|
$(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Windows native host tool definitions
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
HOSTCC = mingw32-gcc.exe
|
||||||
|
HOSTINCLUDES = -I.
|
||||||
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
||||||
|
HOSTEXEEXT = .exe
|
||||||
|
|
||||||
|
# Windows-native host tools
|
||||||
|
|
||||||
|
#MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||||
|
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||||
|
else
|
||||||
|
|
||||||
|
# Linux/Cygwin host tool definitions
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
|
HOSTINCLUDES = -I.
|
||||||
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
||||||
|
|
||||||
|
# This is the tool to use for dependencies (i.e., none)
|
||||||
|
|
||||||
|
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||||
|
|
||||||
|
# ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies
|
||||||
|
|
||||||
|
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||||
|
endif
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
/****************************************************************************/
|
||||||
|
/* configs/makerlisp/scripts/makerlisp.linkcmd */
|
||||||
|
/* */
|
||||||
|
/* Copyright (C) 2019 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. */
|
||||||
|
/* */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
-FORMAT=OMF695,INTEL32
|
||||||
|
-map -maxhexlen=64 -quiet -NOwarnoverlap -xref -unresolved=fatal
|
||||||
|
-sort ADDRESS=ascending -warn -NOdebug -NOigcase
|
||||||
|
|
||||||
|
RANGE ROM $000000 : $03FFFF
|
||||||
|
RANGE RAM $B80000 : $BFFFFF
|
||||||
|
RANGE EXTIO $000000 : $00FFFF
|
||||||
|
RANGE INTIO $000000 : $0000FF
|
||||||
|
|
||||||
|
CHANGE STRSECT is ROM
|
||||||
|
|
||||||
|
ORDER .RESET,.IVECTS,.STARTUP,CODE,DATA
|
||||||
|
COPY DATA ROM
|
||||||
|
|
||||||
|
DEFINE __low_romdata = copy base of DATA
|
||||||
|
DEFINE __low_data = base of DATA
|
||||||
|
DEFINE __len_data = length of DATA
|
||||||
|
DEFINE __low_bss = base of BSS
|
||||||
|
DEFINE __len_bss = length of BSS
|
||||||
|
DEFINE __stack = highaddr of RAM + 1
|
||||||
|
DEFINE __heaptop = highaddr of RAM
|
||||||
|
DEFINE __heapbot = top of RAM + 1
|
||||||
|
DEFINE __low_romcode = copy base of CODE
|
||||||
|
DEFINE __low_code = base of CODE
|
||||||
|
DEFINE __len_code = length of CODE
|
||||||
|
DEFINE __copy_code_to_ram = 0
|
||||||
|
DEFINE __crtl = 1
|
||||||
|
DEFINE __CS0_LBR_INIT_PARAM = $10
|
||||||
|
DEFINE __CS0_UBR_INIT_PARAM = $1f
|
||||||
|
DEFINE __CS0_CTL_INIT_PARAM = $a8
|
||||||
|
DEFINE __CS0_BMC_INIT_PARAM = $02
|
||||||
|
DEFINE __CS1_LBR_INIT_PARAM = $c0
|
||||||
|
DEFINE __CS1_UBR_INIT_PARAM = $c7
|
||||||
|
DEFINE __CS1_CTL_INIT_PARAM = $28
|
||||||
|
DEFINE __CS1_BMC_INIT_PARAM = $02
|
||||||
|
DEFINE __CS2_LBR_INIT_PARAM = $80
|
||||||
|
DEFINE __CS2_UBR_INIT_PARAM = $bf
|
||||||
|
DEFINE __CS2_CTL_INIT_PARAM = $28
|
||||||
|
DEFINE __CS2_BMC_INIT_PARAM = $81
|
||||||
|
DEFINE __CS3_LBR_INIT_PARAM = $00
|
||||||
|
DEFINE __CS3_UBR_INIT_PARAM = $00
|
||||||
|
DEFINE __CS3_CTL_INIT_PARAM = $00
|
||||||
|
DEFINE __CS3_BMC_INIT_PARAM = $02
|
||||||
|
DEFINE __RAM_CTL_INIT_PARAM = $C0
|
||||||
|
DEFINE __RAM_ADDR_U_INIT_PARAM = $B7
|
||||||
|
DEFINE __FLASH_CTL_INIT_PARAM = $68
|
||||||
|
DEFINE __FLASH_ADDR_U_INIT_PARAM = $00
|
||||||
|
|
||||||
|
define _SYS_CLK_FREQ = 50000000
|
||||||
|
|
||||||
|
define _OSC_FREQ = 50000000
|
||||||
|
define _SYS_CLK_SRC = 0
|
||||||
|
define _OSC_FREQ_MULT = 1
|
||||||
|
define __PLL_CTL0_INIT_PARAM = $40
|
||||||
|
|
||||||
|
define _zsl_g_clock_xdefine = 50000000
|
||||||
|
|
||||||
|
/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
/Make.dep
|
||||||
|
/.depend
|
||||||
|
/*.asm
|
||||||
|
/*.obj
|
||||||
|
/*.rel
|
||||||
|
/*.lst
|
||||||
|
/*.sym
|
||||||
|
/*.adb
|
||||||
|
/*.lib
|
||||||
|
/*.src
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/makerlisp/Makefile
|
||||||
|
#
|
||||||
|
# Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
-include $(TOPDIR)/Make.defs
|
||||||
|
|
||||||
|
ASRCS =
|
||||||
|
CSRCS = ez80_lowinit.c ez80_bringup.c
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_LIB_BOARDCTL),y)
|
||||||
|
CSRCS += ez80_appinit.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ARCH_LEDS),y)
|
||||||
|
CSRCS += ez80_leds.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_MMCSD_SPI),y)
|
||||||
|
ifeq ($(CONFIG_EZ80_SPI),y)
|
||||||
|
CSRCS += ez80_spimmcsd.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(TOPDIR)/configs/Board.mk
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* config/makerlisp/src/ez80_appinit.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 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 <nuttx/board.h>
|
||||||
|
|
||||||
|
#include "makerlisp.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef OK
|
||||||
|
# define OK 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_app_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Perform application specific initialization. This function is never
|
||||||
|
* called directly from application code, but only indirectly via the
|
||||||
|
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||||
|
*
|
||||||
|
* Input Parameters:
|
||||||
|
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||||
|
* implementation without modification. The argument has no
|
||||||
|
* meaning to NuttX; the meaning of the argument is a contract
|
||||||
|
* between the board-specific initialization logic and the
|
||||||
|
* matching application logic. The value cold be such things as a
|
||||||
|
* mode enumeration value, a set of DIP switch switch settings, a
|
||||||
|
* pointer to configuration data read from a file or serial FLASH,
|
||||||
|
* or whatever you would like to do with it. Every implementation
|
||||||
|
* should accept zero/NULL as a default configuration.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||||
|
* any failure to indicate the nature of the failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int board_app_initialize(uintptr_t arg)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||||
|
/* Board initialization already performed by board_late_initialize() */
|
||||||
|
|
||||||
|
return OK;
|
||||||
|
#else
|
||||||
|
/* Perform board-specific initialization */
|
||||||
|
|
||||||
|
return ez80_bringup();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* config/makerlisp/src/ez80_bringup.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 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 <sys/types.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: ez80_bringup
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Perform architecture-specific initialization
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||||
|
* Called from board_late_initialize().
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
|
||||||
|
* Called from the NSH library
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int ez80_bringup(void)
|
||||||
|
{
|
||||||
|
int ret = OK;
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_PROCFS
|
||||||
|
/* Mount the procfs file system */
|
||||||
|
|
||||||
|
ret = mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
serr("ERROR: Failed to mount procfs at %s: %d\n",
|
||||||
|
STM32_PROCFS_MOUNTPOINT, ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_MMCSD
|
||||||
|
/* Initialize SPI-based SD card slot */
|
||||||
|
|
||||||
|
ret = ez80_mmcsd_initialize(void);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
serr("ERROR: Failed to initialize SD card: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
UNUSED(ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/makerlisp/src/ez80_leds.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 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 D3 GREEN LED is driven by an eZ80 GPI/O pin. However, it has some
|
||||||
|
* additional properties:
|
||||||
|
*
|
||||||
|
* 1. On input, it will be '1' if the I/O expansion board is present.
|
||||||
|
* 2. Setting it to an output of '0' will generate a system reset.
|
||||||
|
* 3. Setting it to an output of '1' will not only illuminate the LED
|
||||||
|
* take the card out of reset and enable power to the SD card slot.
|
||||||
|
*
|
||||||
|
* As a consequence, the GREEN LED will not be illuminated if SD card
|
||||||
|
* support or SPI is disabled. The only effect of CONFIG_ARCH_LEDS is that
|
||||||
|
* the GREEN LED will turned off in the event of a crash.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
|
#include "up_internal.h"
|
||||||
|
#include "makerlisp.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled_initialize
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled_initialize(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled_on
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled_on(int led)
|
||||||
|
{
|
||||||
|
if (led != 0) /* LED_ASSERTION or LED_PANIC */
|
||||||
|
{
|
||||||
|
/* To be provided */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_autoled_off
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void board_autoled_off(int led)
|
||||||
|
{
|
||||||
|
/* Ignored */
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_ARCH_LEDS */
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* configs/makerlisp/src/ez80_lowinit.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Gregory Nutt. All rights reserved.
|
||||||
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Based upon sample code included with the Zilog ZDS-II toolchain.
|
||||||
|
*
|
||||||
|
* 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 <stdbool.h>
|
||||||
|
|
||||||
|
#include <nuttx/arch.h>
|
||||||
|
#include <arch/chip/io.h>
|
||||||
|
|
||||||
|
#include "chip.h"
|
||||||
|
#include "makerlisp.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
bool g_ebpresent = false; /* True: I/O Expansion board is present */
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: ez80_lowinit
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* All eZ80 architectures must provide the following entry point. This
|
||||||
|
* entry point is called early in the initialization -- after basic CPU
|
||||||
|
* configuration is complete but before any devices have been initialized.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
void ez80_lowinit(void)
|
||||||
|
{
|
||||||
|
register uint8_t regval;
|
||||||
|
|
||||||
|
/* Port B pin 5 is set if the I/O expansion board is present */
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_DR);
|
||||||
|
g_ebpresent = (regval & EZ80_GPIOD5 != 0);
|
||||||
|
|
||||||
|
/* Set Port B pin 5 as output, assert /sysreset, SD card power off */
|
||||||
|
|
||||||
|
regval &= ~EZ80_GPIOD5;
|
||||||
|
outp(EZ80_PB_DR, regval);
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_ALT1);
|
||||||
|
regval &= ~EZ80_GPIOD5;
|
||||||
|
outp(EZ80_PB_ALT1, regval);
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_ALT2);
|
||||||
|
regval &= ~EZ80_GPIOD5;
|
||||||
|
outp(EZ80_PB_ALT2, regval);
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_DDR);
|
||||||
|
regval &= ~EZ80_GPIOD5;
|
||||||
|
outp(EZ80_PB_DDR, regval);
|
||||||
|
|
||||||
|
/* Set port B pins 7 (MOSI), 6 (MISO), 3 (SCK), 2 (/SS) to SPI */
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_ALT1);
|
||||||
|
regval &= ~(EZ80_GPIOD2 | EZ80_GPIOD3 | EZ80_GPIOD6 | EZ80_GPIOD7);
|
||||||
|
outp(EZ80_PB_ALT1, regval);
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_ALT2);
|
||||||
|
regval &= ~(EZ80_GPIOD2 | EZ80_GPIOD3 | EZ80_GPIOD6 | EZ80_GPIOD7);
|
||||||
|
outp(EZ80_PB_ALT2, regval);
|
||||||
|
|
||||||
|
/* Set port B pin 4 as output, high - use for /CS */
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_DR);
|
||||||
|
regval |= EZ80_GPIOD4;
|
||||||
|
outp(EZ80_PB_DR, regval);
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_ALT1);
|
||||||
|
regval &= ~EZ80_GPIOD4;
|
||||||
|
outp(EZ80_PB_ALT1, regval);
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_ALT2);
|
||||||
|
regval &= ~EZ80_GPIOD4;
|
||||||
|
outp(EZ80_PB_ALT2, regval);
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_DDR);
|
||||||
|
regval &= ~EZ80_GPIOD4;
|
||||||
|
outp(EZ80_PB_DDR, regval);
|
||||||
|
|
||||||
|
/* Leave /sysreset asserted for a while */
|
||||||
|
|
||||||
|
up_udelay(150);
|
||||||
|
|
||||||
|
/* Take the system out of reset and and turn on SD card power */
|
||||||
|
|
||||||
|
regval = inp(EZ80_PB_DR);
|
||||||
|
regval |= EZ80_GPIOD5;
|
||||||
|
outp(EZ80_PB_DR, regval);
|
||||||
|
|
||||||
|
/* Wait for the SD card to power up */
|
||||||
|
|
||||||
|
up_udelay(750);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: board_late_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
|
||||||
|
* initialization call will be performed in the boot-up sequence to a
|
||||||
|
* function called board_late_initialize(). board_late_initialize() will be
|
||||||
|
* called immediately after up_initialize() is called and just before the
|
||||||
|
* initial application is started. This additional initialization phase
|
||||||
|
* may be used, for example, to initialize board-specific device drivers.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||||
|
void board_late_initialize(void)
|
||||||
|
{
|
||||||
|
/* Perform board-specific initialization */
|
||||||
|
|
||||||
|
(void)ez80_bringup();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* configs/makerlisp/src/ez80_spimmcsd.c
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Greg 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 <pthread.h>
|
||||||
|
#include <sched.h>
|
||||||
|
#include <semaphore.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <nuttx/mmcsd.h>
|
||||||
|
#include <nuttx/spi/spi.h>
|
||||||
|
|
||||||
|
#include "chip.h"
|
||||||
|
#include "ez80f91_spi.h"
|
||||||
|
#include "makerlisp.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_MMCSD
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Private Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* NOTE: We are using a SDCard adapter/module without Card Detect pin!
|
||||||
|
* Then we don't need to Card Detect callback here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Name: ez80_spi1register
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Registers media change callback
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int ez80_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback,
|
||||||
|
void *arg)
|
||||||
|
{
|
||||||
|
spiinfo("INFO: Registering spi1 device\n");
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Name: ez80_mmcsd_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Initialize SPI-based SD card.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int ez80_mmcsd_initialize(void)
|
||||||
|
{
|
||||||
|
struct spi_dev_s *spi;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
mcinfo("INFO: Initializing mmcsd card\n");
|
||||||
|
|
||||||
|
/* Get/initialize the SPI interface */
|
||||||
|
|
||||||
|
spi = ez80_spibus_initialize(1);
|
||||||
|
if (spi == NULL)
|
||||||
|
{
|
||||||
|
mcerr("ERROR: Failed to initialize SPI\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Register the MMC/SD block driver for slot 0 with device minor number 0. */
|
||||||
|
|
||||||
|
ret = mmcsd_spislotinitialize(0, 0, spi);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
mcerr("ERROR: Failed to bind SPI to SD slot 0\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcinfo("INFO: mmcsd card has been initialized successfully\n");
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_MMCSD */
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* arch/makerlisp/src/makerlisp.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 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_MAKERLISP_SRC_MAKERLISP_H
|
||||||
|
#define _CONFIGS_MAKERLISP_SRC_MAKERLISP_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
# include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Configuration */
|
||||||
|
|
||||||
|
#define HAVE_MMCSD 1
|
||||||
|
#if !defined(CONFIG_MMCSD_SPI) || !defined(CONFIG_EZ80_SPI)
|
||||||
|
# undef HAVE_MMCSD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Helpers for accessing memory mapped registers */
|
||||||
|
|
||||||
|
#define ez80_getreg8(a) (*(uint8_t*)(a))
|
||||||
|
#define ez80_putreg8(v,a) (*(uint8_t*)(a) = (v))
|
||||||
|
|
||||||
|
/* Memory map. Board-specific extensions to the basic ez80f91 memory map
|
||||||
|
* (see arch/z80/src/ez80/ez80f91.h)
|
||||||
|
*/
|
||||||
|
/* CS0: 0x000000 256Kb of on-chip flash */
|
||||||
|
#define EZ80_OFFCHIPFLASH 0x400000 /* CS0: Off chip flash (Up to 4Mb-256Kb) */
|
||||||
|
#define EZ80_LEDGPIOCNTRL 0x800000 /* CS2: (See below) */
|
||||||
|
#define EZ80_PLTFMSRAM 0xb80000 /* CS2: Platform SRAM (512Kb) */
|
||||||
|
#define EZ80_MODULESRAM 0xc00000 /* CS1: Module SRAM (up to 2Mb) */
|
||||||
|
/* 0xffc000 On-chip EMAC SRAM (8Kb) */
|
||||||
|
/* 0xffe000 On-chip SRAM (8Kb) */
|
||||||
|
|
||||||
|
/* LED and port emulation memory register addresses */
|
||||||
|
|
||||||
|
/* GPIO data bit definitions */
|
||||||
|
|
||||||
|
#define EZ80_GPIOD0 (1 << 0)
|
||||||
|
#define EZ80_GPIOD1 (1 << 1)
|
||||||
|
#define EZ80_GPIOD2 (1 << 2)
|
||||||
|
#define EZ80_GPIOD3 (1 << 3)
|
||||||
|
#define EZ80_GPIOD4 (1 << 4)
|
||||||
|
#define EZ80_GPIOD5 (1 << 5)
|
||||||
|
#define EZ80_GPIOD6 (1 << 6)
|
||||||
|
#define EZ80_GPIOD7 (1 << 7)
|
||||||
|
|
||||||
|
/* Modem Signals:
|
||||||
|
*
|
||||||
|
* DCD:
|
||||||
|
* The Data Carrier Detect (DCD) signal at D1 indicates that a good carrier
|
||||||
|
* signal is being received from the remove mode.
|
||||||
|
* RX:
|
||||||
|
* The RX signal at D2 indicates that data is received from the modem.
|
||||||
|
* DTR:
|
||||||
|
* The Data Terminal Ready (DTR) signal at D3 informs the modem that the PC
|
||||||
|
* is ready.
|
||||||
|
* TX:
|
||||||
|
* The TX signal at D4 indicates that data is transmitted to the modem.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Push buttons:
|
||||||
|
*
|
||||||
|
* PB0 SW1 Bit 0 of GPIO Port B
|
||||||
|
* PB1 SW2 Bit 1 of GPIO Port B
|
||||||
|
* PB2 SW3 Bit 2 of GPIO Port B
|
||||||
|
* RESET SW4
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define EZ80_PB0_IRQ EZ80_PORTB0_IRQ /* Vector Oxa0 */
|
||||||
|
#define EZ80_PB1_IRQ EZ80_PORTB1_IRQ /* Vector Oxa4 */
|
||||||
|
#define EZ80_PB2_IRQ EZ80_PORTB2_IRQ /* Vector Oxa8 */
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
extern bool g_ebpresent; /* True: I/O Expansion board is present */
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Functions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EXTERN extern "C"
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
#define EXTERN extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: ez80_bringup
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Perform architecture-specific initialization
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=y :
|
||||||
|
* Called from board_late_initialize().
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_LIB_BOARDCTL=y :
|
||||||
|
* Called from the NSH library
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int ez80_bringup(void);
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* Name: ez80_mmcsd_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Initialize SPI-based SD card.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_MMCSD
|
||||||
|
int ez80_mmcsd_initialize(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _CONFIGS_MAKERLISP_SRC_MAKERLISP_H */
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* config/stm32f4discovery/src/stm32_appinit.c
|
* config/stm32f4discovery/src/stm32_appinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012, 2014, 2016, 20018 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012, 2014, 2016, 2018 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
@@ -66,8 +66,6 @@
|
|||||||
|
|
||||||
void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
|
void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
va_list copy;
|
|
||||||
|
|
||||||
/* Check if this priority is enabled */
|
/* Check if this priority is enabled */
|
||||||
|
|
||||||
if ((g_syslog_mask & LOG_MASK(priority)) != 0)
|
if ((g_syslog_mask & LOG_MASK(priority)) != 0)
|
||||||
@@ -76,11 +74,10 @@ void vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
|
|||||||
*
|
*
|
||||||
* NOTE: The va_list parameter is passed by reference. That is
|
* NOTE: The va_list parameter is passed by reference. That is
|
||||||
* because the va_list is a structure in some compilers and passing
|
* because the va_list is a structure in some compilers and passing
|
||||||
* of structures in the NuttX sycalls does not work.
|
* of structures in the NuttX syscalls does not work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
va_copy(copy, ap);
|
(void)nx_vsyslog(priority, fmt, &ap);
|
||||||
(void)nx_vsyslog(priority, fmt, ©);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user