configs/16z: Add support for 16z board

This commit is contained in:
Gregory Nutt 2014-01-22 11:50:37 -06:00
parent 2fa97a056d
commit dac7ffc41b
27 changed files with 4639 additions and 1 deletions

20
configs/16z/Kconfig Normal file
View File

@ -0,0 +1,20 @@
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
if CONFIG_ARCH_BOARD_16Z
config 16Z_RFTRANSCEIVER
bool "RF Transceiver installed"
default n
---help---
Select this option if the on-board RF transceiver is installed
config 16Z_SERIAL_MEMORY
bool "Serial memory"
default n
---help---
Select this option if the on-board serial memory is installed
endif # CONFIG_ARCH_BOARD_16Z

426
configs/16z/README.txt Normal file
View File

@ -0,0 +1,426 @@
README.txt
==========
This is the README file for the NuttX port to the 16z board. The 16z board
is based on the ZiLOG ZNEOZ16F2811AL20EG part. See https://github.com/toyaga/16z
for further information.
Contents
========
- GPIO Configuration
- ZDS-II Compiler Versions
- Serial Console
- LEDs
- RAM
- Selecting Configurations
- Configuration Sub-directories
GPIO Configuration
==================
--------------------------- ------ --------------------------------------------
GPIO SIGNAL On-Board Connections
--------------------------- ------ --------------------------------------------
PA0/T0IN/T0OUT/DMA0REQ GP8 PS/2 / GPIO, Expansion slots
PA1/T0OUT/DMA0ACK GP9 PS/2 / GPIO, Expansion slots
PA2/DE0/FAULTY ~INTI Power section, RF transceiver (1)
PA3/CTS0/FAULT0 ~INTX Expansion slots
PA4/RXD0/CS1 RXD MAX3232D RS-232
PA5/TXD0/CS2 TXD MAX3232D RS-232
PA6/SCL/CS3 SCL RTC / UID, Expansion slots
PA7/SDA/CS4 SDA RTC / UID, Expansion slots
--------------------------- ------ --------------------------------------------
PB0/ANA0/T0IN0 GP0 Expansion slots
PB1/ANA1/T0IN1 GP1 Expansion slots
PB2/ANA2/T0IN2 GP2 Expansion slots
PB3/ANA3/OPOUT GP3 Expansion slots
PB4/ANA4 GP4 Expansion slots
PB5/ANA5 GP5 Expansion slots
PB6/ANA6/OPINP/CINN GP6 Expansion slots
PB7/ANA7/OPINN GP7 Expansion slots
--------------------------- ------ --------------------------------------------
PC0/T1IN/T1OUT/DMA1REQ/CINN GP10 PS/2 / GPIO, Expansion slots
PC1/T1OUT/DMA1ACK/COMPOUT GP11 PS/2 / GPIO, Expansion slots
PC2/SS/CS4 ~EXP Expansion slots
PC3/SCK/DMA2REQ SCK FT800Q, Serial memory (1), RF Transceiver (1),
Expansion slots, SD0, 1, and 2
PC4/MOSI/DMA2ACK MOSI FT800Q, Serial memory (1), RF Transceiver (1),
Expansion slots, SD0, 1, and 2
PC5/MISO/CS5 MISO FT800Q, Serial memory (1), RF Transceiver (1),
Expansion slots, SD0, 1, and 2
PC6/T2IN/T2OUT/PWMH0 ~CTS MAX3232D RS-232
PC7/T2OUT/PWML0 ~RTS MAX3232D RS-232, Power section (?)
--------------------------- ------ --------------------------------------------
PD0/PWMH1/ADR20 A20 RAM, Expansion slots
PD1/PWML1/ADR21 A21 RAM, Expansion slots
PD2/PWMH2/ADR22 A22 RAM, Expansion slots
PD3/DE1/ADR16 A16 RAM, Expansion slots
PD4/RXD1/ADR18 A18 RAM, Expansion slots
PD5/TXD1/ADR19 A19 RAM, Expansion slots
PD6/CTS1/ADR17 A17 RAM, Expansion slots
PD7/PWML2/ADR23 A23 Expansion slots
--------------------------- ------ --------------------------------------------
PE0/DATA0 D0 RAM, Expansion slots
PE1/DATA1 D1 RAM, Expansion slots
PE2/DATA2 D2 RAM, Expansion slots
PE3/DATA3 D3 RAM, Expansion slots
PE4/DATA4 D4 RAM, Expansion slots
PE5/DATA5 D5 RAM, Expansion slots
PE6/DATA6 D6 RAM, Expansion slots
PE7/DATA7 D7 RAM, Expansion slots
--------------------------- ------ --------------------------------------------
PF0/ADR0 A0 Expansion slots
PF1/ADR1 A1 RAM, Expansion slots
PF2/ADR2 A2 RAM, Expansion slots
PF3/ADR3 A3 RAM, Expansion slots
PF4/ADR4 A4 RAM, Expansion slots
PF5/ADR5 A5 RAM, Expansion slots
PF6/ADR6 A6 RAM, Expansion slots
PF7/ADR7 A7 RAM, Expansion slots
--------------------------- ------ --------------------------------------------
PG0/ADR0 A8 RAM, Expansion slots
PG1/ADR0 A9 RAM, Expansion slots
PG2/ADR0 A10 RAM, Expansion slots
PG3/ADR0 A11 RAM, Expansion slots
PG4/ADR0 A12 RAM, Expansion slots
PG5/ADR0 A13 RAM, Expansion slots
PG6/ADR0 A14 RAM, Expansion slots
PG7/ADR0 A15 RAM, Expansion slots
--------------------------- ------ --------------------------------------------
PH0/ANA8/WR ~WR RAM, Expansion slots
PH1/ANA9/RD ~RD RAM, Expansion slots
PH2/ANA10/CS0 ~RF LED3, RF transceiver, X2 (1)
PH3/ANA11/CINP/WAIT ~SXM LED4, Chip select for the serial memory, U4 (1)
--------------------------- ------ --------------------------------------------
PJ0/DATA8 ~SD1 LED5, Chip select for the SD card 1, X11.
PJ1/DATA9 ~DT1 Card detect for SD card 1
PJ2/DATA10 WP1 Write protect for SD card 1
PJ3/DATA11 EVE EVE chip select
PJ4/DATA12 ~SD2 LED6, Chip select for the SD card 2, X10.
PJ5/DATA13 ~DT2 Card detect for SD card 2
PJ6/DATA14 WP2 Write protect for SD card 2
PJ7/DATA15 ~SD0 LED7, Chip select for the microSD 0, X12.
--------------------------- ------ --------------------------------------------
PK0/BHEN ~BHE RAM, Expansion slots
PK1/BLEN ~BLE RAM, Expansion slots
PK2/CS0 ~0000 Bottom RAM bank, Expansion slots
PK3/CS1 ~8000 Top RAM bank, Expansion slots
PK4/CS2 ~F000 Expansion slots
PK5/CS3 ~FFC8 Expansion slots
PK6/CS4 ~FFD0 Expansion slots
PK7/CS5 ~FFD8 Expansion slots
--------------------------- ------ --------------------------------------------
Note 1: Not populated on my board
ZDS-II Compiler Versions
========================
Version 5.0.1
All testing has been performed with ZSD II verion 5.0.1 for the ZNEO.
Other Versions
If you use any version of ZDS-II other than 5.0.1 or if you install ZDS-II
at any location other than the default location, you will have to modify
two files: (1) configs/16z/*/setenv.sh and (2) configs/16z/*/Make.defs.
Simply edit these two files, changing 5.0.1 to whatever.
Serial Console
==============
The 16z supports a single UART, UART0, that will be used to support the
NuttX serial console.
LEDs
====
The 16z board has 7 LEDs, five of which are controllable via software:
----- ------ ------ ------------------------------------
LED Color Signal Description
----- ------ ------ ------------------------------------
LED1 Red 3V3 Indicates the presence of +3.3V
LED2 Red 5V Indicates the presence of +5V
LED3 Blue ~RF Controlled via PH2. Notes: 1, 2
LED4 Green ~SXM Controlled via PH3. Notes: 1, 3
LED5 Green ~SD1 Controlled via PJ0. Notes: 1, 4
LED6 Yellow ~SD2 Controlled via PJ4. Notes: 1, 5
LED7 Yellow ~SD0 Controlled via PJ7. Notes: 1, 6
----- ------ ------ ------------------------------------
Note 1: Pulled high so a low output illuminates the LED.
Note 2: PH2/~RF is also used by the RF transceiver, X2. That part is not
populated on my board.
Note 3: ~SXM is the chip select for the serial memory, U4. That part is
not populated on my board.
Note 4: ~SD1 is the chip select for the SD card 1, X11.
Note 5: ~SD2 is the chip select for the SD card 2, X10.
Note 6: ~SD0 is the chip select for the microSD 0, X12.
In conclusion: None of the LEDs are available to indicate software status
without potentially sacrificing board functionality. If the RF transceiver
is not installed (CONFIG_16Z_RFTRANSCEIVER=n) and if LED support is
requested (CONFIG_ARCH_LEDS), then LED3 will be used to indicate status: A
solid color means that the board has boot successfully; flashing at a rate
of approximately 2Hz indicates a software failure.
RAM
===
The 16z has two IS66WVE4M16BLL 64Mb (4M x 16b) "Pseudo" SRAM parts on board.
This provides a total of 16MiB of SRAM from program usage.
Selecting Configurations
========================
Variations on the basic 16z configuration are maintained in subdirectories.
To configure any specific configuration, do the following steps:
cd <nuttx-top-directory>/tools
./configure.sh 16z/<sub-directory>
cd <nuttx-top-directory>
make
Where <sub-directory> is the specific board configuration that you wish to
build. The following board-specific configurations are available.
Before entering the make command, make certain that the path to the ZNEO
compiler is in you PATH variable. You make modify and use the setenv.sh
script to set that PATH if you like. You can simply source setenv.sh
before making like:
...
. ./setenv.sh
make
Configuration Sub-directories
=============================
source/ and include/
--------------------
These directories contain common logic for all 16z configurations.
nsh
---
nsh:
This configuration directory will built the NuttShell (NSH). See
the NSH user manual in the documents directory (or online at nuttx.org).
See also the README.txt file in the nsh sub-directory for information
about using ZDS-II.
NOTES:
1. This configuration uses the mconf-based configuration tool. To
change this configuration using that tool, you should:
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
and misc/tools/
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
2. By default, this configuration assumes that you are using the
Cygwin environment on Windows. An option is to use the native
CMD.exe window build as described in the top-level README.txt
file. To set up that configuration:
-CONFIG_WINDOWS_CYGWIN=y
+CONFIG_WINDOWS_NATIVE=y
And after configuring, make sure that CONFIG_APPS_DIR uses
the back slash character. For example:
CONFIG_APPS_DIR="..\apps"
NOTES:
a. If you need to change the toolchain path used in Make.defs, you
will need to use the short 8.3 filenames to avoid spaces. On my
PC, C:\PROGRA~1\ is is C:\Program Files\ and C:\PROGRA~2\ is
C:\Program Files (x86)\
b. I have not tried to use this configuration with the native
Windows build, but I would expect the same issues as is listed
for the ostest configuration..
STATUS:
Currently, NSH failes nsh_consoleoutput(). Here is an example.
This echo command causes the system to hang:
nsh> echo abc
Below is some annotated output from the debugger. Here is the 30,000 ft view:
- cmd_echo loops for each argv[i], 1 >=i > argc.
- It calls:
vtbl->output(vtbl, "%s ", argv[i])
where the prototype for output is:
int (*output)(FAR struct nsh_vtbl_s *vtbl, const char *fmt, ...);
- vtbl->output maps to nsh_consoleoutput() in this case.
- cmd_echo passes all of the arguments to output in registers.
- nsh_consoleoutput expects all of the parameters on the stack.
- nsh_console calls vfprintf() using bad values from the stack.
- vfprintf crashes and never returns.
Looks like a compiler bug to me.
# int cmd_echo(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
#
# All input parameters are in registers
#
# R1=00802DA0 # vtbl
# R2=00000002 # argc
# R3=00802D15 # argv
# # argv[0]=00802DD7
# # argv[1]=00802DDC
# # 00802DD7="echo\0abc\0"
# SP=00802CDD
0001024C 05F0 PUSHMHI <R8-R11> # SP=00802CCD
0001024E 4418 LD R8,R1 # R8=00802DA0 vtbl
00010250 442A LD R10,R2 # R10=00000002 argc
00010252 443B LD R11,R3 # R11=00802D15 argv
00010254 3901 LD R9,#%1 # R9=00000001 arg index
00010256 C00C JP %10270
00010270 A5A9 CP R9,R10 # Bottom of loop
00010272 E1F2 JP lt,%10258
00010258 48840010 LD R4,%10(R8) # R4=00011156 adddress of output() method
0001025C 4490 LD R0,R9 # R0=00000001 Index of argv[1]
0001025E BC20 SLL R0,#%2 # R0=00000004 Offset to argv[1]
00010260 A0B0 ADD R0,R11 # R0=00802D19 Address of argv[1]
00010262 4481 LD R1,R8 # R1=00802DA0 vtbl address
00010264 452200008ADB LD R2,#%8ADB # R2=00008ADB = "%s "
0001026A 1203 LD R3,(R0) # R3=00802DDC Value of argv[1]
0001026C F214 CALL (R4) # Call vtbl->output(vtbl, "%s ", argv[i]);
# vtbl->output is nsh_consoleoutput
# static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl, const char *fmt, ...)
#
# All parameters are in registers:
#
# R1=00802DA0 vtbl address
# R2=00008ADB "%s "
# R3=00802DDC Value of argv[1]
# First is a check if the output file is open
#
# if (nsh_openifnotopen(pstate) != 0)
# {
# return ERROR;
# }
00011156 0800 LINK #%0 # SP=00802CC9, R14=00802CC9
00011158 5C81 LD R1,%8(FP) # R1=0000017F Should be value file FILE * for output
0001115A DF96 CALL %11088 # Call nsh_openifnotopen(), returns R0=00000000
0001115C 9000 CP R0,#%0
0001115E E602 JP z,%11164 # Skip over error return
00011160 30FF LD R0,#-%1
00011162 C007 JP %11172
# Then the failing call to vfprintf:
#
# va_start(ap, fmt);
# ret = vfprintf(pstate->cn_outstream, fmt, ap);
# va_end(ap);
#
# return ret;
00011164 4D03 LEA R3,%10(FP) # R3=00802CD5 ap=GARBAGE
00011166 5C80 LD R0,%8(FP) # R0=0000017F Should be value of pstate
00011168 48010033 LD R1,%33(R0) # R1=01000000 pstate->cn_outstream. Looks suspicious
0001116C 5CC2 LD R2,%C(FP) # R2=00802DA0
0001116E F10003FB CALL %11968 # Call vfprintf(01000000, 00802DA0, 00802CD5)
# All arguments are bad
# Does not survive call to vfprintf
ostest
------
This builds the examples/ostest application for execution from FLASH.
See the README.txt file in the ostest sub-directory for information
about using ZDS-II. See also apps/examples/README.txt for information
about ostest.
NOTES:
1. This configuration uses the mconf-based configuration tool. To
change this configuration using that tool, you should:
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
and misc/tools/
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
2. By default, this configuration assumes that you are using the
Cygwin environment on Windows. An option is to use the native
CMD.exe window build as described in the top-level README.txt
file. To set up that configuration:
-CONFIG_WINDOWS_CYGWIN=y
+CONFIG_WINDOWS_NATIVE=y
And after configuring, make sure that CONFIG_APPS_DIR uses
the back slash character. For example:
CONFIG_APPS_DIR="..\apps"
NOTES:
a. If you need to change the toolchain path used in Make.defs, you
will need to use the short 8.3 filenames to avoid spaces. On my
PC, C:\PROGRA~1\ is is C:\Program Files\ and C:\PROGRA~2\ is
C:\Program Files (x86)\
b. You can't use setenv.sh in the native Windows environment. Try
scripts/setenv.bat instead.
c. At present, the native Windows build fails at the final link stages.
The failure is due to problems in arch/z16/src/nuttx.linkcmd that
is autogenerated by arch/z16/src/Makefile. The basic problem
is the spurious spaces and and carrirage returns are generated at
the end of the lines after a line continuation (\ ^M). If these
trailing bad characters are manually eliminated, then the build
will succeed on the next try.
pashello
--------
Configures to use examples/pashello for execution from FLASH
See examples/README.txt for information about pashello.
NOTES:
1. This configuration uses the mconf-based configuration tool. To
change this configuration using that tool, you should:
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
and misc/tools/
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
2. The last time I tried building this configuration, there were
a few undefined symbols from the PCODE logic. It might require
a little TLC to get this all working again.
3. The native windows build has not been tried with this configuration
but should, in principle, work (see notes for the ostest configuration
above).
Check out any README.txt files in these <sub-directory>s.

