mirror of
https://github.com/apache/nuttx.git
synced 2025-12-14 07:25:51 +08:00
Compare commits
212 Commits
nuttx-3.6
...
nuttx-3.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07475ddcaf | ||
|
|
4daf380c0c | ||
|
|
52ca776537 | ||
|
|
c93316bf89 | ||
|
|
ab876969dd | ||
|
|
536a458525 | ||
|
|
7caf0ae3b6 | ||
|
|
0125c5989f | ||
|
|
ec531944df | ||
|
|
5b5b6af723 | ||
|
|
cc67653244 | ||
|
|
8b84d88550 | ||
|
|
7984beaa4b | ||
|
|
976ff7a822 | ||
|
|
6cf70e0e2a | ||
|
|
71105edc9f | ||
|
|
7b5c4e515b | ||
|
|
8d31154e34 | ||
|
|
bb2a525bac | ||
|
|
990820d579 | ||
|
|
12dea795b3 | ||
|
|
460aa35bb4 | ||
|
|
b1234a6bda | ||
|
|
2dda17684f | ||
|
|
bcc151c414 | ||
|
|
5f80286cc5 | ||
|
|
b1b50a6bad | ||
|
|
dd90e2f273 | ||
|
|
85d947640a | ||
|
|
aae7fd5432 | ||
|
|
aab9267f38 | ||
|
|
4b331938fa | ||
|
|
f8e0254f63 | ||
|
|
c1d789accf | ||
|
|
cbc6fcce57 | ||
|
|
34974400b3 | ||
|
|
491f5b42b5 | ||
|
|
cb4390a8a0 | ||
|
|
da700355ed | ||
|
|
fed8278b13 | ||
|
|
96565fd538 | ||
|
|
e6756626f8 | ||
|
|
cb2cc8c22e | ||
|
|
28366b75d0 | ||
|
|
295a7a1fd5 | ||
|
|
feccbf06e2 | ||
|
|
352eb0fb64 | ||
|
|
daa2610d07 | ||
|
|
e173b3ff73 | ||
|
|
1bada71e80 | ||
|
|
b8b16ad1f0 | ||
|
|
c447d1ff47 | ||
|
|
81f4b8dbf0 | ||
|
|
7629c2c811 | ||
|
|
fb76a5e579 | ||
|
|
98f52d9f61 | ||
|
|
b125ca88c2 | ||
|
|
6ab50706bb | ||
|
|
aace60d986 | ||
|
|
0823879b84 | ||
|
|
c558d34600 | ||
|
|
c90fc3b5e6 | ||
|
|
67a6ec5ddb | ||
|
|
65280ba602 | ||
|
|
f906f80359 | ||
|
|
b3969170d5 | ||
|
|
1ce0745dd8 | ||
|
|
4a157c8855 | ||
|
|
3ee215ef6f | ||
|
|
b41956664f | ||
|
|
a6623735c0 | ||
|
|
a7e1b7b8eb | ||
|
|
9657fa43d8 | ||
|
|
dfcedbcac5 | ||
|
|
cabaa75a43 | ||
|
|
ce8536d51f | ||
|
|
0bfed5e52d | ||
|
|
9a955f0901 | ||
|
|
8d2f18e709 | ||
|
|
ba6cd0d3e2 | ||
|
|
0067b7a08c | ||
|
|
ad2155cd0c | ||
|
|
f0c6f2f44b | ||
|
|
50a54fc544 | ||
|
|
c4b3cf7095 | ||
|
|
efb733dfc4 | ||
|
|
dda4565ed9 | ||
|
|
432da54d46 | ||
|
|
0fca25b777 | ||
|
|
ee5f02dae5 | ||
|
|
9a7c5c29c5 | ||
|
|
54242efbcd | ||
|
|
f90fb7cdbe | ||
|
|
53a99eb382 | ||
|
|
b252be9bb9 | ||
|
|
3c494bbc9a | ||
|
|
669118c68e | ||
|
|
14570ca238 | ||
|
|
2d8db3fabc | ||
|
|
325e4e3833 | ||
|
|
bf2225c26c | ||
|
|
4dd560c5f0 | ||
|
|
b114621101 | ||
|
|
e3bd6172aa | ||
|
|
75253df209 | ||
|
|
d0a0accc99 | ||
|
|
5622797411 | ||
|
|
507914b3b4 | ||
|
|
2ab10a107f | ||
|
|
97a52f1b17 | ||
|
|
039efd6e2b | ||
|
|
7dffca15a1 | ||
|
|
978b0f79ad | ||
|
|
0bd70f78e4 | ||
|
|
28b1b8fdac | ||
|
|
757eff86e8 | ||
|
|
f116c153b9 | ||
|
|
174a9f77c6 | ||
|
|
3fd8bd65f4 | ||
|
|
2f1acf6786 | ||
|
|
09af7cf6ce | ||
|
|
00ad2ca2c4 | ||
|
|
ce1c48f5b6 | ||
|
|
ee8c1a2d58 | ||
|
|
4c564b97dc | ||
|
|
ac37ac75e0 | ||
|
|
1e52a8f36a | ||
|
|
7b3c17b1c1 | ||
|
|
ad8140f162 | ||
|
|
fac0d203bc | ||
|
|
e3035d2dff | ||
|
|
2134001f0f | ||
|
|
aa7ecab89c | ||
|
|
ce50defd4c | ||
|
|
3dc0fee9ba | ||
|
|
94ef1222d8 | ||
|
|
40f92a9da4 | ||
|
|
cb79ddc9a0 | ||
|
|
0a07af9fc7 | ||
|
|
1358cc1911 | ||
|
|
9654e2d4b4 | ||
|
|
c773c4e139 | ||
|
|
59451ae6c0 | ||
|
|
715cc89148 | ||
|
|
4a7a565ef3 | ||
|
|
c55f4a3783 | ||
|
|
89c63fc635 | ||
|
|
675205a5de | ||
|
|
3ae27c3c9e | ||
|
|
8aa92af787 | ||
|
|
46f139066c | ||
|
|
b4557a830a | ||
|
|
37d20db817 | ||
|
|
5db8af3015 | ||
|
|
16aff5292e | ||
|
|
4b07e6ffa4 | ||
|
|
d15ab7811c | ||
|
|
6e5c4b2316 | ||
|
|
4ad0370f60 | ||
|
|
b65bbad338 | ||
|
|
3616465288 | ||
|
|
c4ddb4980f | ||
|
|
948c8bd2d4 | ||
|
|
76d4673969 | ||
|
|
299dc971dd | ||
|
|
62f7d251ae | ||
|
|
e1f5aeaf51 | ||
|
|
fb4253bfb2 | ||
|
|
30984a7eed | ||
|
|
6bf63d8d35 | ||
|
|
ee1d841569 | ||
|
|
bf27d79c0d | ||
|
|
ad12689460 | ||
|
|
dfca90057b | ||
|
|
9291ec957f | ||
|
|
1f115108e6 | ||
|
|
9108a01f1d | ||
|
|
b07eb44e4e | ||
|
|
0d102fa42e | ||
|
|
1b853a92bb | ||
|
|
0dd2134fa8 | ||
|
|
9dbc6e1c2f | ||
|
|
517d951c67 | ||
|
|
8f3ef9954e | ||
|
|
0a32f4d20b | ||
|
|
544a21b80c | ||
|
|
291270beb5 | ||
|
|
af73c158f2 | ||
|
|
d387191f04 | ||
|
|
0e4924079a | ||
|
|
435528e7a0 | ||
|
|
e881da738c | ||
|
|
83f36eac7d | ||
|
|
748bcdbe11 | ||
|
|
e59f302e50 | ||
|
|
817b284a13 | ||
|
|
3dffab3aca | ||
|
|
0156bc785f | ||
|
|
32c3e79ece | ||
|
|
03d8c867cf | ||
|
|
3f1c7dc771 | ||
|
|
c691f1db9d | ||
|
|
d8b91b19e5 | ||
|
|
8216d763a6 | ||
|
|
131931c877 | ||
|
|
71f2d3d25d | ||
|
|
11e06742c2 | ||
|
|
eda24c6c3a | ||
|
|
c5a589f25b | ||
|
|
7a9bfd3ccb | ||
|
|
93dd5f44cb | ||
|
|
f14e8056ce |
67
ChangeLog
67
ChangeLog
@@ -290,4 +290,69 @@
|
||||
* Fix deadlock errors when using stdio but with no buffering
|
||||
* Add support for Pascal P-Code interpreter
|
||||
|
||||
0.3.7 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.3.6.1 2008-01-07 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* The initial 0.3.6 release including an error that prevented
|
||||
building successfully if the Pascal add-on was
|
||||
was not present.
|
||||
|
||||
0.3.7 2008-01-31 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added support for the Zilog Z16F using the Zilog Z16F2800100ZCOG
|
||||
Development Kit.
|
||||
* Add support toolchains that do not support making of dependencies
|
||||
* Fix Cygwin build with spaces in directory names
|
||||
* Name make system changes to deal with non-GNU toolchains (i.e., Zilog)
|
||||
* Add support for Windows native toolchains that cannot follow Cygwin soft links
|
||||
* Modified serial driver interface to handle hardware with non-16550A-like
|
||||
interrupt architecture (like the Z16F)
|
||||
* Added a "dumb" serial console driver to simplify OS bringup
|
||||
* Corrected a bug that caused the errno value of one task to be clobbered
|
||||
when a different task exits. Effects all architectures.
|
||||
|
||||
0.3.8 2008-02-10 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added a test case to verify the Pascal P-Code interpreter
|
||||
* Added /dev/zero
|
||||
* 'errno' is now defined to be *get_errno_ptr() with no name conflicts
|
||||
* Added lseek() and fseek()
|
||||
* Integrated Pascal interpreter test case on the simulation platform. Needs
|
||||
pascal-0.1.1.
|
||||
* Add Pascal test case on the z16f platform. Needs pascal-0.1.2 (does not
|
||||
yet work due to some tool issues).
|
||||
* C buffered I/O fixes:
|
||||
- Fix fflush() return value,
|
||||
- Add correct fflush behavior when the FILE argument is null.
|
||||
- Add logic to a correctly handle read/write access on the same FILE
|
||||
- fseek() flushes read/write data when before moving the file pointer
|
||||
- When read data is flushed, reposition the file pointer to account for
|
||||
buffered, but unread data
|
||||
* Pascal P-Code files are now standardized to big-endian for portability
|
||||
* Fix a build problem with z80 and SDCC 2.7.0 (format of a map file changed)
|
||||
(see bug 1887170)
|
||||
* Pascal P-Code runtime now compiles with the SDCC toolchain.
|
||||
* Added a generic CAN driver. This driver is untested as of this writing.
|
||||
* Corrected DM320 UART configuration problem
|
||||
|
||||
0.3.9 2008-03-09 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Began adding support for the ZiLOG Z8Encore! microcontroller for the Z8Encore000ZCO
|
||||
development board and the Z8F6403 part.
|
||||
* Fix broken 'clean' target on z80sim configurations
|
||||
* Re-structure arch/z80 to provide support for all ZiLOG 8-bit microcontrollers (ez8
|
||||
in particular for now).
|
||||
* Add support for TRS80-Model 3 based on the xtrs emulation (http://www.tim-mann.org/xtrs.html)
|
||||
Per patch from Jacques Pelletier.
|
||||
* In all shell scripts, change #!/bin/sh to #!/bin/bash to resolve problems in
|
||||
Ubuntu where /bin/sh is a link to dash.
|
||||
* Z8Encore! port verified on ZDS-II instruction set/chip simulator.
|
||||
|
||||
0.3.10 2008-05-15 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add support for the ZiLOG EZ80Acclaim microcontrooler (EZ80F91 chip).
|
||||
* Add configuration for the ZiLOG z8f64200100kit development kit, Z8F6423 part.
|
||||
* Add configuration for the ZiLOG ez80f0910200kitg development kit, EZ80F091 part.
|
||||
* Correct critical list handling errors in task shutdown logic: One in timer
|
||||
deletion logic (timer_delete.c) and one in stream logic (lib_init.c).
|
||||
|
||||
0.3.11 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||
<p>Last Updated: January 6, 2008</p>
|
||||
<p>Last Updated: May 15, 2008</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -27,39 +27,76 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#overview">Overview</a></td>
|
||||
<td>
|
||||
<a href="#overview">Overview</a>.<br>
|
||||
What is NuttX?
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#downloads">Downloads</a></td>
|
||||
<td>
|
||||
<a href="#downloads">Downloads</a>.<br>
|
||||
Where can I get NuttX? What is the current development status?
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#platforms">Supported Platforms</a></td>
|
||||
<td>
|
||||
<a href="#platforms">Supported Platforms</a>.<br>
|
||||
What target platforms has NuttX been ported to?
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#footprint">Memory Footprint</a></td>
|
||||
<td>
|
||||
<a href="#environments">Development Environments</a>.<br>
|
||||
What kinds of host cross-development platforms can be used with NuttX?
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#licensing">Licensing</a></td>
|
||||
<td>
|
||||
<a href="#footprint">Memory Footprint</a>.<br>
|
||||
Just how big is it? Do I have enough memory to use NuttX?
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#history">Release History</a></td>
|
||||
<td>
|
||||
<a href="#licensing">Licensing</a>.<br>
|
||||
Are there any licensing restrictions for the use of NuttX? (Almost none)
|
||||
Will there be problems if I link my proprietary code with NuttX? (No)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#TODO">Bugs, Issues, <i>Things-To-Do</i></a></td>
|
||||
<td>
|
||||
<a href="#history">Release History</a><br>
|
||||
What has changed in the last release of NuttX?
|
||||
What unreleased changes are pending in CVS?
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#documentation">Other Documentation</a></td>
|
||||
<td>
|
||||
<a href="#TODO">Bugs, Issues, <i>Things-To-Do</i></a>.<br>
|
||||
Software is never finished nor ever tested well enough.
|
||||
(Do you want to help develop NuttX? If so, send me an email).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td><a href="#trademarks">Trademarks</a></td>
|
||||
<td>
|
||||
<a href="#documentation">Other Documentation</a>.<br>
|
||||
What other NuttX documentation is available?
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td>
|
||||
<a href="#trademarks">Trademarks</a>.<br>
|
||||
Some of the words used in this document belong to other people.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -146,7 +183,7 @@
|
||||
The primary governing standards are POSIX and ANSI standards.
|
||||
Additional standard APIs from Unix and other common RTOS's are
|
||||
adopted for functionality not available under these standards
|
||||
or for functionaly that is not appropriate for the deeply-embedded
|
||||
or for functionality that is not appropriate for the deeply-embedded
|
||||
RTOS (such as <code>fork()</code>).
|
||||
</p>
|
||||
<p>
|
||||
@@ -419,46 +456,26 @@
|
||||
</table>
|
||||
|
||||
<p>
|
||||
The 18th release of NuttX (nuttx-0.3.6) is available for download
|
||||
The 22nd release of NuttX (nuttx-0.3.11) is available for download
|
||||
from the <a href="http://sourceforge.net/project/showfiles.php?group_id=189573">SourceForge</a>
|
||||
website.
|
||||
The change log associated with the release is available <a href="#currentrelease">here</a>.
|
||||
Unreleased changes after this release are avalable in CVS.
|
||||
Unreleased changes after this release are available in CVS.
|
||||
These unreleased changes are listed <a href="#pendingchanges">here</a>.
|
||||
</p>
|
||||
<p>
|
||||
NuttX 0.3.8 is the 7th release containing the integration of a network
|
||||
subsystem and the uIP TCP/IP, UDP, and ICMP stacks based on
|
||||
<a href="http://www.sics.se/~adam/uip/index.php/Main_Page">uIP</a>
|
||||
into NuttX.
|
||||
nuttx-0.3.10 is an important bug fix release.
|
||||
This release incorporates fixes to correct critical list handling errors
|
||||
in task shutdown logic: One in timer deletion logic (timer_delete.c) and one
|
||||
in stream logic (lib_init.c).
|
||||
</p>
|
||||
<p>
|
||||
This release contains on a few changes.
|
||||
The primary purpose of this release is to synchronize with the release
|
||||
of the pascal-0.1.0 add-on package.
|
||||
This release of NuttX includes the following changes:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Fixes for use with SDCC compiler, <li>
|
||||
<li>Added a simulated z80 target (arch/z80), <li>
|
||||
<li>Fix deadlock errors when using stdio but with no buffering, and</li>
|
||||
<li>Add support for the add-on Pascal P-Code interpreter (pcode/)
|
||||
(see the pascal-0.1.0 package)</li>
|
||||
</ul>
|
||||
<p>
|
||||
The Pascal add-on it integrated but has so far been tested very little;
|
||||
it is certainly at an early, pre-alpha release leve.
|
||||
The baseline functionality of NuttX (including recently added network)
|
||||
functionality continues to mature and remains at post-beta or production level.
|
||||
Extensive testing has been done for the ARM architecture using the GCC
|
||||
compiler/toolchain.
|
||||
Other architectures and the SDCC toolchain are also supported but not as
|
||||
well exercised.
|
||||
Additional, minor enhancements includes support to ZiLOG EZ80Acclaim
|
||||
microcontrooler (EZ80F91 chip) and configurations fot the ZiLOG z8f64200100kit (Z8F6423)
|
||||
and ez80f0910200kitg (EZ80F091) development kit.
|
||||
</p>
|
||||
<p>
|
||||
The current release were verified only on the simulated Z80 and and host
|
||||
simulation targets. As usual, any feedback about bugs or suggestions
|
||||
for improvement would be greatly appreciated.
|
||||
As usual, any feedback about bugs or suggestions for improvement would be greatly appreciated.
|
||||
</p>
|
||||
|
||||
<table width ="100%">
|
||||
@@ -481,7 +498,7 @@
|
||||
<td>
|
||||
<p>
|
||||
A user-mode port of NuttX to the x86 Linux platform is available.
|
||||
The purpose of this port is primarily to support OS feature developement.
|
||||
The purpose of this port is primarily to support OS feature development.
|
||||
</p>
|
||||
<p>
|
||||
<b>STATUS:</b>
|
||||
@@ -574,7 +591,77 @@
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Z80</b>
|
||||
<b>Zilog Z16F</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
<b>Zilog z16f Microncontroller</b>.
|
||||
This port use the Zilog z16f2800100zcog development kit and the Zilog
|
||||
ZDS-II Windows command line tools.
|
||||
The development environment is Cygwin under WinXP.
|
||||
</p>
|
||||
<p>
|
||||
<b>STATUS:</b>
|
||||
The initial release of support for the z16f was made available in NuttX version 0.3.7.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Zilog eZ80Acclaim!</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
<b>Zilog eZ80Acclaim! Microncontroller</b>.
|
||||
This port uses the ZiLOG ez80f0910200kitg development kit, eZ80F091 part
|
||||
and the Zilog ZDS-II Windows command line tools.
|
||||
The development environment is Cygwin under WinXP.
|
||||
</p>
|
||||
<p>
|
||||
<b>STATUS:</b>
|
||||
This is a work in progress. Verified ez80 support will be announced in a future NuttX release.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Zilog Z8Encore!</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
<b>Zilog Z8Encore! Microncontroller</b>.
|
||||
This port uses the either:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Zilog z8encore000zco development kit, Z8F6403 part, or</li>
|
||||
<li>Zilog z8f64200100kit development kit, Z8F6423 part</li>
|
||||
</ul>
|
||||
<p>
|
||||
and the Zilog ZDS-II Windows command line tools.
|
||||
The development environment is Cygwin under WinXP.
|
||||
</p>
|
||||
<p>
|
||||
<b>STATUS:</b>
|
||||
This release has been verified only on the ZiLOG ZDS-II Z8Encore! chip simulation
|
||||
as of nuttx-0.3.9.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Zilog Z80</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -583,14 +670,14 @@
|
||||
<p>
|
||||
<b>Z80 Instruction Set Simulator</b>.
|
||||
This port uses the <a href="http://sdcc.sourceforge.net/">SDCC</a> toolchain
|
||||
under Linux or Cygwin (verfied using version 2.6.0).
|
||||
under Linux or Cygwin (verified using version 2.6.0).
|
||||
This port has been verified using only a Z80 instruction simulator.
|
||||
That simulator can be found in the NuttX CVS
|
||||
<a href="http://nuttx.cvs.sourceforge.net/nuttx/misc/sims/z80sim/">here</a>.
|
||||
</p>
|
||||
<p>
|
||||
<b>STATUS:</b>
|
||||
This port is complete and stable to the extent that it can be teste
|
||||
This port is complete and stable to the extent that it can be tested
|
||||
using an instruction set simulator.
|
||||
</p>
|
||||
</td>
|
||||
@@ -615,6 +702,160 @@
|
||||
is available that may be used to build a NuttX-compatible arm-elf toolchain under
|
||||
Linux or Cygwin.</blockquote>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="environments"><h1>Development Environments</h1></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<center><table width="90%">
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Linux + GNU make + GCC/binutils</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
The is the most natural development environment for NuttX.
|
||||
Any version of the GCC/binutils toolchain may be used.
|
||||
There is a highly modified <a href="http://buildroot.uclibc.org/">buildroot</a>
|
||||
available for download from the
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=189573">NuttX SourceForge</a>
|
||||
page.
|
||||
This download may be used to build a NuttX-compatible arm-elf toolchain under Linux or Cygwin.
|
||||
Additional support for m68k, m68hc11, and m68hc12 is available in the
|
||||
<a href="http://nuttx.cvs.sourceforge.net/nuttx/misc/buildroot/">NuttX CVS</a>.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Linux + GNU make + SDCC</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
Also very usable is the Linux environment using the
|
||||
<a href="http://sdcc.sourceforge.net/">SDCC</a> compiler.
|
||||
The SDCC compiler provides support for the 8051/2, z80, hc08, and other microcontrollers.
|
||||
The SDCC-based logic is less well exercised and you will likely find some compilation
|
||||
issues if you use parts of NuttX with SDCC that have not been well-tested.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Cygwin + GNU make + GCC/binutils</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
This combination works well too.
|
||||
It works just as well as the native Linux environment except
|
||||
that compilation and build times are a little longer.
|
||||
The custom NuttX buildroot referenced above may be build in
|
||||
the Cygwin environment as well.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Cygwin + GNU make + SDCC</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
I have never tried this combination, but it would probably work just fine.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Cygwin + GNU make + Windows Native Toolchain</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
This is a tougher environment.
|
||||
In this case, the Windows native toolchain is unaware of the the
|
||||
Cygwin <i>sandbox</i> and, instead, operates in the native Windows environment.
|
||||
The primary difficulties with this are:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<b>Paths</b>.
|
||||
Full paths for the native toolchain must follow Windows standards.
|
||||
For example, the path <code>/home/my\ name/nuttx/include</code> my have to be
|
||||
converted to something like <code>'C:\cygwin\home\my name\nuttx\include'</code>
|
||||
to be usable by the toolchain.
|
||||
</li>
|
||||
<p>
|
||||
Fortunately, this conversion is done simply using the <code>cygpath</code> utility.
|
||||
</p>
|
||||
<li>
|
||||
<b>Symbolic Links</b>
|
||||
NuttX depends on symbolic links to install platform-specific directories in the build system.
|
||||
On Linux, true symbolic links are used.
|
||||
On Cygwin, emulated symbolic links are used.
|
||||
Unfortunately, for native Windows applications that operate outside of the
|
||||
Cygwin <i>sandbox</i>, these symbolic links cannot be used.
|
||||
</li>
|
||||
<p>
|
||||
The NuttX make system works around this limitation by copying the platform
|
||||
specific directories in place.
|
||||
These copied directories make work a little more complex, but otherwise work well.
|
||||
</p>
|
||||
</ul>
|
||||
<p>
|
||||
At present, on the Zilog Z16F port uses a native Windows toolchain
|
||||
(the Zilog ZDS-II toolchain).
|
||||
</p.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Others Environments?</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
The primary environmental dependency of NuttX are (1) GNU make,
|
||||
(2) bash scripting, and (3) Linux utilities (such as sed).
|
||||
If you have other platforms that support GNU make or make
|
||||
utilities that are compatible with GNU make, then it is very
|
||||
likely that NuttX would work in that environment as well (with some
|
||||
porting effort). If GNU make is not supported, then some significant
|
||||
modification of the Make system would be required.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table></center>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
@@ -706,13 +947,13 @@ Other memory:
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td>
|
||||
<a href="ChangeLog.txt">Change Logs for all releases</a><br>
|
||||
<a href="ChangeLog.txt">Change Logs for All NuttX Releases</a><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="favicon.ico"></td>
|
||||
<td>
|
||||
<a href="#currentrelease">ChangeLog for Current Release</a><br>
|
||||
<a href="#currentrelease">ChangeLog for Current Releases</a><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -732,12 +973,27 @@ Other memory:
|
||||
</table>
|
||||
|
||||
<pre><ul>
|
||||
0.3.6 2007-01-06 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
nuttx-0.3.10 2008-05-15 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Changes for use with SDCC compiler
|
||||
* Added a simulated z80 target
|
||||
* Fix deadlock errors when using stdio but with no buffering
|
||||
* Add support for Pascal P-Code interpreter
|
||||
* Add support for the ZiLOG EZ80Acclaim microcontrooler (EZ80F91 chip).
|
||||
* Add configuration for the ZiLOG z8f64200100kit development kit, Z8F6423 part.
|
||||
* Add configuration for the ZiLOG ez80f0910200kitg development kit, EZ80F091 part.
|
||||
* Correct critical list handling errors in task shutdown logic: One in timer
|
||||
deletion logic (timer_delete.c) and one in stream logic (lib_init.c).
|
||||
|
||||
pascal-0.1.2 2008-02-10 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add logic to build and link with the ZDS-II toolchain
|
||||
use with the z16f.
|
||||
* Make sure that POFF header structures are aligned
|
||||
* Standardized POFF file format to big-endian
|
||||
* Break up large switch statements to lower complexity
|
||||
and eliminate a compiler bug
|
||||
* Changes so that runtime compiles with SDCC.
|
||||
|
||||
buildroot-0.1.0 2007-03-09 <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Support for arm-elf toolchain
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
@@ -749,7 +1005,13 @@ Other memory:
|
||||
</table>
|
||||
|
||||
<pre><ul>
|
||||
0.3.7 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
nuttx-0.3.11 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
buildroot-0.1.1 2007-xx-xx <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Support for m68k-elf and m68hc11 toolchain
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
@@ -809,7 +1071,7 @@ Other memory:
|
||||
<li>TI is a tradename of Texas Instruments Incorporated.</li>
|
||||
<li>UNIX is a registered trademark of The Open Group.</li>
|
||||
<li>VxWorks is a registered trademark of Wind River Systems, Incorporated.</li>
|
||||
<li>Z80 is a registered trademark of Zilog, Inc.</li>
|
||||
<li>ZDS, ZNEO, Z16F, Z80, and Zilog are a registered trademark of Zilog, Inc.</li>
|
||||
</ul>
|
||||
<p>
|
||||
NOTE: NuttX is <i>not</i> licensed to use the POSIX trademark. NuttX uses the POSIX
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="210">
|
||||
<a href="freeports.html" target="_blank">
|
||||
<img src="freeports.gif" width="210" height="62" border="0"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
</head>
|
||||
|
||||
<body background="backgd.gif">
|
||||
<hr>
|
||||
<hr><hr>
|
||||
<center><h1><i>Under Construction</i></h1></center>
|
||||
<hr>
|
||||
<hr><hr>
|
||||
<center>
|
||||
<big><b>
|
||||
<p>NuttX Operating System</p>
|
||||
<p>Porting Guide</p>
|
||||
</b></big>
|
||||
<h1><big><b>
|
||||
<p>NuttX Operating System</br>
|
||||
Porting Guide</p>
|
||||
</b></big></h1>
|
||||
<p><small>by</small></p>
|
||||
<p>Gregory Nutt</p>
|
||||
<p><small>Last Update: January 6, 2006</small></p>
|
||||
<p><small>Last Update: March 15, 2008</small></p>
|
||||
</center>
|
||||
|
||||
<center><h1>Table of Contents</h1></center>
|
||||
@@ -36,7 +36,7 @@
|
||||
<li><a href="#summaryofconfigfiles">2.3.2 Summary of Files</a></li>
|
||||
<ul>
|
||||
<li><a href="#boardlogic">2.3.2.1 Board Specific Logic</a></li>
|
||||
<li><a href="#boardconfigfiles">2.3.2.2 Board Specific Configuration Files</a></li>
|
||||
<li><a href="#boardconfigsubdirs">2.3.2.2 Board Specific Configuration Sub-Directories</a></li>
|
||||
</ul>
|
||||
<li><a href="#supportedboards">2.3.3 Supported Boards</a></li>
|
||||
</ul>
|
||||
@@ -90,13 +90,13 @@
|
||||
</ul>
|
||||
<li><a href="#NxFileSystem">5.0 NuttX File System</a></li>
|
||||
<li><a href="#apndxconfigs">Appendix A: NuttX Configuration Settings</a></li>
|
||||
|
||||
<li><a href="#apndxtrademarks">Appendix B: Trademarks</a></li>
|
||||
<hr>
|
||||
<h1>1.0 <a name="Introduction">Introduction</a></h1>
|
||||
|
||||
<p><b>Overview</b>
|
||||
This document provides and overview of the NuttX build and configuration
|
||||
logic and provides hints for the incorporation of new processor/board archectures
|
||||
logic and provides hints for the incorporation of new processor/board architectures
|
||||
into the build.
|
||||
</p>
|
||||
<p>
|
||||
@@ -132,7 +132,7 @@
|
||||
| | | `-- <i>(chip-specific source files)</i>
|
||||
| | |--<i><other-chips></i>/
|
||||
| | `-- <i>(architecture-specific source files)</i>
|
||||
| `-- <i><other-architectures></i>/
|
||||
| `-- <i><other-architecture directories></i>/
|
||||
|-- <a href="#DirStructConfigs">configs</a>/
|
||||
| |-- <i><board-name></i>/
|
||||
| | |-- include/
|
||||
@@ -140,8 +140,10 @@
|
||||
| | |-- src/
|
||||
| | | |-- Makefile
|
||||
| | | `-- <i>(board-specific source files)</i>
|
||||
| | `-- <i>(board-specific configuration files)</i>
|
||||
| `-- <i><other-boards></i>/
|
||||
| | |---<i><config1-dir></i>/
|
||||
| | | `-- <i>(board-specific/configuration-specific files)</i>
|
||||
| | `---<i>(other board-specific configuration sub-directories)</i>/
|
||||
| `-- <i><(other board directories)></i>/
|
||||
|-- <a href="#DirStructDrivers">drivers</a>/
|
||||
| |-- Makefile
|
||||
| `-- <i>(common driver source files)</i>
|
||||
@@ -226,14 +228,14 @@
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<i>Board specific files</i>.
|
||||
<i>Board specific configurations</i>.
|
||||
In order to be usable, the chip must be contained in a board environment.
|
||||
The board configuration defines additional properties of the board including such things as
|
||||
peripheral LEDs, external peripherals (such as network, USB, etc.).
|
||||
<p>
|
||||
These board-specific configuration files can be found in the
|
||||
<code>configs/</code><i><board-name></i><code>/</code> sub-directories and are discussed
|
||||
in a a paragraph <a href="#configsdirectorystructure">below</a>.
|
||||
in a paragraph <a href="#configsdirectorystructure">below</a>.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -251,8 +253,8 @@
|
||||
This directory contains several sub-directories, each containing
|
||||
architecture-specific logic.
|
||||
The task of porting NuttX to a new processor consists of
|
||||
add a new sudirectory under <code>arch/</code> containing logic specific
|
||||
to the new architecuture.
|
||||
add a new subdirectory under <code>arch/</code> containing logic specific
|
||||
to the new architecture.
|
||||
The complete board port in is defined by the architecture-specific code in this
|
||||
directory (plus the board-specific configurations in the <code>config/</code>
|
||||
subdirectory).
|
||||
@@ -382,7 +384,7 @@
|
||||
This directory holds common ARM architectures. At present, this includes
|
||||
the following subdirectories:
|
||||
<ul>
|
||||
<li><code>arch/arm/include</code> and <code>arch/arm/common</code>:
|
||||
<li><code>arch/arm/include</code> and <code>arch/arm/src/common</code>:
|
||||
Common ARM logic.
|
||||
</li>
|
||||
|
||||
@@ -414,16 +416,51 @@
|
||||
</li>
|
||||
|
||||
<li><code>arch/m68322</code>
|
||||
A work in progress.</li>
|
||||
A work in progress.
|
||||
</li>
|
||||
|
||||
<li><code>arch/pjrc-8051</code>:
|
||||
8051 Microcontroller. This port is not quite ready for prime time.</li>
|
||||
8051 Microcontroller. This port is not quite ready for prime time.
|
||||
</li>
|
||||
|
||||
<li><code>arch/z80</code>:
|
||||
z80 Microcontroller. This port has been verified using only a z80 instruction simulator.</li>
|
||||
<li><code>arch/z16f</code>:
|
||||
Zilog z16f Microcontroller.
|
||||
This port uses the Zilog z16f2800100zcog Development Kit.
|
||||
This port was released with nuttx-0.3.7.
|
||||
</li>
|
||||
|
||||
<li><code>arch/z80</code>:
|
||||
This directory holds 8-bit ZiLOG architectures. At present, this includes the
|
||||
Zilog z80, ez80Acclaim! and z8Encore! Microcontrollers.
|
||||
<ul>
|
||||
<li><code>arch/z80/include</code> and <code>arch/z80/src/common</code>:
|
||||
Common logic.
|
||||
</li>
|
||||
|
||||
<li><code>arch/z80/include/z80</code> and <code>arch/z80/src/z80</code>:
|
||||
The Z80 port was released in nuttx-0.3.6 has been verified using only a
|
||||
z80 instruction simulator.
|
||||
The set simulator can be found in the NuttX CVS at
|
||||
http://nuttx.cvs.sourceforge.net/nuttx/misc/sims/z80sim.
|
||||
This port also uses the SDCC toolchain (http://sdcc.sourceforge.net/")
|
||||
(verified with version 2.6.0 and 2.7.0).
|
||||
</li>
|
||||
|
||||
<li><code>arch/z80/include/ez80</code> and <code>arch/z80/src/ez80</code>:
|
||||
The ez80Acclaim! port uses the ZiLOG ez80f0910200kitg development kit, eZ80F091 part,
|
||||
with the Zilog ZDS-II Windows command line tools.
|
||||
The development environment is Cygwin under WinXP.
|
||||
This is a work in progress. Verified ez80 support will be announced in a future NuttX release.
|
||||
</li>
|
||||
|
||||
<li><code>arch/z80/include/z8</code> and <code>arch/z80/src/z8</code>:
|
||||
The Z8Encore! port uses either the ZiLOG z8encore000zco development kit, Z8F6403 part,
|
||||
or the z8f64200100kit development kit, Z8F6423 part with the Zilog ZDS-II Windows command line
|
||||
tools. The development environment is Cygwin under WinXP.
|
||||
The initial release, verified only on the ZDS-II ez8 simulator, was released in nuttx-0.3.9.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -461,15 +498,24 @@
|
||||
provide a subdirectory <board-name> under <code>configs/</code> with the following characteristics:
|
||||
</p>
|
||||
<ul><pre>
|
||||
|-- Make.defs
|
||||
|-- defconfig
|
||||
`-- setenv.sh
|
||||
<i><board-name></i>
|
||||
|-- include/
|
||||
| `-- <i>(board-specific header files)</i>
|
||||
|-- src/
|
||||
| |-- Makefile
|
||||
| `-- <i>(board-specific source files)</i>
|
||||
|-- Make.defs
|
||||
|-- defconfig
|
||||
`-- setenv.sh
|
||||
|-- <i><config1-dir></i>
|
||||
| |-- Make.defs
|
||||
| |-- defconfig
|
||||
| `-- setenv.sh
|
||||
|-- <i><config2-dir></i>
|
||||
| |-- Make.defs
|
||||
| |-- defconfig
|
||||
| `-- setenv.sh
|
||||
`-- <i>(other board-specific configuration sub-directories)</i>/
|
||||
</pre></ul>
|
||||
|
||||
<h3><a name="summaryofconfigfiles">2.3.2 Summary of Files</a></h3>
|
||||
@@ -495,10 +541,15 @@
|
||||
It must support the following targets: <code>libext$(LIBEXT)</code>, <code>clean</code>, and <code>distclean</code>.
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a name="boardconfigfiles">2.3.2.2 Board Specific Configuration Files</a></h4>
|
||||
<h4><a name="boardconfigsubdirs">2.3.2.2 Board Specific Configuration Sub-Directories</a></h4>
|
||||
<p>
|
||||
The <code>configs/</code><i><board-name></i><code>/</code> sub-directory holds all of the
|
||||
files that are necessary to configure Nuttx for the particular board.
|
||||
A board may have various different configurations using the common source files.
|
||||
Each board configuration is described by three files: <code>Make.defs</code>, <code>defconfig</code>, and <code>setenv.sh</code>.
|
||||
Typically, each set of configuration files is retained in a separate configuration sub-directory
|
||||
(<i><config1-dir></i>, <i><config2-dir></i>, .. in the above diagram).
|
||||
|
||||
The procedure for configuring NuttX is described <a href="#configuringnuttx">below</a>,
|
||||
This paragraph will describe the contents of these configuration files.
|
||||
</p>
|
||||
@@ -511,6 +562,7 @@
|
||||
<ul>
|
||||
<li>Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP</li>
|
||||
<li>Tool options: CFLAGS, LDFLAGS</li>
|
||||
<li>COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros</li>
|
||||
</ul>
|
||||
<p>
|
||||
When this makefile fragment runs, it will be passed TOPDIR which
|
||||
@@ -522,7 +574,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<code>defconfig</code>: This is a configuration file similar to the Linux
|
||||
configuration file. In contains varialble/value pairs like:
|
||||
configuration file. In contains variable/value pairs like:
|
||||
<ul>
|
||||
<li><code>CONFIG_VARIABLE</code>=value</li>
|
||||
</ul>
|
||||
@@ -545,7 +597,7 @@
|
||||
<h3><a name="supportedboards">2.3.3 Supported Boards</a></h3>
|
||||
<p>
|
||||
All of the specific boards supported by NuttX are identified below.
|
||||
These the the specific <i><board-name></i>'s that may be used to configure NuttX
|
||||
These are the specific <i><board-name></i>'s that may be used to configure NuttX
|
||||
as described <a href="#configuringnuttx">below</a>.
|
||||
</p>
|
||||
<ul>
|
||||
@@ -592,6 +644,37 @@
|
||||
This port is not quite ready for prime time.
|
||||
</li>
|
||||
|
||||
<li><code>configs/xtrs</code>
|
||||
TRS80 Model 3. This port uses a vintage computer based on the Z80.
|
||||
An emulator for this computer is available to run TRS80 programs on a
|
||||
linux platform (http://www.tim-mann.org/xtrs.html).
|
||||
</li>
|
||||
|
||||
<li><code>configs/z16f2800100zcog</code>
|
||||
z16f Microcontroller.
|
||||
This port use the Zilog z16f2800100zcog development kit and the
|
||||
Zilog ZDS-II Windows command line tools.
|
||||
The development environment is Cygwin under WinXP.
|
||||
</li>
|
||||
|
||||
<li><code>configs/ez80f0910200kitg</code>
|
||||
ez80Acclaim! Microcontroller. This port use the Zilog ez80f0910200kitg
|
||||
development kit, eZ80F091 part, and the Zilog ZDS-II Windows command line
|
||||
tools. The development environment is Cygwin under WinXP.
|
||||
</li>
|
||||
|
||||
<li><code>configs/z8encore000zco</code>
|
||||
z8Encore! Microcontroller. This port use the Zilog z8encore000zco
|
||||
development kit, Z8F6403 part, and the Zilog ZDS-II Windows command line
|
||||
tools. The development environment is Cygwin under WinXP.
|
||||
</li>
|
||||
|
||||
<li><code>configs/z8encore000zco</code>
|
||||
z8Encore! Microcontroller. This port use the Zilog z8f64200100kit
|
||||
development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line
|
||||
tools. The development environment is Cygwin under WinXP.
|
||||
</li>
|
||||
|
||||
<li><code>configs/z80sim</code>:
|
||||
z80 Microcontroller. This port uses a Z80 instruction set simulator.
|
||||
That simulator can be found in the NuttX CVS
|
||||
@@ -683,19 +766,20 @@
|
||||
<p>
|
||||
<b>Manual Configuration</b>.
|
||||
Configuring NuttX requires only copying the
|
||||
<a href="#boardconfigfiles">board-specific configuration files</a> into the top level directory which appears in the make files as the make variable, <code>${TOPDIR}</code>.
|
||||
<a href="#boardconfigsubdirs">board-specific configuration files</a> into the top level directory which appears in the make files as the make variable, <code>${TOPDIR}</code>.
|
||||
This could be done manually as follows:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Copy <code>configs/</code><i><board-name></i></code>/Make.def</code> to <code>${TOPDIR}/Make.defs</code>,<li>
|
||||
<li>Copy <code>configs/</code><i><board-name></i></code>/setenv.sh</code> to <code>${TOPDIR}/setenv.sh</code>, and</li>
|
||||
<li>Copy <code>configs/</code><i><board-name></i></code>/defconfig</code> to <code>${TOPDIR}/.config</code></li>
|
||||
<li>Copy <code>configs/</code><i><board-name></i><code>/[</code><i><config-dir></i><code>/]Make.def</code> to <code>${TOPDIR}/Make.defs</code>,<li>
|
||||
<li>Copy <code>configs/</code><i><board-name></i><code>/[</code><i><config-dir></i><code>/]setenv.sh</code> to <code>${TOPDIR}/setenv.sh</code>, and</li>
|
||||
<li>Copy <code>configs/</code><i><board-name></i><code>/[</code><i><config-dir></i><code>/]defconfig</code> to <code>${TOPDIR}/.config</code></li>
|
||||
</ul>
|
||||
<p>
|
||||
Where <i><board-name></i> is the name of one of the sub-directories of the
|
||||
NuttX <a href="#DirStructConfigs"><code>configs/</code></a> directory.
|
||||
This sub-directory name corresponds to one of the supported boards
|
||||
identified <a href="#supportedboards">above</a>.
|
||||
And <config-dir> is the optional, specific configuration directory for the board.
|
||||
</p>
|
||||
<p>
|
||||
<b>Automated Configuration</b>.
|
||||
@@ -704,7 +788,7 @@
|
||||
</p>
|
||||
<ul><pre>
|
||||
cd tools
|
||||
./configure.sh <i><board-name></i>
|
||||
./configure.sh <i><board-name></i></i><code>[/</code><i><config-dir></i><code>]</code>
|
||||
</pre></ul>
|
||||
|
||||
<p>
|
||||
@@ -733,14 +817,14 @@ make
|
||||
That directory also holds:
|
||||
</p>
|
||||
<ul>
|
||||
<li>The makefile fragment <a href="#boardconfigfiles"><code>.config</code></a> that describes the current configuration.</li>
|
||||
<li>The makefile fragment <a href="#boardconfigfiles"><code>Make.defs</code></a> that provides customized build targers, and</li>
|
||||
<li>The shell script <a href="#boardconfigfiles"><code>setenv.sh</code></a> that sets up the configuration environment for the build.</li>
|
||||
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>.config</code></a> that describes the current configuration.</li>
|
||||
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>Make.defs</code></a> that provides customized build targers, and</li>
|
||||
<li>The shell script <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> that sets up the configuration environment for the build.</li>
|
||||
</ul>
|
||||
<p>
|
||||
The <a href="#boardconfigfiles"><code>setenv.sh</code></a> contains Linux environmental settings that are needed for the build.
|
||||
The specific environmental definitions are unique for each board but should include, as a minimum, updates to the <code>PATH</code> variable to include the full path to the architecture-specific toolchain identified in <a href="#boardconfigfiles"><code>Make.defs</code></a>.
|
||||
The <a href="#boardconfigfiles"><code>setenv.sh</code></a> only needs to be source'ed at the beginning of a session.
|
||||
The <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> contains Linux/Cygwin environmental settings that are needed for the build.
|
||||
The specific environmental definitions are unique for each board but should include, as a minimum, updates to the <code>PATH</code> variable to include the full path to the architecture-specific toolchain identified in <a href="#boardconfigsubdirs"><code>Make.defs</code></a>.
|
||||
The <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> only needs to be source'ed at the beginning of a session.
|
||||
The system can be re-made subsequently by just typing <code>make</code>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -935,7 +1019,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
<p><b>Inputs:</b></p>
|
||||
<ul>
|
||||
<li><code>tcb</code>: Refers to a task in the ready-to-run list (normally
|
||||
the task at the the head of the list). It most be
|
||||
the task at the head of the list). It most be
|
||||
stopped, its context saved and moved into one of the
|
||||
waiting task lists. It it was the task at the head
|
||||
of the ready-to-run list, then a context to the new
|
||||
@@ -1234,7 +1318,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Some architectures require a description of the the RAM configuration:
|
||||
Some architectures require a description of the RAM configuration:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>CONFIG_DRAM_SIZE</code>:
|
||||
@@ -1242,7 +1326,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
<li><code>CONFIG_DRAM_START</code>:
|
||||
The start address of DRAM (physical)</li>
|
||||
<li><code>CONFIG_DRAM_VSTART</code>:
|
||||
The startaddress of DRAM (virtual)</li>
|
||||
The start address of DRAM (virtual)</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -1284,7 +1368,7 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
<code>CONFIG_DEBUG_LIB</code>: enable C library debug output (disabled by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_HAVE_LOWPUTC</code>: architecture supports low-level, boot
|
||||
<code>CONFIG_ARCH_LOWPUTC</code>: architecture supports low-level, boot
|
||||
time console output
|
||||
</li>
|
||||
<li>
|
||||
@@ -1534,6 +1618,22 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="apndxtrademarks">Appendix B: Trademarks</a></h1>
|
||||
|
||||
<li>ARM, ARM7 ARM7TDMI, ARM9, ARM926EJS are trademarks of Advanced RISC Machines, Limited.</li>
|
||||
<li>Cygwin is a trademark of Red Hat, Incorporated.</li>
|
||||
<li>Linux is a registered trademark of Linus Torvalds.</li>
|
||||
<li>LPC2148 is a trademark of NXP Semiconductors.</li>
|
||||
<li>TI is a tradename of Texas Instruments Incorporated.</li>
|
||||
<li>UNIX is a registered trademark of The Open Group.</li>
|
||||
<li>VxWorks is a registered trademark of Wind River Systems, Incorporated.</li>
|
||||
<li>ZDS, ZNEO, Z16F, Z80, and Zilog are a registered trademark of Zilog, Inc.</li>
|
||||
|
||||
<p>
|
||||
NOTE: NuttX is <i>not</i> licensed to use the POSIX trademark. NuttX uses the POSIX
|
||||
standard as a development guideline only.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ User's Manual
|
||||
<p>
|
||||
Gregory Nutt
|
||||
<p>
|
||||
<small>Last Update: December 10, 2007</small>
|
||||
<small>Last Update: Februrary 2, 2008</small>
|
||||
</center>
|
||||
|
||||
<h1>1.0 <A NAME="Introduction">Introduction</a></h1>
|
||||
@@ -62,9 +62,15 @@ Gregory Nutt
|
||||
<b>Section 3.0, <a href="#Data_Structures">OS Data Structures</a></b>:
|
||||
This section documents the data structures that are used at the NuttX
|
||||
interface.
|
||||
<ul>
|
||||
<li>Paragraph 3.1 <a href="#ScalarType">Scalar Types</a></li>
|
||||
<li>Paragraph 3.2 <a href="#HiddenStructures">Hidden Interface Structures</a></li>
|
||||
<li>Paragraph 3.3 <a href="#ErrnoAccess">Access to the <code>errno</code> Variable</a></li>
|
||||
<li>Paragraph 3.4 <a href="#UserStructures">User Interface Structures</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#index">Index</a>
|
||||
<a href="#index"><b>Index</b></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -227,7 +233,7 @@ paragraphs.
|
||||
<li>
|
||||
Returns the non-zero task ID of the new task or
|
||||
ERROR if memory is insufficient or the task cannot be
|
||||
created (errno is not set).
|
||||
created (<a href="#ErrnoAccess"><code>errno</code></a> is not set).
|
||||
</LI>
|
||||
</ul>
|
||||
|
||||
@@ -296,7 +302,7 @@ VxWorks provides the following similar interface:
|
||||
<ul>
|
||||
<li><p>OK, or ERROR if the task cannot be initialized.</P>
|
||||
<p>This function can only failure is it is unable to assign
|
||||
a new, unique task ID to the TCB (errno is not set).</P>
|
||||
a new, unique task ID to the TCB (<a href="#ErrnoAccess"><code>errno</code></a> is not set).</P>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Assumptions/Limitations:</b>
|
||||
@@ -348,7 +354,7 @@ task_init argument).
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
<ul>
|
||||
<li>OK, or ERROR if the task cannot be activated (errno is not set).
|
||||
<li>OK, or ERROR if the task cannot be activated (<a href="#ErrnoAccess"><code>errno</code></a> is not set).
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -399,7 +405,7 @@ zero signifies the calling task.
|
||||
<b>Returned Values:</b>
|
||||
<ul>
|
||||
<li>OK, or ERROR if the task cannot be deleted.
|
||||
This function can fail if the provided pid does not correspond to a task (errno is not set)
|
||||
This function can fail if the provided pid does not correspond to a task (<a href="#ErrnoAccess"><code>errno</code></a> is not set)
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -613,7 +619,7 @@ Compatible with the POSIX interface of the same name.
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, sched_setparam() returns 0 (OK).
|
||||
On error, -1 (ERROR) is returned, and<code>errno</code>is set appropriately.
|
||||
On error, -1 (ERROR) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately.
|
||||
</p>
|
||||
<ul>
|
||||
|
||||
@@ -714,7 +720,7 @@ interface of the same name.
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, <i>sched_setscheduler()</i> returns OK (zero). On
|
||||
error, ERROR (-1) is returned, and<code>errno</code>is set appropriately:
|
||||
error, ERROR (-1) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li>EINVAL The scheduling policy is not one of the
|
||||
@@ -762,7 +768,7 @@ policy.
|
||||
<li>
|
||||
On success, <i>sched_getscheduler()</i> returns the policy for
|
||||
the task (either SCHED_FIFO or SCHED_RR).
|
||||
On error, ERROR (-1) is returned, and<code>errno</code>is set appropriately:
|
||||
On error, ERROR (-1) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
<ul>
|
||||
<li>ESRCH The task whose ID is pid could not be found.</li>
|
||||
</ul>
|
||||
@@ -775,7 +781,7 @@ policy.
|
||||
interface of the same name.
|
||||
Differences from the full POSIX implementation include:
|
||||
<ul>
|
||||
<li>Does not report errors via <I>errno</I>.
|
||||
<li>Does not report errors via <a href="#ErrnoAccess"><code>errno</code></a>.
|
||||
</ul>
|
||||
|
||||
<H3><a name="sched_yield">2.2.5 sched_yield</a></H3>
|
||||
@@ -894,7 +900,7 @@ priority of the calling task is returned.
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, sched_rr_get_interval() returns OK (0). On
|
||||
error, ERROR (-1) is returned, and<code>errno</code>is set to:
|
||||
error, ERROR (-1) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set to:
|
||||
</p>
|
||||
<ul>
|
||||
<li>EFAULT Cannot copy to interval</LI>
|
||||
@@ -1216,7 +1222,7 @@ interface of the same name.
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, <code>mq_send()</code> returns 0 (<code>OK</code>);
|
||||
on error, -1 (<code>ERROR</code>) is returned, with <code>errno</code> set
|
||||
on error, -1 (<code>ERROR</code>) is returned, with <a href="#ErrnoAccess"><code>errno</code></a> set
|
||||
to indicate the error:
|
||||
</p>
|
||||
<ul>
|
||||
@@ -1299,7 +1305,7 @@ interface of the same name.
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, <code>mq_send()</code> returns 0 (<code>OK</code>);
|
||||
on error, -1 (<code>ERROR</code>) is returned, with <code>errno</code> set
|
||||
on error, -1 (<code>ERROR</code>) is returned, with <a href="#ErrnoAccess"><code>errno</code></a> set
|
||||
to indicate the error:
|
||||
</p>
|
||||
<ul>
|
||||
@@ -1370,7 +1376,7 @@ interface of the same name.
|
||||
<p>
|
||||
<b>Returned Values:</b>.
|
||||
One success, the length of the selected message in bytes is returned.
|
||||
On failure, -1 (<code>ERROR</code>) is returned and the <code>errno</code> is set appropriately:
|
||||
On failure, -1 (<code>ERROR</code>) is returned and the <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -1451,7 +1457,7 @@ interface of the same name.
|
||||
<p>
|
||||
<b>Returned Values:</b>.
|
||||
One success, the length of the selected message in bytes is returned.
|
||||
On failure, -1 (<code>ERROR</code>) is returned and the <code>errno</code> is set appropriately:
|
||||
On failure, -1 (<code>ERROR</code>) is returned and the <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -1516,7 +1522,7 @@ registration.
|
||||
<li><I>mqdes</I>. Message queue descriptor
|
||||
<li><I>notification</I>. Real-time signal structure containing:
|
||||
<ul>
|
||||
<li><I>sigev_notify</I>. Should be osSIGEV_SIGNAL (but actually
|
||||
<li><I>sigev_notify</I>. Should be SIGEV_SIGNAL (but actually
|
||||
ignored)
|
||||
<li><I>sigev_signo</I>. The signo to use for the notification
|
||||
<li><I>sigev_value</I>. Value associated with the signal
|
||||
@@ -1951,9 +1957,8 @@ the lock or the call is interrupted by a signal.
|
||||
</ul>
|
||||
<p>
|
||||
If <I>sem_wait</I> returns -1 (ERROR) then the cause of the failure
|
||||
will be indicated by the thread-specific <I>errno</I> value (a pointer
|
||||
to this value can be obtained using <I>get_errno_ptr()</I>). The following
|
||||
lists the possible values for <I>errno</I>:
|
||||
will be indicated by the thread-specific <a href="#ErrnoAccess"><code>errno</code></a>.
|
||||
The following lists the possible values for <a href="#ErrnoAccess"><code>errno</code></a>:
|
||||
<p>
|
||||
<ul>
|
||||
<li><I>EINVAL</I>: Indicates that the <I>sem</I> input parameter is
|
||||
@@ -1992,9 +1997,8 @@ returns without blocking.
|
||||
<li>0 (OK) or -1 (ERROR) if unsuccessful
|
||||
</ul>
|
||||
If <I>sem_wait</I> returns -1 (ERROR) then the cause of the failure
|
||||
will be indicated by the thread-specific <I>errno</I> value (a pointer
|
||||
to this value can be obtained using <I>get_errno_ptr()</I>). The following
|
||||
lists the possible values for <I>errno</I>:
|
||||
will be indicated by the thread-specific <a href="#ErrnoAccess"><code>errno</code></a>.
|
||||
The following lists the possible values for <a href="#ErrnoAccess"><code>errno</code></a>:
|
||||
<p>
|
||||
<ul>
|
||||
<li><I>EINVAL</I>: Indicates that the <I>sem</I> input parameter is
|
||||
@@ -2522,7 +2526,7 @@ VxWorks provides the following comparable interface:
|
||||
If the call succeeds, <code>timer_create()</code> will return 0 (<code>OK</code>) and update the
|
||||
location referenced by <code>timerid</code> to a <code>timer_t</code>, which can be passed to the
|
||||
other per-thread timer calls. If an error occurs, the function will return
|
||||
a value of -1 (<code>ERROR</code>) and set<code>errno</code>to indicate the error.
|
||||
a value of -1 (<code>ERROR</code>) and set <a href="#ErrnoAccess"><code>errno</code></a> to indicate the error.
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EAGAIN</code>. The system lacks sufficient signal queuing resources to honor the
|
||||
@@ -2570,7 +2574,8 @@ VxWorks provides the following comparable interface:
|
||||
</p>
|
||||
<p>
|
||||
If successful, the <I>timer_delete()</I> function will return zero (<I>OK</I>).
|
||||
Otherwise, the function will return a value of -1 (ERROR) and set<code>errno</code>to indicate the error:
|
||||
Otherwise, the function will return a value of -1 (ERROR) and set
|
||||
<a href="#ErrnoAccess"><code>errno</code></a> to indicate the error:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EINVAL</code>. The timer specified timerid is not valid.</li>
|
||||
@@ -2647,7 +2652,8 @@ VxWorks provides the following comparable interface:
|
||||
</p>
|
||||
<p>
|
||||
If the timer_gettime() succeeds, a value of 0 (OK) will be returned.
|
||||
If an error occurs, the value -1 (ERROR) will be returned, and<code>errno</code>set to indicate the error.
|
||||
If an error occurs, the value -1 (ERROR) will be returned, and
|
||||
<a href="#ErrnoAccess"><code>errno</code></a> set to indicate the error.
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EINVAL</code>. The timerid argument does not correspond to an ID returned by timer_create() but not yet deleted by timer_delete().</li>
|
||||
@@ -3065,12 +3071,12 @@ If sigprocmask() fails, the signal mask of the task is not changed.
|
||||
<ul>
|
||||
<li><I>how</I>. How the signal mast will be changed:
|
||||
<ul>
|
||||
<li><I>osSIG_BLOCK</I>. The resulting set is the union of the
|
||||
<li><I>SIG_BLOCK</I>. The resulting set is the union of the
|
||||
current set and the signal set pointed to by the <I>set</I> input parameter.
|
||||
<li><I>osSIG_UNBLOCK</I>. The resulting set is the intersection
|
||||
<li><I>SIG_UNBLOCK</I>. The resulting set is the intersection
|
||||
of the current set and the complement of the signal set pointed
|
||||
to by the <I>set</I> input parameter.
|
||||
<li><I>osSIG_SETMASK</I>. The resulting set is the signal set
|
||||
<li><I>SIG_SETMASK</I>. The resulting set is the signal set
|
||||
pointed to by the <I>set</I> input parameter.
|
||||
</ul>
|
||||
|
||||
@@ -3280,7 +3286,7 @@ the unblocked signal is ignored.
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <signal.h>
|
||||
int sigqueue (int tid, int signo, const union sigval value);
|
||||
int sigqueue (int tid, int signo, union sigval value);
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -3307,7 +3313,7 @@ is delivered more than once."
|
||||
<ul>
|
||||
<li>
|
||||
On success (at least one signal was sent), zero (OK) is returned.
|
||||
On error, -1 (ERROR) is returned, and<code>errno</code>is set appropriately.
|
||||
On error, -1 (ERROR) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately.
|
||||
<ul>
|
||||
<li><code>EGAIN</code>. The limit of signals which may be queued has been reached.</li>
|
||||
<li><code>EINVAL</code>. signo was invalid.</li>
|
||||
@@ -5860,7 +5866,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
0 on success; -1 on error with<code>errno</code>set appropriately:
|
||||
0 on success; -1 on error with <a href="#ErrnoAccess"><code>errno</code></a> set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EACCES</code>.
|
||||
@@ -5906,7 +5912,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
0 on success; -1 on error with<code>errno</code>set appropriately:
|
||||
0 on success; -1 on error with <a href="#ErrnoAccess"><code>errno</code></a> set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EACCES</code>
|
||||
@@ -5961,7 +5967,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
0 on success; -1 on error with<code>errno</code>set appropriately:
|
||||
0 on success; -1 on error with <a href="#ErrnoAccess"><code>errno</code></a> set appropriately:
|
||||
</p>
|
||||
<li><code>EACCES</code> or </code>EPERM</code>:
|
||||
The user tried to connect to a broadcast address without having the
|
||||
@@ -6028,7 +6034,8 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
|
||||
On success, zero is returned. On error, -1 is returned, and
|
||||
<a href="#ErrnoAccess"><code>errno</code></a> is set appropriately.
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EADDRINUSE</code>: Another socket is already listening on the same port.</li>
|
||||
@@ -6177,7 +6184,8 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, returns the number of characters sent. On error, -1 is returned, and<code>errno</code>is set appropriately:
|
||||
On success, returns the number of characters sent. On error, -1 is returned,
|
||||
and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EAGAIN</code> or <code>EWOULDBLOCK</code>.
|
||||
@@ -6284,7 +6292,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, returns the number of characters sent.
|
||||
On error, -1 is returned, and errno is set appropriately:
|
||||
On error, -1 is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>EAGAIN</code>.
|
||||
@@ -6348,7 +6356,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, returns the number of characters sent.
|
||||
On error, -1 is returned, and errno is set appropriately:
|
||||
On error, -1 is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>BADF</code>.
|
||||
@@ -6411,7 +6419,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
<p>
|
||||
<b>Returned Values:</b>
|
||||
On success, returns the number of characters sent.
|
||||
On error, -1 is returned, and errno is set appropriately:
|
||||
On error, -1 is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>BADF</code>.
|
||||
@@ -6428,8 +6436,8 @@ Those socket APIs are discussed in the following paragraphs.</p>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h1>3.0 <A NAME="Data_Structures">OS Data Structures</a></h1>
|
||||
<H2>3.1 Scalar types</H2>
|
||||
<h1>3.0 <A NAME="Data_Structures">OS Data Structures</A></h1>
|
||||
<H2>3.1 <A NAME="ScalarType">Scalar Types</A></H2>
|
||||
<p>
|
||||
Many of the types used to communicate with NuttX are simple
|
||||
scalar types. These types are used to provide architecture independence
|
||||
@@ -6443,7 +6451,7 @@ interface include:
|
||||
<li>time_t
|
||||
</ul>
|
||||
|
||||
<H2>3.2 Hidden Interface Structures</H2>
|
||||
<H2>3.2 <A NAME="HiddenStructures">Hidden Interface Structures</A></H2>
|
||||
<p>
|
||||
Several of the types used to interface with NuttX are
|
||||
structures that are intended to be hidden from the application.
|
||||
@@ -6458,37 +6466,47 @@ OS resources. These hidden structures include:
|
||||
<li>pthread_key_t
|
||||
</ul>
|
||||
<p>
|
||||
In order to maintain portability, applications should not reference
|
||||
specific elements within these hidden structures. These hidden
|
||||
structures will not be described further in this user's manual.
|
||||
In order to maintain portability, applications should not reference
|
||||
specific elements within these hidden structures. These hidden
|
||||
structures will not be described further in this user's manual.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
<H2>3.3. Access to the <I>errno</I> Variable</H2>
|
||||
<H2>3.3 <A NAME="ErrnoAccess">Access to the <code>errno</code> Variable</A></H2>
|
||||
<p>
|
||||
A pointer to the thread-specific <I>errno</I>. value is available through a
|
||||
function call:
|
||||
A pointer to the thread-specific <code>errno</code> value is available through a
|
||||
function call:
|
||||
</p>
|
||||
<p>
|
||||
<b>Function Prototype:</b>
|
||||
<b>Function Prototype:</b>
|
||||
<p>
|
||||
<pre> int *get_errno_ptr( void )</pre>
|
||||
<pre> #include <errno.h>
|
||||
#define errno *get_errno_ptr()
|
||||
int *get_errno_ptr( void )</pre>
|
||||
<p>
|
||||
<b>Description</b>: <I>osGetErrnorPtr()</I> returns a pointer to
|
||||
the thread-specific <I>errno</I> value.
|
||||
<b>Description</b>:
|
||||
<code>get_errno_ptr()</code> returns a pointer to the thread-specific <code>errno</code> value.
|
||||
Note that the symbol <code>errno</code> is defined to be <code>get_errno_ptr()</code> so that the usual
|
||||
access by referencing the symbol <code>errno</code> will work as expected.
|
||||
</p>
|
||||
<p>
|
||||
This differs somewhat from the use for<code>errno</code>in a multi-threaded process environment:
|
||||
Each pthread will have its own private copy of<code>errno</code>and the<code>errno</code>will not be shared
|
||||
between pthreads.
|
||||
There is a unique, private <code>errno</code> value for each NuttX task.
|
||||
However, the implementation of <code>errno</code> differs somewhat from the use of
|
||||
<code>errno</code> in most multi-threaded process environments:
|
||||
In NuttX, each pthread will also have its own private copy of <code>errno</code> and the
|
||||
<code>errno</code> will not be shared between pthreads.
|
||||
This is, perhaps, non-standard but promotes better thread independence.
|
||||
<p>
|
||||
<b>Input Parameters</b>: None
|
||||
<p>
|
||||
<b>Returned Values</b>:
|
||||
<p>
|
||||
<ul>
|
||||
<li>A pointer to the thread-specific <I>errno</I> value.
|
||||
<li>A pointer to the thread-specific <code>errno</code> value.
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
<H2>3.4 User Interface Structures</H2>
|
||||
<H2>3.4 <A NAME="UserStructures">User Interface Structures</A></H2>
|
||||
<p>
|
||||
<H3>3.4.1 main_t</H3>
|
||||
<p>
|
||||
|
||||
BIN
Documentation/freeports.gif
Normal file
BIN
Documentation/freeports.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
20
Documentation/freeports.html
Normal file
20
Documentation/freeports.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Free NuttX Ports</title>
|
||||
</head>
|
||||
<body background="backgd.gif">
|
||||
<center>
|
||||
<table border="1" width="80%" bgcolor="#eeeeee">
|
||||
<tr><td>
|
||||
<big><b><i>Free</i> Ports</b></big>.
|
||||
If you have a hardware platform that you would like to see NuttX ported to then have I got a deal for you:
|
||||
I am willing to port NuttX to run on your hardware <b><i>FREE</i></b>.
|
||||
You would, of course, have to provide all hardware, development tools, and documentation.
|
||||
The functionality would be limited to basic boot-up, serial console, networking, ...
|
||||
I would need to retain the hardware throught the support cycle.
|
||||
Of course, this offer depends the availability of free time to do the port.
|
||||
If you are interested, contact <a href="http://sourceforge.net/users/patacongo/">patacongo</a> at SourceForge.
|
||||
</td></tr></table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
125
Makefile
125
Makefile
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
############################################################################
|
||||
# Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 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.
|
||||
#
|
||||
@@ -31,12 +31,19 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
TOPDIR = ${shell pwd}
|
||||
TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'}
|
||||
-include ${TOPDIR}/.config
|
||||
-include ${TOPDIR}/Make.defs
|
||||
|
||||
# Default tools
|
||||
|
||||
ifeq ($(DIRLINK),)
|
||||
DIRLINK = $(TOPDIR)/tools/link.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
endif
|
||||
|
||||
# Process architecture and board-specific directories
|
||||
|
||||
ARCH_DIR = arch/$(CONFIG_ARCH)
|
||||
@@ -47,7 +54,7 @@ BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
|
||||
# Add-on directories. These may or may not be in place in the
|
||||
# NuttX source tree (they must be specifically installed)
|
||||
|
||||
PCODE_DIR := `if [ -r pcode/Makefile ]; then echo "pcode"; fi`
|
||||
PCODE_DIR := ${shell if [ -r pcode/Makefile ]; then echo "pcode"; fi}
|
||||
|
||||
# FSDIRS depend on file descriptor support; NONFSDIRS do not
|
||||
# (except for parts of FSDIRS). We will exclude FSDIRS
|
||||
@@ -113,7 +120,7 @@ all: $(BIN)
|
||||
|
||||
# Build the mkconfig tool used to create include/nuttx/config.h
|
||||
tools/mkconfig:
|
||||
$(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) mkconfig
|
||||
@$(MAKE) -C tools -f Makefile.mkconfig TOPDIR="$(TOPDIR)" mkconfig
|
||||
|
||||
# Create the include/nuttx/config.h file
|
||||
include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
|
||||
@@ -121,79 +128,39 @@ include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
|
||||
|
||||
# link the arch/<arch-name>/include dir to include/arch
|
||||
include/arch: Make.defs
|
||||
@if [ -h include/arch ]; then \
|
||||
rm -f include/arch ; \
|
||||
else \
|
||||
if [ -e include/arch ]; then \
|
||||
echo "include/arch exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(TOPDIR)/$(ARCH_DIR)/include include/arch
|
||||
@$(DIRLINK) $(TOPDIR)/$(ARCH_DIR)/include include/arch
|
||||
|
||||
# Link the configs/<board-name>/include dir to include/arch/board
|
||||
include/arch/board: Make.defs include/arch
|
||||
@if [ -h include/arch/board ]; then \
|
||||
rm -f include/arch/board ; \
|
||||
else \
|
||||
if [ -e include/arch/board ]; then \
|
||||
echo "include/arch/board exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
|
||||
include/arch/board: include/arch Make.defs include/arch
|
||||
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
|
||||
|
||||
# Link the configs/<board-name>/src dir to arch/<arch-name>/src/board
|
||||
$(ARCH_SRC)/board: Make.defs
|
||||
@if [ -h $(ARCH_SRC)/board ]; then \
|
||||
rm -f $(ARCH_SRC)/board ; \
|
||||
else \
|
||||
if [ -e $(ARCH_SRC)/board ]; then \
|
||||
echo "$(ARCH_SRC)/board exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
|
||||
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
|
||||
|
||||
# Link arch/<arch-name>/include/<chip-name> to arch/<arch-name>/include/chip
|
||||
$(ARCH_SRC)/chip: Make.defs
|
||||
ifneq ($(CONFIG_ARCH_CHIP),)
|
||||
@if [ -h $(ARCH_SRC)/chip ]; then \
|
||||
rm -f $(ARCH_SRC)/chip ; \
|
||||
else \
|
||||
if [ -e $(ARCH_SRC)/chip ]; then \
|
||||
echo "$(ARCH_SRC)/chip exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
|
||||
@$(DIRLINK) $(TOPDIR)/$(ARCH_SRC)/$(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
|
||||
endif
|
||||
|
||||
# Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip
|
||||
$(ARCH_INC)/chip: Make.defs
|
||||
include/arch/chip: include/arch Make.defs
|
||||
ifneq ($(CONFIG_ARCH_CHIP),)
|
||||
@if [ -e $(ARCH_INC)/chip ]; then \
|
||||
if [ -h $(ARCH_INC)/chip ]; then \
|
||||
rm -f $(ARCH_INC)/chip ; \
|
||||
else \
|
||||
echo "$(ARCH_INC)/chip exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(CONFIG_ARCH_CHIP) $(ARCH_INC)/chip
|
||||
@$(DIRLINK) $(TOPDIR)/$(ARCH_INC)/$(CONFIG_ARCH_CHIP) include/arch/chip
|
||||
endif
|
||||
|
||||
dirlinks: include/arch include/arch/board $(ARCH_SRC)/board $(ARCH_SRC)/chip $(ARCH_INC)/chip
|
||||
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip
|
||||
|
||||
context: check_context include/nuttx/config.h dirlinks
|
||||
|
||||
clean_context:
|
||||
@rm -f include/nuttx/config.h include/arch
|
||||
@if [ -h include/arch ]; then rm -f include/arch ; fi
|
||||
@if [ -h $(ARCH_INC)/board ]; then rm -f $(ARCH_INC)/board ; fi
|
||||
@if [ -h $(ARCH_SRC)/board ]; then rm -f $(ARCH_SRC)/board ; fi
|
||||
@if [ -h $(ARCH_INC)/chip ]; then rm -f $(ARCH_INC)/chip ; fi
|
||||
@if [ -h $(ARCH_SRC)/chip ]; then rm -f $(ARCH_SRC)/chip ; fi
|
||||
@rm -f include/nuttx/config.h
|
||||
@$(DIRUNLINK) include/arch/board
|
||||
@$(DIRUNLINK) include/arch/chip
|
||||
@$(DIRUNLINK) include/arch
|
||||
@$(DIRUNLINK) $(ARCH_SRC)/board
|
||||
@$(DIRUNLINK) $(ARCH_SRC)/chip
|
||||
|
||||
check_context:
|
||||
@if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \
|
||||
@@ -203,63 +170,63 @@ check_context:
|
||||
fi
|
||||
|
||||
sched/libsched$(LIBEXT): context
|
||||
$(MAKE) -C sched TOPDIR=$(TOPDIR) libsched$(LIBEXT)
|
||||
@$(MAKE) -C sched TOPDIR="$(TOPDIR)" libsched$(LIBEXT)
|
||||
|
||||
lib/liblib$(LIBEXT): context
|
||||
$(MAKE) -C lib TOPDIR=$(TOPDIR) liblib$(LIBEXT)
|
||||
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
|
||||
|
||||
$(ARCH_SRC)/libarch$(LIBEXT): context
|
||||
$(MAKE) -C $(ARCH_SRC) TOPDIR=$(TOPDIR) libarch$(LIBEXT)
|
||||
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
|
||||
|
||||
mm/libmm$(LIBEXT): context
|
||||
$(MAKE) -C mm TOPDIR=$(TOPDIR) libmm$(LIBEXT)
|
||||
@$(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT)
|
||||
|
||||
net/libnet$(LIBEXT): context
|
||||
$(MAKE) -C net TOPDIR=$(TOPDIR) libnet$(LIBEXT)
|
||||
@$(MAKE) -C net TOPDIR="$(TOPDIR)" libnet$(LIBEXT)
|
||||
|
||||
netutils/libnetutils$(LIBEXT): context
|
||||
$(MAKE) -C netutils TOPDIR=$(TOPDIR) libnetutils$(LIBEXT)
|
||||
@$(MAKE) -C netutils TOPDIR="$(TOPDIR)" libnetutils$(LIBEXT)
|
||||
|
||||
fs/libfs$(LIBEXT): context
|
||||
$(MAKE) -C fs TOPDIR=$(TOPDIR) libfs$(LIBEXT)
|
||||
@$(MAKE) -C fs TOPDIR="$(TOPDIR)" libfs$(LIBEXT)
|
||||
|
||||
drivers/libdrivers$(LIBEXT): context
|
||||
$(MAKE) -C drivers TOPDIR=$(TOPDIR) libdrivers$(LIBEXT)
|
||||
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT)
|
||||
|
||||
pcode/libpcode$(LIBEXT): context
|
||||
$(MAKE) -C pcode TOPDIR=$(TOPDIR) libpcode$(LIBEXT)
|
||||
@$(MAKE) -C pcode TOPDIR="$(TOPDIR)" libpcode$(LIBEXT)
|
||||
|
||||
examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT): context
|
||||
$(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR=$(TOPDIR) lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
@$(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR="$(TOPDIR)" lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
|
||||
$(BIN): context depend $(LINKLIBS)
|
||||
$(MAKE) -C $(ARCH_SRC) TOPDIR=$(TOPDIR) LINKLIBS="$(LINKLIBS)" $(BIN)
|
||||
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" LINKLIBS="$(LINKLIBS)" $(BIN)
|
||||
|
||||
depend:
|
||||
@for dir in $(MAKEDIRS) ; do \
|
||||
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) depend ; \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
|
||||
done
|
||||
|
||||
subdir_clean:
|
||||
@for dir in $(CLEANDIRS) ; do \
|
||||
if [ -e $$dir/Makefile ]; then \
|
||||
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) clean ; \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean ; \
|
||||
fi \
|
||||
done
|
||||
$(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) clean
|
||||
$(MAKE) -C mm -f Makefile.test TOPDIR=$(TOPDIR) clean
|
||||
@$(MAKE) -C tools -f Makefile.mkconfig TOPDIR="$(TOPDIR)" clean
|
||||
@$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
|
||||
|
||||
clean: subdir_clean
|
||||
rm -f $(BIN) $(BIN).* mm_test *.map *~
|
||||
@rm -f $(BIN) $(BIN).* mm_test *.map *~
|
||||
|
||||
subdir_distclean:
|
||||
@for dir in $(CLEANDIRS) ; do \
|
||||
if [ -e $$dir/Makefile ]; then \
|
||||
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) distclean ; \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" distclean ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
distclean: clean subdir_distclean clean_context
|
||||
rm -f Make.defs setenv.sh .config
|
||||
@rm -f Make.defs setenv.sh .config
|
||||
|
||||
|
||||
|
||||
435
ReleaseNotes
435
ReleaseNotes
@@ -1,3 +1,366 @@
|
||||
nuttx-0.1.0
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the initial. This initial includes the complete NuttX RTOS
|
||||
with support for the Linux user mode simulation and the TI TMS320C5471
|
||||
(Arm7) processor. Partial support for the 87C52 is included.
|
||||
|
||||
This release has been verified on both the Linux user-mode and C5471
|
||||
platforms using the test program under examples/ostest. Test results
|
||||
for the C5471 can be found in arch/c5471/doc/test-results.txt.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 9,2007.
|
||||
|
||||
nuttx-0.1.1
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the second release of NuttX. This release includes the following.
|
||||
See the ChangeLog for more detailed description of the changes.
|
||||
|
||||
(1) General OS bugfixes (see the ChangeLog for details),
|
||||
(2) bugfixes for the TI TMS320C5471 (Arm7) platform (see
|
||||
the ChangeLog)
|
||||
(3) Complete support for the 87C52. (However, the 87C52
|
||||
release is not stable enough for general usage).
|
||||
(4) Added the beginning of a shell call NuttShell (nsh)
|
||||
|
||||
This release has been verified on the Linux user-mode platform, the
|
||||
Spectrum Digital TMS320C5471 EVM, and the PJRC 87C52 development board
|
||||
using the test program under examples/ostest.
|
||||
|
||||
STATUS: The development status remains as ALPHA until further testing
|
||||
is performed.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 14, 2007.
|
||||
|
||||
nuttx-0.1.2
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the third release of NuttX. This release is
|
||||
primarily a bugfix release with minimal new features. See
|
||||
the ChangeLog for a more detailed description of the
|
||||
changes.
|
||||
|
||||
(1) Several important OS and ARM7 bugfixes,
|
||||
(2) opendir(), closedir(), readdir(), etc. added
|
||||
(3) Added C5471 watchdog timer.
|
||||
(4) Created a shareable, serial driver.
|
||||
(5) Added 'ls' command to NuttShell (nsh)
|
||||
(6) Added a test of the round robin scheduler
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform, the Spectrum Digital TMS320C5471 EVM using the
|
||||
test program under examples/ostest.
|
||||
|
||||
This tarball contains a CVS snapshot from March 19, 2007.
|
||||
|
||||
nuttx-0.2.1
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the fourth relese of NuttX. This release adds adds
|
||||
support for a new platform, restructures many header files,
|
||||
and adds a few new features:
|
||||
|
||||
(1) Support for Neuros OSD / DM320
|
||||
(2) Restructuring of header files for better POSIX compliance
|
||||
(3) Added kill()
|
||||
(4) Added POSIX timers
|
||||
(5) bugfixes and documentation updates
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform, the Spectrum Digital TMS320C5471 EVM, and the
|
||||
Neuros OSD using the test program under examples/ostest. Because
|
||||
of the stability of these tests, the project status
|
||||
has been upgraded to 'beta.'
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 22, 2007.
|
||||
|
||||
nuttx-0.2.2
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the fifth release of NuttX. There is no major new
|
||||
functionality in this release. This release adds support
|
||||
for new pthread barrier APIs, changes the directory
|
||||
structure, to better handle different board configurations
|
||||
using the same processor architecture, and corrects a few
|
||||
defects.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform and the Neuros OSD using the test program under
|
||||
examples/ostest. There are no known, critical defects but
|
||||
the project development status remains at 'beta' status
|
||||
pending further test and evaluation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from
|
||||
March 26, 2007.
|
||||
|
||||
nuttx-0.2.3
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the sixth release of NuttX. This release is
|
||||
primarily a bugfix release. Numerous problems were fixed
|
||||
as detailedin the change log. New functionality includes
|
||||
support for timed message queues.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform and the Neuros OSD using the test program under
|
||||
examples/ostest. The results of the testing is available in
|
||||
the source tree under configs/ntosd-dm320/doc/test-results.
|
||||
There are no known, critical defects but the project
|
||||
development status remains at 'beta' status pending further
|
||||
test and evaluation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 29,
|
||||
2007.
|
||||
|
||||
nuttx-0.2.4
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 7th release of NuttX. This release is only to roll out
|
||||
build changes to better support different SoC's that use the same
|
||||
processor architecture. In particular, the two existing ARM architectures,
|
||||
c5471 and DM320 were combined into a single ARM directory. This was done
|
||||
in preparation for an LPC2148 port that is currently in progress. There
|
||||
is NO new functionality or significant bufixes in this release.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified on the Linux user-mode platform
|
||||
and the Neuros OSD using the test program under examples/ostest.
|
||||
The results of the testing is available in the source tree under
|
||||
configs/ntosd-dm320/doc/test-results and under configs/sim/doc/test-results.
|
||||
There are no known, critical defects but the project development status
|
||||
remains at 'beta' status pending further test and evaluation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from April 28, 2007.
|
||||
|
||||
nuttx-0.2.5
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 8th release of NuttX. This release includes:
|
||||
|
||||
(1) Several bug fixes
|
||||
(2) Initial support for FAT filesystems. Testing has not
|
||||
been exhaustive and some functionality is missing
|
||||
(mkdir, stat, unlink chmod, and rename functionality is
|
||||
not yet implemented).
|
||||
(3) Support for the NXP lpc2148 processor is included but
|
||||
is untested as of this writing. The current
|
||||
implementation includes only support for serial console
|
||||
and timer interrupt.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode
|
||||
platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from May 19,
|
||||
2007.
|
||||
|
||||
nuttx-0.2.6
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 9th release of NuttX. This is primarily a
|
||||
bugfix release to correct a number of problems introduced
|
||||
with the 0.2.5 release. This release does include some FAT
|
||||
filesystem extensions including unlink(), mkdir(), rmdir(),
|
||||
rename(), opendir(), closedir(), readdir(), seekdir(),
|
||||
telldir(), rewindir(). There are some pending FAT changes
|
||||
that did not make it into this release including stat(),
|
||||
truncate(), and long file names.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode
|
||||
platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from May 26,
|
||||
2007.
|
||||
|
||||
nuttx-0.2.7
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 10th release of NuttX. This is primarily a bugfix releaseto correct a
|
||||
number of problems reported to me (thanks Didier!). This release does include the
|
||||
final changes complete the FAT filesystem logic including stat(), tatfs(), and non-
|
||||
standard APIs to manage FAT
|
||||
attributes. At present,FAT long file names and file trunction() are still not
|
||||
supported.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from June 9, 2007.
|
||||
|
||||
nuttx-0.2.8
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 11th release of NuttX. This release (1) corrects important bugs
|
||||
in opendir and realloc, (2) adds support for environment variables, (3) adds
|
||||
several new C library interfaces, and (4) extends several example programs.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from July 2, 2007.
|
||||
|
||||
nuttx-0.3.0
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 12th release of NuttX. This release includes the initial
|
||||
integration of a network subsystem and the uIP TCP/IP stack into NuttX
|
||||
(see http://www.sics.se/~adam/uip/index.php/Main_Page). Also included
|
||||
is a device driver for the Davicom DM90x0 ethernet controller.
|
||||
|
||||
This integration is very preliminary. Only a small portion of the
|
||||
network functionality has been integrated and there are a number of
|
||||
open issues (see the TODO file). The network subsystem is pre-alpha
|
||||
at this point in time. I expect that it will stabilize and mature
|
||||
over the next few releases.
|
||||
|
||||
The baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta (as long as the network is not used).
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 6, 2007.
|
||||
|
||||
nuttx-0.3.1
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 13th release of NuttX and the second release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
Many network-related problems have been fixed and the implementation
|
||||
has matured significantly. However, the level of network reliability
|
||||
is probably still at the pre-alpha or early level. It is sufficiently
|
||||
complete that you may begin to perform some network integration and
|
||||
is exepcted to achieve beta level of reliability over the next few
|
||||
releases.
|
||||
|
||||
The baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta (as long as the network is not used).
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 19, 2007.
|
||||
|
||||
nuttx-0.3.2
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 14th release of NuttX and the 3rd release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
Many network-related problems have been fixed and the implementation
|
||||
has matured significantly. This release consists of:
|
||||
|
||||
o TCP-related bug-fixes
|
||||
o TCP performance improvements
|
||||
o Initial UDP integration
|
||||
o Initial uIP micro webserver integration
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
The level of network reliability is at alpha level is expected to
|
||||
achieve beta level of reliability over the next few releases.
|
||||
|
||||
The baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 23, 2007.
|
||||
|
||||
nuttx-0.3.3
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 15th release of NuttX and the 4th release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
Many network-related problems have been fixed and the implementation
|
||||
has matured significantly. This release consists of:
|
||||
|
||||
o TCP-related bug-fixes for disconnecting sockets
|
||||
o Correction of some TCP read-ahead logic
|
||||
o TCP performance improvements
|
||||
o Misc. additions and cleanup (See the ChangeLog for a complete list of
|
||||
changes).
|
||||
|
||||
The level of network reliability is at an early beta release level. The
|
||||
baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta. Open network-related issues include only:
|
||||
|
||||
o Some minor unimplemented BSD socket functionality,
|
||||
o Thread safety issues: the same socket cannot be used concurrently on
|
||||
different threads.
|
||||
o Pending design changes necessary to support multiple network interfaces.
|
||||
o IPv6 support is incomplete.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver. Any feedback for improving the network
|
||||
reliability/performance would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 28, 2007.
|
||||
|
||||
nuttx-0.3.4
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 16th release of NuttX and the 5th release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
This release is primarily a bug-fix release. New features include
|
||||
only:
|
||||
|
||||
o TELNET front-end to NSH,
|
||||
o DHCPC server functionality, and
|
||||
o C5471 Ethernet driver.
|
||||
|
||||
Numerous network related problems were fixed related to DHCPC, UDP
|
||||
input processing, UDP broadcast, send timeouts, and bad compilation when
|
||||
uIP is compiled at high levels of optimization.
|
||||
|
||||
The level of network reliability is at a strong beta release level. The
|
||||
baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta or production level.
|
||||
|
||||
Parts of this release were verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 Ethernet driver and other parts on the Spectrum
|
||||
Digital C5471 EVM using the C5471 Ethernet driver. Any feedback about bugs
|
||||
or suggestions for improving the network reliability/performance would be
|
||||
greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from December 10, 2007.
|
||||
|
||||
nuttx-0.3.5
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 17th release of NuttX this release is primarily a bug-fix
|
||||
release and intended to synchronize with the current CVS contents. See
|
||||
the ChangeLog for a detailed list of changes and fixes.
|
||||
|
||||
This release were verified only on the Spectrum Digital C5471 EVM using
|
||||
the C5471 Ethernet driver. Any feedback about bugs or suggestions for
|
||||
improvement would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from December 18, 2007.
|
||||
|
||||
nuttx-0.3.6
|
||||
^^^^^^^^^^^
|
||||
|
||||
@@ -18,3 +381,75 @@ simulation targets. As usual, any feedback about bugs or suggestions
|
||||
for improvement would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from January 6, 2007.
|
||||
|
||||
====
|
||||
|
||||
There was an error in the initial 0.3.6 release that prevented
|
||||
a successful build unless the Pascal add-on was present. The
|
||||
tarball was patched to include the fix. Make sure that you download
|
||||
the nuttx-0.3.6.1.tar.gz version to avoid this problem.
|
||||
|
||||
nuttx-0.3.7
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 19th release of NuttX. This release includes the
|
||||
preliminary port of NuttX to the ZiLOG z16f 16-bit microcontroller.
|
||||
This port was verified using the ZiLOG z16f2800100zcog Development
|
||||
and the ZiLOG ZDS-II toolchain. See http://www.zilog.com for
|
||||
further information.
|
||||
|
||||
I emphasize that this is a preliminary release of the z16f port and
|
||||
is only alpha or, perhaps, pre-alpha quality as of this writing.
|
||||
There are a list of known issues in the TODO file in the root of
|
||||
the NuttX directory. The overall quality of NuttX (excluding the
|
||||
z16f port) continues to improve beyond the late beta level.
|
||||
|
||||
The z16f port required numerous changes to NuttX to handle:
|
||||
|
||||
* NEAR and FAR addressing, and
|
||||
* Use of a Windows native toolchain in a Cygwin build environment.
|
||||
|
||||
In addition to the z16f port, at least one very critical bug was
|
||||
found and corrected in NuttX: The thread-specific errno value of one
|
||||
task was being randomly trashed when a different thread exitted.
|
||||
|
||||
This release were verified on the ZiLOG z16f2800100zcog, Neuros OSD
|
||||
(ARM9), and the simulation platforms. As usual, any feedback about bugs
|
||||
or suggestions for improvement would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from January 31, 2008.
|
||||
|
||||
nuttx-0.3.8
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 20th release of NuttX. This is a minor bugfix release.
|
||||
It corrects a few minor problems, adds a few minor features, and
|
||||
continues the integration of the ZiLOG Z18F and of the Pascal P-Code
|
||||
add-on. This release is synchronized with the release of Pascal-0.1.2.
|
||||
|
||||
This tarball contains a complete CVS snapshot from February 10, 2008.
|
||||
|
||||
nuttx-0.3.9
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 21st release of NuttX. This is a minor future enhancement
|
||||
release. This release includes support for the ZiLOG Z8Encore! micro-
|
||||
controller. Also included is the initial framework for support for
|
||||
the Z80, XTRS platform (http://www.tim-mann.org/xtrs.html).
|
||||
|
||||
This released has been verified only on the ZiLOG ZDS-II Z8Encore!
|
||||
chip simulation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 9, 2008.
|
||||
|
||||
nuttx-0.3.10
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 22nd release of NuttX. This is an important bug fix release.
|
||||
This release incorporates fixes to correct critical list handling errors
|
||||
in task shutdown logic: One in timer deletion logic (timer_delete.c) and one
|
||||
in stream logic (lib_init.c). This release also includes support to ZiLOG EZ80Acclaim
|
||||
microcontrooler (EZ80F91 chip) and configurations fot the ZiLOG z8f64200100kit (Z8F6423)
|
||||
and ez80f0910200kitg (EZ80F091) development kit.
|
||||
|
||||
|
||||
|
||||
179
TODO
179
TODO
@@ -1,4 +1,4 @@
|
||||
NuttX TODO List (Last updated December 13, 2007)
|
||||
NuttX TODO List (Last updated February 13, 2008)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
(6) Task/Scheduler (sched/)
|
||||
@@ -7,19 +7,21 @@ NuttX TODO List (Last updated December 13, 2007)
|
||||
(1) Signals (sched/, arch/)
|
||||
(1) pthreads (sched/)
|
||||
(1) C++ Support
|
||||
(10) Network (net/, netutils/)
|
||||
(11) Network (net/, netutils/)
|
||||
(2) USB (drivers/usbdev)
|
||||
(3) Libraries (lib/)
|
||||
(2) File system (fs/, drivers/)
|
||||
(3) File system/Generic drivers (fs/, drivers/)
|
||||
(1) Pascal add-on (pcode/)
|
||||
(2) Documentation (Documentation/)
|
||||
(3) Build system
|
||||
(0) Applications & Tests (examples/)
|
||||
(1) ARM (arch/arm/)
|
||||
(0) ARM/C5471 (arch/arm/src/c5471/)
|
||||
(1) ARM/C5471 (arch/arm/src/c5471/)
|
||||
(1) ARM/DM320 (arch/arm/src/dm320/)
|
||||
(2) ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||
(4) pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||
(2) z80 (arch/z80/)
|
||||
(6) z80/z8 (arch/z80/)
|
||||
(7) z16 (arch/z16/)
|
||||
|
||||
o Task/Scheduler (sched/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -182,6 +184,10 @@ o Network (net/, netutils/)
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
Description: Port PPP support from http://contiki.cvs.sourceforge.net/contiki/contiki-2.x/backyard/core/net/ppp/
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
o USB (drivers/usbdev)
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -212,8 +218,8 @@ o Libraries (lib/)
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
o File system (fs/, drivers/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
o File system / Generic drivers (fs/, drivers/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: Add chmod(), truncate().
|
||||
Status: Open
|
||||
@@ -223,6 +229,22 @@ o File system (fs/, drivers/)
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
Description: The CAN driver is untested. Add a test for the CAN driver.
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
o Pascal Add-On (pcode/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: Need APIs to verify execution of P-Code from memory buffer.
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: Loader and object format may be too large for some small
|
||||
memory systems. Consider ways to reduce memory footprint.
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
o Documentation (Documentation/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -261,11 +283,16 @@ o ARM (arch/arm/)
|
||||
present, each interrupt executes on top of the user stack
|
||||
allocation making each user stack allocation larger than needed.
|
||||
Status: Open
|
||||
Priority: Medim
|
||||
Priority: Medium
|
||||
|
||||
o ARM/C5471 (arch/arm/src/c5471/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: UART re-configuration is untested and conditionally compiled out.
|
||||
Status: Open
|
||||
Priority: Medium. ttyS1 is not configured, but not used; ttyS0 is configured
|
||||
by the bootloader
|
||||
|
||||
o ARM/DM320 (arch/arm/src/dm320/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -275,7 +302,7 @@ o ARM/DM320 (arch/arm/src/dm320/)
|
||||
the stack seems to fix the problem (might also be the
|
||||
bootloader overwriting memory)
|
||||
Status: Open
|
||||
Priority: Mediam
|
||||
Priority: Medium
|
||||
|
||||
o ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -323,16 +350,16 @@ o pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||
Status: Open
|
||||
Priority: Low -- only because there as so many other issues with 8051
|
||||
|
||||
o z80 (arch/z80)
|
||||
^^^^^^^^^^^^^^^
|
||||
o z80/z8 (arch/z80)
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: The Has the same problems with interger overflow during compilation
|
||||
as described for pjrc-8051. At typical cause is code like
|
||||
Description: The SDCC version the same problems with interger overflow during
|
||||
compilation as described for pjrc-8051. At typical cause is code like
|
||||
usleep(500*1000) which exceeds the range of a 16-bit integer
|
||||
Status: See pjrc-8051
|
||||
Priority: See pjrc-8051
|
||||
|
||||
Description: The simulated serial console (configs/z80sim/src/z80_serial.c +
|
||||
Description: The simulated Z80 serial console (configs/z80sim/src/z80_serial.c +
|
||||
driver/serial.c) does not work. This is because there are
|
||||
no interrupts in the simulation so there is never any serial
|
||||
traffic.
|
||||
@@ -340,5 +367,129 @@ o z80 (arch/z80)
|
||||
Priority: Low -- the simulated console is not critical path and the designs
|
||||
to solve the problem are complex.
|
||||
|
||||
Description: ZDS-II Librarian complains that the source for the .obj file
|
||||
is not in the library.
|
||||
Status: Open
|
||||
Priority: Low, thought to be cosmetic. I think this is a consequence of
|
||||
replacing vs. inserting the library.
|
||||
|
||||
Description: The ZDS-II compiler (version 4.10.1) fails with an internal error
|
||||
while compiler mm/mm_initialize. This has been reported as
|
||||
incident 81509.
|
||||
|
||||
I have found the following workaround that I use to build for the
|
||||
time being:
|
||||
|
||||
--- mm/mm_initialize.c.SAVE 2008-02-13 08:06:46.833857700 -0600
|
||||
+++ mm/mm_initialize.c 2008-02-13 08:07:26.367608900 -0600
|
||||
@@ -94,8 +94,11 @@
|
||||
{
|
||||
int i;
|
||||
|
||||
+#if 0 /* DO NOT CHECK IN */
|
||||
CHECK_ALLOCNODE_SIZE;
|
||||
CHECK_FREENODE_SIZE;
|
||||
+#endif
|
||||
|
||||
/* Set up global variables */
|
||||
|
||||
Status: Open
|
||||
Priority: High
|
||||
|
||||
Description: Add support for prioritized ez8 interrupts. Currently logic supports
|
||||
only nominal interrupt priority.
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: The z8Encore! port has only been verified on the ZDS-II instruction
|
||||
set simulator.
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
o z16 (arch/z16)
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: ZDS-II Librarian complains that the source for the .obj file
|
||||
is not in the library.
|
||||
Status: Open
|
||||
Priority: Low, thought to be cosmetic. I think this is a consequence of
|
||||
replacing vs. inserting the library.
|
||||
|
||||
Description: When the interrupt-driven serial driver is used, the system
|
||||
hangs. This is because of TX ready (TRDE) interrupts that
|
||||
get lost while interrupts are disabled. The existing
|
||||
serial driver appears to be limited to hardware with a
|
||||
latching, level-sensitive TX ready interrupt.
|
||||
Status: Open
|
||||
Priority: Medium. A polled, write-only serial driver is used in the
|
||||
interim for system testing.
|
||||
|
||||
Description: The system delays do not appear to be correct with the
|
||||
examples/ostest/timedmqueue.c test.
|
||||
Status: Open
|
||||
Priority: Medium-High
|
||||
|
||||
Description: At present, the z16f port does not run properly when CONFIG_DEBUG
|
||||
is disabled: The obvious symptom is that there is no printf()
|
||||
output. I have isolated with problem to errors in optimization.
|
||||
With -reduceopt on the command line, I can get the printf output.
|
||||
However, there are still errors in the compiled code -- specifically
|
||||
in sched/timer_create.c.
|
||||
|
||||
I have submitted a bug report to ZiLOG for this (support incident
|
||||
81400). You can see the status of the bug report (and lots more
|
||||
technical detail) here:
|
||||
http://support.zilog.com/support/incident/incident_support.asp?iIncidentId=81400&iSiteId=1&chLanguageCode=ENG
|
||||
|
||||
Summary of ZiLOG analysis: "This is a ZNEO compiler problem. ... [a] workaround
|
||||
is to replace:
|
||||
if ( !timerid || (clockid != 0) )
|
||||
By:
|
||||
if ((clockid != 0) || !timerid)"
|
||||
|
||||
Status: Open
|
||||
Priority: Medium-High
|
||||
|
||||
Description: The pascal add-on does not work with the z16f (that is
|
||||
configuration z16f2800100zcog/pashello). This appears to be
|
||||
another ZDS-II error: when executing the instruction
|
||||
SYSIO 0, WRITESTR a large case statement is executed. This
|
||||
involves a call into the ZiLOG runtime library to __uwcase().
|
||||
__uwcase is passed a pointer to a structure containing jump
|
||||
information. The cause of the failure appears to be that
|
||||
the referenced switch data is bad.
|
||||
This is submited as ZiLOG support incident 81459.
|
||||
|
||||
Summary of ZiLOG analysis: "This is a ZNEO run time library problem.
|
||||
One workaround is to replace the line 58 in uwcase.asm
|
||||
|
||||
From:
|
||||
ADD R9,#4 ; Skip handler
|
||||
To:
|
||||
ADD R9,#2 ; Skip handler
|
||||
|
||||
And add uwcase.asm to the project.
|
||||
|
||||
If the customer does not want to modify uwcase.asm then the other
|
||||
workaround is to add a dummy case and make it same as default:
|
||||
|
||||
case 0x8000:
|
||||
default:
|
||||
|
||||
This will make sure that uwcase is not called but ulcase is called."
|
||||
Status: Open. Due to licensing issues, I cannot include the modified
|
||||
uwcase in the NuttX code base.
|
||||
Priority: Medium
|
||||
|
||||
Description: Add support to maintain SPOV in context switching. This
|
||||
improvement will provide protection against stack overflow
|
||||
and make a safer system solution.
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: Add support for prioritized interrupts. Currently logic supports
|
||||
only nominal interrupt priority.
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
|
||||
|
||||
@@ -123,13 +123,13 @@ src/Makefile
|
||||
Supported Architectures
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
arch/sim
|
||||
arch/sim - Linux simulation
|
||||
A user-mode port of NuttX to the x86 Linux platform is available.
|
||||
The purpose of this port is primarily to support OS feature developement.
|
||||
The purpose of this port is primarily to support OS feature development.
|
||||
This port does not support interrupts or a real timer (and hence no
|
||||
round robin scheduler) Otherwise, it is complete.
|
||||
|
||||
arch/arm
|
||||
arch/arm - ARM-based micro-controllers
|
||||
This directory holds common ARM architectures. At present, this includes
|
||||
the following subdirectories:
|
||||
|
||||
@@ -156,13 +156,36 @@ arch/m68322
|
||||
A work in progress.
|
||||
STATUS: Stalled for the moment.
|
||||
|
||||
arch/pjrc-8051
|
||||
arch/pjrc-8051 - 8051/52 microcontrollers
|
||||
8051 Microcontroller. This port is not quite ready for prime time.
|
||||
|
||||
arch/z80
|
||||
z80 Microcontroller.
|
||||
STATUS: Functional with no known defects. There are still several
|
||||
OS features that have not yet been tested (e.g., networking).
|
||||
arch/z16 - ZiLOG 16-bit processors
|
||||
This directory holds related, 16-bit architectures from ZiLOG. At
|
||||
present, this includes the following subdirectories:
|
||||
|
||||
arch/z16/include and arch/z16/common
|
||||
Common microcontroller logic.
|
||||
|
||||
arch/z16/include/z16f and arch/z16/src/z16f
|
||||
ZiLOG z16f Microcontroller.
|
||||
STATUS: Released in nuttx-0.3.7. Fully functional other than issues
|
||||
addressed in ${TOPDIR}/TODO.
|
||||
|
||||
arch/z80 - ZiLOG 8-bit microcontrollers
|
||||
This directory holds related, 8-bit architectures from ZiLOG. At
|
||||
present, this includes the following subdirectories:
|
||||
|
||||
arch/z80/include and arch/z80/common
|
||||
Common microcontroller logic.
|
||||
|
||||
arch/z80/include/z80 and arch/z80/src/z80
|
||||
Classic ZiLOG z80 Microcontroller.
|
||||
STATUS: Functional with no known defects. There are still several
|
||||
OS features that have not yet been tested (e.g., networking).
|
||||
|
||||
arch/z80/include/z8 and arch/z80/src/z8
|
||||
ZiLOG Z8Encore! Microcontroller
|
||||
This is a work in progress.
|
||||
|
||||
The following architecture directories are deprecated. They have been
|
||||
replaced by the logic in arm/arm and will deleted at some point in the
|
||||
|
||||
@@ -77,4 +77,3 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARCH_H */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# Makefile
|
||||
# arch/arm/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 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.
|
||||
#
|
||||
@@ -36,7 +36,6 @@
|
||||
-include $(TOPDIR)/Make.defs
|
||||
-include chip/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(TOPDIR)/sched
|
||||
|
||||
@@ -67,22 +66,22 @@ VPATH = chip:common
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT):
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) libboard$(LIBEXT)
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
|
||||
@echo "LD: nuttx"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
@$(NM) $(TOPDIR)/$@ | \
|
||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
@@ -101,23 +100,23 @@ endif
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
fi
|
||||
$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
|
||||
fi
|
||||
@rm -f libarch$(LIBEXT) *~
|
||||
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
|
||||
fi
|
||||
@rm -f Make.dep .depend
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -84,7 +84,7 @@ static inline void putreg16(uint16 val, unsigned int addr)
|
||||
|
||||
/* Most DM320 registers are 16-bits wide */
|
||||
|
||||
#define getreg(a) getreg16(1)
|
||||
#define getreg(a) getreg16(a)
|
||||
#define putreg(v,a) putreg16(v,a)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -58,17 +58,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Funtions
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: _up_dumponexit
|
||||
*
|
||||
* Description:
|
||||
* Dump the state of all tasks whenever on task exits. This
|
||||
* is debug instrumentation that was added to check file-
|
||||
* related reference counting but could be useful again
|
||||
* sometime in the future.
|
||||
* Dump the state of all tasks whenever on task exits. This is debug
|
||||
* instrumentation that was added to check file-related reference counting
|
||||
* but could be useful again sometime in the future.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -133,13 +132,15 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
_TCB* tcb;
|
||||
|
||||
/* Disable interrupts. They will be restored when the next
|
||||
* task is started.
|
||||
@@ -150,41 +151,13 @@ void _exit(int status)
|
||||
lldbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
dbg("Other tasks:\n");
|
||||
lldbg("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
* board bring-up and not part of normal platform configuration.
|
||||
*/
|
||||
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
|
||||
#undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* common/up_sigdeliver.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -47,23 +47,23 @@
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_sigdeliver
|
||||
*
|
||||
* Description:
|
||||
@@ -72,7 +72,7 @@
|
||||
* with and forced to branch to this location with interrupts
|
||||
* disabled.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_sigdeliver(void)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ void up_sigdeliver(void)
|
||||
* the correct errno value (probably EINTR).
|
||||
*/
|
||||
|
||||
int saved_errno = rtcb->errno;
|
||||
int saved_errno = rtcb->pterrno;
|
||||
|
||||
up_ledon(LED_SIGNAL);
|
||||
|
||||
@@ -125,7 +125,7 @@ void up_sigdeliver(void)
|
||||
*/
|
||||
|
||||
dbg("Resuming\n");
|
||||
rtcb->errno = saved_errno;
|
||||
rtcb->pterrno = saved_errno;
|
||||
|
||||
/* Then restore the correct state for this thread of
|
||||
* execution.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,24 +70,28 @@
|
||||
#define UART_DTRR_DTR_MASK 0x00ff /* Data transmit/receive */
|
||||
|
||||
/* UART BRSR register bit definitions */
|
||||
/* The UART clock is half of the ARM clock */
|
||||
/* The UART module is clocked by either the AHB clock or PLLIN / 16 */
|
||||
|
||||
#define UART_CLK (DM320_ARM_CLOCK / 2)
|
||||
#ifdef CONFIG_DM320_UARTPPLIN
|
||||
# define UART_REFCLK (27000000 / 16)
|
||||
#else
|
||||
# define UART_REFCLK (DM320_AHB_CLOCK / 16)
|
||||
#endif
|
||||
|
||||
/* And baud rate = UART_CLK / 16 / (VALUE+1) */
|
||||
/* And baud = UART_REFCLK / (brsr+1) */
|
||||
|
||||
#define UART_BAUD_2400 ((uint16)(((UART_CLK / 16) / 2400 ) - 1))
|
||||
#define UART_BAUD_4800 ((uint16)(((UART_CLK / 16) / 4800 ) - 1))
|
||||
#define UART_BAUD_9600 ((uint16)(((UART_CLK / 16) / 9600 ) - 1))
|
||||
#define UART_BAUD_14400 ((uint16)(((UART_CLK / 16) / 14400 ) - 1))
|
||||
#define UART_BAUD_19200 ((uint16)(((UART_CLK / 16) / 19200 ) - 1))
|
||||
#define UART_BAUD_28800 ((uint16)(((UART_CLK / 16) / 28800 ) - 1))
|
||||
#define UART_BAUD_38400 ((uint16)(((UART_CLK / 16) / 38400 ) - 1))
|
||||
#define UART_BAUD_57600 ((uint16)(((UART_CLK / 16) / 57600 ) - 1))
|
||||
#define UART_BAUD_115200 ((uint16)(((UART_CLK / 16) / 115200) - 1))
|
||||
#define UART_BAUD_230400 ((uint16)(((UART_CLK / 16) / 230400) - 1))
|
||||
#define UART_BAUD_460800 ((uint16)(((UART_CLK / 16) / 460800) - 1))
|
||||
#define UART_BAUD_921600 ((uint16)(((UART_CLK / 16) / 921600) - 1))
|
||||
#define UART_BAUD_2400 ((uint16)((UART_REFCLK / 2400 ) - 1))
|
||||
#define UART_BAUD_4800 ((uint16)((UART_REFCLK / 4800 ) - 1))
|
||||
#define UART_BAUD_9600 ((uint16)((UART_REFCLK / 9600 ) - 1))
|
||||
#define UART_BAUD_14400 ((uint16)((UART_REFCLK / 14400 ) - 1))
|
||||
#define UART_BAUD_19200 ((uint16)((UART_REFCLK / 19200 ) - 1))
|
||||
#define UART_BAUD_28800 ((uint16)((UART_REFCLK / 28800 ) - 1))
|
||||
#define UART_BAUD_38400 ((uint16)((UART_REFCLK / 38400 ) - 1))
|
||||
#define UART_BAUD_57600 ((uint16)((UART_REFCLK / 57600 ) - 1))
|
||||
#define UART_BAUD_115200 ((uint16)((UART_REFCLK / 115200) - 1))
|
||||
#define UART_BAUD_230400 ((uint16)((UART_REFCLK / 230400) - 1))
|
||||
#define UART_BAUD_460800 ((uint16)((UART_REFCLK / 460800) - 1))
|
||||
#define UART_BAUD_921600 ((uint16)((UART_REFCLK / 921600) - 1))
|
||||
|
||||
/* UART MSR register bit definitions */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**************************************************************************
|
||||
* lpc214x/lpc214X_lowputc.S
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@@ -92,7 +92,7 @@
|
||||
# error "No CONFIG_UARTn_PARITY Setting"
|
||||
#endif
|
||||
|
||||
#ifdef LPC214X_UART_2STOP != 0
|
||||
#if LPC214X_UART_2STOP != 0
|
||||
# define LPC214X_LCR_STOP LPC214X_LCR_STOP_2
|
||||
#else
|
||||
# define LPC214X_LCR_STOP LPC214X_LCR_STOP_1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* lpc214x/lpc214x_serial.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@@ -82,15 +82,17 @@ struct up_dev_s
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev);
|
||||
static void up_shutdown(struct uart_dev_s *dev);
|
||||
static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
static int up_interrupt(int irq, void *context);
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, uint32 *status);
|
||||
static void up_rxint(struct uart_dev_s *dev, boolean enable);
|
||||
static boolean up_rxfifonotempty(struct uart_dev_s *dev);
|
||||
static boolean up_rxavailable(struct uart_dev_s *dev);
|
||||
static void up_send(struct uart_dev_s *dev, int ch);
|
||||
static void up_txint(struct uart_dev_s *dev, boolean enable);
|
||||
static boolean up_txfifonotfull(struct uart_dev_s *dev);
|
||||
static boolean up_txfifoempty(struct uart_dev_s *dev);
|
||||
static boolean up_txready(struct uart_dev_s *dev);
|
||||
static boolean up_txempty(struct uart_dev_s *dev);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
@@ -100,15 +102,16 @@ struct uart_ops_s g_uart_ops =
|
||||
{
|
||||
.setup = up_setup,
|
||||
.shutdown = up_shutdown,
|
||||
.handler = up_interrupt,
|
||||
.attach = up_attach,
|
||||
.detach = up_detach,
|
||||
.ioctl = up_ioctl,
|
||||
.receive = up_receive,
|
||||
.rxint = up_rxint,
|
||||
.rxfifonotempty = up_rxfifonotempty,
|
||||
.rxavailable = up_rxavailable,
|
||||
.send = up_send,
|
||||
.txint = up_txint,
|
||||
.txfifonotfull = up_txfifonotfull,
|
||||
.txfifoempty = up_txfifoempty,
|
||||
.txready = up_txready,
|
||||
.txempty = up_txempty,
|
||||
};
|
||||
|
||||
/* I/O buffers */
|
||||
@@ -124,6 +127,7 @@ static struct up_dev_s g_uart0priv =
|
||||
{
|
||||
.uartbase = LPC214X_UART0_BASE,
|
||||
.baud = CONFIG_UART0_BAUD,
|
||||
.irq = LPC214X_UART0_IRQ,
|
||||
.parity = CONFIG_UART0_PARITY,
|
||||
.bits = CONFIG_UART0_BITS,
|
||||
.stopbits2 = CONFIG_UART0_2STOP,
|
||||
@@ -131,7 +135,6 @@ static struct up_dev_s g_uart0priv =
|
||||
|
||||
static uart_dev_t g_uart0port =
|
||||
{
|
||||
.irq = LPC214X_UART0_IRQ,
|
||||
.recv =
|
||||
{
|
||||
.size = CONFIG_UART0_RXBUFSIZE,
|
||||
@@ -152,6 +155,7 @@ static struct up_dev_s g_uart1priv =
|
||||
{
|
||||
.uartbase = LPC214X_UART1_BASE,
|
||||
.baud = CONFIG_UART1_BAUD,
|
||||
.irq = LPC214X_UART1_IRQ,
|
||||
.parity = CONFIG_UART1_PARITY,
|
||||
.bits = CONFIG_UART1_BITS,
|
||||
.stopbits2 = CONFIG_UART1_2STOP,
|
||||
@@ -159,7 +163,6 @@ static struct up_dev_s g_uart1priv =
|
||||
|
||||
static uart_dev_t g_uart1port =
|
||||
{
|
||||
.irq = LPC214X_UART1_IRQ,
|
||||
.recv =
|
||||
{
|
||||
.size = CONFIG_UART1_RXBUFSIZE,
|
||||
@@ -234,10 +237,10 @@ static inline void up_restoreuartint(struct up_dev_s *priv, ubyte ier)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_waittxfifonotfull
|
||||
* Name: up_waittxready
|
||||
****************************************************************************/
|
||||
|
||||
static inline void up_waittxfifonotfull(struct up_dev_s *priv)
|
||||
static inline void up_waittxready(struct up_dev_s *priv)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
@@ -283,7 +286,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, boolean enable)
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_LPC214X_UART_CONFIG
|
||||
#ifndef CONFIG_SUPPRESS_LPC214X_UART_CONFIG
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
uint16 baud;
|
||||
ubyte lcr;
|
||||
@@ -299,11 +302,11 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
/* Set up the IER */
|
||||
|
||||
priv->ier = up_serialin(priv, LPC214X_UART_IER_OFFSET);
|
||||
|
||||
|
||||
/* Set up the LCR */
|
||||
|
||||
|
||||
lcr = 0;
|
||||
|
||||
|
||||
if (priv->bits == 7)
|
||||
{
|
||||
lcr |= LPC214X_LCR_CHAR_7;
|
||||
@@ -317,7 +320,7 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
lcr |= LPC214X_LCR_STOP_2;
|
||||
}
|
||||
|
||||
|
||||
if (priv->parity == 1)
|
||||
{
|
||||
lcr |= LPC214X_LCR_PAR_ODD;
|
||||
@@ -328,15 +331,15 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
}
|
||||
|
||||
/* Enter DLAB=1 */
|
||||
|
||||
|
||||
up_serialout(priv, LPC214X_UART_LCR_OFFSET, (lcr | LPC214X_LCR_DLAB_ENABLE));
|
||||
|
||||
|
||||
/* Set the BAUD divisor */
|
||||
|
||||
baud = UART_BAUD(priv->baud);
|
||||
up_serialout(priv, LPC214X_UART_DLM_OFFSET, baud >> 8);
|
||||
up_serialout(priv, LPC214X_UART_DLL_OFFSET, baud & 0xff);
|
||||
|
||||
|
||||
/* Clear DLAB */
|
||||
|
||||
up_serialout(priv, LPC214X_UART_LCR_OFFSET, lcr);
|
||||
@@ -359,6 +362,57 @@ static void up_shutdown(struct uart_dev_s *dev)
|
||||
up_disableuartint(priv, NULL);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_attach
|
||||
*
|
||||
* Description:
|
||||
* Configure the UART to operation in interrupt driven mode. This method is
|
||||
* called when the serial port is opened. Normally, this is just after the
|
||||
* the setup() method is called, however, the serial console may operate in
|
||||
* a non-interrupt driven mode during the boot phase.
|
||||
*
|
||||
* RX and TX interrupts are not enabled when by the attach method (unless the
|
||||
* hardware supports multiple levels of interrupt enabling). The RX and TX
|
||||
* interrupts are not enabled until the txint() and rxint() methods are called.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int up_attach(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
int ret;
|
||||
|
||||
/* Attach and enable the IRQ */
|
||||
|
||||
ret = irq_attach(priv->irq, up_interrupt);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Enable the interrupt (RX and TX interrupts are still disabled
|
||||
* in the UART
|
||||
*/
|
||||
|
||||
up_enable_irq(priv->irq);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_detach
|
||||
*
|
||||
* Description:
|
||||
* Detach UART interrupts. This method is called when the serial port is
|
||||
* closed normally just before the shutdown method is called. The exception is
|
||||
* the serial console which is never shutdown.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void up_detach(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
up_disable_irq(priv->irq);
|
||||
irq_detach(priv->irq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_interrupt
|
||||
*
|
||||
@@ -379,11 +433,11 @@ static int up_interrupt(int irq, void *context)
|
||||
ubyte status;
|
||||
int passes;
|
||||
|
||||
if (g_uart1port.irq == irq)
|
||||
if (g_uart1priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart1port;
|
||||
}
|
||||
else if (g_uart0port.irq == irq)
|
||||
else if (g_uart0priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart0port;
|
||||
}
|
||||
@@ -548,14 +602,14 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_rxfifonotempty
|
||||
* Name: up_rxavailable
|
||||
*
|
||||
* Description:
|
||||
* Return TRUE if the receive fifo is not empty
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static boolean up_rxfifonotempty(struct uart_dev_s *dev)
|
||||
static boolean up_rxavailable(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_RDR) != 0);
|
||||
@@ -600,28 +654,28 @@ static void up_txint(struct uart_dev_s *dev, boolean enable)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_txfifonotfull
|
||||
* Name: up_txready
|
||||
*
|
||||
* Description:
|
||||
* Return TRUE if the tranmsit fifo is not full
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static boolean up_txfifonotfull(struct uart_dev_s *dev)
|
||||
static boolean up_txready(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_THRE) != 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_txfifoempty
|
||||
* Name: up_txempty
|
||||
*
|
||||
* Description:
|
||||
* Return TRUE if the transmit fifo is empty
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static boolean up_txfifoempty(struct uart_dev_s *dev)
|
||||
static boolean up_txempty(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_THRE) != 0);
|
||||
@@ -692,7 +746,7 @@ int up_putc(int ch)
|
||||
ubyte ier;
|
||||
|
||||
up_disableuartint(priv, &ier);
|
||||
up_waittxfifonotfull(priv);
|
||||
up_waittxready(priv);
|
||||
up_serialout(priv, LPC214X_UART_THR_OFFSET, (ubyte)ch);
|
||||
|
||||
/* Check for LF */
|
||||
@@ -701,11 +755,11 @@ int up_putc(int ch)
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
up_waittxfifonotfull(priv);
|
||||
up_waittxready(priv);
|
||||
up_serialout(priv, LPC214X_UART_THR_OFFSET, '\r');
|
||||
}
|
||||
|
||||
up_waittxfifonotfull(priv);
|
||||
up_waittxready(priv);
|
||||
up_restoreuartint(priv, ier);
|
||||
return ch;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
# Makefile
|
||||
############################################################################
|
||||
# arch/c5471/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 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.
|
||||
#
|
||||
@@ -31,11 +31,10 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
|
||||
ASRCS = up_vectors.S up_saveusercontext.S up_fullcontextrestore.S
|
||||
@@ -72,15 +71,14 @@ LIBGCC = ${shell $(CC) -print-libgcc-file-name}
|
||||
all: up_head.o libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(LINKOBJS): %.o: %.S
|
||||
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %.o: %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT):
|
||||
@@ -105,9 +103,9 @@ ifeq ($(CONFIG_RRLOAD_BINARY),y)
|
||||
endif
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend
|
||||
touch $@
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@$(MAKE) -C board TOPDIR=$(TOPDIR) depend
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
@@ -115,7 +113,8 @@ clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||
fi
|
||||
rm -f libarch$(LIBEXT) *.o *~
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* up_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -49,28 +49,27 @@
|
||||
#include <nuttx/fs.h>
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _up_dumponexit
|
||||
*
|
||||
* Description:
|
||||
* Dump the state of all tasks whenever on task exits. This
|
||||
* is debug instrumentation that was added to check file-
|
||||
* related reference counting but could be useful again
|
||||
* sometime in the future.
|
||||
* Dump the state of all tasks whenever on task exits. This is debug
|
||||
* instrumentation that was added to check file-related reference counting
|
||||
* but could be useful again sometime in the future.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
@@ -113,23 +112,30 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
irqstate_t flags = irqsave();
|
||||
_TCB* tcb;
|
||||
|
||||
/* Disable interrupts. They will be restored when the next
|
||||
* task is started.
|
||||
*/
|
||||
|
||||
(void)irqsave();
|
||||
|
||||
lldbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
@@ -138,37 +144,9 @@ void _exit(int status)
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
|
||||
#define CONFIG_SUPPRESS_UART_CONFIG 1 /* Do not reconfig UART */
|
||||
#undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */
|
||||
|
||||
/************************************************************
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
# Makefile
|
||||
############################################################################
|
||||
# arch/dm320/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 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.
|
||||
#
|
||||
@@ -31,11 +31,10 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
|
||||
ASRCS = up_vectors.S up_saveusercontext.S up_fullcontextrestore.S \
|
||||
@@ -70,15 +69,14 @@ LIBGCC = ${shell $(CC) -print-libgcc-file-name}
|
||||
all: up_head.o libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(LINKOBJS): %.o: %.S
|
||||
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %.o: %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT):
|
||||
@@ -106,8 +104,8 @@ endif
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
|
||||
if
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
touch $@
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
@@ -115,12 +113,13 @@ clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||
fi
|
||||
rm -f libarch$(LIBEXT) *.o *~
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
|
||||
fi
|
||||
rm -f Make.dep .depend
|
||||
@rm -f Make.dep .depend
|
||||
|
||||
-include Make.dep
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* up_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -49,28 +49,27 @@
|
||||
#include <nuttx/fs.h>
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _up_dumponexit
|
||||
*
|
||||
* Description:
|
||||
* Dump the state of all tasks whenever on task exits. This
|
||||
* is debug instrumentation that was added to check file-
|
||||
* related reference counting but could be useful again
|
||||
* sometime in the future.
|
||||
* Dump the state of all tasks whenever on task exits. This is debug
|
||||
* instrumentation that was added to check file-related reference counting
|
||||
* but could be useful again sometime in the future.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
@@ -112,22 +111,24 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
_TCB* tcb;
|
||||
|
||||
/* Disable interrupts. They will be restored when the next
|
||||
* task is started.
|
||||
@@ -138,41 +139,13 @@ void _exit(int status)
|
||||
lldbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
dbg("Other tasks:\n");
|
||||
lldbg("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
|
||||
#define CONFIG_SUPPRESS_UART_CONFIG 1 /* Do not reconfig UART */
|
||||
#define CONFIG_DUMP_ON_EXIT 1 /* Dump task state on exit */
|
||||
|
||||
/************************************************************
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
# Makefile
|
||||
############################################################################
|
||||
# arch/pjrc-8051/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 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.
|
||||
#
|
||||
@@ -31,11 +31,10 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
ASFLAGS = -x -j -g -l -s -p
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) -D__ASSEMBLY__
|
||||
@@ -109,13 +108,13 @@ STACK_BASE = ${shell \
|
||||
all: up_head$(OBJEXT) libarch$(LIBEXT)
|
||||
|
||||
$(ASRCS) $(LINKASRCS): %$(ASMEXT): %.S
|
||||
$(CPP) -P $(CPPFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(CPP) -P $(CPPFLAGS) $< -o $@
|
||||
|
||||
$(AOBJS) $(LINKOBJS): $(ASRCS) $(LINKASRCS)
|
||||
$(AS) $(ASFLAGS) $<
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS) $(TESTOBJS): %$(OBJEXT): %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
# Create a header file that contains addressing information needed by the code
|
||||
|
||||
@@ -148,8 +147,7 @@ up_mem.h: pass1.mem
|
||||
|
||||
libarch$(LIBEXT): up_mem.h $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $${obj} FAILED!" ; exit 1 ; } ; \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
# This is a kludge to work around some conflicting symbols in libsdcc.liXqueb
|
||||
@@ -172,19 +170,21 @@ board/libboard$(LIBEXT):
|
||||
# This target builds the final executable
|
||||
|
||||
pass1.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS) board/libboard$(LIBEXT)
|
||||
$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
|
||||
@echo "LD: $@"
|
||||
@$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
|
||||
$(LDLIBS) -llibboard$(LIBEXT) $(SDCCLIBS) -o $@
|
||||
@rm -f up_mem.h
|
||||
@rm -f up_allocateheap$(OBJEXT) libarch$(LIBEXT)
|
||||
@$(MAKE) TOPDIR=$(TOPDIR) libarch$(LIBEXT)
|
||||
|
||||
nuttx.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS)
|
||||
$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
|
||||
@echo "LD: $@"
|
||||
@$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
|
||||
$(LDLIBS) -llibboard$(LIBEXT) $(SDCCLIBS) -o $@
|
||||
|
||||
nuttx$(EXEEXT): pass1.ihx nuttx.ihx
|
||||
@rm -f pass1.*
|
||||
packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
|
||||
@packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
|
||||
@cp -f nuttx.map $(TOPDIR)/.
|
||||
|
||||
# This target builds a test program to verify interrupt context switching. irqtest is
|
||||
@@ -202,8 +202,8 @@ irqtest:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
|
||||
fi
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
touch $@
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
@@ -211,9 +211,8 @@ clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||
fi
|
||||
rm -f libarch$(LIBEXT) up_mem.h
|
||||
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~
|
||||
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
||||
@rm -f libarch$(LIBEXT) up_mem.h *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* up_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -46,34 +46,36 @@
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
FAR _TCB* tcb = (FAR _TCB*)g_readytorun.head;
|
||||
FAR _TCB* tcb;
|
||||
|
||||
dbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
@@ -83,37 +85,9 @@ void _exit(int status)
|
||||
|
||||
EA = 0;
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
# Makefile
|
||||
############################################################################
|
||||
# arch/sim/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 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.
|
||||
#
|
||||
@@ -31,11 +31,10 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
|
||||
ASRCS = up_setjmp.S
|
||||
@@ -61,9 +60,9 @@ SRCS = $(ASRCS) $(CSRCS) $(SPECSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS) $(SPECOBJS)
|
||||
|
||||
LDFLAGS = $(ARCHSCRIPT)
|
||||
EXTRA_LIBS = -lc
|
||||
STDLIBS = -lc
|
||||
ifeq ($(CONFIG_FS_FAT),y)
|
||||
EXTRA_LIBS += -lz
|
||||
STDLIBS += -lz
|
||||
endif
|
||||
|
||||
LINKOBJS = up_head$(OBJEXT)
|
||||
@@ -74,23 +73,23 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
|
||||
all: up_head$(OBJEXT) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS): %$(OBJEXT): %.S
|
||||
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
$(SPECOBJS): %$(OBJEXT): %.c
|
||||
$(CC) -c $(HOSTCFLAGS) $< -o $@
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
nuttx$(EXEEXT): $(LINKOBJS)
|
||||
$(CC) $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ $(LINKOBJS) \
|
||||
-Wl,--start-group $(LDLIBS) -Wl,--end-group $(EXTRA_LIBS)
|
||||
@echo "LD: nuttx$(EXEEXT)"
|
||||
@$(CC) $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ $(LINKOBJS) \
|
||||
-Wl,--start-group $(LDLIBS) -Wl,--end-group $(STDLIBS) $(EXTRA_LIBS)
|
||||
@$(NM) $(TOPDIR)/$@ | \
|
||||
grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
sort > $(TOPDIR)/System.map
|
||||
@@ -102,8 +101,8 @@ nuttx$(EXEEXT): $(LINKOBJS)
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
@rm -f libarch$(LIBEXT) *~
|
||||
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@rm -f Make.dep .depend
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* up_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -45,68 +45,42 @@
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
_TCB* tcb;
|
||||
|
||||
sdbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now.
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
80
arch/z16/include/arch.h
Normal file
80
arch/z16/include/arch.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/****************************************************************************
|
||||
* arch/arch.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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 nameNuttX 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/arch.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARCH_H
|
||||
#define __ARCH_ARCH_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARCH_H */
|
||||
|
||||
81
arch/z16/include/irq.h
Normal file
81
arch/z16/include/irq.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/****************************************************************************
|
||||
* arch/irq.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_IRQ_H
|
||||
#define __ARCH_IRQ_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/chip/irq.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_IRQ_H */
|
||||
|
||||
73
arch/z16/include/limits.h
Normal file
73
arch/z16/include/limits.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/****************************************************************************
|
||||
* arch/limits.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_LIMITS_H
|
||||
#define __ARCH_LIMITS_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MIN 0x80
|
||||
#define SCHAR_MAX 0x7f
|
||||
#define UCHAR_MAX 0xff
|
||||
|
||||
/* These could be different on machines where char is unsigned */
|
||||
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
|
||||
#define SHRT_MIN 0x8000
|
||||
#define SHRT_MAX 0x7fff
|
||||
#define USHRT_MAX 0xffff
|
||||
|
||||
#define INT_MIN 0x80000000
|
||||
#define INT_MAX 0x7fffffff
|
||||
#define UINT_MAX 0xffffffff
|
||||
|
||||
#define LONG_MAX 0x80000000
|
||||
#define LONG_MIN 0x7fffffff
|
||||
#define ULONG_MAX 0xffffffff
|
||||
|
||||
#define LLONG_MAX 0x80000000
|
||||
#define LLONG_MIN 0x7fffffff
|
||||
#define ULLONG_MAX 0xffffffff
|
||||
|
||||
#endif /* __ARCH_LIMITS_H */
|
||||
55
arch/z16/include/serial.h
Normal file
55
arch/z16/include/serial.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/************************************************************
|
||||
* arch/serial.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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 Gregory Nutt nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
|
||||
#ifndef __ARCH_SERIAL_H
|
||||
#define __ARCH_SERIAL_H
|
||||
|
||||
/************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Public Data
|
||||
************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
|
||||
#endif /* __ARCH_SERIAL_H */
|
||||
80
arch/z16/include/types.h
Normal file
80
arch/z16/include/types.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/****************************************************************************
|
||||
* arch/types.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through sys/types.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_TYPES_H
|
||||
#define __ARCH_TYPES_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Type Declarations
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* These are the sizes of the standard GNU types */
|
||||
|
||||
typedef char sbyte;
|
||||
typedef unsigned char ubyte;
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned char boolean;
|
||||
typedef short sint16;
|
||||
typedef unsigned short uint16;
|
||||
typedef int sint32;
|
||||
typedef unsigned int uint32;
|
||||
|
||||
/* This is the size of the interrupt state save returned by
|
||||
* irqsave()
|
||||
*/
|
||||
|
||||
typedef unsigned short irqstate_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_TYPES_H */
|
||||
77
arch/z16/include/z16f/arch.h
Normal file
77
arch/z16/include/z16f/arch.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/****************************************************************************
|
||||
* arch/z26f/arch.h
|
||||
* arch/chip/arch.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/arch.h (via arch/arch.h)
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_Z16F_ARCH_H
|
||||
#define __ARCH_Z16F_ARCH_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_Z16F_ARCH_H */
|
||||
|
||||
245
arch/z16/include/z16f/irq.h
Normal file
245
arch/z16/include/z16f/irq.h
Normal file
@@ -0,0 +1,245 @@
|
||||
/****************************************************************************
|
||||
* arch/z16f/irq.h
|
||||
* arch/chip/irq.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h (via arch/irq.h)
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_Z16F_IRQ_H
|
||||
#define __ARCH_Z16F_IRQ_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Interrupt Vectors (excluding reset and sysexec which are handled differently) */
|
||||
|
||||
#define Z16F_IRQ_IRQ0 ( 0) /* First of 8 IRQs controlled by IRQ0 registers */
|
||||
#define Z16F_IRQ_ADC ( 0) /* Vector: 0x2C IRQ0.0 ADC */
|
||||
#define Z16F_IRQ_SPI ( 1) /* Vector: 0x28 IRQ0.1 SPI */
|
||||
#define Z16F_IRQ_I2C ( 2) /* Vector: 0x24 IRQ0.2 I2C */
|
||||
#define Z16F_IRQ_UART0TX ( 3) /* Vector: 0x20 IRQ0.3 UART0 TX */
|
||||
#define Z16F_IRQ_UART0RX ( 4) /* Vector: 0x1C IRQ0.4 UART0 RX */
|
||||
#define Z16F_IRQ_TIMER0 ( 5) /* Vector: 0x18 IRQ0.5 Timer 0 */
|
||||
#define Z16F_IRQ_TIMER1 ( 6) /* Vector: 0x14 IRQ0.6 Timer 1 */
|
||||
#define Z16F_IRQ_TIMER2 ( 7) /* Vector: 0x10 IRQ0.7 Timer 2 */
|
||||
|
||||
#define Z16F_IRQ_IRQ1 ( 8) /* First of 8 IRQs controlled by IRQ1 registers */
|
||||
#define Z16F_IRQ_P0AD ( 8) /* Vector: 0x4C IRQ1.0 Port A/D0, rising/falling edge */
|
||||
#define Z16F_IRQ_P1AD ( 9) /* Vector: 0x48 IRQ1.1 Port A/D1, rising/falling edge */
|
||||
#define Z16F_IRQ_P2AD (10) /* Vector: 0x44 IRQ1.2 Port A/D2, rising/falling edge */
|
||||
#define Z16F_IRQ_P3AD (11) /* Vector: 0x40 IRQ1.3 Port A/D3, rising/falling edge */
|
||||
#define Z16F_IRQ_P4AD (12) /* Vector: 0x3C IRQ1.4 Port A/D4, rising/falling edge */
|
||||
#define Z16F_IRQ_P5AD (13) /* Vector: 0x38 IRQ1.5 Port A/D5, rising/falling edge */
|
||||
#define Z16F_IRQ_P6AD (14) /* Vector: 0x34 IRQ1.6 Port A/D6, rising/falling edge */
|
||||
#define Z16F_IRQ_P7AD (15) /* Vector: 0x30 IRQ1.7 Port A/D7, rising/falling edge */
|
||||
|
||||
#define Z16F_IRQ_IRQ2 (16) /* First of 8 IRQs controlled by IRQ2 registers */
|
||||
#define Z16F_IRQ_C0 (16) /* Vector: IRQ2.0 0x6C Port C0, both edges DMA0 */
|
||||
#define Z16F_IRQ_C1 (17) /* Vector: IRQ2.1 0x68 Port C1, both edges DMA1 */
|
||||
#define Z16F_IRQ_C2 (18) /* Vector: IRQ2.2 0x64 Port C2, both edges DMA2 */
|
||||
#define Z16F_IRQ_C3 (19) /* Vector: IRQ2.3 0x60 Port C3, both edges DMA3 */
|
||||
#define Z16F_IRQ_PWMFAULT (20) /* Vector: IRQ2.4 0x5C PWM Fault */
|
||||
#define Z16F_IRQ_UART1TX (21) /* Vector: IRQ2.5 0x58 UART1 TX */
|
||||
#define Z16F_IRQ_UART1RX (22) /* Vector: IRQ2.6 0x54 UART1 RX */
|
||||
#define Z16F_IRQ_PWMTIMER (23) /* Vector: IRQ2.7 0x50 PWM Timer */
|
||||
|
||||
#define Z16F_IRQ_SYSTIMER Z16F_IRQ_TIMER0
|
||||
#define NR_IRQS (24)
|
||||
|
||||
/* These macros will map an IRQ to a register bit position */
|
||||
|
||||
#define Z16F_IRQ0_BIT(i) (1 << ((i)-Z16F_IRQ_IRQ0))
|
||||
#define Z16F_IRQ1_BIT(i) (1 << ((i)-Z16F_IRQ_IRQ1))
|
||||
#define Z16F_IRQ2_BIT(i) (1 << ((i)-Z16F_IRQ_IRQ2))
|
||||
|
||||
/* IRQ Stack Frame Format
|
||||
*
|
||||
* This stack frame is created on each interrupt. These registers are stored
|
||||
* in the TCB to many context switches.
|
||||
*
|
||||
* The following represent all of the "static" registers r8-r15. These
|
||||
* are registers that whose value must be retained across function calls.
|
||||
* These registers must be saved bothby interrupt handling context switch
|
||||
* switch logic and also by user-initiated context switches.
|
||||
*
|
||||
* Registers are saved in the order consistent with pushmho <r8-r15>,
|
||||
* that is with r15 pushed first and r8 push last. Since the z16f has
|
||||
* a "push-down" stack, the registers will be "in order" in memory.
|
||||
*/
|
||||
|
||||
#define REG_R8 ( 0) /* 32-bits: R8 */
|
||||
#define REG_R9 ( 2) /* 32-bits: R9 */
|
||||
#define REG_R10 ( 4) /* 32-bits: R10 */
|
||||
#define REG_R11 ( 6) /* 32-bits: R11 */
|
||||
#define REG_R12 ( 8) /* 32-bits: R12 */
|
||||
#define REG_R13 (10) /* 32-bits: R13 */
|
||||
|
||||
/* The frame pointer and the SP at the point of task resumption must
|
||||
* always be saved.
|
||||
*/
|
||||
|
||||
#define REG_R14 (12) /* 32-bits: R14 = fp */
|
||||
#define REG_FP REG_R14
|
||||
#define REG_R15 (14) /* 32-bits: R15 = sp */
|
||||
#define REG_SP REG_R15
|
||||
|
||||
/* The following represent all of the "volatile" registers r0-r7. These
|
||||
* are registers that whose value need not be retained across function
|
||||
* calls. These registers must be saved by interrupt handling context
|
||||
* switch logic but not by user-initiated context switches.
|
||||
*
|
||||
* Registers are saved in the order consistent with pushmlo <r0-r7>,
|
||||
* that is with r7 pushed first and r0 push last. Since the z16f has
|
||||
* a "push-down" stack, the registers will be "in order" in memory.
|
||||
*/
|
||||
|
||||
#define REG_R0 (16) /* 32-bits: R0 */
|
||||
#define REG_R1 (18) /* 32-bits: R1 */
|
||||
#define REG_R2 (20) /* 32-bits: R2 */
|
||||
#define REG_R3 (22) /* 32-bits: R3 */
|
||||
#define REG_R4 (24) /* 32-bits: R4 */
|
||||
#define REG_R5 (26) /* 32-bits: R5 */
|
||||
#define REG_R6 (28) /* 32-bits: R6 */
|
||||
#define REG_R7 (30) /* 32-bits: R7 */
|
||||
|
||||
/* The following two offsets represent the state of the stack on entry
|
||||
* into the interrupt handler:
|
||||
*
|
||||
* TOS[0] = PC[31:24]
|
||||
* TOS[1] = PC[23:16]
|
||||
* TOS[2] = PC[15:8]
|
||||
* TOS[3] = PC[7:0]
|
||||
* TOS[4] = 0
|
||||
* TOS[5] = flags
|
||||
*/
|
||||
|
||||
#define REG_PC (32) /* 32-bits: Return PC */
|
||||
#define REG_FLAGS (34) /* 16-bits: Flags register (with 0x00 padding) */
|
||||
|
||||
#define XCPTCONTEXT_REGS (35)
|
||||
#define XCPTCONTEXT_SIZE (2 * XCPTCONTEXT_REGS)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* This is the the type of the register save array */
|
||||
|
||||
typedef uint16 chipreg_t;
|
||||
|
||||
/* This struct defines the way the registers are stored. */
|
||||
|
||||
struct xcptcontext
|
||||
{
|
||||
/* Register save area */
|
||||
|
||||
uint16 regs[XCPTCONTEXT_REGS];
|
||||
|
||||
/* The following function pointer is non-zero if there
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
CODE void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
|
||||
/* The following retains that state during signal execution */
|
||||
|
||||
uint32 saved_pc; /* Saved return address */
|
||||
uint16 saved_i; /* Saved interrupt state */
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/* The ZDS-II provides built-in operations to test & disable and to restore
|
||||
* the interrupt state.
|
||||
*
|
||||
* irqstate_t irqsave(void);
|
||||
* void irqrestore(irqstate_t flags);
|
||||
*/
|
||||
|
||||
#ifdef __ZILOG__
|
||||
# define irqsave() TDI()
|
||||
# define irqrestore(f) RI(f)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/* ZDS-II intrinsic functions (normally declared in zneo.h) */
|
||||
|
||||
EXTERN intrinsic void EI(void);
|
||||
EXTERN intrinsic void DI(void);
|
||||
EXTERN intrinsic void RI(unsigned short);
|
||||
EXTERN intrinsic SET_VECTOR(int,void (* func) (void));
|
||||
EXTERN intrinsic unsigned short TDI(void);
|
||||
|
||||
#ifndef __ZILOG__
|
||||
EXTERN irqstate_t irqsave(void);
|
||||
EXTERN void irqrestore(irqstate_t flags);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_Z16F_IRQ_H */
|
||||
|
||||
146
arch/z16/src/Makefile
Normal file
146
arch/z16/src/Makefile
Normal file
@@ -0,0 +1,146 @@
|
||||
############################################################################
|
||||
# arch/z16/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# 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
|
||||
-include chip/Make.defs
|
||||
|
||||
COMPILER = ${shell basename $(CC)}
|
||||
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||
ifeq ($(COMPILER),zneocc.exe)
|
||||
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
|
||||
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
|
||||
else
|
||||
WARCHSRCDIR = $(ARCHSRCDIR)
|
||||
USRINCLUDES = -I$(TOPDIR)/sched -I$(ARCHSRCDIR) -I$(ARCHSRCDIR)/common
|
||||
endif
|
||||
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES)
|
||||
CPPFLAGS += -I$(ARCHSRCDIR)
|
||||
ifeq ($(COMPILER),zneocc.exe)
|
||||
LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
||||
endif
|
||||
|
||||
HEAD_ASRC = $(HEAD_SSRC:.S=$(ASMEXT))
|
||||
HEAD_AOBJ = $(HEAD_SSRC:.S=$(OBJEXT))
|
||||
|
||||
SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS)
|
||||
ASRCS = $(SSRCS:.S=$(ASMEXT))
|
||||
AOBJS = $(SSRCS:.S=$(OBJEXT))
|
||||
|
||||
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
DEPSRCS = $(SSRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
|
||||
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
|
||||
|
||||
VPATH = chip:common
|
||||
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
ifeq ($(COMPILER),zneocc.exe)
|
||||
$(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S
|
||||
@$(CPP) $(CPPFLAGS) $< -o $@.tmp
|
||||
@cat $@.tmp | sed -e "s/^#/;/g" > $@
|
||||
@rm $@.tmp
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
else
|
||||
$(OBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
endif
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
ifeq ($(COMPILER),zneocc.exe)
|
||||
$(call COMPILE, `cygpath -w $<`, $@)
|
||||
else
|
||||
$(call COMPILE, $<, $@)
|
||||
endif
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT):
|
||||
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
||||
|
||||
ifeq ($(COMPILER),zneocc.exe)
|
||||
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||
@cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
|
||||
@echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_AOBJ)}\", \\" >>nuttx.linkcmd
|
||||
@( for lib in $(LINKLIBS); do \
|
||||
echo " \"`cygpath -w $(TOPDIR)/$${lib}`\", \\" >>nuttx.linkcmd; \
|
||||
done ; )
|
||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/board/libboard$(LIBEXT)}\", \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/chelpld$(LIBEXT)}\", \\" >>nuttx.linkcmd
|
||||
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/fpld$(LIBEXT)}\"" >>nuttx.linkcmd
|
||||
else
|
||||
nuttx.linkcmd:
|
||||
endif
|
||||
|
||||
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
|
||||
@echo "LD: nuttx.hex"
|
||||
@$(LD) $(LDFLAGS)
|
||||
|
||||
.depend: Makefile chip/Make.defs $(DEPSRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
fi
|
||||
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
|
||||
fi
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
ifeq ($(COMPILER),zneocc.exe)
|
||||
@rm -f nuttx.linkcmd *.asm *.tmp *.map
|
||||
endif
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
|
||||
fi
|
||||
@rm -f Make.dep .depend
|
||||
|
||||
-include Make.dep
|
||||
112
arch/z16/src/common/up_allocateheap.c
Normal file
112
arch/z16/src/common/up_allocateheap.c
Normal file
@@ -0,0 +1,112 @@
|
||||
/****************************************************************************
|
||||
* common/up_allocateheap.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip/chip.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Use ZDS-II linker settings to get the unused external RAM and use this
|
||||
* for the NuttX heap.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_HEAP1_BASE
|
||||
extern _Far unsigned long far_heapbot;
|
||||
#define CONFIG_HEAP1_BASE ((unsigned long)&far_heapbot)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_HEAP1_END
|
||||
extern _Far unsigned long far_heaptop;
|
||||
#define CONFIG_HEAP1_END ((unsigned long)&far_heaptop)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_allocate_heap
|
||||
*
|
||||
* Description:
|
||||
* The heap may be statically allocated by defining CONFIG_HEAP_BASE and
|
||||
* CONFIG_HEAP_SIZE. If these are not defined, then this function will be
|
||||
* called to dynamically set aside the heap region.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
{
|
||||
*heap_start = (FAR void*)CONFIG_HEAP1_BASE;
|
||||
*heap_size = CONFIG_HEAP1_END - CONFIG_HEAP1_BASE;
|
||||
up_ledon(LED_HEAPALLOCATE);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_addregions
|
||||
*
|
||||
* Description:
|
||||
* Memory may be added in non-contiguous chunks. Additional chunks are
|
||||
* added by calling this function.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_MM_REGIONS > 1
|
||||
void up_addregion(void)
|
||||
{
|
||||
mm_addregion((FAR void*)CONFIG_HEAP2_BASE, CONFIG_HEAP2_END - CONFIG_HEAP2_BASE);
|
||||
}
|
||||
#endif
|
||||
179
arch/z16/src/common/up_assert.c
Normal file
179
arch/z16/src/common/up_assert.c
Normal file
@@ -0,0 +1,179 @@
|
||||
/****************************************************************************
|
||||
* common/up_assert.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip/chip.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
# undef lldbg
|
||||
# define lldbg lib_lowprintf
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: _up_assert
|
||||
****************************************************************************/
|
||||
|
||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
||||
{
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (up_interrupt_context() || ((FAR _TCB*)g_readytorun.head)->pid == 0)
|
||||
{
|
||||
(void)irqsave();
|
||||
for(;;)
|
||||
{
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
up_ledon(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
up_ledoff(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
exit(errorcode);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_assert
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HAVE_FILENAME
|
||||
void up_assert(const ubyte *filename, int lineno)
|
||||
#else
|
||||
void up_assert(void)
|
||||
#endif
|
||||
{
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
#endif
|
||||
|
||||
up_ledon(LED_ASSERTION);
|
||||
|
||||
#ifdef CONFIG_HAVE_FILENAME
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
lldbg("Assertion failed at file:%s line: %d\n",
|
||||
filename, lineno);
|
||||
#endif
|
||||
#else
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
lldbg("Assertion failed: task: %s\n", rtcb->name);
|
||||
#else
|
||||
lldbg("Assertion failed\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
up_stackdump();
|
||||
up_registerdump();
|
||||
_up_assert(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_assert_code
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HAVE_FILENAME
|
||||
void up_assert_code(const ubyte *filename, int lineno, int errorcode)
|
||||
#else
|
||||
void up_assert_code(int errorcode)
|
||||
#endif
|
||||
{
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
#endif
|
||||
|
||||
up_ledon(LED_ASSERTION);
|
||||
|
||||
#ifdef CONFIG_HAVE_FILENAME
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
|
||||
filename, lineno, rtcb->name, errorcode);
|
||||
#else
|
||||
lldbg("Assertion failed at file:%s line: %d error code: %d\n",
|
||||
filename, lineno, errorcode);
|
||||
#endif
|
||||
#else
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
lldbg("Assertion failed: task: %s error code: %d\n", rtcb->name, errorcode);
|
||||
#else
|
||||
lldbg("Assertion failed: error code: %d\n", errorcode);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
up_stackdump();
|
||||
up_registerdump();
|
||||
_up_assert(errorcode);
|
||||
}
|
||||
173
arch/z16/src/common/up_blocktask.c
Normal file
173
arch/z16/src/common/up_blocktask.c
Normal file
@@ -0,0 +1,173 @@
|
||||
/****************************************************************************
|
||||
* common/up_blocktask.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_block_task
|
||||
*
|
||||
* Description:
|
||||
* The currently executing task at the head of
|
||||
* the ready to run list must be stopped. Save its context
|
||||
* and move it to the inactive list specified by task_state.
|
||||
*
|
||||
* Inputs:
|
||||
* tcb: Refers to a task in the ready-to-run list (normally
|
||||
* the task at the the head of the list). It most be
|
||||
* stopped, its context saved and moved into one of the
|
||||
* waiting task lists. It it was the task at the head
|
||||
* of the ready-to-run list, then a context to the new
|
||||
* ready to run task must be performed.
|
||||
* task_state: Specifies which waiting task list should be
|
||||
* hold the blocked task TCB.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_block_task(FAR _TCB *tcb, tstate_t task_state)
|
||||
{
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
if ((tcb->task_state < FIRST_READY_TO_RUN_STATE) ||
|
||||
(tcb->task_state > LAST_READY_TO_RUN_STATE))
|
||||
{
|
||||
PANIC(OSERR_BADBLOCKSTATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
|
||||
boolean switch_needed;
|
||||
|
||||
/* dbg("Blocking TCB=%p\n", tcb); */
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
* are blocking the task at the head of the task list (the
|
||||
* most likely case), then a context switch to the next
|
||||
* ready-to-run task is needed. In this case, it should
|
||||
* also be true that rtcb == tcb.
|
||||
*/
|
||||
|
||||
switch_needed = sched_removereadytorun(tcb);
|
||||
|
||||
/* Add the task to the specified blocked task list */
|
||||
|
||||
sched_addblocked(tcb, (tstate_t)task_state);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
switch_needed |= sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now, perform the context switch if one is needed */
|
||||
|
||||
if (switch_needed)
|
||||
{
|
||||
/* Are we in an interrupt handler? */
|
||||
|
||||
if (IN_INTERRUPT)
|
||||
{
|
||||
/* Yes, then we have to do things differently.
|
||||
* Just copy the current registers into the OLD rtcb.
|
||||
*/
|
||||
|
||||
SAVE_IRQCONTEXT(rtcb);
|
||||
|
||||
/* Restore the exception context of the rtcb at the (new) head
|
||||
* of the g_readytorun task list.
|
||||
*/
|
||||
|
||||
rtcb = (FAR _TCB*)g_readytorun.head;
|
||||
/* dbg("New Active Task TCB=%p\n", rtcb); */
|
||||
|
||||
/* Then setup so that the context will be performed on exit
|
||||
* from the interrupt.
|
||||
*/
|
||||
|
||||
SET_IRQCONTEXT(rtcb);
|
||||
}
|
||||
|
||||
/* Copy the user C context into the TCB at the (old) head of the
|
||||
* g_readytorun Task list. if SAVE_USERCONTEXT returns a non-zero
|
||||
* value, then this is really the previously running task restarting!
|
||||
*/
|
||||
|
||||
else if (!SAVE_USERCONTEXT(rtcb))
|
||||
{
|
||||
/* Restore the exception context of the rtcb at the (new) head
|
||||
* of the g_readytorun task list.
|
||||
*/
|
||||
|
||||
rtcb = (FAR _TCB*)g_readytorun.head;
|
||||
/* dbg("New Active Task TCB=%p\n", rtcb); */
|
||||
|
||||
/* Then switch contexts */
|
||||
|
||||
RESTORE_USERCONTEXT(rtcb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* common/up_copystate.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
132
arch/z16/src/common/up_createstack.c
Normal file
132
arch/z16/src/common/up_createstack.c
Normal file
@@ -0,0 +1,132 @@
|
||||
/****************************************************************************
|
||||
* common/up_createstack.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip/chip.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Global Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_create_stack
|
||||
*
|
||||
* Description:
|
||||
* Allocate a stack for a new thread and setup
|
||||
* up stack-related information in the TCB.
|
||||
*
|
||||
* The following TCB fields must be initialized:
|
||||
* adj_stack_size: Stack size after adjustment for hardware,
|
||||
* processor, etc. This value is retained only for debug
|
||||
* purposes.
|
||||
* stack_alloc_ptr: Pointer to allocated stack
|
||||
* adj_stack_ptr: Adjusted stack_alloc_ptr for HW. The
|
||||
* initial value of the stack pointer.
|
||||
*
|
||||
* Inputs:
|
||||
* tcb: The TCB of new task
|
||||
* stack_size: The requested stack size. At least this much
|
||||
* must be allocated.
|
||||
****************************************************************************/
|
||||
|
||||
STATUS up_create_stack(_TCB *tcb, size_t stack_size)
|
||||
{
|
||||
if (tcb->stack_alloc_ptr &&
|
||||
tcb->adj_stack_size != stack_size)
|
||||
{
|
||||
sched_free(tcb->stack_alloc_ptr);
|
||||
tcb->stack_alloc_ptr = NULL;
|
||||
}
|
||||
|
||||
if (!tcb->stack_alloc_ptr)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (uint32 *)kzmalloc(stack_size);
|
||||
}
|
||||
|
||||
if (tcb->stack_alloc_ptr)
|
||||
{
|
||||
size_t top_of_stack;
|
||||
size_t size_of_stack;
|
||||
|
||||
/* The Arm7Tdmi uses a push-down stack: the stack grows
|
||||
* toward loweraddresses in memory. The stack pointer
|
||||
* register, points to the lowest, valid work address
|
||||
* (the "top" of the stack). Items on the stack are
|
||||
* referenced as positive word offsets from sp.
|
||||
*/
|
||||
|
||||
top_of_stack = (uint32)tcb->stack_alloc_ptr + stack_size - 4;
|
||||
|
||||
/* The Arm7Tdmi stack must be aligned at word (4 byte)
|
||||
* boundaries. If necessary top_of_stack must be rounded
|
||||
* down to the next boundary
|
||||
*/
|
||||
|
||||
top_of_stack &= ~3;
|
||||
size_of_stack = top_of_stack - (uint32)tcb->stack_alloc_ptr + 4;
|
||||
|
||||
/* Save the adjusted stack values in the _TCB */
|
||||
|
||||
tcb->adj_stack_ptr = (uint32*)top_of_stack;
|
||||
tcb->adj_stack_size = size_of_stack;
|
||||
|
||||
up_ledon(LED_STACKCREATED);
|
||||
return OK;
|
||||
}
|
||||
|
||||
return ERROR;
|
||||
}
|
||||
121
arch/z16/src/common/up_doirq.c
Normal file
121
arch/z16/src/common/up_doirq.c
Normal file
@@ -0,0 +1,121 @@
|
||||
/****************************************************************************
|
||||
* common/up_doirq.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip/chip.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_doirq
|
||||
*
|
||||
* Description:
|
||||
* Interface between low-level IRQ decode logic and the NuttX IRQ dispatch
|
||||
* logic.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
|
||||
{
|
||||
FAR chipreg_t *ret = regs;
|
||||
|
||||
up_ledon(LED_INIRQ);
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
PANIC(OSERR_ERREXCEPTION);
|
||||
#else
|
||||
if ((unsigned)irq < NR_IRQS)
|
||||
{
|
||||
/* Current regs non-zero indicates that we are processing
|
||||
* an interrupt; current_regs is also used to manage
|
||||
* interrupt level context switches.
|
||||
*/
|
||||
|
||||
current_regs = regs;
|
||||
|
||||
/* Mask and acknowledge the interrupt */
|
||||
|
||||
up_maskack_irq(irq);
|
||||
|
||||
/* Deliver the IRQ */
|
||||
|
||||
irq_dispatch(irq, regs);
|
||||
|
||||
/* Indicate that we are no long in an interrupt handler */
|
||||
|
||||
ret = current_regs;
|
||||
current_regs = NULL;
|
||||
|
||||
/* Unmask the last interrupt (global interrupts are still
|
||||
* disabled.
|
||||
*/
|
||||
|
||||
up_enable_irq(irq);
|
||||
}
|
||||
up_ledoff(LED_INIRQ);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
177
arch/z16/src/common/up_exit.c
Normal file
177
arch/z16/src/common/up_exit.c
Normal file
@@ -0,0 +1,177 @@
|
||||
/****************************************************************************
|
||||
* common/up_exit.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "chip/chip.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
#ifdef CONFIG_DUMP_ON_EXIT
|
||||
#include <nuttx/fs.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: _up_dumponexit
|
||||
*
|
||||
* Description:
|
||||
* Dump the state of all tasks whenever on task exits. This is debug
|
||||
* instrumentation that was added to check file-related reference counting
|
||||
* but could be useful again sometime in the future.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
{
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_STREAMS > 0
|
||||
int i;
|
||||
#endif
|
||||
|
||||
dbg(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
if (tcb->filelist)
|
||||
{
|
||||
lldbg(" filelist refcount=%d\n",
|
||||
tcb->filelist->fl_crefs);
|
||||
|
||||
for (i = 0; i < CONFIG_NFILE_DESCRIPTORS; i++)
|
||||
{
|
||||
struct inode *inode = tcb->filelist->fl_files[i].f_inode;
|
||||
if (inode)
|
||||
{
|
||||
lldbg(" fd=%d refcount=%d\n",
|
||||
i, inode->i_crefs);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_NFILE_STREAMS > 0
|
||||
if (tcb->streams)
|
||||
{
|
||||
lldbg(" streamlist refcount=%d\n",
|
||||
tcb->streams->sl_crefs);
|
||||
|
||||
for (i = 0; i < CONFIG_NFILE_STREAMS; i++)
|
||||
{
|
||||
struct file_struct *filep = &tcb->streams->sl_streams[i];
|
||||
if (filep->fs_filedes >= 0)
|
||||
{
|
||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
lldbg(" fd=%d nbytes=%d\n",
|
||||
filep->fs_filedes,
|
||||
filep->fs_bufpos - filep->fs_bufstart);
|
||||
#else
|
||||
lldbg(" fd=%d\n", filep->fs_filedes);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
FAR _TCB* tcb;
|
||||
|
||||
/* Disable interrupts. Interrupts will remain disabled until
|
||||
* the new task is resumed below.
|
||||
*/
|
||||
|
||||
(void)irqsave();
|
||||
|
||||
slldbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
lldbg("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
*/
|
||||
|
||||
tcb = (FAR _TCB*)g_readytorun.head;
|
||||
slldbg("New Active Task TCB=%p\n", tcb);
|
||||
|
||||
/* Then switch contexts */
|
||||
|
||||
RESTORE_USERCONTEXT(tcb);
|
||||
}
|
||||
|
||||
107
arch/z16/src/common/up_idle.c
Normal file
107
arch/z16/src/common/up_idle.c
Normal file
@@ -0,0 +1,107 @@
|
||||
/****************************************************************************
|
||||
* common/up_idle.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP)
|
||||
static ubyte g_ledtoggle = 0;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_idle
|
||||
*
|
||||
* Description:
|
||||
* up_idle() is the logic that will be executed when their
|
||||
* is no other ready-to-run task. This is processor idle
|
||||
* time and will continue until some interrupt occurs to
|
||||
* cause a context switch from the idle task.
|
||||
*
|
||||
* Processing in this state may be processor-specific. e.g.,
|
||||
* this is where power management operations might be
|
||||
* performed.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_idle(void)
|
||||
{
|
||||
#if defined(CONFIG_ARCH_LEDS) && defined(CONFIG_ARCH_BRINGUP)
|
||||
g_ledtoggle++;
|
||||
if (g_ledtoggle == 0x80)
|
||||
{
|
||||
up_ledon(LED_IDLE);
|
||||
}
|
||||
else if (g_ledtoggle == 0x00)
|
||||
{
|
||||
up_ledoff(LED_IDLE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SUPPRESS_INTERRUPTS) || defined(CONFIG_SUPPRESS_TIMER_INTS)
|
||||
/* If the system is idle and there are no timer interrupts,
|
||||
* then process "fake" timer interrupts. Hopefully, something
|
||||
* will wake up.
|
||||
*/
|
||||
|
||||
sched_process_timer();
|
||||
#endif
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user