2008-01-09 23:53:52 +01:00
|
|
|
README.txt
|
2014-01-02 14:53:27 +01:00
|
|
|
==========
|
2008-01-09 23:53:52 +01:00
|
|
|
|
2010-10-01 03:07:04 +02:00
|
|
|
This is the README file for the NuttX port to the ZiLog ZNEO MCU.
|
|
|
|
|
2014-04-26 16:23:11 +02:00
|
|
|
- Console output is on UART0.
|
|
|
|
|
|
|
|
- NOTE: My board has a 20MHz crystal, but I have heard of other boards with
|
|
|
|
18.432MHz crystals. If you board has a diff crystal installed, then
|
|
|
|
modify the system frequency in include/board.h.
|
|
|
|
|
|
|
|
Contents
|
|
|
|
========
|
|
|
|
|
|
|
|
- ZDS-II Compiler Versions
|
|
|
|
- Patches
|
|
|
|
- Serial Console
|
|
|
|
- Selecting Configurations
|
|
|
|
- Configuration Sub-directories
|
|
|
|
|
2008-01-10 19:16:20 +01:00
|
|
|
ZDS-II Compiler Versions
|
2014-01-02 14:53:27 +01:00
|
|
|
========================
|
2008-01-10 19:16:20 +01:00
|
|
|
|
2012-11-29 17:48:29 +01:00
|
|
|
Version 4.10.2
|
|
|
|
|
2008-02-07 15:41:11 +01:00
|
|
|
The ZDS-II version 4.10.2 will not compile NuttX. It reports "internal
|
|
|
|
errors" on some of the files. Upgrades to ZDS-II are available for
|
|
|
|
download from the Zilog website: http://www.zilog.com/software/zds2.asp
|
2008-01-09 23:53:52 +01:00
|
|
|
|
2012-11-29 17:48:29 +01:00
|
|
|
Version 4.11.0
|
|
|
|
|
2008-02-07 15:41:11 +01:00
|
|
|
NuttX compiles correctly with the newer 4.11.0 version of the ZDS-II
|
|
|
|
toolchain. However, I have found a few issues:
|
|
|
|
|
|
|
|
- The code will not run without the -reduceopt option. There is,
|
|
|
|
apparently, some optimization related issue. This issue has not
|
|
|
|
been analyzed as of this writing.
|
|
|
|
|
|
|
|
- Not all NuttX logic will not run with the -regvars option. There is
|
|
|
|
at least one failure that has been reported to ZiLOG as incident 81400.
|
|
|
|
|
|
|
|
- The Pascal add-on interpreter includes a large switch statement and
|
|
|
|
exposes another compiler problem. This is reported as incident 81459.
|
2008-01-09 23:53:52 +01:00
|
|
|
|
2012-11-29 17:48:29 +01:00
|
|
|
Version 4.11.1
|
|
|
|
|
2010-10-01 03:07:04 +02:00
|
|
|
As of this writing (30 September 2010), the latest release of ZDS-II for the
|
|
|
|
ZNEO is 4.11.1. It is unknown if this release includes fixes for incidents
|
|
|
|
81400 and 81459 or not. It is unknown if the code will run without -reduceopt
|
|
|
|
either. (Basically, it compiles with 4.11.1, but is untested with that version).
|
|
|
|
|
2014-04-27 23:49:38 +02:00
|
|
|
Version 4.12.0
|
|
|
|
|
|
|
|
Never tested
|
|
|
|
|
|
|
|
Version 5.0.0
|
|
|
|
|
|
|
|
Never tested
|
|
|
|
|
2012-11-29 17:48:29 +01:00
|
|
|
Version 5.0.1
|
|
|
|
|
|
|
|
On November 29, 2012, all of the z16f configurations were converted to use 5.0.1,
|
|
|
|
but have not been verified on a running target.
|
|
|
|
|
|
|
|
Paths were also updated that are specific to a 32-bit toolchain running on
|
|
|
|
a 64 bit windows platform. Change to a different toolchain, you will need
|
|
|
|
to modify the versioning in Make.defs and setenv.sh; if you want to build
|
|
|
|
on a different platform, you will need to change the path in the ZDS binaries
|
|
|
|
in those same files.
|
2014-01-01 19:40:18 +01:00
|
|
|
|
2012-11-29 17:48:29 +01:00
|
|
|
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/z16f2800100zcog/*/setenv.sh and (2)
|
|
|
|
configs/z16f2800100zcog/*/Make.defs. Simply edit these two files, changing
|
|
|
|
5.0.1 to whatever.
|
2008-01-10 19:16:20 +01:00
|
|
|
|
2014-01-24 18:58:30 +01:00
|
|
|
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/z16f2800100zcog/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 z16f2800100zcog/nsh
|
|
|
|
cd ..
|
|
|
|
. ./setenv.sh
|
2014-04-25 15:23:31 +02:00
|
|
|
dopatch.sh
|
2014-01-24 18:58:30 +01:00
|
|
|
make
|
|
|
|
|
2014-04-25 15:23:31 +02:00
|
|
|
The patch can also be removed with:
|
|
|
|
|
|
|
|
dopatch.sh -R
|
|
|
|
|
2014-01-24 18:58:30 +01:00
|
|
|
See the section "Selecting Configurations" below.
|
|
|
|
|
2014-04-26 16:23:11 +02:00
|
|
|
Serial Console
|
|
|
|
==============
|
|
|
|
|
|
|
|
By default, console output is on UART1 which corresponds to the DB9
|
|
|
|
connector labelled CONSOLE.
|
|
|
|
|
|
|
|
UART1 is also available on JP2:
|
|
|
|
|
|
|
|
MCU PIN GPIO JP2
|
2014-04-26 17:43:40 +02:00
|
|
|
Pin 86 TXD1 PD5 JP2 Pin 26
|
|
|
|
Pin 87 RXD1 PD4 JP2 Pin 27
|
2014-04-26 16:23:11 +02:00
|
|
|
Vcc JP2 Pin 59
|
|
|
|
GND JP2 Pins 19, 39, 46, 48, 56
|
|
|
|
|
2014-01-02 14:53:27 +01:00
|
|
|
Selecting Configurations
|
|
|
|
========================
|
2008-01-10 19:16:20 +01:00
|
|
|
|
|
|
|
Variations on the basic z8f162800100zcog configuration are maintained
|
|
|
|
in subdirectories. To configure any specific configuration, do the
|
|
|
|
following steps:
|
|
|
|
|
|
|
|
cd <nuttx-top-directory>/tools
|
|
|
|
./configure.sh z16f2800100zcog/<sub-directory>
|
2010-10-01 03:07:04 +02:00
|
|
|
cd <nuttx-top-directory>
|
2008-01-10 19:16:20 +01:00
|
|
|
make
|
|
|
|
|
|
|
|
Where <sub-directory> is the specific board configuration that you
|
|
|
|
wish to build. The following board-specific configurations are
|
2014-01-24 18:58:30 +01:00
|
|
|
available. You may also need to apply a path to NuttX before making.
|
|
|
|
Please refer the the section "Patches" above"
|
2014-01-02 14:53:27 +01:00
|
|
|
|
|
|
|
Configuration Sub-directories
|
|
|
|
=============================
|
|
|
|
|
|
|
|
source/ and include/
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
These directories contain common logic for all z16f2800100zcog
|
|
|
|
configurations.
|
2008-01-10 19:16:20 +01:00
|
|
|
|
2014-01-01 19:40:18 +01:00
|
|
|
nsh
|
|
|
|
---
|
|
|
|
nsh:
|
|
|
|
This configuration directory will built the NuttShell (NSH). See
|
|
|
|
the NSH user manual in the documents directory (or online at nuttx.org).
|
2014-01-22 18:50:37 +01:00
|
|
|
See also the README.txt file in the nsh sub-directory for information
|
2014-01-01 19:40:18 +01:00
|
|
|
about using ZDS-II.
|
|
|
|
|
|
|
|
NOTES:
|
|
|
|
|
|
|
|
1. This configuration uses the mconf-based configuration tool. To
|
|
|
|
change this configuration using that tool, you should:
|
|
|
|
|
|
|
|
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
|
|
|
and misc/tools/
|
|
|
|
|
|
|
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
|
|
|
reconfiguration process.
|
|
|
|
|
|
|
|
2. By default, this configuration assumes that you are using the
|
|
|
|
Cygwin environment on Windows. An option is to use the native
|
|
|
|
CMD.exe window build as described in the top-level README.txt
|
|
|
|
file. To set up that configuration:
|
|
|
|
|
|
|
|
-CONFIG_WINDOWS_CYGWIN=y
|
|
|
|
+CONFIG_WINDOWS_NATIVE=y
|
|
|
|
|
|
|
|
And after configuring, make sure that CONFIG_APPS_DIR uses
|
|
|
|
the back slash character. For example:
|
|
|
|
|
|
|
|
CONFIG_APPS_DIR="..\apps"
|
|
|
|
|
|
|
|
NOTES:
|
|
|
|
|
|
|
|
a. If you need to change the toolchain path used in Make.defs, you
|
|
|
|
will need to use the short 8.3 filenames to avoid spaces. On my
|
|
|
|
PC, C:\PROGRA~1\ is is C:\Program Files\ and C:\PROGRA~2\ is
|
|
|
|
C:\Program Files (x86)\
|
|
|
|
b. I have not tried to use this configuration with the native
|
|
|
|
Windows build, but I would expect the same issues as is listed
|
|
|
|
for the ostest configuration..
|
|
|
|
|
2014-01-04 15:38:05 +01:00
|
|
|
STATUS:
|
2014-01-24 18:58:30 +01:00
|
|
|
|
|
|
|
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.
|
|
|
|
The configuration will run correctly with the patch applied.
|
2014-01-04 15:38:05 +01:00
|
|
|
|
2012-11-29 19:44:02 +01:00
|
|
|
ostest
|
|
|
|
------
|
|
|
|
|
2008-02-02 21:16:31 +01:00
|
|
|
This builds the examples/ostest application for execution from FLASH.
|
2014-01-01 19:40:18 +01:00
|
|
|
See the README.txt file in the ostest sub-directory for information
|
|
|
|
about using ZDS-II. See also apps/examples/README.txt for information
|
|
|
|
about ostest.
|
2008-02-02 21:16:31 +01:00
|
|
|
|
2012-11-29 19:44:02 +01:00
|
|
|
NOTES:
|
|
|
|
|
|
|
|
1. This configuration uses the mconf-based configuration tool. To
|
|
|
|
change this configuration using that tool, you should:
|
|
|
|
|
2013-01-09 13:55:13 +01:00
|
|
|
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
|
|
|
and misc/tools/
|
2012-11-29 19:44:02 +01:00
|
|
|
|
|
|
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
|
|
|
reconfiguration process.
|
|
|
|
|
|
|
|
2. By default, this configuration assumes that you are using the
|
|
|
|
Cygwin environment on Windows. An option is to use the native
|
|
|
|
CMD.exe window build as described in the top-level README.txt
|
|
|
|
file. To set up that configuration:
|
|
|
|
|
|
|
|
-CONFIG_WINDOWS_CYGWIN=y
|
|
|
|
+CONFIG_WINDOWS_NATIVE=y
|
|
|
|
|
|
|
|
And after configuring, make sure that CONFIG_APPS_DIR uses
|
|
|
|
the back slash character. For example:
|
|
|
|
|
|
|
|
CONFIG_APPS_DIR="..\apps"
|
|
|
|
|
|
|
|
NOTES:
|
2014-01-01 19:40:18 +01:00
|
|
|
|
2012-11-29 19:44:02 +01:00
|
|
|
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
|
2014-04-26 16:23:11 +02:00
|
|
|
is the spurious spaces and and carriage returns are generated at
|
2012-11-29 19:44:02 +01:00
|
|
|
the end of the lines after a line continuation (\ ^M). If these
|
|
|
|
trailing bad characters are manually eliminated, then the build
|
|
|
|
will succeed on the next try.
|
|
|
|
|
|
|
|
pashello
|
|
|
|
--------
|
2008-02-02 21:16:31 +01:00
|
|
|
|
|
|
|
Configures to use examples/pashello for execution from FLASH
|
|
|
|
See examples/README.txt for information about pashello.
|
2008-01-10 19:16:20 +01:00
|
|
|
|
2012-11-29 19:44:02 +01:00
|
|
|
NOTES:
|
|
|
|
|
|
|
|
1. This configuration uses the mconf-based configuration tool. To
|
|
|
|
change this configuration using that tool, you should:
|
|
|
|
|
2013-01-09 13:55:13 +01:00
|
|
|
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
|
|
|
and misc/tools/
|
2012-11-29 19:44:02 +01:00
|
|
|
|
|
|
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
|
|
|
reconfiguration process.
|
|
|
|
|
|
|
|
2. The last time I tried building this configuration, there were
|
|
|
|
a few undefined symbols from the PCODE logic. It might require
|
|
|
|
a little TLC to get this all working again.
|
|
|
|
|
|
|
|
3. The native windows build has not been tried with this configuration
|
|
|
|
but should, in principle, work (see notes for the ostest configuration
|
|
|
|
above).
|
|
|
|
|
2008-02-07 15:41:11 +01:00
|
|
|
Check out any README.txt files in these <sub-directory>s.
|