129
configs/16z/include/board.h Normal file
View File

@ -0,0 +1,129 @@
/****************************************************************************
* board/board.h
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#ifndef __ARCH_BOARD_BOARD_H
#define __ARCH_BOARD_BOARD_H
/****************************************************************************
* Included Files
****************************************************************************/
/****************************************************************************
* Definitions
****************************************************************************/
/* LEDs
*
* The 16z board has 7 LEDs, five of which are controllable via software:
*
* ----- ------ ------ ------------------------------------
* LED Color Signal Description
* ----- ------ ------ ------------------------------------
* LED1 Red 3V3 Indicates the presence of +3.3V
* LED2 Red 5V Indicates the presence of +5V
* LED3 Blue ~RF Controlled via PH2. Notes: 1, 2
* LED4 Green ~SXM Controlled via PH3. Notes: 1, 3
* LED5 Green ~SD1 Controlled via PJ0. Notes: 1, 4
* LED6 Yellow ~SD2 Controlled via PJ4. Notes: 1, 5
* LED7 Yellow ~SD0 Controlled via PJ7. Notes: 1, 6
* ----- ------ ------ ------------------------------------
*
* Note 1: Pulled high so a low output illuminates the LED.
* Note 2: PH2/~RF is also used by the RF transceiver, X2. That part is not
* populated on my board.
* Note 3: ~SXM is the chip select for the serial memory, U4. That part is
* not populated on my board.
* Note 4: ~SD1 is the chip select for the SD card 1, X11.
* Note 5: ~SD2 is the chip select for the SD card 2, X10.
* Note 6: ~SD0 is the chip select for the microSD 0, X12.
*
* In conclusion: None of the LEDs are available to indicate software status
* without potentially sacrificing board functionality. If the RF transceiver
* is not installed (CONFIG_16Z_RFTRANSCEIVER=n) and if LED support is
* requested (CONFIG_ARCH_LEDS), then LED3 will be used to indicate status: A
* solid color means that the board has boot successfully; flashing at a rate
* of approximately 2Hz indicates a software failure.
*/
#define __LED3_BIT (1 << 0)
#define __LED4_BIT (1 << 1)
#undef HAVE_16Z_LED3
#undef HAVE_16Z_LED4
#if !defined(CONFIG_16Z_RFTRANSCEIVER)
# define __LEDPANIC __LED3_BIT
# define HAVE_16Z_LED3
#elif !defined(CONFIG_16Z_SERIAL_MEMORY)
# define __LEDPANIC __LED4_BIT
# define HAVE_16Z_LED4
#else
# define __LEDPANIC (0)
#endif
#if !defined(CONFIG_16Z_SERIAL_MEMORY) && !defined(HAVE_16Z_LED4)
# define __LEDSTARTED __LED4_BIT
# define HAVE_16Z_LED4
#else
# define __LEDSTARTED __LEDPANIC
#endif
/* LED3 LED4 */
#define LED_STARTED 0 /* OFF OFF */
#define LED_HEAPALLOCATE 0 /* N/C N/C */
#define LED_IRQSENABLED 0 /* N/C N/C */
#define LED_STACKCREATED __LEDSTARTED /* N/C ON */
#define LED_INIRQ 0 /* N/C N/C */
#define LED_SIGNAL 0 /* N/C N/C */
#define LED_ASSERTION 0 /* N/C N/C */
#define LED_PANIC __LEDPANIC /* ON N/C */
/****************************************************************************
* 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 /* __ARCH_BOARD_BOARD_H */

5
configs/16z/nsh/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
nsh.hex
nsh.map
nsh.lod
nsh.wsp

264
configs/16z/nsh/Make.defs Normal file
View File

@ -0,0 +1,264 @@
############################################################################
# configs/16z/nsh/Make.defs
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
include $(TOPDIR)/.config
include $(TOPDIR)/tools/Config.mk
# These are the 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:
#
# C:\PROGRA~1\ = C:\Profram Files\
# C:\PROGRA~2\ = C:\Program Files (x86)\
#
# Your PC may be configured differently.
ZDSVERSION = 5.0.1
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(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 = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(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_DEBUG_SYMBOLS),y)
ARCHASMOPTIMIZATION = -debug
else
ARCHASMOPTIMIZATION = -nodebug
endif
ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase
ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
ARCHASMWARNINGS = -warn
ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=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 += -NOregvar -reduceopt
else
ARCHOPTIMIZATION += -regvar
endif
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
ARCHPICFLAGS =
ARCHWARNINGS = -warn
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES -define:_Z16F_SERIES
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
# Librarian definitions
ARFLAGS = -quiet -warn
# Linker definitions
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)16z$(DELIM)nsh$(DELIM)nsh.linkcmd
# Tool names/pathes
CROSSDEV =
CC = zneocc.exe
CPP = gcc -E
LD = zneolink.exe
AS = zneoasm.exe
AR = zneolib.exe
# File extensions
ASMEXT = .asm
OBJEXT = .obj
LIBEXT = .lib
EXEEXT = .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) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
endef
define ASSEMBLE
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
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 -g -pipe
HOSTLDFLAGS =
HOSTEXEEXT = .exe
# Windows-native host tools
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
else
# Linux/Cygwin host tool definitions
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -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

View File

@ -0,0 +1,49 @@
README.txt
==========
Contents
--------
o NSH Project
o Loading and Executing Code
o Console Output
o STATUS
NSH Project
-----------
nsh.zfpproj is a simple ZDS II - ZNEO 5.0.1 project that will allow you
to use the ZDS-II debugger. Before using, copy the following files from
the toplevel directory:
nuttx.hex, nuttx.map, nuttx.lod
to this directory as:
nsh.hex, nsh.map, nsh.lod
Loading and Executing Code
--------------------------
1. Copy the files to this directory as described above
2. Connect the ZiLOG XTools USB debugger.
3. Install the USB driver from the ZDS-II device_drivers directory
4. Start ZDS-II and load the nsh.zfpproj project
5. In the debug tab, connect to the debugger
6. In the debug tab, load code, reset, and go
Console Output
--------------
Interaction with NSH is via the serial console at 57600 8N1 baud.
STATUS
------
1. This configuration does not run correctly. There is a problem with the
serial driver. When started, some garbled characters appear on the
console. I suspect (a) the UART is not being configured correctly, and
(2) UART interrupts are not be set up correctly.
2. I bet that this code, like ostest, will not run if started by a hardware
reset. It may only run when started via the debugger.

682
configs/16z/nsh/defconfig Normal file
View File

