mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Remove the 16z board support from the main source tree. It is still avaialable in the misc/Obsoleted directory
This commit is contained in:
@@ -8402,3 +8402,8 @@
|
|||||||
bundle up the user C startup file (crt0), not the kernel head object
|
bundle up the user C startup file (crt0), not the kernel head object
|
||||||
for the kernel and protected builds (2014-9-4).
|
for the kernel and protected builds (2014-9-4).
|
||||||
* tools/mkexport.sh: Add .config file to export package (2014-9-5).
|
* tools/mkexport.sh: Add .config file to export package (2014-9-5).
|
||||||
|
* configs/16z: Support for this board has been removed from the NuttX
|
||||||
|
source tree (but still can be found in the misc/Obsoleted directory).
|
||||||
|
This port is not ready for usage but may return to the NuttX tree
|
||||||
|
at some point in the future (2014-9-5).
|
||||||
|
|
||||||
|
|||||||
@@ -3962,7 +3962,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
<b>Toyaga 16z</b>.
|
<b>Toyaga 16z (obsoleted)</b>.
|
||||||
This port if for the <a href="https://github.com/toyaga/16z">Toyaga 16z</a> board that also use the Zilog ZNEOZ16F2811AL20EG microntroller with the Zilog ZDS-II Windows command line tools.
|
This port if for the <a href="https://github.com/toyaga/16z">Toyaga 16z</a> board that also use the Zilog ZNEOZ16F2811AL20EG microntroller with the Zilog ZDS-II Windows command line tools.
|
||||||
The development environment is either Windows native or Cygwin under Windows.
|
The development environment is either Windows native or Cygwin under Windows.
|
||||||
</p>
|
</p>
|
||||||
@@ -3970,7 +3970,13 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
|
|||||||
<b>STATUS:</b>
|
<b>STATUS:</b>
|
||||||
The initial release of support for the 16z board was made available in NuttX version 6.33.
|
The initial release of support for the 16z board was made available in NuttX version 6.33.
|
||||||
Both the 16z board and the NuttX port are works in progress and are not ready for usage as of NuttX-7.2.
|
Both the 16z board and the NuttX port are works in progress and are not ready for usage as of NuttX-7.2.
|
||||||
Refer to the NuttX board <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/16z/README.txt">README</a> file for further information.
|
Refer to the NuttX board <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/misc/Obsoleted/configs/16z/README.txt">README</a> file for further information.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b><i>Obsoleted</i></b>.
|
||||||
|
This architecture has been <i>obsoleted</i>.
|
||||||
|
The code has been moved out of the NuttX source tree but can still be found be found in <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/misc/Obsoleted/">Obsoleted</a> directory.
|
||||||
|
This support was obsoleted because of technical issues that make NuttX unusable on the board at least in the short term. This configuration may return to the NuttX source tree at some time in the future.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -51,8 +51,6 @@
|
|||||||
| |- audio/
|
| |- audio/
|
||||||
| | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/audio/README.txt"><b><i>README.txt</i></b></a>
|
| | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/audio/README.txt"><b><i>README.txt</i></b></a>
|
||||||
| |- configs/
|
| |- configs/
|
||||||
| | |- 16z/
|
|
||||||
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/16z/README.txt"><b><i>README.txt</i></b></a>
|
|
||||||
| | |- amber/
|
| | |- amber/
|
||||||
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/amber/README.txt"><b><i>README.txt</i></b></a>
|
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/amber/README.txt"><b><i>README.txt</i></b></a>
|
||||||
| | |- arduino-due/
|
| | |- arduino-due/
|
||||||
|
|||||||
@@ -918,8 +918,6 @@ nuttx
|
|||||||
| `-libpcode/
|
| `-libpcode/
|
||||||
| `-README.txt
|
| `-README.txt
|
||||||
|- configs/
|
|- configs/
|
||||||
| |- 16z/
|
|
||||||
| | `- README.txt
|
|
||||||
| |- amber/
|
| |- amber/
|
||||||
| | `- README.txt
|
| | `- README.txt
|
||||||
| |- arduino-due/
|
| |- arduino-due/
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
#
|
|
||||||
# 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
|
|
||||||
@@ -1,326 +0,0 @@
|
|||||||
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
|
|
||||||
- Patches
|
|
||||||
- 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.
|
|
||||||
|
|
||||||
There are some problems with this compiler version. See the section
|
|
||||||
entitled "Patches" below.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Patches
|
|
||||||
=======
|
|
||||||
|
|
||||||
A bug has been found in the ZDS-II toolchain version 5.0.1. a patch is
|
|
||||||
available to work around the bug. A summary of the nature the bug and
|
|
||||||
instructions for applying the patch follow.
|
|
||||||
|
|
||||||
Parameters are passed different to variadic functions (i.e., functions
|
|
||||||
that accept a varying number of parameters) than to regular functions. For
|
|
||||||
most functions, parameters are passed in registers, beginning with R1. But
|
|
||||||
for variadic functions, all parameters must be passed on the stack.
|
|
||||||
|
|
||||||
The logic works correctly for global functions, local functions, and most
|
|
||||||
function pointers. It does not work correctly for the case where a variadic
|
|
||||||
function point is included within a structure. In that case, the caller
|
|
||||||
inappropriately passes the parameters in registers; the receiver will
|
|
||||||
attempt to recover the parameters from the stack and a failure then follows.
|
|
||||||
|
|
||||||
This bug prevents the use of NSH with the ZNEO. However, a patch has been
|
|
||||||
developed that works around the problem. That patch can be found at
|
|
||||||
configs/16z/tools/zneo-zdsii-5_0_1-variadic-func-fix.patch. In that
|
|
||||||
directory is also a bash script that will apply that patch for you.
|
|
||||||
|
|
||||||
The patch would be applied when NuttX is configured as follows:
|
|
||||||
|
|
||||||
cd tools
|
|
||||||
./configure.sh 16z/nsh
|
|
||||||
cd ..
|
|
||||||
. ./setenv.sh
|
|
||||||
dopatch.sh
|
|
||||||
make
|
|
||||||
|
|
||||||
The patch can also be removed with:
|
|
||||||
|
|
||||||
dopatch.sh -R
|
|
||||||
|
|
||||||
See the section "Selecting Configurations" below.
|
|
||||||
|
|
||||||
UPDATE: 2014-4-27: The nsh example still does not run correctly. This
|
|
||||||
is believe to be caused by additional, undiagnosed compiler errors.
|
|
||||||
|
|
||||||
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. You may
|
|
||||||
also need to apply a path to NuttX before making. Please refer the the
|
|
||||||
section "Patches" above"
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
3. 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.
|
|
||||||
|
|
||||||
STATUS:
|
|
||||||
|
|
||||||
1. Note that you must apply the ZNEO patch if you are using ZDS-II 5.0.1.
|
|
||||||
See the README.txt file in the parent directory for more information.
|
|
||||||
|
|
||||||
2. This configuration does not run correctly. This is believed to a yet
|
|
||||||
another ZDS-II compiler problem. The corresponding NSH configuration
|
|
||||||
of the z16f2800100zcog does work, however, so this could also be an
|
|
||||||
issue with the 16z.
|
|
||||||
|
|
||||||
Check out any README.txt files in these <sub-directory>s.
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* configs/16z/include/board.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in
|
|
||||||
* the documentation and/or other materials provided with the
|
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __CONFIGS_16Z_INCLUDE_BOARD_H
|
|
||||||
#define __CONFIGS_16Z_INCLUDE_BOARD_H
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Included Files
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/* The 16Z board has a 18.432MHz crystal. The ZNEO clocking will be
|
|
||||||
* configured to use this crystal frequency directly as the clock source
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define BOARD_XTAL_FREQUENCY 18432000 /* 18.432MHz */
|
|
||||||
#define BOARD_CLKSRC 1 /* Clock source = external crystal */
|
|
||||||
#define BOARD_SYSTEM_FREQUENCY BOARD_XTAL_FREQUENCY
|
|
||||||
|
|
||||||
/* Flash option bits
|
|
||||||
*
|
|
||||||
* "Each time the option bits are programmed or erased, the device must be
|
|
||||||
* Reset for the change to take place. During any reset operation .., the
|
|
||||||
* option bits are automatically read from the Program memory and written
|
|
||||||
* to Option Configuration registers. ... Option Bit Control Register are
|
|
||||||
* loaded before the device exits Reset and the ZNEO CPU begins code
|
|
||||||
* execution. The Option Configuration registers are not part of the
|
|
||||||
* Register file and are not accessible for read or write access."
|
|
||||||
*
|
|
||||||
* "The FLASH3 value of 0x7f is very important because it enables the
|
|
||||||
* J-port, otherwise used for 16-bit data.
|
|
||||||
*
|
|
||||||
* "... in 16z there are some unusual hardware connections. ZNEO
|
|
||||||
* communicates with 16-bit memory via 8-bit bus and using the 16-bit
|
|
||||||
* control signals BHE and BLE."
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
# define BOARD_FLOPTION0 (Z16F_FLOPTION0_MAXPWR | Z16F_FLOPTION0_WDTRES | \
|
|
||||||
Z16F_FLOPTION0_WDTA0 | Z16F_FLOPTION0_VBOA0 | \
|
|
||||||
Z16F_FLOPTION0_DBGUART | Z16F_FLOPTION0_FWP | \
|
|
||||||
Z16F_FLOPTION0_RP)
|
|
||||||
|
|
||||||
# define BOARD_FLOPTION1 (Z16F_FLOPTION1_RESVD | Z16F_FLOPTION1_MCEN | \
|
|
||||||
Z16F_FLOPTION1_OFFH | Z16F_FLOPTION1_OFFL)
|
|
||||||
|
|
||||||
# define BOARD_FLOPTION2 Z16F_FLOPTION2_RESVD
|
|
||||||
|
|
||||||
# define BOARD_FLOPTION3 (Z16F_FLOPTION3_RESVD | Z16F_FLOPTION3_NORMAL)
|
|
||||||
|
|
||||||
/* The same settings, pre-digested for assembly language */
|
|
||||||
|
|
||||||
#else
|
|
||||||
# define BOARD_FLOPTION0 %ff
|
|
||||||
# define BOARD_FLOPTION1 %ff
|
|
||||||
# define BOARD_FLOPTION2 %ff
|
|
||||||
# define BOARD_FLOPTION3 %7f
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* 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 /* __CONFIGS_16Z_INCLUDE_BOARD_H */
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
nsh.hex
|
|
||||||
nsh.map
|
|
||||||
nsh.lod
|
|
||||||
nsh.wsp
|
|
||||||
|
|
||||||
@@ -1,264 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# 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
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
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. Note that you must apply the ZNEO patch if you are using ZDS-II 5.0.1.
|
|
||||||
See the README.txt file in the parent directory for more information.
|
|
||||||
|
|
||||||
2. This configuration does not run correctly. There is currently a problem
|
|
||||||
with the SRAM accesses.
|
|
||||||
|
|
||||||
3. 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.
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,92 +0,0 @@
|
|||||||
/****************************************************************************/
|
|
||||||
/* 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 $020000 : $EFFFFF
|
|
||||||
|
|
||||||
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 = 1
|
|
||||||
define _SYS_CLK_FREQ = 18432000
|
|
||||||
|
|
||||||
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 */
|
|
||||||
|
|
||||||
@@ -1,238 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
#!/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 ZDS-II tools were installed
|
|
||||||
#
|
|
||||||
TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_ZNEO_5.0.1/bin"
|
|
||||||
|
|
||||||
#
|
|
||||||
# This is the path to the 16z tool directory
|
|
||||||
#
|
|
||||||
TOOL_DIR="${WD}/configs/16z/tools"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Add the path to the toolchain and tool directory 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}:${TOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
|
|
||||||
echo "PATH : ${PATH}"
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
@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%
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
/Make.dep
|
|
||||||
/.depend
|
|
||||||
/*.obj
|
|
||||||
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# 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
|
|
||||||
@@ -1,175 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
* 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: board_led_initialize
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
|
||||||
void board_led_initialize(void)
|
|
||||||
{
|
|
||||||
/* All GPIO initialization is done in up_lowinit() */
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: board_led_on
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_led_on(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: board_led_off
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void board_led_off(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 */
|
|
||||||
@@ -1,300 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
* 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"
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* Name: z16f_extcsinit
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
static void z16f_extcsinit(void)
|
|
||||||
{
|
|
||||||
/* CS0 enabled, Data [0:7]
|
|
||||||
* Post Read: No wait states; Chip select: 1 wait state
|
|
||||||
*/
|
|
||||||
|
|
||||||
putreg16(0x9001, Z16F_EXTCS0);
|
|
||||||
|
|
||||||
/* CS1 enabled, Data [0:7]
|
|
||||||
* Post Read: No wait states; Chip select: 1 wait state
|
|
||||||
*/
|
|
||||||
|
|
||||||
putreg16(0x9001, Z16F_EXTCS1);
|
|
||||||
|
|
||||||
/* CS2 enabled, Data [0:7]
|
|
||||||
* Post Read: 1 wait state; Chip select: 1 wait state
|
|
||||||
*/
|
|
||||||
|
|
||||||
putreg16(0x9011, Z16F_EXTCS2);
|
|
||||||
|
|
||||||
/* CS3 enabled, Data [0:7]
|
|
||||||
* Post Read: 1 wait state; Chip select: 5 wait states
|
|
||||||
*/
|
|
||||||
|
|
||||||
putreg16(0x9015, Z16F_EXTCS3);
|
|
||||||
|
|
||||||
/* CS4 enabled, Data [0:7]
|
|
||||||
* Post Read: 1 wait state; Chip select: 5 wait states
|
|
||||||
*/
|
|
||||||
|
|
||||||
putreg16(0x9015, Z16F_EXTCS4);
|
|
||||||
|
|
||||||
/* CS5 enabled, Data [0:7]
|
|
||||||
* Post Read: 1 wait state; Chip select: 5 wait states
|
|
||||||
*/
|
|
||||||
|
|
||||||
putreg16(0x9015, Z16F_EXTCS5);
|
|
||||||
|
|
||||||
/* Enable the 8-bit external bus interface */
|
|
||||||
|
|
||||||
putreg8(0x40, Z16F_EXTCT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* Name: z16f_gpioinit
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Configure board-specific GPIO usage here. Driver pin configurations
|
|
||||||
* are set in the associated device drivers (such as UART, SPI, I2C,
|
|
||||||
* etc.) and must be preserved.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
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
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* Name: z16f_lowinit
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
void z16f_lowinit(void)
|
|
||||||
{
|
|
||||||
z16f_extcsinit(); /* Configure external memory */
|
|
||||||
z16f_gpioinit(); /* Configure board GPIOs */
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
############################################################################
|
|
||||||
# configs/16z/tools/dopatch.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.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
USAGE="${0} [-R] \$PWD"
|
|
||||||
WD=`pwd`
|
|
||||||
TOOLDIR=${WD}/configs/16z/tools
|
|
||||||
ME=${TOOLDIR}/dopatch.sh
|
|
||||||
PATCH=${TOOLDIR}/zneo-zdsii-5_0_1-variadic-func-fix.patch
|
|
||||||
ARGS=${1}
|
|
||||||
|
|
||||||
if [ ! -x ${ME} ]; then
|
|
||||||
echo "ERROR: This script must be executed from the top-level NuttX directory"
|
|
||||||
echo ${USAGE}
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -r ${PATCH} ]; then
|
|
||||||
echo "ERROR: Readable patch not found at ${PATCH}"
|
|
||||||
echo ${USAGE}
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd .. || \
|
|
||||||
{ echo "ERROR: failed to CD to the parent directory"; exit 1; }
|
|
||||||
|
|
||||||
cat ${PATCH} | patch ${ARGS} -p1 || \
|
|
||||||
{ echo "ERROR: patch failed" ; exit 1; }
|
|
||||||
@@ -1,187 +0,0 @@
|
|||||||
diff --git a/apps/nshlib/nsh_console.c b/apps/nshlib/nsh_console.c
|
|
||||||
index ba7dbe7..45e4ab1 100644
|
|
||||||
--- a/apps/nshlib/nsh_console.c
|
|
||||||
+++ b/apps/nshlib/nsh_console.c
|
|
||||||
@@ -46,6 +46,7 @@
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <string.h>
|
|
||||||
+#include <stdarg.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <debug.h>
|
|
||||||
@@ -79,8 +80,13 @@ static FAR struct nsh_vtbl_s *nsh_consoleclone(FAR struct nsh_vtbl_s *vtbl);
|
|
||||||
static void nsh_consolerelease(FAR struct nsh_vtbl_s *vtbl);
|
|
||||||
static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl,
|
|
||||||
FAR const void *buffer, size_t nbytes);
|
|
||||||
+#if 0
|
|
||||||
static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl,
|
|
||||||
FAR const char *fmt, ...);
|
|
||||||
+#else
|
|
||||||
+static int nsh_consolevoutput(FAR struct nsh_vtbl_s *vtbl,
|
|
||||||
+ FAR const char *fmt, va_list ap);
|
|
||||||
+#endif
|
|
||||||
static FAR char *nsh_consolelinebuffer(FAR struct nsh_vtbl_s *vtbl);
|
|
||||||
|
|
||||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
|
||||||
@@ -213,6 +219,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, FAR const void *buf
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl,
|
|
||||||
FAR const char *fmt, ...)
|
|
||||||
{
|
|
||||||
@@ -263,6 +270,51 @@ static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl,
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
+#else
|
|
||||||
+static int nsh_consolevoutput(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, va_list ap)
|
|
||||||
+{
|
|
||||||
+#if CONFIG_NFILE_DESCRIPTORS > 0
|
|
||||||
+ FAR struct console_stdio_s *pstate = (FAR struct console_stdio_s *)vtbl;
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ /* The stream is open in a lazy fashion. This is done because the file
|
|
||||||
+ * descriptor may be opened on a different task than the stream. The
|
|
||||||
+ * actual open will then occur with the first output from the new task.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ if (nsh_openifnotopen(pstate) != 0)
|
|
||||||
+ {
|
|
||||||
+ return ERROR;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ret = vfprintf(pstate->cn_outstream, fmt, ap);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
+#else
|
|
||||||
+ char *str;
|
|
||||||
+
|
|
||||||
+ /* Use avsprintf() to allocate a buffer and fill it with the formatted
|
|
||||||
+ * data
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ str = NULL;
|
|
||||||
+ (void)avsprintf(&str, fmt, ap);
|
|
||||||
+
|
|
||||||
+ /* Was a string allocated? */
|
|
||||||
+
|
|
||||||
+ if (str)
|
|
||||||
+ {
|
|
||||||
+ /* Yes.. Print then free the allocated string */
|
|
||||||
+
|
|
||||||
+ printf("%s", str);
|
|
||||||
+ free(str);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+#endif
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: nsh_consolelinebuffer
|
|
||||||
*
|
|
||||||
@@ -452,7 +504,11 @@ FAR struct console_stdio_s *nsh_newconsole(void)
|
|
||||||
pstate->cn_vtbl.release = nsh_consolerelease;
|
|
||||||
#endif
|
|
||||||
pstate->cn_vtbl.write = nsh_consolewrite;
|
|
||||||
+#if 0
|
|
||||||
pstate->cn_vtbl.output = nsh_consoleoutput;
|
|
||||||
+#else
|
|
||||||
+ pstate->cn_vtbl.voutput = nsh_consolevoutput;
|
|
||||||
+#endif
|
|
||||||
pstate->cn_vtbl.linebuffer = nsh_consolelinebuffer;
|
|
||||||
pstate->cn_vtbl.exit = nsh_consoleexit;
|
|
||||||
|
|
||||||
@@ -489,3 +545,15 @@ FAR struct console_stdio_s *nsh_newconsole(void)
|
|
||||||
}
|
|
||||||
return pstate;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+int nsh_output(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...)
|
|
||||||
+{
|
|
||||||
+ va_list ap;
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ va_start(ap, fmt);
|
|
||||||
+ ret = vtbl->voutput(vtbl, fmt, ap);
|
|
||||||
+ va_end(ap);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
diff --git a/apps/nshlib/nsh_console.h b/apps/nshlib/nsh_console.h
|
|
||||||
index c78362f..207f9b9 100644
|
|
||||||
--- a/apps/nshlib/nsh_console.h
|
|
||||||
+++ b/apps/nshlib/nsh_console.h
|
|
||||||
@@ -47,6 +47,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
+#include <stdarg.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
@@ -62,11 +63,13 @@
|
|
||||||
#define nsh_undirect(v,s) (v)->undirect(v,s)
|
|
||||||
#define nsh_exit(v,s) (v)->exit(v,s)
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
|
||||||
# define nsh_output(v, ...) (v)->output(v, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define nsh_output vtbl->output
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Size of info to be saved in call to nsh_redirect */
|
|
||||||
|
|
||||||
@@ -107,7 +110,11 @@ struct nsh_vtbl_s
|
|
||||||
void (*release)(FAR struct nsh_vtbl_s *vtbl);
|
|
||||||
#endif
|
|
||||||
ssize_t (*write)(FAR struct nsh_vtbl_s *vtbl, FAR const void *buffer, size_t nbytes);
|
|
||||||
+#if 0
|
|
||||||
int (*output)(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...);
|
|
||||||
+#else
|
|
||||||
+ int (*voutput)(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, va_list ap);
|
|
||||||
+#endif
|
|
||||||
FAR char *(*linebuffer)(FAR struct nsh_vtbl_s *vtbl);
|
|
||||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
|
||||||
void (*redirect)(FAR struct nsh_vtbl_s *vtbl, int fd, FAR uint8_t *save);
|
|
||||||
@@ -159,5 +166,6 @@ struct console_stdio_s
|
|
||||||
/* Defined in nsh_console.c *************************************************/
|
|
||||||
|
|
||||||
FAR struct console_stdio_s *nsh_newconsole(void);
|
|
||||||
+int nsh_output(FAR struct nsh_vtbl_s *vtbl, FAR const char *fmt, ...);
|
|
||||||
|
|
||||||
#endif /* __APPS_NSHLIB_NSH_CONSOLE_H */
|
|
||||||
diff --git a/nuttx/include/wdog.h b/nuttx/include/nuttx/wdog.h
|
|
||||||
index 0aa3584..ac4a36a 100644
|
|
||||||
--- a/nuttx/include/nuttx/wdog.h
|
|
||||||
+++ b/nuttx/include/nuttx/wdog.h
|
|
||||||
@@ -74,7 +74,23 @@ typedef union wdparm_u wdparm_t;
|
|
||||||
* watchdog function expires. Up to four parameters may be passed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
typedef CODE void (*wdentry_t)(int argc, uint32_t arg1, ...);
|
|
||||||
+#elif CONFIG_MAX_WDOGPARMS < 1
|
|
||||||
+typedef CODE void (*wdentry_t)(int argc);
|
|
||||||
+#elif CONFIG_MAX_WDOGPARMS < 2
|
|
||||||
+typedef CODE void (*wdentry_t)(int argc, uint32_t arg1);
|
|
||||||
+#elif CONFIG_MAX_WDOGPARMS < 3
|
|
||||||
+typedef CODE void (*wdentry_t)(int argc, uint32_t arg1, uint32_t arg2);
|
|
||||||
+#elif CONFIG_MAX_WDOGPARMS < 4
|
|
||||||
+typedef CODE void (*wdentry_t)(int argc, uint32_t arg1, uint32_t arg2,
|
|
||||||
+ uint32_t arg3);
|
|
||||||
+#elif CONFIG_MAX_WDOGPARMS < 5
|
|
||||||
+typedef CODE void (*wdentry_t)(int argc, uint32_t arg1, uint32_t arg2,
|
|
||||||
+ uint32_t arg3, uint32_t arg4);
|
|
||||||
+#else
|
|
||||||
+# error Ooops. CONFIG_MAX_WDOGPARMS > 4
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Watchdog 'handle' */
|
|
||||||
|
|
||||||
@@ -12,15 +12,6 @@ choice
|
|||||||
be available for selection. Use ARCH_BOARD_CUSTOM to create a new
|
be available for selection. Use ARCH_BOARD_CUSTOM to create a new
|
||||||
board configuration.
|
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
|
config ARCH_BOARD_AMBER
|
||||||
bool "Amber Web Server"
|
bool "Amber Web Server"
|
||||||
depends on ARCH_CHIP_ATMEGA128
|
depends on ARCH_CHIP_ATMEGA128
|
||||||
@@ -957,7 +948,6 @@ config ARCH_BOARD_CUSTOM_DIR
|
|||||||
|
|
||||||
config ARCH_BOARD
|
config ARCH_BOARD
|
||||||
string
|
string
|
||||||
default "16z" if ARCH_BOARD_16Z
|
|
||||||
default "amber" if ARCH_BOARD_AMBER
|
default "amber" if ARCH_BOARD_AMBER
|
||||||
default "arduino-due" if ARCH_BOARD_ARDUINO_DUE
|
default "arduino-due" if ARCH_BOARD_ARDUINO_DUE
|
||||||
default "avr32dev1" if ARCH_BOARD_AVR32DEV1
|
default "avr32dev1" if ARCH_BOARD_AVR32DEV1
|
||||||
@@ -1107,9 +1097,6 @@ config NSH_MMCSDSPIPORTNO
|
|||||||
|
|
||||||
comment "Board-Specific Options"
|
comment "Board-Specific Options"
|
||||||
|
|
||||||
if ARCH_BOARD_16Z
|
|
||||||
source "configs/16z/Kconfig"
|
|
||||||
endif
|
|
||||||
if ARCH_BOARD_AMBER
|
if ARCH_BOARD_AMBER
|
||||||
source "configs/amber/Kconfig"
|
source "configs/amber/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -161,11 +161,6 @@ http://nuttx.org/Documentation/NuttXConfigVariables.html.
|
|||||||
Supported Boards
|
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
|
configs/amber
|
||||||
This is placeholder for the SoC Robotics Amber Web Server that is based
|
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
|
on the Atmel AVR ATMega128 MCU. There is not much there yet and what is
|
||||||
|
|||||||
@@ -114,11 +114,6 @@ The patch can also be removed with:
|
|||||||
|
|
||||||
See the section "Selecting Configurations" below.
|
See the section "Selecting Configurations" below.
|
||||||
|
|
||||||
UPDATE: 2014-4-27: The configs/16z/nsh example still does not run
|
|
||||||
correctly. This is believe to be caused by additional, undiagnosed
|
|
||||||
compiler errors. At present, these compiler bugs do not seem to effect
|
|
||||||
the z16f2800100zcog.
|
|
||||||
|
|
||||||
Serial Console
|
Serial Console
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* The 16Z board has a 20MHz crystal. The ZNEO clocking will be configured
|
/* The Z16F2800100ZCOG board has a 20MHz crystal. The ZNEO clocking will be
|
||||||
* to use this crystal frequency directly as the clock source
|
* configured to use this crystal frequency directly as the clock source
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BOARD_XTAL_FREQUENCY 20000000 /* 20MHz */
|
#define BOARD_XTAL_FREQUENCY 20000000 /* 20MHz */
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ CONFIG_RAM_SIZE=65536
|
|||||||
#
|
#
|
||||||
# Board Selection
|
# Board Selection
|
||||||
#
|
#
|
||||||
# CONFIG_ARCH_BOARD_16Z is not set
|
|
||||||
CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y
|
CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y
|
||||||
# CONFIG_ARCH_BOARD_CUSTOM is not set
|
# CONFIG_ARCH_BOARD_CUSTOM is not set
|
||||||
CONFIG_ARCH_BOARD="z16f2800100zcog"
|
CONFIG_ARCH_BOARD="z16f2800100zcog"
|
||||||
|
|||||||
Reference in New Issue
Block a user