@ -0,0 +1,682 @@
#
# Automatically generated file; DO NOT EDIT.
# Nuttx/ Configuration
#
CONFIG_NUTTX_NEWCONFIG=y
#
# Build Setup
#
# CONFIG_EXPERIMENTAL is not set
# CONFIG_HOST_LINUX is not set
# CONFIG_HOST_OSX is not set
CONFIG_HOST_WINDOWS=y
# CONFIG_HOST_OTHER is not set
# CONFIG_WINDOWS_NATIVE is not set
CONFIG_WINDOWS_CYGWIN=y
# CONFIG_WINDOWS_MSYS is not set
# CONFIG_WINDOWS_OTHER is not set
#
# Build Configuration
#
# CONFIG_APPS_DIR="../apps"
# CONFIG_BUILD_2PASS is not set
#
# Binary Output Formats
#
# CONFIG_RRLOAD_BINARY is not set
# CONFIG_INTELHEX_BINARY is not set
# CONFIG_MOTOROLA_SREC is not set
# CONFIG_RAW_BINARY is not set
#
# Customize Header Files
#
# CONFIG_ARCH_STDBOOL_H is not set
# CONFIG_ARCH_MATH_H is not set
# CONFIG_ARCH_FLOAT_H is not set
# CONFIG_ARCH_STDARG_H is not set
#
# Debug Options
#
CONFIG_DEBUG=y
# CONFIG_ARCH_HAVE_STACKCHECK is not set
# CONFIG_ARCH_HAVE_HEAPCHECK is not set
# CONFIG_DEBUG_VERBOSE is not set
#
# Subsystem Debug Options
#
# CONFIG_DEBUG_MM is not set
# CONFIG_DEBUG_SCHED is not set
# CONFIG_DEBUG_FS is not set
# CONFIG_DEBUG_LIB is not set
# CONFIG_DEBUG_BINFMT is not set
# CONFIG_DEBUG_GRAPHICS is not set
# CONFIG_DEBUG_IRQ is not set
#
# Driver Debug Options
#
# CONFIG_DEBUG_LEDS is not set
# CONFIG_DEBUG_ANALOG is not set
# CONFIG_DEBUG_GPIO is not set
# CONFIG_DEBUG_AUDIO is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_DEBUG_NOOPT is not set
#
# System Type
#
# CONFIG_ARCH_8051 is not set
# CONFIG_ARCH_ARM is not set
# CONFIG_ARCH_AVR is not set
# CONFIG_ARCH_HC is not set
# CONFIG_ARCH_MIPS is not set
# CONFIG_ARCH_RGMP is not set
# CONFIG_ARCH_SH is not set
# CONFIG_ARCH_SIM is not set
# CONFIG_ARCH_X86 is not set
CONFIG_ARCH_Z16=y
# CONFIG_ARCH_Z80 is not set
CONFIG_ARCH="z16"
CONFIG_ARCH_CHIP="z16f"
#
# Z16 Configuration Options
#
# CONFIG_ARCH_CHIP_Z16F2810 is not set
CONFIG_ARCH_CHIP_Z16F2811=y
# CONFIG_ARCH_CHIP_Z16F3211 is not set
# CONFIG_ARCH_CHIP_Z16F6411 is not set
CONFIG_ARCH_CHIP_Z16F=y
#
# Common Configuration Options
#
#
# Z16F Configuration Options
#
CONFIG_Z16F_UART0=y
# CONFIG_Z16F_UART1 is not set
#
# Architecture Options
#
# CONFIG_ARCH_NOINTC is not set
# CONFIG_ARCH_VECNOTIRQ is not set
# CONFIG_ARCH_DMA is not set
CONFIG_ARCH_HAVE_IRQPRIO=y
# CONFIG_CUSTOM_STACK is not set
# CONFIG_ADDRENV is not set
# CONFIG_ARCH_HAVE_VFORK is not set
CONFIG_ARCH_IRQPRIO=y
# CONFIG_ARCH_STACKDUMP is not set
CONFIG_ENDIAN_BIG=y
# CONFIG_ARCH_HAVE_RAMFUNCS is not set
# CONFIG_ARCH_HAVE_RAMVECTORS is not set
#
# Board Settings
#
CONFIG_BOARD_LOOPSPERMSEC=1250
# CONFIG_ARCH_CALIBRATION is not set
#
# Interrupt options
#
# CONFIG_ARCH_HAVE_INTERRUPTSTACK is not set
# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set
#
# Boot options
#
# CONFIG_BOOT_RUNFROMEXTSRAM is not set
CONFIG_BOOT_RUNFROMFLASH=y
# CONFIG_BOOT_RUNFROMISRAM is not set
# CONFIG_BOOT_RUNFROMSDRAM is not set
# CONFIG_BOOT_COPYTORAM is not set
#
# Boot Memory Configuration
#
CONFIG_RAM_START=0x0
CONFIG_RAM_SIZE=65536
#
# Board Selection
#
CONFIG_ARCH_BOARD_16Z=y
# CONFIG_ARCH_BOARD_Z16F2800100ZCOG is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="16z"
#
# Common Board Options
#
CONFIG_ARCH_HAVE_LEDS=y
CONFIG_ARCH_LEDS=y
CONFIG_NSH_MMCSDMINOR=0
#
# Board-Specific Options
#
#
# RTOS Features
#
# CONFIG_BOARD_INITIALIZE is not set
CONFIG_MSEC_PER_TICK=10
# CONFIG_SYSTEM_TIME64 is not set
CONFIG_RR_INTERVAL=200
# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
# CONFIG_SCHED_HAVE_PARENT is not set
# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2014
CONFIG_START_MONTH=1
CONFIG_START_DAY=1
CONFIG_DEV_CONSOLE=y
# CONFIG_MUTEX_TYPES is not set
# CONFIG_PRIORITY_INHERITANCE is not set
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
CONFIG_SCHED_WAITPID=y
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_DISABLE_OS_API=y
# CONFIG_DISABLE_CLOCK is not set
# CONFIG_DISABLE_POSIX_TIMERS is not set
# CONFIG_DISABLE_PTHREAD is not set
# CONFIG_DISABLE_SIGNALS is not set
# CONFIG_DISABLE_MQUEUE is not set
# CONFIG_DISABLE_ENVIRON is not set
#
# Signal Numbers
#
CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGCONDTIMEDOUT=16
#
# Sizes of configurable things (0 disables)
#
CONFIG_MAX_TASKS=16
CONFIG_MAX_TASK_ARGS=4
CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
#
# Stack and heap information
#
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096
#
# Device Drivers
#
CONFIG_DISABLE_POLL=y
CONFIG_DEV_NULL=y
# CONFIG_DEV_ZERO is not set
# CONFIG_LOOP is not set
# CONFIG_RAMDISK is not set
# CONFIG_CAN is not set
# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set
# CONFIG_PWM is not set
# CONFIG_ARCH_HAVE_I2CRESET is not set
# CONFIG_I2C is not set
# CONFIG_SPI is not set
# CONFIG_I2S is not set
# CONFIG_RTC is not set
# CONFIG_WATCHDOG is not set
# CONFIG_ANALOG is not set
# CONFIG_AUDIO_DEVICES is not set
# CONFIG_VIDEO_DEVICES is not set
# CONFIG_BCH is not set
# CONFIG_INPUT is not set
# CONFIG_LCD is not set
# CONFIG_MMCSD is not set
# CONFIG_MTD is not set
# CONFIG_PIPES is not set
# CONFIG_PM is not set
# CONFIG_POWER is not set
# CONFIG_SENSORS is not set
# CONFIG_SERCOMM_CONSOLE is not set
CONFIG_SERIAL=y
# CONFIG_DEV_LOWCONSOLE is not set
# CONFIG_16550_UART is not set
CONFIG_ARCH_HAVE_UART0=y
#
# USART Configuration
#
CONFIG_MCU_SERIAL=y
CONFIG_STANDARD_SERIAL=y
# CONFIG_SERIAL_TIOCSERGSTRUCT is not set
CONFIG_UART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
# UART0 Configuration
#
CONFIG_UART0_RXBUFSIZE=256
CONFIG_UART0_TXBUFSIZE=256
CONFIG_UART0_BAUD=57600
CONFIG_UART0_BITS=8
CONFIG_UART0_PARITY=0
CONFIG_UART0_2STOP=0
# CONFIG_UART0_IFLOWCONTROL is not set
# CONFIG_UART0_OFLOWCONTROL is not set
# CONFIG_SERIAL_IFLOWCONTROL is not set
# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
#
# System Logging Device Options
#
#
# System Logging
#
# CONFIG_RAMLOG is not set
#
# Networking Support
#
# CONFIG_ARCH_HAVE_NET is not set
# CONFIG_ARCH_HAVE_PHY is not set
# CONFIG_NET is not set
#
# File Systems
#
#
# File system configuration
#
# CONFIG_DISABLE_MOUNTPOINT is not set
# CONFIG_FS_READABLE is not set
# CONFIG_FS_WRITABLE is not set
# CONFIG_FS_RAMMAP is not set
# CONFIG_FS_FAT is not set
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_SMARTFS is not set
# CONFIG_FS_BINFS is not set
# CONFIG_FS_PROCFS is not set
#
# System Logging
#
# CONFIG_SYSLOG_ENABLE is not set
# CONFIG_SYSLOG is not set
#
# Graphics Support
#
# CONFIG_NX is not set
#
# Memory Management
#
# CONFIG_MM_MULTIHEAP is not set
# CONFIG_MM_SMALL is not set
CONFIG_MM_REGIONS=1
CONFIG_ARCH_HAVE_HEAP2=y
CONFIG_HEAP2_BASE=0x00000000
CONFIG_HEAP2_SIZE=0
# CONFIG_GRAN is not set
#
# Audio Support
#
# CONFIG_AUDIO is not set
#
# Binary Formats
#
# CONFIG_BINFMT_DISABLE is not set
# CONFIG_BINFMT_EXEPATH is not set
# CONFIG_NXFLAT is not set
# CONFIG_ELF is not set
CONFIG_BUILTIN=y
# CONFIG_PIC is not set
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
#
# Library Routines
#
#
# Standard C Library Options
#
CONFIG_STDIO_BUFFER_SIZE=64
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
# CONFIG_LIBM is not set
CONFIG_NOPRINTF_FIELDWIDTH=y
# CONFIG_LIBC_FLOATINGPOINT is not set
CONFIG_LIB_RAND_ORDER=1
# CONFIG_EOL_IS_CR is not set
# CONFIG_EOL_IS_LF is not set
# CONFIG_EOL_IS_BOTH_CRLF is not set
CONFIG_EOL_IS_EITHER_CRLF=y
# CONFIG_LIBC_EXECFUNCS is not set
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
# CONFIG_LIBC_STRERROR is not set
# CONFIG_LIBC_PERROR_STDOUT is not set
CONFIG_ARCH_LOWPUTC=y
CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_ARCH_ROMGETC is not set
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
#
# Non-standard Library Support
#
# CONFIG_SCHED_WORKQUEUE is not set
# CONFIG_LIB_KBDCODEC is not set
# CONFIG_LIB_SLCDCODEC is not set
#
# Basic CXX Support
#
# CONFIG_C99_BOOL8 is not set
# CONFIG_HAVE_CXX is not set
#
# Application Configuration
#
#
# Built-In Applications
#
CONFIG_BUILTIN_PROXY_STACKSIZE=1024
#
# Examples
#
# CONFIG_EXAMPLES_BUTTONS is not set
# CONFIG_EXAMPLES_CAN is not set
# CONFIG_EXAMPLES_CONFIGDATA is not set
# CONFIG_EXAMPLES_DHCPD is not set
# CONFIG_EXAMPLES_ELF is not set
# CONFIG_EXAMPLES_FTPC is not set
# CONFIG_EXAMPLES_FTPD is not set
# CONFIG_EXAMPLES_HELLO is not set
# CONFIG_EXAMPLES_HELLOXX is not set
# CONFIG_EXAMPLES_JSON is not set
# CONFIG_EXAMPLES_HIDKBD is not set
# CONFIG_EXAMPLES_KEYPADTEST is not set
# CONFIG_EXAMPLES_IGMP is not set
# CONFIG_EXAMPLES_LCDRW is not set
# CONFIG_EXAMPLES_MM is not set
# CONFIG_EXAMPLES_MODBUS is not set
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_NRF24L01TERM is not set
CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
# CONFIG_EXAMPLES_NXFFS is not set
# CONFIG_EXAMPLES_NXFLAT is not set
# CONFIG_EXAMPLES_NXHELLO is not set
# CONFIG_EXAMPLES_NXIMAGE is not set
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
# CONFIG_EXAMPLES_OSTEST is not set
# CONFIG_EXAMPLES_PASHELLO is not set
# CONFIG_EXAMPLES_PIPE is not set
# CONFIG_EXAMPLES_POSIXSPAWN is not set
# CONFIG_EXAMPLES_QENCODER is not set
# CONFIG_EXAMPLES_RGMP is not set
# CONFIG_EXAMPLES_ROMFS is not set
# CONFIG_EXAMPLES_SENDMAIL is not set
# CONFIG_EXAMPLES_SERLOOP is not set
# CONFIG_EXAMPLES_SLCD is not set
# CONFIG_EXAMPLES_SMART_TEST is not set
# CONFIG_EXAMPLES_SMART is not set
# CONFIG_EXAMPLES_TCPECHO is not set
# CONFIG_EXAMPLES_TELNETD is not set
# CONFIG_EXAMPLES_THTTPD is not set
# CONFIG_EXAMPLES_TIFF is not set
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
# CONFIG_EXAMPLES_UDP is not set
# CONFIG_EXAMPLES_UIP is not set
# CONFIG_EXAMPLES_USBSERIAL is not set
# CONFIG_EXAMPLES_USBTERM is not set
# CONFIG_EXAMPLES_WATCHDOG is not set
#
# Graphics Support
#
# CONFIG_TIFF is not set
#
# Interpreters
#
# CONFIG_INTERPRETERS_FICL is not set
# CONFIG_INTERPRETERS_PCODE is not set
#
# Network Utilities
#
#
# Networking Utilities
#
# CONFIG_NETUTILS_CODECS is not set
# CONFIG_NETUTILS_DHCPD is not set
# CONFIG_NETUTILS_FTPC is not set
# CONFIG_NETUTILS_FTPD is not set
# CONFIG_NETUTILS_JSON is not set
# CONFIG_NETUTILS_SMTP is not set
# CONFIG_NETUTILS_TFTPC is not set
# CONFIG_NETUTILS_THTTPD is not set
# CONFIG_NETUTILS_UIPLIB is not set
# CONFIG_NETUTILS_WEBCLIENT is not set
#
# FreeModBus
#
# CONFIG_MODBUS is not set
#
# NSH Library
#
CONFIG_NSH_LIBRARY=y
CONFIG_NSH_BUILTIN_APPS=y
#
# Disable Individual commands
#
# CONFIG_NSH_DISABLE_ADDROUTE is not set
# CONFIG_NSH_DISABLE_CAT is not set
# CONFIG_NSH_DISABLE_CD is not set
# CONFIG_NSH_DISABLE_CP is not set
# CONFIG_NSH_DISABLE_CMP is not set
# CONFIG_NSH_DISABLE_DD is not set
# CONFIG_NSH_DISABLE_DELROUTE is not set
# CONFIG_NSH_DISABLE_ECHO is not set
# CONFIG_NSH_DISABLE_EXEC is not set
# CONFIG_NSH_DISABLE_EXIT is not set
# CONFIG_NSH_DISABLE_FREE is not set
# CONFIG_NSH_DISABLE_GET is not set
# CONFIG_NSH_DISABLE_HELP is not set
# CONFIG_NSH_DISABLE_HEXDUMP is not set
# CONFIG_NSH_DISABLE_IFCONFIG is not set
# CONFIG_NSH_DISABLE_KILL is not set
# CONFIG_NSH_DISABLE_LOSETUP is not set
# CONFIG_NSH_DISABLE_LS is not set
# CONFIG_NSH_DISABLE_MB is not set
# CONFIG_NSH_DISABLE_MKDIR is not set
# CONFIG_NSH_DISABLE_MKFATFS is not set
# CONFIG_NSH_DISABLE_MKFIFO is not set
# CONFIG_NSH_DISABLE_MKRD is not set
# CONFIG_NSH_DISABLE_MH is not set
# CONFIG_NSH_DISABLE_MOUNT is not set
# CONFIG_NSH_DISABLE_MW is not set
# CONFIG_NSH_DISABLE_NSFMOUNT is not set
# CONFIG_NSH_DISABLE_PS is not set
# CONFIG_NSH_DISABLE_PING is not set
# CONFIG_NSH_DISABLE_PUT is not set
# CONFIG_NSH_DISABLE_PWD is not set
# CONFIG_NSH_DISABLE_RM is not set
# CONFIG_NSH_DISABLE_RMDIR is not set
# CONFIG_NSH_DISABLE_SET is not set
# CONFIG_NSH_DISABLE_SH is not set
# CONFIG_NSH_DISABLE_SLEEP is not set
# CONFIG_NSH_DISABLE_TEST is not set
# CONFIG_NSH_DISABLE_UMOUNT is not set
# CONFIG_NSH_DISABLE_UNSET is not set
# CONFIG_NSH_DISABLE_USLEEP is not set
# CONFIG_NSH_DISABLE_WGET is not set
# CONFIG_NSH_DISABLE_XD is not set
#
# Configure Command Options
#
# CONFIG_NSH_CMDOPT_DF_H is not set
CONFIG_NSH_CODECS_BUFSIZE=128
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=80
# CONFIG_NSH_DISABLE_SEMICOLON is not set
# CONFIG_NSH_CMDPARMS is not set
CONFIG_NSH_MAXARGUMENTS=6
# CONFIG_NSH_ARGCAT is not set
CONFIG_NSH_NESTDEPTH=3
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLE_ITEF is not set
# CONFIG_NSH_DISABLE_LOOPS is not set
# CONFIG_NSH_DISABLEBG is not set
CONFIG_NSH_CONSOLE=y
#
# USB Trace Support
#
# CONFIG_NSH_CONDEV is not set
# CONFIG_NSH_ARCHINIT is not set
#
# NxWidgets/NxWM
#
#
# Platform-specific Support
#
# CONFIG_PLATFORM_CONFIGDATA is not set
#
# System Libraries and NSH Add-Ons
#
#
# USB CDC/ACM Device Commands
#
#
# USB Composite Device Commands
#
#
# Custom Free Memory Command
#
# CONFIG_SYSTEM_FREE is not set
#
# I2C tool
#
#
# INI File Parser
#
# CONFIG_SYSTEM_INIFILE is not set
#
# FLASH Program Installation
#
# CONFIG_SYSTEM_INSTALL is not set
#
# FLASH Erase-all Command
#
#
# NxPlayer media player library / command Line
#
# CONFIG_SYSTEM_NXPLAYER is not set
#
# RAM test
#
# CONFIG_SYSTEM_RAMTEST is not set
#
# readline()
#
CONFIG_SYSTEM_READLINE=y
CONFIG_READLINE_ECHO=y
#
# Power Off
#
# CONFIG_SYSTEM_POWEROFF is not set
#
# RAMTRON
#
# CONFIG_SYSTEM_RAMTRON is not set
#
# SD Card
#
# CONFIG_SYSTEM_SDCARD is not set
#
# Sysinfo
#
# CONFIG_SYSTEM_SYSINFO is not set
#
# USB Monitor
#
#
# VI Work-Alike Editor
#
# CONFIG_SYSTEM_VI is not set
#
# Stack Monitor
#
#
# USB Mass Storage Device Commands
#
#
# Zmodem Commands
#
# CONFIG_SYSTEM_ZMODEM is not set

92
configs/16z/nsh/nsh.linkcmd Executable file
View File

@ -0,0 +1,92 @@
/****************************************************************************/
/* configs/16z/nsh/nsh.linkcmd */
/* */
/* Copyright (C) 2014 Gregory Nutt. All rights reserved. */
/* Author: Gregory Nutt <gnutt@nuttx.org> */
/* */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions */
/* are met: */
/* */
/* 1. Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* 2. Redistributions in binary form must reproduce the above copyright */
/* notice, this list of conditions and the following disclaimer in */
/* the documentation and/or other materials provided with the */
/* distribution. */
/* 3. Neither the name NuttX nor the names of its contributors may be */
/* used to endorse or promote products derived from this software */
/* without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */
/* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */
/* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS */
/* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED */
/* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */
/* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */
/* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
/* */
/****************************************************************************/
-FORMAT=OMF695,INTEL32
-map -maxhexlen=64 -quiet -sort NAME=ascending -unresolved=fatal
-warnoverlap -NOxref -warn -debug -NOigcase
RANGE ROM $000000 : $007FFF
RANGE RAM $FFB000 : $FFBFFF
RANGE IODATA $FFC000 : $FFFFFF
RANGE EROM $008000 : $01FFFF
RANGE ERAM $800000 : $FFFFFF
CHANGE NEAR_TEXT=NEAR_DATA
CHANGE FAR_TEXT=FAR_DATA
ORDER FAR_BSS, FAR_DATA
ORDER NEAR_BSS, NEAR_DATA
COPY NEAR_DATA EROM
COPY FAR_DATA EROM
define _0_exit = 0
define _low_near_romdata = copy base of NEAR_DATA
define _low_neardata = base of NEAR_DATA
define _len_neardata = length of NEAR_DATA
define _low_far_romdata = copy base of FAR_DATA
define _low_fardata = base of FAR_DATA
define _len_fardata = length of FAR_DATA
define _low_nearbss = base of NEAR_BSS
define _len_nearbss = length of NEAR_BSS
define _low_farbss = base of FAR_BSS
define _len_farbss = length of FAR_BSS
define _near_heaptop = highaddr of RAM
define _far_heaptop = highaddr of ERAM
define _far_stack = highaddr of ERAM
define _near_stack = highaddr of RAM
define _near_heapbot = top of RAM
define _far_heapbot = top of ERAM
define _SYS_CLK_SRC = 2
define _SYS_CLK_FREQ = 20000000
define __EXTCT_INIT_PARAM = $40
define __EXTCS0_INIT_PARAM = $9001
define __EXTCS1_INIT_PARAM = $9001
define __EXTCS2_INIT_PARAM = $9011
define __EXTCS3_INIT_PARAM = $9015
define __EXTCS4_INIT_PARAM = $9015
define __EXTCS5_INIT_PARAM = $9015
define __PFAF_INIT_PARAM = $ff
define __PGAF_INIT_PARAM = $ff
define __PDAF_INIT_PARAM = $ff00
define __PAAF_INIT_PARAM = $0000
define __PCAF_INIT_PARAM = $0000
define __PHAF_INIT_PARAM = $0300
define __PKAF_INIT_PARAM = $0f
/* arch/z16/src/Makefile will append target, object and library paths below */

238
configs/16z/nsh/nsh.zfpproj Normal file
View File

@ -0,0 +1,238 @@
<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="d:5.0.0:11071102" ZDSII="ZDS - ZNEO 5.0.1 (Build 11071201)">
<cpu>Z16F2811AL</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">_Z16F2811AL=1,_Z16F_SERIES=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>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="chartype" type="string" change-action="compile">U</option>
<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</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="model" type="string" change-action="compile">S</option>
<option name="modsect" 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="regvar" type="boolean" change-action="compile">true</option>
<option name="regvarcache" type="boolean" change-action="none">false</option>
<option name="reduceopt" type="boolean" change-action="compile">false</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">Z16F2800100ZCOG</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">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">true</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">000000000000000000000001</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>
<option name="autoselect" type="boolean" change-action="none">true</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">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="eram" type="string" change-action="build">0-0</option>
<option name="erom" type="string" change-action="build">0-0</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
<option name="iodata" type="string" change-action="build">0-0</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">.\nsh</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
</tools>
</configuration>
<configuration name="Release" >
<tools>
<tool name="Assembler">
<options>
<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=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>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="chartype" type="string" change-action="compile">U</option>
<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</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="model" type="string" change-action="compile">S</option>
<option name="modsect" 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="regvar" type="boolean" change-action="compile">true</option>
<option name="regvarcache" type="boolean" change-action="none">false</option>
<option name="reduceopt" type="boolean" change-action="compile">false</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"></option>
<option name="debugtool" type="string" change-action="none">ZPAKII</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">1</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>
<option name="autoselect" type="boolean" change-action="none">true</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">true</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="eram" type="string" change-action="build">0-0</option>
<option name="erom" type="string" change-action="build">0-0</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
<option name="iodata" type="string" change-action="build">0-0</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">.\nsh</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
</tools>
</configuration>
</configurations>
<!-- watch information -->
<watch-elements>
<watch-element expression="0x801d1a" />
</watch-elements>
<!-- breakpoint information -->
<breakpoints>
</breakpoints>
</project>

64
configs/16z/nsh/setenv.sh Executable file
View File

@ -0,0 +1,64 @@
#!/bin/bash
# configs/16z/nsh/setenv.sh
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Check how we were executed
#
if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
WD=`pwd`
if [ ! -x "setenv.sh" ]; then
echo "This script must be executed from the top-level NuttX build directory"
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
#
# This is the Cygwin path to location where the XDS-II tools were installed
#
TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_ZNEO_5.0.1/bin"
#
# Add the path to the toolchain to the PATH variable. NOTE that /bin and /usr/bin
# preceded the toolchain bin directory. This is because the ZDSII bin directory
# includes binaries like make.exe that will interfere with the normal build process
# if we do not give priority to the versions at /bin and /usr/bin.
#
export PATH="/bin:/usr/bin:${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"

5
configs/16z/ostest/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
ostest.hex
ostest.map
ostest.lod
ostest.wsp

View File

@ -0,0 +1,264 @@
############################################################################
# configs/16z/ostest/Make.defs
#
# Copyright (C) 2008, 2010, 2012-2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
include $(TOPDIR)/.config
include $(TOPDIR)/tools/Config.mk
# These are the 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:
#
# C:\PROGRA~1\ = C:\Profram Files\
# C:\PROGRA~2\ = C:\Program Files (x86)\
#
# Your PC may be configured differently.
ZDSVERSION = 5.0.1
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(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 = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(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_DEBUG_SYMBOLS),y)
ARCHASMOPTIMIZATION = -debug
else
ARCHASMOPTIMIZATION = -nodebug
endif
ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase
ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
ARCHASMWARNINGS = -warn
ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=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 += -NOregvar -reduceopt
else
ARCHOPTIMIZATION += -regvar
endif
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
ARCHPICFLAGS =
ARCHWARNINGS = -warn
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES -define:_Z16F_SERIES
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
# Librarian definitions
ARFLAGS = -quiet -warn
# Linker definitions
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)16z$(DELIM)ostest$(DELIM)ostest.linkcmd
# Tool names/pathes
CROSSDEV =
CC = zneocc.exe
CPP = gcc -E
LD = zneolink.exe
AS = zneoasm.exe
AR = zneolib.exe
# File extensions
ASMEXT = .asm
OBJEXT = .obj
LIBEXT = .lib
EXEEXT = .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) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
endef
define ASSEMBLE
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
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 -g -pipe
HOSTLDFLAGS =
HOSTEXEEXT = .exe
# Windows-native host tools
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
else
# Linux/Cygwin host tool definitions
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -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

View File

@ -0,0 +1,37 @@
README.txt
^^^^^^^^^^
OSTEST Project
--------------
ostest.zfpproj is a simple ZDS II - ZNEO 5.0.1 project that will allow you
to use the ZDS-II debugger. Before using, copy the following files from
the toplevel directory:
nuttx.hex, nuttx.map, nuttx.lod
to this directory as:
ostest.hex, ostest.map, ostest.lod
ostest.zdzbak is a project file for an older ZDS-II 4.0 version (There is no
difference in the files other than for some versioning information at the
top).
Loading and Executing Code
--------------------------
1. Copy the files to this directory as described above
2. Connect the ZiLOG XTools USB debugger.
3. Install the USB driver from the ZDS-II device_drivers directory
4. Start ZDS-II and load the ostest.zfpproj project
5. In the debug tab, connect to the debugger
6. In the debug tab, load code, reset, and go
Hmmm... it appears that the code does not run if started by a hardware reset.
It runs only when started via the debugger. What is up with that?
Console Output
--------------
OS test results will be provided on the serial console at 57600 8N1 baud.

View File

@ -0,0 +1,610 @@
#
# Automatically generated file; DO NOT EDIT.
# Nuttx/ Configuration
#
CONFIG_NUTTX_NEWCONFIG=y
#
# Build Setup
#
# CONFIG_EXPERIMENTAL is not set
# CONFIG_HOST_LINUX is not set
# CONFIG_HOST_OSX is not set
CONFIG_HOST_WINDOWS=y
# CONFIG_HOST_OTHER is not set
# CONFIG_WINDOWS_NATIVE is not set
CONFIG_WINDOWS_CYGWIN=y
# CONFIG_WINDOWS_MSYS is not set
# CONFIG_WINDOWS_OTHER is not set
#
# Build Configuration
#
# CONFIG_APPS_DIR="../apps"
# CONFIG_BUILD_2PASS is not set
#
# Binary Output Formats
#
# CONFIG_RRLOAD_BINARY is not set
# CONFIG_INTELHEX_BINARY is not set
# CONFIG_MOTOROLA_SREC is not set
# CONFIG_RAW_BINARY is not set
#
# Customize Header Files
#
# CONFIG_ARCH_STDBOOL_H is not set
# CONFIG_ARCH_MATH_H is not set
# CONFIG_ARCH_FLOAT_H is not set
# CONFIG_ARCH_STDARG_H is not set
#
# Debug Options
#
CONFIG_DEBUG=y
# CONFIG_ARCH_HAVE_STACKCHECK is not set
# CONFIG_ARCH_HAVE_HEAPCHECK is not set
# CONFIG_DEBUG_VERBOSE is not set
#
# Subsystem Debug Options
#
# CONFIG_DEBUG_MM is not set
# CONFIG_DEBUG_SCHED is not set
# CONFIG_DEBUG_FS is not set
# CONFIG_DEBUG_LIB is not set
# CONFIG_DEBUG_BINFMT is not set
# CONFIG_DEBUG_GRAPHICS is not set
# CONFIG_DEBUG_IRQ is not set
#
# Driver Debug Options
#
# CONFIG_DEBUG_LEDS is not set
# CONFIG_DEBUG_ANALOG is not set
# CONFIG_DEBUG_GPIO is not set
# CONFIG_DEBUG_AUDIO is not set
# CONFIG_DEBUG_SYMBOLS is not set
# CONFIG_DEBUG_NOOPT is not set
#
# System Type
#
# CONFIG_ARCH_8051 is not set
# CONFIG_ARCH_ARM is not set
# CONFIG_ARCH_AVR is not set
# CONFIG_ARCH_HC is not set
# CONFIG_ARCH_MIPS is not set
# CONFIG_ARCH_RGMP is not set
# CONFIG_ARCH_SH is not set
# CONFIG_ARCH_SIM is not set
# CONFIG_ARCH_X86 is not set
CONFIG_ARCH_Z16=y
# CONFIG_ARCH_Z80 is not set
CONFIG_ARCH="z16"
CONFIG_ARCH_CHIP="z16f"
#
# Z16 Configuration Options
#
# CONFIG_ARCH_CHIP_Z16F2810 is not set
CONFIG_ARCH_CHIP_Z16F2811=y
# CONFIG_ARCH_CHIP_Z16F3211 is not set
# CONFIG_ARCH_CHIP_Z16F6411 is not set
CONFIG_ARCH_CHIP_Z16F=y
#
# Common Configuration Options
#
#
# Z16F Configuration Options
#
CONFIG_Z16F_UART0=y
# CONFIG_Z16F_UART1 is not set
#
# Architecture Options
#
# CONFIG_ARCH_NOINTC is not set
# CONFIG_ARCH_VECNOTIRQ is not set
# CONFIG_ARCH_DMA is not set
CONFIG_ARCH_HAVE_IRQPRIO=y
# CONFIG_CUSTOM_STACK is not set
# CONFIG_ADDRENV is not set
# CONFIG_ARCH_HAVE_VFORK is not set
CONFIG_ARCH_IRQPRIO=y
# CONFIG_ARCH_STACKDUMP is not set
CONFIG_ENDIAN_BIG=y
# CONFIG_ARCH_HAVE_RAMFUNCS is not set
# CONFIG_ARCH_HAVE_RAMVECTORS is not set
#
# Board Settings
#
CONFIG_BOARD_LOOPSPERMSEC=1250
# CONFIG_ARCH_CALIBRATION is not set
#
# Interrupt options
#
# CONFIG_ARCH_HAVE_INTERRUPTSTACK is not set
# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set
#
# Boot options
#
# CONFIG_BOOT_RUNFROMEXTSRAM is not set
CONFIG_BOOT_RUNFROMFLASH=y
# CONFIG_BOOT_RUNFROMISRAM is not set
# CONFIG_BOOT_RUNFROMSDRAM is not set
# CONFIG_BOOT_COPYTORAM is not set
#
# Boot Memory Configuration
#
CONFIG_RAM_START=0x0
CONFIG_RAM_SIZE=65536
#
# Board Selection
#
CONFIG_ARCH_BOARD_16Z=y
# CONFIG_ARCH_BOARD_Z16F2800100ZCOG is not set
# CONFIG_ARCH_BOARD_CUSTOM is not set
CONFIG_ARCH_BOARD="16z"
#
# Common Board Options
#
CONFIG_ARCH_HAVE_LEDS=y
CONFIG_ARCH_LEDS=y
#
# Board-Specific Options
#
#
# RTOS Features
#
# CONFIG_BOARD_INITIALIZE is not set
CONFIG_MSEC_PER_TICK=10
# CONFIG_SYSTEM_TIME64 is not set
CONFIG_RR_INTERVAL=200
# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
# CONFIG_SCHED_HAVE_PARENT is not set
# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2012
CONFIG_START_MONTH=11
CONFIG_START_DAY=29
CONFIG_DEV_CONSOLE=y
# CONFIG_MUTEX_TYPES is not set
# CONFIG_PRIORITY_INHERITANCE is not set
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
# CONFIG_SCHED_WAITPID is not set
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
CONFIG_USER_ENTRYPOINT="ostest_main"
CONFIG_DISABLE_OS_API=y
# CONFIG_DISABLE_CLOCK is not set
# CONFIG_DISABLE_POSIX_TIMERS is not set
# CONFIG_DISABLE_PTHREAD is not set
# CONFIG_DISABLE_SIGNALS is not set
# CONFIG_DISABLE_MQUEUE is not set
# CONFIG_DISABLE_ENVIRON is not set
#
# Signal Numbers
#
CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGCONDTIMEDOUT=16
#
# Sizes of configurable things (0 disables)
#
CONFIG_MAX_TASKS=16
CONFIG_MAX_TASK_ARGS=4
CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
#
# Stack and heap information
#
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_USERMAIN_STACKSIZE=4096
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=4096
#
# Device Drivers
#
CONFIG_DISABLE_POLL=y
CONFIG_DEV_NULL=y
# CONFIG_DEV_ZERO is not set
# CONFIG_LOOP is not set
# CONFIG_RAMDISK is not set
# CONFIG_CAN is not set
# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set
# CONFIG_PWM is not set
# CONFIG_ARCH_HAVE_I2CRESET is not set
# CONFIG_I2C is not set
# CONFIG_SPI is not set
# CONFIG_I2S is not set
# CONFIG_RTC is not set
# CONFIG_WATCHDOG is not set
# CONFIG_ANALOG is not set
# CONFIG_AUDIO_DEVICES is not set
# CONFIG_VIDEO_DEVICES is not set
# CONFIG_BCH is not set
# CONFIG_INPUT is not set
# CONFIG_LCD is not set
# CONFIG_MMCSD is not set
# CONFIG_MTD is not set
# CONFIG_PIPES is not set
# CONFIG_PM is not set
# CONFIG_POWER is not set
# CONFIG_SENSORS is not set
# CONFIG_SERCOMM_CONSOLE is not set
CONFIG_SERIAL=y
CONFIG_DEV_LOWCONSOLE=y
# CONFIG_16550_UART is not set
CONFIG_ARCH_HAVE_UART0=y
#
# USART Configuration
#
CONFIG_MCU_SERIAL=y
# CONFIG_SERIAL_TIOCSERGSTRUCT is not set
CONFIG_UART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
# UART0 Configuration
#
CONFIG_UART0_RXBUFSIZE=256
CONFIG_UART0_TXBUFSIZE=256
CONFIG_UART0_BAUD=57600
CONFIG_UART0_BITS=8
CONFIG_UART0_PARITY=0
CONFIG_UART0_2STOP=0
# CONFIG_UART0_IFLOWCONTROL is not set
# CONFIG_UART0_OFLOWCONTROL is not set
# CONFIG_SERIAL_IFLOWCONTROL is not set
# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
#
# System Logging Device Options
#
#
# System Logging
#
# CONFIG_RAMLOG is not set
#
# Networking Support
#
# CONFIG_ARCH_HAVE_NET is not set
# CONFIG_ARCH_HAVE_PHY is not set
# CONFIG_NET is not set
#
# File Systems
#
#
# File system configuration
#
# CONFIG_DISABLE_MOUNTPOINT is not set
# CONFIG_FS_READABLE is not set
# CONFIG_FS_WRITABLE is not set
# CONFIG_FS_RAMMAP is not set
# CONFIG_FS_FAT is not set
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_SMARTFS is not set
# CONFIG_FS_PROCFS is not set
#
# System Logging
#
# CONFIG_SYSLOG_ENABLE is not set
# CONFIG_SYSLOG is not set
#
# Graphics Support
#
# CONFIG_NX is not set
#
# Memory Management
#
# CONFIG_MM_MULTIHEAP is not set
# CONFIG_MM_SMALL is not set
CONFIG_MM_REGIONS=1
CONFIG_ARCH_HAVE_HEAP2=y
CONFIG_HEAP2_BASE=0x00000000
CONFIG_HEAP2_SIZE=0
# CONFIG_GRAN is not set
#
# Audio Support
#
# CONFIG_AUDIO is not set
#
# Binary Formats
#
# CONFIG_BINFMT_DISABLE is not set
# CONFIG_BINFMT_EXEPATH is not set
# CONFIG_NXFLAT is not set
# CONFIG_ELF is not set
# CONFIG_BUILTIN is not set
# CONFIG_PIC is not set
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
#
# Library Routines
#
#
# Standard C Library Options
#
CONFIG_STDIO_BUFFER_SIZE=64
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
# CONFIG_LIBM is not set
CONFIG_NOPRINTF_FIELDWIDTH=y
# CONFIG_LIBC_FLOATINGPOINT is not set
CONFIG_LIB_RAND_ORDER=1
# CONFIG_EOL_IS_CR is not set
# CONFIG_EOL_IS_LF is not set
# CONFIG_EOL_IS_BOTH_CRLF is not set
CONFIG_EOL_IS_EITHER_CRLF=y
# CONFIG_LIBC_EXECFUNCS is not set
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
# CONFIG_LIBC_STRERROR is not set
# CONFIG_LIBC_PERROR_STDOUT is not set
CONFIG_ARCH_LOWPUTC=y
CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_ARCH_ROMGETC is not set
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
#
# Non-standard Library Support
#
# CONFIG_SCHED_WORKQUEUE is not set
# CONFIG_LIB_KBDCODEC is not set
# CONFIG_LIB_SLCDCODEC is not set
#
# Basic CXX Support
#
# CONFIG_C99_BOOL8 is not set
# CONFIG_HAVE_CXX is not set
#
# Application Configuration
#
#
# Built-In Applications
#
#
# Examples
#
# CONFIG_EXAMPLES_BUTTONS is not set
# CONFIG_EXAMPLES_CAN is not set
# CONFIG_EXAMPLES_CONFIGDATA is not set
# CONFIG_EXAMPLES_DHCPD is not set
# CONFIG_EXAMPLES_ELF is not set
# CONFIG_EXAMPLES_FTPC is not set
# CONFIG_EXAMPLES_FTPD is not set
# CONFIG_EXAMPLES_HELLO is not set
# CONFIG_EXAMPLES_HELLOXX is not set
# CONFIG_EXAMPLES_JSON is not set
# CONFIG_EXAMPLES_HIDKBD is not set
# CONFIG_EXAMPLES_KEYPADTEST is not set
# CONFIG_EXAMPLES_IGMP is not set
# CONFIG_EXAMPLES_LCDRW is not set
# CONFIG_EXAMPLES_MM is not set
# CONFIG_EXAMPLES_MODBUS is not set
# CONFIG_EXAMPLES_MOUNT is not set
# CONFIG_EXAMPLES_NRF24L01TERM is not set
# CONFIG_EXAMPLES_NSH is not set
# CONFIG_EXAMPLES_NULL is not set
# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
# CONFIG_EXAMPLES_NXFFS is not set
# CONFIG_EXAMPLES_NXFLAT is not set
# CONFIG_EXAMPLES_NXHELLO is not set
# CONFIG_EXAMPLES_NXIMAGE is not set
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8
CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000
CONFIG_EXAMPLES_OSTEST_RR_RUNS=10
# CONFIG_EXAMPLES_PASHELLO is not set
# CONFIG_EXAMPLES_PIPE is not set
# CONFIG_EXAMPLES_POLL is not set
# CONFIG_EXAMPLES_POSIXSPAWN is not set
# CONFIG_EXAMPLES_QENCODER is not set
# CONFIG_EXAMPLES_RGMP is not set
# CONFIG_EXAMPLES_ROMFS is not set
# CONFIG_EXAMPLES_SENDMAIL is not set
# CONFIG_EXAMPLES_SERLOOP is not set
# CONFIG_EXAMPLES_SLCD is not set
# CONFIG_EXAMPLES_SMART is not set
# CONFIG_EXAMPLES_TCPECHO is not set
# CONFIG_EXAMPLES_TELNETD is not set
# CONFIG_EXAMPLES_THTTPD is not set
# CONFIG_EXAMPLES_TIFF is not set
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
# CONFIG_EXAMPLES_UDP is not set
# CONFIG_EXAMPLES_UIP is not set
# CONFIG_EXAMPLES_USBSERIAL is not set
# CONFIG_EXAMPLES_USBTERM is not set
# CONFIG_EXAMPLES_WATCHDOG is not set
#
# Graphics Support
#
# CONFIG_TIFF is not set
#
# Interpreters
#
# CONFIG_INTERPRETERS_FICL is not set
# CONFIG_INTERPRETERS_PCODE is not set
#
# Network Utilities
#
#
# Networking Utilities
#
# CONFIG_NETUTILS_CODECS is not set
# CONFIG_NETUTILS_DHCPD is not set
# CONFIG_NETUTILS_FTPC is not set
# CONFIG_NETUTILS_FTPD is not set
# CONFIG_NETUTILS_JSON is not set
# CONFIG_NETUTILS_SMTP is not set
# CONFIG_NETUTILS_TFTPC is not set
# CONFIG_NETUTILS_THTTPD is not set
# CONFIG_NETUTILS_UIPLIB is not set
# CONFIG_NETUTILS_WEBCLIENT is not set
#
# FreeModBus
#
# CONFIG_MODBUS is not set
#
# NSH Library
#
# CONFIG_NSH_LIBRARY is not set
#
# NxWidgets/NxWM
#
#
# Platform-specific Support
#
# CONFIG_PLATFORM_CONFIGDATA is not set
#
# System Libraries and NSH Add-Ons
#
#
# USB CDC/ACM Device Commands
#
#
# USB Composite Device Commands
#
#
# Custom Free Memory Command
#
# CONFIG_SYSTEM_FREE is not set
#
# I2C tool
#
#
# INI File Parser
#
# CONFIG_SYSTEM_INIFILE is not set
#
# FLASH Program Installation
#
# CONFIG_SYSTEM_INSTALL is not set
#
# FLASH Erase-all Command
#
#
# NxPlayer media player library / command Line
#
# CONFIG_SYSTEM_NXPLAYER is not set
#
# RAM test
#
# CONFIG_SYSTEM_RAMTEST is not set
#
# readline()
#
# CONFIG_SYSTEM_READLINE is not set
#
# Power Off
#
# CONFIG_SYSTEM_POWEROFF is not set
#
# RAMTRON
#
# CONFIG_SYSTEM_RAMTRON is not set
#
# SD Card
#
# CONFIG_SYSTEM_SDCARD is not set
#
# Sysinfo
#
# CONFIG_SYSTEM_SYSINFO is not set
#
# USB Monitor
#
#
# VI Work-Alike Editor
#
# CONFIG_SYSTEM_VI is not set
#
# Stack Monitor
#
#
# USB Mass Storage Device Commands
#
#
# Zmodem Commands
#
# CONFIG_SYSTEM_ZMODEM is not set

View File

@ -0,0 +1,92 @@
/****************************************************************************/
/* configs/16z/ostest/ostest.linkcmd */
/* */
/* Copyright (C) 2008 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 -sort NAME=ascending -unresolved=fatal
-warnoverlap -NOxref -warn -debug -NOigcase
RANGE ROM $000000 : $007FFF
RANGE RAM $FFB000 : $FFBFFF
RANGE IODATA $FFC000 : $FFFFFF
RANGE EROM $008000 : $01FFFF
RANGE ERAM $800000 : $FFFFFF
CHANGE NEAR_TEXT=NEAR_DATA
CHANGE FAR_TEXT=FAR_DATA
ORDER FAR_BSS, FAR_DATA
ORDER NEAR_BSS, NEAR_DATA
COPY NEAR_DATA EROM
COPY FAR_DATA EROM
define _0_exit = 0
define _low_near_romdata = copy base of NEAR_DATA
define _low_neardata = base of NEAR_DATA
define _len_neardata = length of NEAR_DATA
define _low_far_romdata = copy base of FAR_DATA
define _low_fardata = base of FAR_DATA
define _len_fardata = length of FAR_DATA
define _low_nearbss = base of NEAR_BSS
define _len_nearbss = length of NEAR_BSS
define _low_farbss = base of FAR_BSS
define _len_farbss = length of FAR_BSS
define _near_heaptop = highaddr of RAM
define _far_heaptop = highaddr of ERAM
define _far_stack = highaddr of ERAM
define _near_stack = highaddr of RAM
define _near_heapbot = top of RAM
define _far_heapbot = top of ERAM
define _SYS_CLK_SRC = 2
define _SYS_CLK_FREQ = 20000000
define __EXTCT_INIT_PARAM = $40
define __EXTCS0_INIT_PARAM = $9001
define __EXTCS1_INIT_PARAM = $9001
define __EXTCS2_INIT_PARAM = $9011
define __EXTCS3_INIT_PARAM = $9015
define __EXTCS4_INIT_PARAM = $9015
define __EXTCS5_INIT_PARAM = $9015
define __PFAF_INIT_PARAM = $ff
define __PGAF_INIT_PARAM = $ff
define __PDAF_INIT_PARAM = $ff00
define __PAAF_INIT_PARAM = $0000
define __PCAF_INIT_PARAM = $0000
define __PHAF_INIT_PARAM = $0300
define __PKAF_INIT_PARAM = $0f
/* arch/z16/src/Makefile will append target, object and library paths below */

238
configs/16z/ostest/ostest.zdsbak Executable file
View File

@ -0,0 +1,238 @@
<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="c:4.11:07031901">
<cpu>Z16F2811AL</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">_Z16F2811AL=1,_Z16F_SERIES=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>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="chartype" type="string" change-action="compile">U</option>
<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</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="model" type="string" change-action="compile">S</option>
<option name="modsect" 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="regvar" type="boolean" change-action="compile">true</option>
<option name="regvarcache" type="boolean" change-action="none">false</option>
<option name="reduceopt" type="boolean" change-action="compile">false</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">Z16F2800100ZCOG</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">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">true</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">000000000000000000000001</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>
<option name="autoselect" type="boolean" change-action="none">true</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">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="eram" type="string" change-action="build">0-0</option>
<option name="erom" type="string" change-action="build">0-0</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
<option name="iodata" type="string" change-action="build">0-0</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">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
</tools>
</configuration>
<configuration name="Release" >
<tools>
<tool name="Assembler">
<options>
<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=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>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="chartype" type="string" change-action="compile">U</option>
<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</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="model" type="string" change-action="compile">S</option>
<option name="modsect" 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="regvar" type="boolean" change-action="compile">true</option>
<option name="regvarcache" type="boolean" change-action="none">false</option>
<option name="reduceopt" type="boolean" change-action="compile">false</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"></option>
<option name="debugtool" type="string" change-action="none">ZPAKII</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">1</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>
<option name="autoselect" type="boolean" change-action="none">true</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">true</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="eram" type="string" change-action="build">0-0</option>
<option name="erom" type="string" change-action="build">0-0</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
<option name="iodata" type="string" change-action="build">0-0</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">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
</tools>
</configuration>
</configurations>
<!-- watch information -->
<watch-elements>
<watch-element expression="0x801d1a" />
</watch-elements>
<!-- breakpoint information -->
<breakpoints>
</breakpoints>
</project>

View File

@ -0,0 +1,238 @@
<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="d:5.0.0:11071102" ZDSII="ZDS - ZNEO 5.0.1 (Build 11071201)">
<cpu>Z16F2811AL</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">_Z16F2811AL=1,_Z16F_SERIES=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>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="chartype" type="string" change-action="compile">U</option>
<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</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="model" type="string" change-action="compile">S</option>
<option name="modsect" 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="regvar" type="boolean" change-action="compile">true</option>
<option name="regvarcache" type="boolean" change-action="none">false</option>
<option name="reduceopt" type="boolean" change-action="compile">false</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">Z16F2800100ZCOG</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">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">true</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">000000000000000000000001</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>
<option name="autoselect" type="boolean" change-action="none">true</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">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="eram" type="string" change-action="build">0-0</option>
<option name="erom" type="string" change-action="build">0-0</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
<option name="iodata" type="string" change-action="build">0-0</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">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
</tools>
</configuration>
<configuration name="Release" >
<tools>
<tool name="Assembler">
<options>
<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=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>
</options>
</tool>
<tool name="Compiler">
<options>
<option name="chartype" type="string" change-action="compile">U</option>
<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</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="model" type="string" change-action="compile">S</option>
<option name="modsect" 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="regvar" type="boolean" change-action="compile">true</option>
<option name="regvarcache" type="boolean" change-action="none">false</option>
<option name="reduceopt" type="boolean" change-action="compile">false</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"></option>
<option name="debugtool" type="string" change-action="none">ZPAKII</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">1</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>
<option name="autoselect" type="boolean" change-action="none">true</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">true</option>
<option name="igcase" type="boolean" change-action="assemble">false</option>
<option name="outputdir" type="string" change-action="compile">.</option>
</options>
</tool>
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
<option name="eram" type="string" change-action="build">0-0</option>
<option name="erom" type="string" change-action="build">0-0</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
<option name="iodata" type="string" change-action="build">0-0</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">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
</tools>
</configuration>
</configurations>
<!-- watch information -->
<watch-elements>
<watch-element expression="0x801d1a" />
</watch-elements>
<!-- breakpoint information -->
<breakpoints>
</breakpoints>
</project>

63
configs/16z/ostest/setenv.sh Executable file
View File

@ -0,0 +1,63 @@
#!/bin/bash
# configs/16z/ostest/setenv.sh
#
# Copyright (C) 2008, 2009, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Check how we were executed
#
if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
WD=`pwd`
if [ ! -x "setenv.sh" ]; then
echo "This script must be executed from the top-level NuttX build directory"
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
#
# This is the Cygwin path to location where the XDS-II tools were installed
#
TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_ZNEO_5.0.1/bin"
#
# Add the path to the toolchain to the PATH variable. NOTE that /bin and /usr/bin
# preceded the toolchain bin directory. This is because the ZDSII bin directory
# includes binaries like make.exe that will interfere with the normal build process
# if we do not give priority to the versions at /bin and /usr/bin.
#
export PATH="/bin:/usr/bin:${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"

View File

@ -0,0 +1,529 @@
This is the output from the z16f target from January 31, 2008
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
While all tests pass per this output, my impression is that some
of the timed delays in during execution of the test were not
correct and I suspect some system timing issues.
stdio_test: write fd=1
stdio_test: write fd=2
stdio_test: Standard I/O Check: printf
user_start: putenv(Variable1=BadValue3)
user_start: setenv(Variable1, GoodValue1, TRUE)
user_start: setenv(Variable2, BadValue1, FALSE)
user_start: setenv(Variable2, GoodValue2, TRUE)
user_start: setenv(Variable3, Variable3, FALSE)
user_start: setenv(Variable3, Variable3, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
user_start: Started user_main at PID=2
stdio_test: Standard I/O Check: fprintf to stderr
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="<noname>"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 2 2
mxordblk 76b20 76b20
uordblks 33d0 33d0
fordblks 78180 78180
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 2 3
mxordblk 76b20 76b20
uordblks 33d0 33c0
fordblks 78180 78190
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 33c0 3380
fordblks 78190 781d0
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 32 32
Errors 0 0
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: cancel test
cancel_test: Test 1: Normal Cancelation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
thread_waiter: Taking mutex
thread_waiter: Starting wait for condition
start_thread: Yielding
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=ffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Cancelation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
thread_waiter: Taking mutex
thread_waiter: Starting wait for condition
start_thread: Yielding
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 3: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
thread_waiter: Taking mutex
thread_waiter: Starting wait for condition
thread_waiter: Setting non-cancelable
start_thread: Yielding
cancel_test: Canceling thread
cancel_test: Joining
thread_waiter: Releasing mutex
thread_waiter: Setting cancelable
cancel_test: waiter exited with result=ffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: semaphore test
sem_test: Initializing semaphore to 0
sem_test: Starting waiter thread 1
sem_test: Set thread 1 priority to 191
waiter_func: Thread 1 Started
waiter_func: Thread 1 initial semaphore value = 0
waiter_func: Thread 1 waiting on semaphore
sem_test: Starting waiter thread 2
sem_test: Set thread 2 priority to 128
waiter_func: Thread 2 Started
waiter_func: Thread 2 initial semaphore value = -1
waiter_func: Thread 2 waiting on semaphore
sem_test: Starting poster thread 3
sem_test: Set thread 3 priority to 64
poster_func: Thread 3 started
poster_func: Thread 3 semaphore value = -2
poster_func: Thread 3 posting semaphore
waiter_func: Thread 1 awakened
waiter_func: Thread 1 new semaphore value = -1
waiter_func: Thread 1 done
poster_func: Thread 3 new semaphore value = -1
poster_func: Thread 3 semaphore value = -1
poster_func: Thread 3 posting semaphore
waiter_func: Thread 2 awakened
waiter_func: Thread 2 new semaphore value = 0
waiter_func: Thread 2 done
poster_func: Thread 3 new semaphore value = 0
poster_func: Thread 3 done
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: condition variable test
cond_test: Initializing mutex
cond_test: Initializing cond
cond_test: Starting waiter
cond_test: Set thread 1 priority to 128
waiter_thread: Started
cond_test: Starting signaler
cond_test: Set thread 2 priority to 64
thread_signaler: Started
thread_signaler: Terminating
cond_test: signaler terminated, now cancel the waiter
cond_test: Waiter Signaler
cond_test: Loops 32 32
cond_test: Errors 0 0
cond_test:
cond_test: 0 times, waiter did not have to wait for data
cond_test: 0 times, data was already available when the signaler run
cond_test: 0 times, the waiter was in an unexpected state when the signaler ran
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: timed wait test
thread_waiter: Initializing mutex
timedwait_test: Initializing cond
timedwait_test: Starting waiter
timedwait_test: Set thread 2 priority to 177
thread_waiter: Taking mutex
thread_waiter: Starting 5 second wait for condition
timedwait_test: Joining
tcb=0x8057d0 sigdeliver=0x13046
rtcb=0x8000c8 current_regs=0xffffbf7a
rtcb=8057d0 sigdeliver=13046 sigpendactionq.head=0
Resuming
thread_waiter: pthread_cond_timedwait timed out
thread_waiter: Releasing mutex
thread_waiter: Exit with status 0x12345678
timedwait_test: waiter exited with result=12345678
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: message queue test
mqueue_test: Starting receiver
mqueue_test: Set receiver priority to 128
receiver_thread: Starting
mqueue_test: Starting sender
mqueue_test: Set sender thread priority to 64
mqueue_test: Waiting for sender to complete
sender_thread: Starting
receiver_thread: mq_receive succeeded on msg 0
sender_thread: mq_send succeeded on msg 0
receiver_thread: mq_receive succeeded on msg 1
sender_thread: mq_send succeeded on msg 1
receiver_thread: mq_receive succeeded on msg 2
sender_thread: mq_send succeeded on msg 2
receiver_thread: mq_receive succeeded on msg 3
sender_thread: mq_send succeeded on msg 3
receiver_thread: mq_receive succeeded on msg 4
sender_thread: mq_send succeeded on msg 4
receiver_thread: mq_receive succeeded on msg 5
sender_thread: mq_send succeeded on msg 5
receiver_thread: mq_receive succeeded on msg 6
sender_thread: mq_send succeeded on msg 6
receiver_thread: mq_receive succeeded on msg 7
sender_thread: mq_send succeeded on msg 7
receiver_thread: mq_receive succeeded on msg 8
sender_thread: mq_send succeeded on msg 8
receiver_thread: mq_receive succeeded on msg 9
sender_thread: mq_send succeeded on msg 9
sender_thread: returning ntcb=0x8057d0 sigdeliver=0x13046
rtcb=0x806e30 current_regs=0x0
rtcb=8057d0 sigdeliver=13046 sigpendactionq.head=0
Resuming
errors=0
mqueue_test: Killing receiver
receiver_thread: mq_receive interrupted!
receiver_thread: returning nerrors=0
mqueue_test: Canceling receiver
mqueue_test: receiver has already terminated
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: timed message queue test
timedmqueue_test: Starting sender
sender_thread: Starting
sender_thread: mq_timedsend succeeded on msg 0
sender_thread: mq_timedsend succeeded on msg 1
timedmqueue_test: Waiting for sender to complete
sender_thread: mq_timedsend succeeded on msg 2
sender_thread: mq_timedsend succeeded on msg 3
sender_thread: mq_timedsend succeeded on msg 4
sender_thread: mq_timedsend succeeded on msg 5
sender_thread: mq_timedsend succeeded on msg 6
sender_thread: mq_timedsend succeeded on msg 7
sender_thread: mq_timedsend succeeded on msg 8
sender_thread: mq_timedsend 9 timed out as expected
sender_thread: returning nerrors=0
timedmqueue_test: Starting receiver
receiver_thread: Starting
receiver_thread: mq_timedreceive succeeded on msg 0
receiver_thread: mq_timedreceive succeeded on msg 1
receiver_thread: mq_timedreceive succeeded on msg 2
receiver_thread: mq_timedreceive succeeded on msg 3
timedmqueue_test: Waiting for receiver to complete
receiver_thread: mq_timedreceive succeeded on msg 4
receiver_thread: mq_timedreceive succeeded on msg 5
receiver_thread: mq_timedreceive succeeded on msg 6
receiver_thread: mq_timedreceive succeeded on msg 7
receiver_thread: mq_timedreceive succeeded on msg 8
receiver_thread: Receive 9 timed out as expected
receiver_thread: returning nerrors=0
timedmqueue_test: Test complete
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 3
mxordblk 76b20 76b20
uordblks 3380 3380
fordblks 781d0 781d0
user_main: signal handler test
sighand_test: Initializing semaphore to 0
sighand_test: Starting waiter task
sighand_test: Started waiter_main pid=20
waiter_main: Waiter started
waiter_main: Unmasking signal 17
waiter_main: Registering signal handler
waiter_main: oact.sigaction=0 oact.sa_flags=0 oact.sa_mask=0
waiter_main: Waiting on semaphore
tcb=0x8057d0 sigdeliver=0x13046
rtcb=0x806e30 current_regs=0x0
sighand_test: Signaling pid=20 with signo=17 sigvalue=42
rtcb=8057d0 sigdeliver=13046 sigpendactionq.head=804b10
Resuming
wakeup_action: Received signal 17
wakeup_action: sival_int=42
wakeup_action: si_code=1
wakeup_action: ucontext=0
waiter_main: sem_wait() successfully interrupted by signal
waiter_main: done
sighand_test: done
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 3 4
mxordblk 76b20 76b20
uordblks 3380 35c0
fordblks 781d0 77f90
user_main: POSIX timer test
timer_test: Initializing semaphore to 0
timer_test: Unmasking signal 17
timer_test: Registering signal handler
timer_test: oact.sigaction=0 oact.sa_flags=0 oact.sa_mask=0
timer_test: Creating timer
timer_test: Starting timer
timer_test: Waiting on semaphore
tcb=0x806e30 sigdeliver=0x13046
rtcb=0x8000c8 current_regs=0xffffbf7a
rtcb=806e30 sigdeliver=13046 sigpendactionq.head=804b23
Resuming
timer_expiration: Received signal 17
timer_expiration: sival_int=42
timer_expiration: si_code=2 (SI_TIMER)
timer_expiration: ucontext=0
timer_test: sem_wait() successfully interrupted by signal
timer_test: g_nsigreceived=1
timer_test: Waiting on semaphore
tcb=0x806e30 sigdeliver=0x13046
rtcb=0x8000c8 current_regs=0xffffbf7a
rtcb=806e30 sigdeliver=13046 sigpendactionq.head=804b36
Resuming
timer_expiration: Received signal 17
timer_expiration: sival_int=42
timer_expiration: si_code=2 (SI_TIMER)
timer_expiration: ucontext=0
timer_test: sem_wait() successfully interrupted by signal
timer_test: g_nsigreceived=2
timer_test: Waiting on semaphore
tcb=0x806e30 sigdeliver=0x13046
rtcb=0x8000c8 current_regs=0xffffbf7a
rtcb=806e30 sigdeliver=13046 sigpendactionq.head=804b49
Resuming
timer_expiration: Received signal 17
timer_expiration: sival_int=42
timer_expiration: si_code=2 (SI_TIMER)
timer_expiration: ucontext=0
timer_test: sem_wait() successfully interrupted by signal
timer_test: g_nsigreceived=3
timer_test: Waiting on semaphore
tcb=0x806e30 sigdeliver=0x13046
rtcb=0x8000c8 current_regs=0xffffbf76
rtcb=806e30 sigdeliver=13046 sigpendactionq.head=804b5c
Resuming
timer_expiration: Received signal 17
timer_expiration: sival_int=42
timer_expiration: si_code=2 (SI_TIMER)
timer_expiration: ucontext=0
timer_test: sem_wait() successfully interrupted by signal
timer_test: g_nsigreceived=4
timer_test: Waiting on semaphore
tcb=0x806e30 sigdeliver=0x13046
rtcb=0x8000c8 current_regs=0xffffbf66
rtcb=806e30 sigdeliver=13046 sigpendactionq.head=804b6f
Resuming
timer_expiration: Received signal 17
timer_expiration: sival_int=42
timer_expiration: si_code=2 (SI_TIMER)
timer_expiration: ucontext=0
timer_test: sem_wait() successfully interrupted by signal
timer_test: g_nsigreceived=5
timer_test: Deleting timer
timer_test: done
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 4 4
mxordblk 76b20 76b20
uordblks 35c0 35c0
fordblks 77f90 77f90
user_main: round-robin scheduler test
rr_test: Starting sieve1 thread
rr_test: Set thread priority to 1
rr_test: Set thread policty to SCHED_RR
rr_test: Starting sieve1 thread
sieve1 started
rr_test: Waiting for sieves to complete -- this should take awhile
rr_test: If RR scheduling is working, they should start and complete at
rr_test: about the same time
sieve2 started
sieve1 finished
sieve2 finished
rr_test: Done
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 4 4
mxordblk 76b20 76b20
uordblks 35c0 35c0
fordblks 77f90 77f90
user_main: barrier test
barrier_test: Initializing barrier
barrier_func: Thread 0 started
barrier_test: Thread 0 created
barrier_func: Thread 1 started
barrier_test: Thread 1 created
barrier_func: Thread 2 started
barrier_test: Thread 2 created
barrier_func: Thread 3 started
barrier_test: Thread 3 created
barrier_func: Thread 0 calling pthread_barrier_wait()
barrier_func: Thread 1 calling pthread_barrier_wait()
barrier_func: Thread 2 calling pthread_barrier_wait()
barrier_func: Thread 4 started
barrier_test: Thread 4 created
barrier_func: Thread 3 calling pthread_barrier_wait()
barrier_func: Thread 4 calling pthread_barrier_wait()
barrier_func: Thread 5 started
barrier_test: Thread 5 created
barrier_func: Thread 6 started
barrier_test: Thread 6 created
barrier_func: Thread 7 started
barrier_test: Thread 7 created
barrier_func: Thread 5 calling pthread_barrier_wait()
barrier_func: Thread 6 calling pthread_barrier_wait()
barrier_func: Thread 7 calling pthread_barrier_wait()
barrier_func: Thread 7, back with status=PTHREAD_BARRIER_SERIAL_THREAD (I AM SPECIAL)
barrier_func: Thread 0, back with status=0 (I am not special)
barrier_func: Thread 1, back with status=0 (I am not special)
barrier_func: Thread 2, back with status=0 (I am not special)
barrier_func: Thread 3, back with status=0 (I am not special)
barrier_func: Thread 4, back with status=0 (I am not special)
barrier_func: Thread 5, back with status=0 (I am not special)
barrier_func: Thread 6, back with status=0 (I am not special)
barrier_func: Thread 2 done
barrier_func: Thread 7 done
barrier_func: Thread 0 done
barrier_func: Thread 1 done
barrier_func: Thread 6 done
barrier_func: Thread 3 done
barrier_func: Thread 4 done
barrier_func: Thread 5 done
barrier_test: Thread 0 completed with result=0
barrier_test: Thread 1 completed with result=0
barrier_test: Thread 2 completed with result=0
barrier_test: Thread 3 completed with result=0
barrier_test: Thread 4 completed with result=0
barrier_test: Thread 5 completed with result=0
barrier_test: Thread 6 completed with result=0
barrier_test: Thread 7 completed with result=0
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 4 4
mxordblk 76b20 76b20
uordblks 35c0 35c0
fordblks 77f90 77f90
Final memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 7b550 7b550
ordblks 2 4
mxordblk 76b20 76b20
uordblks 33d0 35c0
fordblks 78180 77f90
user_main: Exitting

View File

@ -0,0 +1,50 @@
@echo off
rem configs/16z/scripts/setenv.bat
rem
rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
rem Author: Gregory Nutt <gnutt@nuttx.org>
rem
rem Redistribution and use in source and binary forms, with or without
rem modification, are permitted provided that the following conditions
rem are met:
rem
rem 1. Redistributions of source code must retain the above copyright
rem notice, this list of conditions and the following disclaimer.
rem 2. Redistributions in binary form must reproduce the above copyright
rem notice, this list of conditions and the following disclaimer in
rem the documentation and/or other materials provided with the
rem distribution.
rem 3. Neither the name NuttX nor the names of its contributors may be
rem used to endorse or promote products derived from this software
rem without specific prior written permission.
rem
rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
rem POSSIBILITY OF SUCH DAMAGE.
rem This is the location where I installed in the MinGW compiler. With
rem this configuration, it is recommended that you do NOT install the
rem MSYS tools; they conflict with the GNUWin32 tools. See
rem http://www.mingw.org/ for further info.
set PATH=C:\MinGW\bin;%PATH%
rem This is the location where I installed the ZDS-II toolchain.
set PATH=C:\Program Files (x86)\ZiLOG\ZDSII_ZNEO_5.0.1\bin;%PATH%
rem This is the location where I installed the GNUWin32 tools. See
rem http://gnuwin32.sourceforge.net/.
set PATH=C:\gnuwin32\bin;%PATH%
echo %PATH%

4
configs/16z/src/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/Make.dep
/.depend
/*.obj

90
configs/16z/src/Makefile Normal file
View File

@ -0,0 +1,90 @@
############################################################################
# configs/16z/Makefile
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
-include $(TOPDIR)/Make.defs
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common"
else
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) $(EXTRADEFINES)
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = z16f_lowinit.c z16f_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT)
$(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S
$(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp
$(Q) cat $@.tmp | sed -e "s/^#/;/g" > $@
$(Q) rm $@.tmp
$(AOBJS): %$(OBJEXT): %$(ASMEXT)
$(call ASSEMBLE, $<, $@)
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libboard$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
.depend: Makefile $(SRCS)
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@
depend: .depend
clean:
$(call DELFILE, libboard$(LIBEXT))
$(call CLEAN)
distclean: clean
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
-include Make.dep

175
configs/16z/src/z16f_leds.c Normal file
View File

@ -0,0 +1,175 @@
/****************************************************************************
* configs/16z/z16f_leds.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* LEDs
*
* The 16z board has 7 LEDs, five of which are controllable via software:
*
* ----- ------ ------ ------------------------------------
* LED Color Signal Description
* ----- ------ ------ ------------------------------------
* LED1 Red 3V3 Indicates the presence of +3.3V
* LED2 Red 5V Indicates the presence of +5V
* LED3 Blue ~RF Controlled via PH2. Notes: 1, 2
* LED4 Green ~SXM Controlled via PH3. Notes: 1, 3
* LED5 Green ~SD1 Controlled via PJ0. Notes: 1, 4
* LED6 Yellow ~SD2 Controlled via PJ4. Notes: 1, 5
* LED7 Yellow ~SD0 Controlled via PJ7. Notes: 1, 6
* ----- ------ ------ ------------------------------------
*
* Note 1: Pulled high so a low output illuminates the LED.
* Note 2: PH2/~RF is also used by the RF transceiver, X2. That part is not
* populated on my board.
* Note 3: ~SXM is the chip select for the serial memory, U4. That part is
* not populated on my board.
* Note 4: ~SD1 is the chip select for the SD card 1, X11.
* Note 5: ~SD2 is the chip select for the SD card 2, X10.
* Note 6: ~SD0 is the chip select for the microSD 0, X12.
*
* In conclusion: None of the LEDs are available to indicate software status
* without potentially sacrificing board functionality. If the RF transceiver
* is not installed (CONFIG_16Z_RFTRANSCEIVER=n) and if LED support is
* requested (CONFIG_ARCH_LEDS), then LED3 will be used to indicate status: A
* solid color means that the board has boot successfully; flashing at a rate
* of approximately 2Hz indicates a software failure.
*/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <arch/board/board.h>
#include "up_internal.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: up_ledinit
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void up_ledinit(void)
{
/* All GPIO initialization is done in up_lowinit() */
}
/****************************************************************************
* Name: up_ledon
****************************************************************************/
void up_ledon(int led)
{
#if defined(HAVE_16Z_LED3) || defined(HAVE_16Z_LED4)
/* The following operations must be atomic */
irqstate_t flags = irqsave();
uint8_t regval = getreg8(Z16F_GPIOH_OUT);
#ifdef HAVE_16Z_LED3
/* LED3 is available at PH2 and illuminated by a low output */
if ((led & __LED3_BIT) != 0)
{
regval &= ~(1 << 2);
}
#endif
#ifdef HAVE_16Z_LED4
/* LED4 is available at PH3 and illuminated by a low output */
if ((led & __LED4_BIT) != 0)
{
regval &= ~(1 << 3);
}
#endif
putreg8(regval, Z16F_GPIOH_OUT);
irqrestore(flags);
#endif
}
/****************************************************************************
* Name: up_ledoff
****************************************************************************/
void up_ledoff(int led)
{
#if defined(HAVE_16Z_LED3) || defined(HAVE_16Z_LED4)
/* The following operations must be atomic */
irqstate_t flags = irqsave();
uint8_t regval = getreg8(Z16F_GPIOH_OUT);
#ifdef HAVE_16Z_LED3
/* LED3 is available at PH2 and illuminated by a low output */
if ((led & __LED3_BIT) != 0)
{
regval |= (1 << 2);
}
#endif
#ifdef HAVE_16Z_LED4
/* LED4 is available at PH3 and illuminated by a low output */
if ((led & __LED4_BIT) != 0)
{
regval |= (1 << 3);
}
#endif
putreg8(regval, Z16F_GPIOH_OUT);
irqrestore(flags);
#endif
}
#endif /* CONFIG_ARCH_LEDS */

View File

@ -0,0 +1,256 @@
/***************************************************************************
* configs/16z/src/z16f_lowinit.c
*
* Copyright (C) 2014 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 "chip/chip.h"
/***************************************************************************
* Definitions
***************************************************************************/
/***************************************************************************
* Private Functions
***************************************************************************/
static void z16f_extcsinit(void)
{
putreg8(0x40, Z16F_EXTCT); /* 8-bit External Bus Interface is enabled (Port E). */
putreg8(0x90, Z16F_EXTCS0H); /* CS0 enabled, Data [0:7] */
putreg8(0x01, Z16F_EXTCS0L); /* Post Read: No wait states; Chip select: 1 wait state */
putreg8(0x90, Z16F_EXTCS1H); /* CS1 enabled, Data [0:7] */
putreg8(0x01, Z16F_EXTCS1L); /* Post Read: No wait states; Chip select: 1 wait state */
putreg8(0x90, Z16F_EXTCS2H); /* CS2 enabled, Data [0:7] */
putreg8(0x11, Z16F_EXTCS2L); /* Post Read: 1 wait state; Chip select: 1 wait state */
putreg8(0x90, Z16F_EXTCS3H); /* CS3 enabled, Data [0:7] */
putreg8(0x15, Z16F_EXTCS3L); /* Post Read: 1 wait state; Chip select: 5 wait states */
putreg8(0x90, Z16F_EXTCS4H); /* CS4 enabled, Data [0:7] */
putreg8(0x15, Z16F_EXTCS4L); /* Post Read: 1 wait state; Chip select: 5 wait states */
putreg8(0x90, Z16F_EXTCS5H); /* CS5 enabled, Data [0:7] */
putreg8(0x15, Z16F_EXTCS5L); /* Post Read: 1 wait state; Chip select: 5 wait states */
}
static void z16f_gpioinit(void)
{
/* NOTE: Here we assume that all ports are in the default reset state */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PA0/T0IN/T0OUT/DMA0REQ GP8 PS/2 / GPIO, Expansion slots
* PA1/T0OUT/DMA0ACK GP9 PS/2 / GPIO, Expansion slots
* PA2/DE0/FAULTY ~INTI Power section, RF transceiver (1)
* PA3/CTS0/FAULT0 ~INTX Expansion slots
* PA4/RXD0/CS1 RXD MAX3232D RS-232
* PA5/TXD0/CS2 TXD MAX3232D RS-232
* PA6/SCL/CS3 SCL RTC / UID, Expansion slots
* PA7/SDA/CS4 SDA RTC / UID, Expansion slots
* --------------------------- ------ --------------------------------------------
*/
putreg8(0x9f, Z16F_GPIOA_DD); /* Inputs: GP8, GP9, ~INTI, ~INTX, RXD, and SDA */
putreg8(0x03, Z16F_GPIOA_HDE); /* High drive current: GP8 and GP9 */
putreg8(0xf0, Z16F_GPIOA_AFL); /* RXD=Alt 1, TXD=Alt 1, SCL=Alt 1, SDA=Alt 1 */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PB0/ANA0/T0IN0 GP0 Expansion slots
* PB1/ANA1/T0IN1 GP1 Expansion slots
* PB2/ANA2/T0IN2 GP2 Expansion slots
* PB3/ANA3/OPOUT GP3 Expansion slots
* PB4/ANA4 GP4 Expansion slots
* PB5/ANA5 GP5 Expansion slots
* PB6/ANA6/OPINP/CINN GP6 Expansion slots
* PB7/ANA7/OPINN GP7 Expansion slots
* --------------------------- ------ --------------------------------------------
*/
putreg8(0xff, Z16F_GPIOB_DD); /* Inputs: all */
putreg8(0xff, Z16F_GPIOB_HDE); /* High drive current: all */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PC0/T1IN/T1OUT/DMA1REQ/CINN GP10 PS/2 / GPIO, Expansion slots
* PC1/T1OUT/DMA1ACK/COMPOUT GP11 PS/2 / GPIO, Expansion slots
* PC2/SS/CS4 ~EXP Expansion slots
* PC3/SCK/DMA2REQ SCK FT800Q, Serial memory (1), RF Transceiver (1),
* Expansion slots, SD0, 1, and 2
* PC4/MOSI/DMA2ACK MOSI FT800Q, Serial memory (1), RF Transceiver (1),
* Expansion slots, SD0, 1, and 2
* PC5/MISO/CS5 MISO FT800Q, Serial memory (1), RF Transceiver (1),
* Expansion slots, SD0, 1, and 2
* PC6/T2IN/T2OUT/PWMH0 ~CTS MAX3232D RS-232
* PC7/T2OUT/PWML0 ~RTS MAX3232D RS-232, Power section (?)
* --------------------------- ------ --------------------------------------------
*/
putreg8(0x63, Z16F_GPIOC_DD); /* Inputs: GP10, GP11, MISO, and ~CTS */
putreg8(0x03, Z16F_GPIOC_HDE); /* High drive current: GP10 and GP11 */
putreg8(0x38, Z16F_GPIOC_AFL); /* SCK=Alt 1, MOSI=Alt 1, MISO=Alt 1 */
putreg8(0x04, Z16F_GPIOC_OUT); /* ~EXP output high */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PD0/PWMH1/ADR20 A20 RAM, Expansion slots
* PD1/PWML1/ADR21 A21 RAM, Expansion slots
* PD2/PWMH2/ADR22 A22 RAM, Expansion slots
* PD3/DE1/ADR16 A16 RAM, Expansion slots
* PD4/RXD1/ADR18 A18 RAM, Expansion slots
* PD5/TXD1/ADR19 A19 RAM, Expansion slots
* PD6/CTS1/ADR17 A17 RAM, Expansion slots
* PD7/PWML2/ADR23 A23 Expansion slots
* --------------------------- ------ --------------------------------------------
*/
putreg8(0x00, Z16F_GPIOD_DD); /* Inputs: None */
putreg8(0xff, Z16F_GPIOD_AFH); /* All=Alt 2
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PE0/DATA0 D0 RAM, Expansion slots
* PE1/DATA1 D1 RAM, Expansion slots
* PE2/DATA2 D2 RAM, Expansion slots
* PE3/DATA3 D3 RAM, Expansion slots
* PE4/DATA4 D4 RAM, Expansion slots
* PE5/DATA5 D5 RAM, Expansion slots
* PE6/DATA6 D6 RAM, Expansion slots
* PE7/DATA7 D7 RAM, Expansion slots
* --------------------------- ------ --------------------------------------------
*/
putreg8(0xff, Z16F_GPIOE_DD); /* Inputs: all */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PF0/ADR0 A0 Expansion slots
* PF1/ADR1 A1 RAM, Expansion slots
* PF2/ADR2 A2 RAM, Expansion slots
* PF3/ADR3 A3 RAM, Expansion slots
* PF4/ADR4 A4 RAM, Expansion slots
* PF5/ADR5 A5 RAM, Expansion slots
* PF6/ADR6 A6 RAM, Expansion slots
* PF7/ADR7 A7 RAM, Expansion slots
* --------------------------- ------ --------------------------------------------
*/
putreg8(0x00, Z16F_GPIOF_DD); /* Inputs: None */
putreg8(0xff, Z16F_GPIOF_AFL); /* All=Alt 1 */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PG0/ADR0 A8 RAM, Expansion slots
* PG1/ADR0 A9 RAM, Expansion slots
* PG2/ADR0 A10 RAM, Expansion slots
* PG3/ADR0 A11 RAM, Expansion slots
* PG4/ADR0 A12 RAM, Expansion slots
* PG5/ADR0 A13 RAM, Expansion slots
* PG6/ADR0 A14 RAM, Expansion slots
* PG7/ADR0 A15 RAM, Expansion slots
* --------------------------- ------ --------------------------------------------
*/
putreg8(0x00, Z16F_GPIOG_DD); /* Inputs: None */
putreg8(0xff, Z16F_GPIOG_AFL); /* All=Alt 1 */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PH0/ANA8/WR ~WR RAM, Expansion slots
* PH1/ANA9/RD ~RD RAM, Expansion slots
* PH2/ANA10/CS0 ~RF LED3, RF transceiver, X2 (1)
* PH3/ANA11/CINP/WAIT ~SXM LED4, Chip select for the serial memory, U4 (1)
* --------------------------- ------ --------------------------------------------
*/
putreg8(0xf0, Z16F_GPIOH_DD); /* Inputs: None (PH4-PH7 undefined) */
putreg8(0x03, Z16F_GPIOH_AFH); /*~WR=Alt2 ~RD=Alt 2 */
putreg8(0x0c, Z16F_GPIOH_OUT); /* Output high: ~RF and ~SXM */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PJ0/DATA8 ~SD1 LED5, Chip select for the SD card 1, X11.
* PJ1/DATA9 ~DT1 Card detect for SD card 1
* PJ2/DATA10 WP1 Write protect for SD card 1
* PJ3/DATA11 EVE EVE chip select
* PJ4/DATA12 ~SD2 LED6, Chip select for the SD card 2, X10.
* PJ5/DATA13 ~DT2 Card detect for SD card 2
* PJ6/DATA14 WP2 Write protect for SD card 2
* PJ7/DATA15 ~SD0 LED7, Chip select for the microSD 0, X12.
* --------------------------- ------ --------------------------------------------
*/
putreg8(0x66, Z16F_GPIOJ_DD); /* Inputs: ~DT1, WP1, ~DT2, and WP2 */
putreg8(0x99, Z16F_GPIOJ_OUT); /* Output high: ~SD1, EVE, ~SD2, ~SD0 */
/* --------------------------- ------ --------------------------------------------
* GPIO SIGNAL On-Board Connections
* --------------------------- ------ --------------------------------------------
* PK0/BHEN ~BHE RAM, Expansion slots
* PK1/BLEN ~BLE RAM, Expansion slots
* PK2/CS0 ~0000 Bottom RAM bank, Expansion slots
* PK3/CS1 ~8000 Top RAM bank, Expansion slots
* PK4/CS2 ~F000 Expansion slots
* PK5/CS3 ~FFC8 Expansion slots
* PK6/CS4 ~FFD0 Expansion slots
* PK7/CS5 ~FFD8 Expansion slots
* --------------------------- ------ --------------------------------------------
*/
putreg8(0x00, Z16F_GPIOK_DD); /* Inputs: None */
putreg8(0xff, Z16F_GPIOK_AFL); /* All=Alt 1 */
}
/***************************************************************************
* Public Functions
***************************************************************************/
void z16f_lowinit(void)
{
z16f_extcsinit();
z16f_gpioinit();
}

View File

@ -12,6 +12,15 @@ choice
be available for selection. Use ARCH_BOARD_CUSTOM to create a new
board configuration.
config ARCH_BOARD_16Z
bool "16z Board"
depends on ARCH_CHIP_Z16F2811
select ARCH_HAVE_LEDS
---help---
This selection enables the port of NuttX port to the 16z board. The
16z board is based on the ZiLOG ZNEO Z16F2811AL20EG part. See
https://github.com/toyaga/16z for further information.
config ARCH_BOARD_AMBER
bool "Amber Web Server"
depends on ARCH_CHIP_ATMEGA128
@ -871,6 +880,7 @@ config ARCH_BOARD_CUSTOM_DIR
config ARCH_BOARD
string
default "16z" if ARCH_BOARD_16Z
default "amber" if ARCH_BOARD_AMBER
default "arduino-due" if ARCH_BOARD_ARDUINO_DUE
default "avr32dev1" if ARCH_BOARD_AVR32DEV1
@ -1013,6 +1023,9 @@ config NSH_MMCSDSPIPORTNO
comment "Board-Specific Options"
if ARCH_BOARD_16Z
source "configs/16z/Kconfig"
endif
if ARCH_BOARD_AMBER
source "configs/amber/Kconfig"
endif

View File

@ -169,6 +169,11 @@ http://nuttx.org/Documentation/NuttXConfigVariables.html.
Supported Boards
^^^^^^^^^^^^^^^^
configs/16z
This is the port of NuttX port to the 16z board. The 16z board is based on
the ZiLOG ZNEO Z16F2811AL20EG part. See https://github.com/toyaga/16z for
further information.
configs/amber
This is placeholder for the SoC Robotics Amber Web Server that is based
on the Atmel AVR ATMega128 MCU. There is not much there yet and what is

View File

@ -83,7 +83,7 @@ nsh
nsh:
This configuration directory will built the NuttShell (NSH). See
the NSH user manual in the documents directory (or online at nuttx.org).
See also the README.txt file in the ostest sub-directory for information
See also the README.txt file in the nsh sub-directory for information
about using ZDS-II.
NOTES: