mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 21:20:26 +08:00
Compare commits
128 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14dd3e6265 | ||
|
|
77aca3e58f | ||
|
|
a89062967e | ||
|
|
34e4d846a6 | ||
|
|
c3a7c92677 | ||
|
|
a019c26daa | ||
|
|
18e3cfd272 | ||
|
|
9a0b25efcd | ||
|
|
b72a7ab50b | ||
|
|
2d9b57758b | ||
|
|
2ce5085cc8 | ||
|
|
ef651cc6bc | ||
|
|
961336e574 | ||
|
|
276e2880bd | ||
|
|
5a508351e4 | ||
|
|
99c94d9cbe | ||
|
|
5c0768fb0d | ||
|
|
21c9f463a2 | ||
|
|
7d1031cc71 | ||
|
|
b54499d254 | ||
|
|
295bf51f3f | ||
|
|
ea2ca7bfc3 | ||
|
|
26c91f4733 | ||
|
|
27192d3a00 | ||
|
|
ab1f88c3b8 | ||
|
|
0e1b8b8b11 | ||
|
|
ca5e8b5998 | ||
|
|
5698f351b1 | ||
|
|
dd0e40bbed | ||
|
|
8c0dd44a5e | ||
|
|
5d7b5add5d | ||
|
|
5ea5c4cf09 | ||
|
|
9b0f9f10d6 | ||
|
|
a2affa9a9c | ||
|
|
69cbd66244 | ||
|
|
f6547ca194 | ||
|
|
d622214165 | ||
|
|
22cd175fd7 | ||
|
|
81d093e29e | ||
|
|
db8aff6778 | ||
|
|
ddeb703501 | ||
|
|
44778c69bd | ||
|
|
77119d8359 | ||
|
|
c48d0935a1 | ||
|
|
5fe0d01775 | ||
|
|
643c8d6401 | ||
|
|
da7b0d1d90 | ||
|
|
03e6e759a6 | ||
|
|
f3209435ab | ||
|
|
6f8dae2964 | ||
|
|
d7d1145863 | ||
|
|
b91d6d3b2f | ||
|
|
5b9425f1b6 | ||
|
|
c869e421e9 | ||
|
|
105aa81d1f | ||
|
|
00093c0a08 | ||
|
|
f43ffa05aa | ||
|
|
69ec9510a0 | ||
|
|
b85008dc63 | ||
|
|
04eac6d18a | ||
|
|
24dc336781 | ||
|
|
7bc52e9ea1 | ||
|
|
30ad777538 | ||
|
|
b1bc346305 | ||
|
|
a0318797d7 | ||
|
|
aa8343178b | ||
|
|
d69acf31de | ||
|
|
87743cdc8e | ||
|
|
23dcda6743 | ||
|
|
d63a0352a5 | ||
|
|
ec8c6ffb23 | ||
|
|
a401a91d03 | ||
|
|
dcf7c7c365 | ||
|
|
01207cc66e | ||
|
|
4283c46855 | ||
|
|
952db3328f | ||
|
|
09d6450ab3 | ||
|
|
a3d199f7ac | ||
|
|
cdfb48dac6 | ||
|
|
535038c5cc | ||
|
|
d265632c82 | ||
|
|
8c0ce78863 | ||
|
|
4f3ecdd85a | ||
|
|
cae9bad97b | ||
|
|
f72d286d19 | ||
|
|
f47c8cb529 | ||
|
|
7015014104 | ||
|
|
d82d41387b | ||
|
|
800afcd04d | ||
|
|
287e032069 | ||
|
|
6119aa0943 | ||
|
|
29aeec7b8a | ||
|
|
c60f939f91 | ||
|
|
1344768825 | ||
|
|
f5afe99329 | ||
|
|
09e2a0cc1e | ||
|
|
f5f4000981 | ||
|
|
454fededc8 | ||
|
|
e8c4bbf98e | ||
|
|
f33928ef6a | ||
|
|
6f1e5c74ef | ||
|
|
e260ea2fa8 | ||
|
|
fff3a9d265 | ||
|
|
d8cdca20f5 | ||
|
|
4a0697786a | ||
|
|
f0c085abec | ||
|
|
7e5a954d79 | ||
|
|
fb5466800f | ||
|
|
96c7f2422e | ||
|
|
e155bf66df | ||
|
|
cdd8fe239a | ||
|
|
c418e219ac | ||
|
|
14c19aa3d1 | ||
|
|
3237757a86 | ||
|
|
475e731751 | ||
|
|
0466636a01 | ||
|
|
d4ccda1bae | ||
|
|
09a3864fd5 | ||
|
|
445da7f795 | ||
|
|
13bd9989b2 | ||
|
|
576c4f55c2 | ||
|
|
4e52b5e11c | ||
|
|
00d1800b76 | ||
|
|
eff35dc99f | ||
|
|
729fad8b7d | ||
|
|
d583be7062 | ||
|
|
9a4b84349d | ||
|
|
c013dc876f |
87
ChangeLog
87
ChangeLog
@@ -148,7 +148,7 @@
|
||||
* Fixed ARM compilation errors introduced in 0.2.5 (that is what I get
|
||||
for only testing on the simulation).
|
||||
|
||||
0.2.7 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.7 2007-06-09 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added stat() to fs layer and to FAT
|
||||
* Fixed reference counting errors associated with mounted filesystems
|
||||
@@ -169,12 +169,93 @@
|
||||
* Restructured some Makefiles to better handle enabling and disabling
|
||||
NuttX features without having so much conditional compilation in the
|
||||
source files.
|
||||
* tools/mkconfig.c: No long depends on asprintf() and _GNU_SOURCE and
|
||||
* tools/mkconfig.c: No longer depends on asprintf() and _GNU_SOURCE and
|
||||
so should now build in non-GNU, non-GLIBC environments.
|
||||
* include/nuttx/compiler.h: Fix for using SDCC with the Z80.
|
||||
* include/assert.h & arch/pjrc-8051/src/up_assert.c: SDCC does support
|
||||
__FILE__and __LINE__ (not tested)
|
||||
* examples/ostest/barrier.c: Don't call usleep() when signals are
|
||||
disabled.
|
||||
* Started m68322
|
||||
|
||||
0.2.8 2007-07-02 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* tools/Makefile.mkconfig: Under Cygwin, executable has a different name
|
||||
* tools/mkdeps.sh & arch/arm/src/Makefile: Corrected a problem makeing dependencies
|
||||
* tools/zipme.sh: Force directory name to be nuttx-xx.yy.zz
|
||||
* fs/fs_opendir.c: Correct errors in semaphore usage that can cause deadlock.
|
||||
* lib/lib_getopt.c: Added getopt() support
|
||||
* examples/nsh/: NSH now supports cat, mount, umount, and mkdir. ls supports
|
||||
-l -s, and -R
|
||||
* Added basic OS support to manage environment variables: environment
|
||||
storage, cloning on task creation, sharing on pthread creation, destruction
|
||||
on thread/task exit.
|
||||
* Add environment variables APIs: environ, getenv, putenv, clearenv, setenv,
|
||||
unsetenv
|
||||
* Correct an error in realloc() when the block is extended "down" in memory.
|
||||
In this case, the old memory contents need to be copied to the new location
|
||||
and an allocated bit was not being set.
|
||||
* examples/ostest/: Added an environment variable test.
|
||||
* examples/nsh/: Break into several files.
|
||||
* lib/: Added strrchr, basename, dirname
|
||||
* examples/nsh/: Add cp, rm, rmdir, set, unset commands. echo will now print
|
||||
environment variables.
|
||||
|
||||
0.3.0 2007-11-06 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Imported uIP into the tree (see
|
||||
http://www.sics.se/~adam/uip/index.php/Main_Page)
|
||||
* Adding socket(), bind(), connect()
|
||||
* Added snprintf()
|
||||
* Added send() and sendto(); integrate write() and close() with socket descriptors.
|
||||
* Added recv() and recvfrom().
|
||||
* Added getsockopt() and setsockopt()
|
||||
* Documentation updated to address socket interfaces.
|
||||
* Implemented receive timeouts via setsockopt(SO_RCVTIMEO).
|
||||
* Provide support for multiple network devices
|
||||
* Implement socket ioctl() calls to set addresses
|
||||
* Added listen() and accept()
|
||||
* Added DM90x0 ethernet driver
|
||||
* ARP timer is now built into the network layer
|
||||
* Basic client functionality verified: TCP socket(), bind(), connect(), recv(), send().
|
||||
|
||||
0.3.1 2007-11-19 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Separated net/uip/uip.c into several functions in several files.
|
||||
* Corrected a TCP problem where packets were dropped because there was no
|
||||
recv() in place but the packet was being ACKed. There are still TCP
|
||||
recv buffering issues, but this is part of a larger buffering issue.
|
||||
* Basic server functionality verified: TCP listen(), accept()
|
||||
* Fix DM90x0 driver problem that caused TX overruns
|
||||
* Add strncmp()
|
||||
* Added TCP/IP read-ahead buffer to minimize failed ACKs and packet loss.
|
||||
|
||||
0.3.2 2007-11-23 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add strcat() and strncat()
|
||||
* Integrated uIP micro webserver
|
||||
* Corrected a serious bug in TCP queue management
|
||||
* Fix leak in socket close logic
|
||||
* Add TX notification to driver so that it can respond faster to
|
||||
the availability of TX data.
|
||||
* Moved urgent data info into device structure.
|
||||
* TCP and ICMP protocols can now be disabled.
|
||||
* Added UDP test in examples/udp
|
||||
* Verified/debugged UDP socket(), bind(), sendto() and recvfrom() logic
|
||||
using examples/udp
|
||||
* recvfrom() and accept() now correctly return the remote address.
|
||||
* Fixed computation error in ntohl().
|
||||
|
||||
0.3.3 2007-11-28 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Removed unused uIP files
|
||||
* sched/, mm/, and net/ subystem debug can not be selectively enabled/disabled
|
||||
* Correct socket close logic -- needs to disconnect TCP socket on close
|
||||
* uIP webserver now seems to be fully functional
|
||||
* fs/ and lib/ subystem debug can not be selectively enabled/disabled
|
||||
* Added vsnprintf
|
||||
* Integrated uIP telnetd
|
||||
* Add missing logic to readahead buffer logic
|
||||
* examples/nettest uses larger buffers
|
||||
* Improved ACK handling in send() to better hander deferred acknowledgements
|
||||
and polling intervals. Greatly improves send performance.
|
||||
|
||||
0.3.4 2007-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: June 9, 2007</p>
|
||||
<p>Last Updated: November 28, 2007</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -183,12 +183,48 @@
|
||||
</table>
|
||||
|
||||
<p>
|
||||
The 10th release of NuttX (nuttx-0.2.7) 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.
|
||||
These unreleased changes are listed <a href="#pendingchanges">here</a>.
|
||||
The 15th release of NuttX (nuttx-0.3.3) 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.
|
||||
These unreleased changes are listed <a href="#pendingchanges">here</a>.
|
||||
</p>
|
||||
<p>
|
||||
NuttX 0.3.3 is the 4th 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.
|
||||
</p>
|
||||
<p>
|
||||
Many network-related problems have been fixed from version 0.3.2
|
||||
and the implementation has matured significantly.
|
||||
Changes in this release include:
|
||||
</p>
|
||||
<ul>
|
||||
<li>TCP-related bug-fixes for disconnecting sockets,</li>
|
||||
<li>Correction of some TCP read-ahead logic,<li>
|
||||
<li>TCP performance improvements,</li>
|
||||
<li>Initial UDP integration, and</li>
|
||||
<li>IMisc. additions and cleanup (See the ChangeLog for a complete list of
|
||||
changes).</li>
|
||||
</ul>
|
||||
<p>
|
||||
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:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Some minor unimplemented BSD socket functionality,</li>
|
||||
<li>Thread safety issues: the same socket cannot be used concurrently on
|
||||
different threads, </li>
|
||||
<li>Pending design changes necessary to support multiple network interfaces, and </li>
|
||||
<li>IPv6 support is incomplete.</li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<table width ="100%">
|
||||
@@ -251,14 +287,14 @@
|
||||
</p>
|
||||
<p>
|
||||
<b>STATUS:</b>
|
||||
This port is in progress and should be available in the nuttx-0.2.7 release.
|
||||
Initial coding of this port code complete but has not yet been verified.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>ARM9EJS</b>.
|
||||
<b>ARM926EJS</b>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -273,7 +309,7 @@
|
||||
</p>
|
||||
<p>
|
||||
<b>STATUS:</b>
|
||||
This port is code complete but totally untested due to hardware issues with my OSD.
|
||||
This port is complete and verified.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -329,7 +365,7 @@ is available that be used to build a NuttX-compatible arm-elf toolchain.</blockq
|
||||
</table>
|
||||
|
||||
<ul>
|
||||
<p><b>C5471 (Arm7)</b>
|
||||
<p><b>C5471 (ARM7)</b>
|
||||
The build for this ARM7 target that includes most of the OS features and
|
||||
a broad range of OS tests. The size of this executable as given by the
|
||||
Linux <tt>size</tt> command is (3/9/07):
|
||||
@@ -338,6 +374,25 @@ is available that be used to build a NuttX-compatible arm-elf toolchain.</blockq
|
||||
text data bss dec hex filename
|
||||
53272 428 3568 57268 dfb4 nuttx
|
||||
</pre>
|
||||
<p><b>DM320 (ARM9)</b>
|
||||
This build for the ARM9 target includes a significant subset of OS
|
||||
features, a filesystem, Ethernet driver, full TCP/IP, UDP and (minimal)
|
||||
ICMP stacks (via uIP) and a small network test application: (11/8/07,
|
||||
configuration netconfig, examples/nettest)
|
||||
</p>
|
||||
<pre>
|
||||
text data bss dec hex filename
|
||||
49472 296 3972 53740 d1ec nuttx
|
||||
</pre>
|
||||
<p>
|
||||
Another build for the ARM9 target includes a minimal OS feature
|
||||
set, Ethernet driver, full TCP/IP and (minimal) ICMP stacks, and
|
||||
a small webserver: (11/20/07, configuration uipconfig, examples/uip)
|
||||
</p>
|
||||
<pre>
|
||||
text data bss dec hex filename
|
||||
52040 72 4148 56260 dbc4 nuttx
|
||||
</pre>
|
||||
<p><b>87C52</b>
|
||||
A reduced functionality OS test for the 8052 target requires only
|
||||
about 18-19Kb:
|
||||
@@ -411,13 +466,13 @@ Other memory:
|
||||
</table>
|
||||
|
||||
<ul><pre>
|
||||
0.1.0 2007-03-09 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.1.0 2007-03-09 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Initial Release
|
||||
* Support for Linux user mode simulation and TI
|
||||
TMS320C5471 (Arm7) provided
|
||||
|
||||
0.1.1 2007-03-14 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.1.1 2007-03-14 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Corrected an error in interrupt level context switching
|
||||
for C5471
|
||||
@@ -445,7 +500,7 @@ Other memory:
|
||||
issue when SP enters indirect address space.
|
||||
* Documentation updates
|
||||
|
||||
0.1.2 2007-03-19 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.1.2 2007-03-19 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add dirent.h, opendir(), readdir(), closedir(), etc.
|
||||
* Add strerror()
|
||||
@@ -470,7 +525,7 @@ Other memory:
|
||||
cause various problems
|
||||
* Added a test for roundrobin scheduler.
|
||||
|
||||
0.2.1 2007-03-22 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.1 2007-03-22 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Fix error in handing signed decimal in vsprintf().
|
||||
* Major restructuring of header files to get closer to
|
||||
@@ -482,7 +537,7 @@ Other memory:
|
||||
* Some Documentation updates
|
||||
* Added support for the Neuros OSD / DM320
|
||||
|
||||
0.2.2 2007-03-26 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.2 2007-03-26 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Created the configs/ directory; separated board configuration
|
||||
from processor architecture logic
|
||||
* Add memory leak detection test to examples/ostest
|
||||
@@ -502,7 +557,7 @@ Other memory:
|
||||
* Added directories to hold board-specific header files
|
||||
* Added directories to hold board-specific drivers
|
||||
|
||||
0.2.3 2007-03-29 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.3 2007-03-29 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* mq_receive and mq_send now return errno's appropriately
|
||||
* mq_receive and mq_send are now correctly awakened by signals.
|
||||
@@ -524,7 +579,7 @@ Other memory:
|
||||
pthread_join. In the failure condition, memory was being
|
||||
deallocated while still in use.
|
||||
|
||||
0.2.4 2007-04-28 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.4 2007-04-28 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Verfied c5471 build under Cygwin on WinXP
|
||||
* Makesystem changes to better support different SoCs.
|
||||
@@ -534,7 +589,7 @@ Other memory:
|
||||
arch/c5471 and arch/dm320 are deprecated and will be removed
|
||||
when the new c5471 and dm320 logic is verified.
|
||||
|
||||
0.2.5 2007-05-19 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.5 2007-05-19 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Corrected some build/configuration issues introduced with the
|
||||
last release.
|
||||
@@ -551,7 +606,7 @@ Other memory:
|
||||
* Added fsync()
|
||||
* Added strspn() and strcspn()
|
||||
|
||||
0.2.6 2007-05-26 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.6 2007-05-26 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added unlink(), mkdir(), rmdir(), and rename()
|
||||
* Fixed several serious FAT errors with oflags handling (&& instead of &)
|
||||
@@ -560,18 +615,8 @@ Other memory:
|
||||
telldir(), rewindir().
|
||||
* Fixed ARM compilation errors introduced in 0.2.5 (that is what I get
|
||||
for only testing on the simulation).
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="currentrelease">ChangeLog for Current Release</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<pre><ul>
|
||||
0.2.7 2007-06-09 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.7 2007-06-09 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added stat() to fs layer and to FAT
|
||||
* Fixed reference counting errors associated with mounted filesystems
|
||||
@@ -592,13 +637,104 @@ Other memory:
|
||||
* Restructured some Makefiles to better handle enabling and disabling
|
||||
NuttX features without having so much conditional compilation in the
|
||||
source files.
|
||||
* tools/mkconfig.c: No long depends on asprintf() and _GNU_SOURCE and
|
||||
* tools/mkconfig.c: No longer depends on asprintf() and _GNU_SOURCE and
|
||||
so should now build in non-GNU, non-GLIBC environments.
|
||||
* include/nuttx/compiler.h: Fix for using SDCC with the Z80.
|
||||
* include/assert.h & arch/pjrc-8051/src/up_assert.c: SDCC does support
|
||||
__FILE__and __LINE__ (not tested)
|
||||
* examples/ostest/barrier.c: Don't call usleep() when signals are
|
||||
disabled.
|
||||
|
||||
0.2.8 2007-07-02 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* tools/Makefile.mkconfig: Under Cygwin, executable has a different name
|
||||
* tools/mkdeps.sh & arch/arm/src/Makefile: Corrected a problem makeing dependencies
|
||||
* tools/zipme.sh: Force directory name to be nuttx-xx.yy.zz
|
||||
* fs/fs_opendir.c: Correct errors in semaphore usage that can cause deadlock.
|
||||
* lib/lib_getopt.c: Added getopt() support
|
||||
* examples/nsh/: NSH now supports cat, mount, umount, and mkdir. ls supports
|
||||
-l -s, and -R
|
||||
* Added basic OS support to manage environment variables: environment
|
||||
storage, cloning on task creation, sharing on pthread creation, destruction
|
||||
on thread/task exit.
|
||||
* Add environment variables APIs: environ, getenv, putenv, clearenv, setenv,
|
||||
unsetenv
|
||||
* Correct an error in realloc() when the block is extended "down" in memory.
|
||||
In this case, the old memory contents need to be copied to the new location
|
||||
and an allocated bit was not being set.
|
||||
* examples/ostest/: Added an environment variable test.
|
||||
* examples/nsh/: Break into several files.
|
||||
* lib/: Added strrchr, basename, dirname
|
||||
* examples/nsh/: Add cp, rm, rmdir, set, unset commands. echo will now print
|
||||
environment variables.
|
||||
|
||||
0.3.0 2007-11-06 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Imported uIP into the tree (see
|
||||
http://www.sics.se/~adam/uip/index.php/Main_Page)
|
||||
* Adding socket(), bind(), connect()
|
||||
* Added snprintf()
|
||||
* Added send() and sendto(); integrate write() and close() with socket descriptors.
|
||||
* Added recv() and recvfrom().
|
||||
* Added getsockopt() and setsockopt()
|
||||
* Documentation updated to address socket interfaces.
|
||||
* Implemented receive timeouts via setsockopt(SO_RCVTIMEO).
|
||||
* Provide support for multiple network devices
|
||||
* Implement socket ioctl() calls to set addresses
|
||||
* Added listen() and accept()
|
||||
* Added DM90x0 ethernet driver
|
||||
* ARP timer is now built into the network layer
|
||||
* Basic client functionality verified: socket(), bind(), connect(), recv(), send().
|
||||
|
||||
0.3.1 2007-11-19 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Separated net/uip/uip.c into several functions in several files.
|
||||
* Corrected a TCP problem where packets were dropped because there was no
|
||||
recv() in place but the packet was being ACKed. There are still TCP
|
||||
recv buffering issues, but this is part of a larger buffering issue.
|
||||
* Basic server functionality verified: listen(), accept()
|
||||
* Fix DM90x0 driver problem that caused TX overruns
|
||||
* Add strncmp()
|
||||
* Added TCP/IP read-ahead buffer to minimize failed ACKs and packet loss.
|
||||
|
||||
0.3.2 2007-11-23 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add strcat() and strncat()
|
||||
* Integrated uIP micro webserver
|
||||
* Corrected a serious bug in TCP queue management
|
||||
* Fix leak in socket close logic
|
||||
* Add TX notification to driver so that it can respond faster to
|
||||
the availability of TX data.
|
||||
* Moved urgent data info into device structure.
|
||||
* TCP and ICMP protocols can now be disabled.
|
||||
* Added UDP test in examples/udp
|
||||
* Verified/debugged UDP socket(), bind(), sendto() and recvfrom() logic
|
||||
using examples/udp
|
||||
* recvfrom() and accept() now correctly return the remote address.
|
||||
* Fixed computation error in ntohl().
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="currentrelease">ChangeLog for Current Release</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<pre><ul>
|
||||
0.3.3 2007-11-28 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Removed unused uIP files
|
||||
* sched/, mm/, and net/ subystem debug can not be selectively enabled/disabled
|
||||
* Correct socket close logic -- needs to disconnect TCP socket on close
|
||||
* uIP webserver now seems to be fully functional
|
||||
* fs/ and lib/ subystem debug can not be selectively enabled/disabled
|
||||
* Added vsnprintf
|
||||
* Integrated uIP telnetd
|
||||
* Add missing logic to readahead buffer logic
|
||||
* examples/nettest uses larger buffers
|
||||
* Improved ACK handling in send() to better hander deferred acknowledgements
|
||||
and polling intervals. Greatly improves send performance.
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
@@ -610,10 +746,7 @@ Other memory:
|
||||
</table>
|
||||
|
||||
<pre><ul>
|
||||
|
||||
0.2.8 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Started m68322
|
||||
0.3.4 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
</pre></ul>
|
||||
|
||||
<table width ="100%">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</b></big>
|
||||
<p><small>by</small></p>
|
||||
<p>Gregory Nutt</p>
|
||||
<p><small>Last Update: May 26, 2007</small></p>
|
||||
<p><small>Last Update: September 8, 2007</small></p>
|
||||
</center>
|
||||
|
||||
<center><h1>Table of Contents</h1></center>
|
||||
@@ -46,9 +46,11 @@
|
||||
<li><a href="#DirStructInclude">2.7 include/</a></li>
|
||||
<li><a href="#DirStructLib">2.8 lib/</a></li>
|
||||
<li><a href="#DirStructMm">2.9 mm/</a></li>
|
||||
<li><a href="#DirStructSched">2.10 sched/</a></li>
|
||||
<li><a href="#DirStructTools">2.11 tools/</a></li>
|
||||
<li><a href="#topmakefile">2.12 Makefile</a></li>
|
||||
<li><a href="#DirStructNet">2.10 net</a></li>
|
||||
<li><a href="#DirStructNetUtils">2.11 netutils</a></li>
|
||||
<li><a href="#DirStructSched">2.12 sched/</a></li>
|
||||
<li><a href="#DirStructTools">2.13 tools/</a></li>
|
||||
<li><a href="#topmakefile">2.14 Makefile</a></li>
|
||||
</ul>
|
||||
<li><a href="#configandbuild">3.0 Configuring and Building</a></li>
|
||||
<ul>
|
||||
@@ -139,8 +141,8 @@
|
||||
| | | `-- <i>(board-specific source files)</i>
|
||||
| | `-- <i>(board-specific configuration files)</i>
|
||||
| `-- <i><other-boards></i>/
|
||||
|-- <a href="#DirStructDrivers">drivers</a>
|
||||
| |-- Makefile/
|
||||
|-- <a href="#DirStructDrivers">drivers</a>/
|
||||
| |-- Makefile
|
||||
| `-- <i>(common driver source files)</i>
|
||||
|-- <a href="#DirStructExamples">examples</a>/
|
||||
| `-- <i>(example)</i>/
|
||||
@@ -148,9 +150,16 @@
|
||||
| `-- <i>(example source files)</i>
|
||||
|-- <a href="#DirStructFs">fs</a>/
|
||||
| |-- Makefile
|
||||
| `-- <i>(fs source files)</i>
|
||||
| `-- <i>(common file system source files)</i>
|
||||
|-- <a href="#DirStructInclude">include</a>/
|
||||
| |-- <i>(standard header files)</i>
|
||||
| |-- arpa/
|
||||
| | `-- <i>(standard header files)</i>
|
||||
| |-- net/
|
||||
| | `-- uip/
|
||||
| | `-- <i>(uIP specific header files)</i>
|
||||
| |-- netinet/
|
||||
| | `-- <i>(standard header files)</i>
|
||||
| |-- nuttx/
|
||||
| | `-- <i>(nuttx specific header files)</i>
|
||||
| `- sys/
|
||||
@@ -160,7 +169,29 @@
|
||||
| `-- <i>(lib source files)</i>
|
||||
|-- <a href="#DirStructMm">mm</a>/
|
||||
| |-- Makefile
|
||||
| `-- <i>(mm source files)</i>
|
||||
| `-- <i>(memory management source files)</i>
|
||||
|-- <a href="#DirStructNet">net</a>/
|
||||
| |-- Makefile
|
||||
| |-- uip/
|
||||
| | `-- <i>(uip source files)</i>
|
||||
| `-- <i>(socket source files)</i>
|
||||
|-- <a href="#DirStructNetUtils">netutils</a>/
|
||||
| |-- dhcp/
|
||||
| | `-- <i>(dhcp source files)</i>
|
||||
| |-- resolv/
|
||||
| | `-- <i>(resolv source files)</i>
|
||||
| |-- smtp/
|
||||
| | `-- <i>(smtp source files)</i>
|
||||
| |-- telnetd/
|
||||
| | `-- <i>(telnetd source files)</i>
|
||||
| |-- uiplib/
|
||||
| | `-- <i>(uiplib source files)</i>
|
||||
| |-- weblclient/
|
||||
| | `-- <i>(webclient source files)</i>
|
||||
| |-- webserver/
|
||||
| | `-- <i>(webserver source files)</i>
|
||||
| |-- Makefile
|
||||
| `-- <i>(fs source files)</i>
|
||||
|-- <a href="#DirStructSched">sched</a>/
|
||||
| |-- Makefile
|
||||
| `-- <i>(sched source files)</i>
|
||||
@@ -342,6 +373,9 @@
|
||||
This port does not support interrupts or a real timer (and hence no
|
||||
round robin scheduler) Otherwise, it is complete.
|
||||
</li>
|
||||
<p>NOTE: This target will not run on Cygwin probably for many reasons but
|
||||
first off because it uses some of the same symbols as does cygwind.dll.
|
||||
</p>
|
||||
|
||||
<li><code>arch/arm</code>:
|
||||
This directory holds common ARM architectures. At present, this includes
|
||||
@@ -604,18 +638,30 @@
|
||||
This is the NuttX memory manager.
|
||||
</p>
|
||||
|
||||
<h2>2.10 <a name="DirStructSched">sched</a></h2>
|
||||
<h2>2.10 <a name="DirStructNet">net</a></h2>
|
||||
<p>
|
||||
This directory contains the implementation of the socket APIs.
|
||||
The subdirectory, <code>uip</code> contians the uIP port.
|
||||
</P>
|
||||
|
||||
<h2>2.11 <a name="DirStructNetUtils">netutils</a></h2>
|
||||
<p>
|
||||
This directory contains most of the network applications contained under the uIP-1.0 apps directory.
|
||||
As the uIP apps/README says, these applications "are not all heavily tested."
|
||||
</p>
|
||||
|
||||
<h2>2.12 <a name="DirStructSched">sched</a></h2>
|
||||
<p>
|
||||
The files forming core of the NuttX RTOS reside here.
|
||||
</p>
|
||||
|
||||
<h2>2.11 <a name="DirStructTools">tools</a></h2>
|
||||
<h2>2.13 <a name="DirStructTools">tools</a></h2>
|
||||
<p>
|
||||
This directory holds a collection of tools and scripts to simplify
|
||||
configuring and building NuttX.
|
||||
</p>
|
||||
|
||||
<h2>2.12 <a name="topmakefile">Makefile</a></h2>
|
||||
<h2>2.14 <a name="topmakefile">Makefile</a></h2>
|
||||
<p>
|
||||
The top-level <code>Makefile</code> in the <code>${TOPDIR}</code> directory contains all of the top-level control
|
||||
logic to build NuttX.
|
||||
@@ -1153,6 +1199,21 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_VERBOSE</code>: enables verbose debug output
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_SCHED</code>: enable OS debug output (disabled by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_MM</code>: enable memory management debug output (disabld by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_NET</code>: enable network debug output (disabled by default)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_DEBUG_FS</code>: enable filesystem debug output (disabled by default)
|
||||
</li>
|
||||
<li>
|
||||
<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
|
||||
time console output
|
||||
@@ -1294,6 +1355,89 @@ The system can be re-made subsequently by just typing <code>make</code>.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Network Support</h2>
|
||||
<h3>TCP/IP and UDP support via uIP</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<code>CONFIG_NET</code>: Enable or disable all network features
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_IPv6</code>: Build in support for IPv6
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NSOCKET_DESCRIPTORS</code>: Maximum number of socket descriptors per task/thread.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_SOCKOPTS</code>: Enable or disable support for socket options.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_BUFSIZE</code>: uIP buffer size
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_TCP</code>: TCP support on or off
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_TCP_CONNS</code>: Maximum number of TCP connections (all tasks).
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_TCP_READAHEAD_BUFSIZE</code>: Size of TCP read-ahead buffers
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_NTCP_READAHEAD_BUFFERS</code>: Number of TCP read-ahead buffers (may be zero)
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_MAX_LISTENPORTS</code>: Maximum number of listening TCP ports (all tasks).
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_TCPURGDATA</code>: Determines if support for TCP urgent data
|
||||
notification should be compiled in. Urgent data (out-of-band data)
|
||||
is a rarely used TCP feature that is very seldom would be required.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_UDP</code>: UDP support on or off
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_UDP_CHECKSUMS</code>: UDP checksums on or off
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_UDP_CONNS</code>: The maximum amount of concurrent UDP connections
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_ICMP</code>: ICMP ping support on or off
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_PINGADDRCONF</code>: Use "ping" packet for setting IP address
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_STATISTICS</code>: uIP statistics on or off
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_RECEIVE_WINDOW</code>: The size of the advertised receiver's window
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_ARPTAB_SIZE</code>: The size of the ARP table
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_BROADCAST</code>: Broadcast support
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_LLH_LEN</code>: The link level header length
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_FWCACHE_SIZE</code>: number of packets to remember when looking for duplicates
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>UIP Network Utilities</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<code>CONFIG_NET_DHCP_LIGHT</code>: Reduces size of DHCP
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_NET_RESOLV_ENTRIES</code>: Number of resolver entries
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Stack and heap information</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
35
Makefile
35
Makefile
@@ -51,16 +51,26 @@ BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
|
||||
NONFSDIRS = sched lib $(ARCH_SRC) mm examples/$(CONFIG_EXAMPLE)
|
||||
FSDIRS = fs drivers
|
||||
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
NONFSDIRS += net netutils
|
||||
endif
|
||||
|
||||
# CLEANDIRS are the directories that will clean in. These are
|
||||
# all directories that we know about.
|
||||
# MAKEDIRS are the directories in which we will build targets
|
||||
|
||||
CLEANDIRS = $(NONFSDIRS) $(FSDIRS)
|
||||
MAKEDIRS = $(NONFSDIRS)
|
||||
|
||||
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
||||
MAKEDIRS = $(NONFSDIRS)
|
||||
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
|
||||
MAKEDIRS += fs
|
||||
endif
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
MAKEDIRS += drivers
|
||||
endif
|
||||
else
|
||||
MAKEDIRS = $(NONFSDIRS) $(FSDIRS)
|
||||
MAKEDIRS += $(FSDIRS)
|
||||
endif
|
||||
|
||||
# LINKLIBS is the list of NuttX libraries that is passed to the
|
||||
@@ -71,8 +81,19 @@ endif
|
||||
LINKLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT) mm/libmm$(LIBEXT) \
|
||||
lib/liblib$(LIBEXT) examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
|
||||
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
||||
LINKLIBS += fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT)
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
LINKLIBS += net/libnet$(LIBEXT) netutils/libnetutils$(LIBEXT)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
|
||||
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
|
||||
LINKLIBS += fs/libfs$(LIBEXT)
|
||||
endif
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
LINKLIBS += drivers/libdrivers$(LIBEXT)
|
||||
endif
|
||||
else
|
||||
LINKLIBS += fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT)
|
||||
endif
|
||||
|
||||
# This is the name of the final target
|
||||
@@ -184,6 +205,12 @@ $(ARCH_SRC)/libarch$(LIBEXT): context
|
||||
mm/libmm$(LIBEXT): context
|
||||
$(MAKE) -C mm TOPDIR=$(TOPDIR) libmm$(LIBEXT)
|
||||
|
||||
net/libnet$(LIBEXT): context
|
||||
$(MAKE) -C net TOPDIR=$(TOPDIR) libnet$(LIBEXT)
|
||||
|
||||
netutils/libnetutils$(LIBEXT): context
|
||||
$(MAKE) -C netutils TOPDIR=$(TOPDIR) libnetutils$(LIBEXT)
|
||||
|
||||
fs/libfs$(LIBEXT): context
|
||||
$(MAKE) -C fs TOPDIR=$(TOPDIR) libfs$(LIBEXT)
|
||||
|
||||
|
||||
35
ReleaseNotes
35
ReleaseNotes
@@ -1,14 +1,31 @@
|
||||
nuttx-0.2.7
|
||||
nuttx-0.3.3
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 10th release of NuttX. This is primarily a bugfix release
|
||||
to 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.
|
||||
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).
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
Many network-related problems have been fixed and the implementation
|
||||
has matured significantly. This release consists of:
|
||||
|
||||
This release has been verified only on the Linux user-mode platform.
|
||||
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).
|
||||
|
||||
This tarball contains a complete CVS snapshot from June 9, 2007.
|
||||
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.
|
||||
|
||||
33
TODO
33
TODO
@@ -23,26 +23,41 @@ o Signals
|
||||
- 'Standard' signals and signal actions are not supported.
|
||||
|
||||
o pthreads
|
||||
- pthread_cancel(): Should implemenent cancellation points and pthread_testcancel()
|
||||
- pthread_cancel(): Should implement cancellation points and pthread_testcancel()
|
||||
|
||||
o C++ Support
|
||||
- Need to call static constructors
|
||||
|
||||
o Network
|
||||
- Port FreeBSD TCP/IP stack
|
||||
- Did not implement send() and sendto() timeouts. Option is setable via setsockopt,
|
||||
but is not implemented.
|
||||
- uIP's netutils/smtp, dpcpc, resolv, webclient -- untested
|
||||
- Should implement SOCK_RAW
|
||||
- uIP polling issues:
|
||||
(1) Current logic will not support multiple ethernet drivers. Each driver should
|
||||
poll on TCP connections connect on the network supported by the driver; UDP
|
||||
polling should respond with TX data only if the UDP packet is intended for the
|
||||
the network supported by the driver.
|
||||
(2) If there were multiple drivers, polling would occur at double the rate.i
|
||||
Fix by using bound IP address in TCP connection (lipaddr) and verifying that it
|
||||
is in the subnet served by the driver.
|
||||
- uIP/Socket callback logic is not thread safe. This means that a socket cannot be
|
||||
used concurrently by two threads. Minimal fix: Add mutex to support exclusion.
|
||||
- IPv6 support is incomplete
|
||||
|
||||
o USB
|
||||
- Implement USB device support
|
||||
- Implement USB bulk device
|
||||
|
||||
o Libraries
|
||||
- sscanf() and lib_vsprintf() do not support floating point values.
|
||||
- The definition of environ in stdlib.h is bogus and will not work as it should. This
|
||||
is because the underlying representation of the environment is not an arry of pointers.
|
||||
|
||||
o File system
|
||||
- Add statfs(), chmod(), truncate().
|
||||
- Add chmod(), truncate().
|
||||
- FAT32: long file names
|
||||
|
||||
o Console Output
|
||||
|
||||
o Documentation
|
||||
- Document fs/ & driver/ logic
|
||||
- Document C-library APIs
|
||||
@@ -51,15 +66,16 @@ o Build system
|
||||
- Some names under arch are still incorrect. These should be processor architecture
|
||||
names: pjrc-8051 should be 805x
|
||||
- configs/pjrc-8051 should be configs/pjrc-87c52
|
||||
- 0.2.4 changes to create the arch/arm directory breaks dependency target in arch/arm/src.
|
||||
Probably need to add the path to the chip or common subdirectorys when
|
||||
running tools/mkdeps.sh
|
||||
- Dependencies do not work correctly under configs/<board>/src (same as arch/<arch>/src/board).
|
||||
|
||||
o Applications & Tests
|
||||
|
||||
o C5471
|
||||
|
||||
o DM320
|
||||
- It seems that when a lot of debug statements are added, the system no
|
||||
longer boots. This has been diagnosed as a stack problem.. making the stack
|
||||
bigger or removing arrays on the stack fixes the problem.
|
||||
|
||||
o LPC214x
|
||||
- Finish bringup
|
||||
@@ -82,3 +98,4 @@ o pjrc-8052 / MCS51
|
||||
clock_initialize.c at line 107
|
||||
pthread_create.c at 330
|
||||
sighand.c at 225 and 244
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
* Included Files
|
||||
************************************************************/
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/chip/irq.h>
|
||||
|
||||
/************************************************************
|
||||
|
||||
@@ -103,7 +103,7 @@ endif
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
|
||||
fi
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
@@ -37,7 +37,7 @@ HEAD_ASRC = up_nommuhead.S
|
||||
|
||||
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S
|
||||
CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
|
||||
up_createstack.c up_dataabort.c up_delay.c up_doirq.c \
|
||||
up_createstack.c up_dataabort.c up_mdelay.c up_udealy.c up_doirq.c \
|
||||
up_exit.c up_idle.c up_initialize.c up_initialstate.c \
|
||||
up_interruptcontext.c up_prefetchabort.c up_releasepending.c \
|
||||
up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/************************************************************
|
||||
* c5471/c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471c5471_serial.c
|
||||
* c5471/c5471_serial.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
@@ -38,16 +38,19 @@
|
||||
************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <semaphore.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/serial.h>
|
||||
#include <arch/serial.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
@@ -381,9 +384,9 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
/* Both the IrDA and MODEM UARTs support RESET and UART mode. */
|
||||
|
||||
up_serialout(priv, UART_MDR_OFFS, MDR_RESET_MODE);
|
||||
up_delay(5);
|
||||
up_mdelay(5);
|
||||
up_serialout(priv, UART_MDR_OFFS, MDR_UART_MODE);
|
||||
up_delay(5);
|
||||
up_mdelay(5);
|
||||
|
||||
priv->regs.ier = up_inserial(priv, UART_IER_OFFS);
|
||||
priv->regs.lcr = up_inserial(priv, UART_LCR_OFFS);
|
||||
|
||||
@@ -38,11 +38,15 @@
|
||||
************************************************************/
|
||||
|
||||
#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 "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
@@ -163,9 +167,9 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
||||
{
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
up_ledon(LED_PANIC);
|
||||
up_delay(250);
|
||||
up_mdelay(250);
|
||||
up_ledoff(LED_PANIC);
|
||||
up_delay(250);
|
||||
up_mdelay(250);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,8 +95,6 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
boolean switch_needed;
|
||||
|
||||
lldbg("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
|
||||
@@ -138,7 +136,6 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
lldbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* Then switch contexts */
|
||||
|
||||
@@ -157,7 +154,6 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
lldbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* Then switch contexts */
|
||||
|
||||
|
||||
@@ -75,8 +75,13 @@
|
||||
#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)
|
||||
{
|
||||
dbg(" filelist refcount=%d\n",
|
||||
@@ -92,7 +97,9 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_NFILE_STREAMS > 0
|
||||
if (tcb->streams)
|
||||
{
|
||||
dbg(" streamlist refcount=%d\n",
|
||||
@@ -109,6 +116,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* common/up_initialize.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
@@ -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,37 +45,67 @@
|
||||
#include "up_arch.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Define to enable timing loop calibration */
|
||||
|
||||
#undef CONFIG_ARM_CALIBRATION
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Global Functions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Name: up_calibratedelay
|
||||
*
|
||||
* Description:
|
||||
* Delay loops are provided for short timing loops. This function, if
|
||||
* enabled, will just wait for 100 seconds. Using a stopwatch, you can
|
||||
* can then determine if the timing loops are properly calibrated.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
#if defined(CONFIG_ARM_CALIBRATION) & defined(CONFIG_DEBUG)
|
||||
static void up_calibratedelay(void)
|
||||
{
|
||||
int i;
|
||||
lldbg("Beginning 100s delay\n");
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
up_mdelay(1000);
|
||||
}
|
||||
lldbg("End 100s delay\n");
|
||||
}
|
||||
#else
|
||||
# define up_calibratedelay()
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_initialize
|
||||
*
|
||||
* Description:
|
||||
* up_initialize will be called once during OS
|
||||
* initialization after the basic OS services have been
|
||||
* initialized. The architecture specific details of
|
||||
* initializing the OS will be handled here. Such things as
|
||||
* setting up interrupt service routines, starting the
|
||||
* clock, and registering device drivers are some of the
|
||||
* things that are different for each processor and hardware
|
||||
* platform.
|
||||
* up_initialize will be called once during OS initialization after the
|
||||
* basic OS services have been initialized. The architecture specific
|
||||
* details of initializing the OS will be handled here. Such things as
|
||||
* setting up interrupt service routines, starting the clock, and
|
||||
* registering device drivers are some of the things that are different
|
||||
* for each processor and hardware platform.
|
||||
*
|
||||
* up_initialize is called after the OS initialized but
|
||||
* before the init process has been started and before the
|
||||
* libraries have been initialized. OS services and driver
|
||||
* services are available.
|
||||
* up_initialize is called after the OS initialized but before the user
|
||||
* initialization logic has been started and before the libraries have
|
||||
* been initialized. OS services and driver services are available.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_initialize(void)
|
||||
{
|
||||
@@ -83,6 +113,10 @@ void up_initialize(void)
|
||||
|
||||
current_regs = NULL;
|
||||
|
||||
/* Calibrate the timing loop */
|
||||
|
||||
up_calibratedelay();
|
||||
|
||||
/* Initialize the interrupt subsystem */
|
||||
|
||||
up_irqinitialize();
|
||||
@@ -95,10 +129,16 @@ void up_initialize(void)
|
||||
|
||||
/* Register devices */
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
devnull_register(); /* Standard /dev/null */
|
||||
#endif
|
||||
|
||||
/* Initialize the serial device driver */
|
||||
|
||||
up_serialinit();
|
||||
|
||||
/* Initialize the netwok */
|
||||
|
||||
up_netinitialize();
|
||||
up_ledon(LED_IRQSENABLED);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ extern uint32 g_heapbase;
|
||||
extern void up_boot(void);
|
||||
extern void up_copystate(uint32 *dest, uint32 *src);
|
||||
extern void up_dataabort(uint32 *regs);
|
||||
extern void up_delay(int milliseconds);
|
||||
extern void up_decodeirq(uint32 *regs);
|
||||
extern void up_doirq(int irq, uint32 *regs);
|
||||
extern void up_fullcontextrestore(uint32 *regs) __attribute__ ((noreturn));
|
||||
@@ -130,8 +129,13 @@ extern void up_vectorfiq(void);
|
||||
|
||||
/* Defined in up_serial.c */
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
extern void up_earlyserialinit(void);
|
||||
extern void up_serialinit(void);
|
||||
#else
|
||||
# define up_earlyserialinit()
|
||||
# define up_serialinit()
|
||||
#endif
|
||||
|
||||
/* Defined in up_watchdog.c */
|
||||
|
||||
@@ -157,6 +161,13 @@ extern void up_ledoff(int led);
|
||||
# define up_ledoff(led)
|
||||
#endif
|
||||
|
||||
/* Defined in board/up_network.c */
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
extern void up_netinitialize(void);
|
||||
#else
|
||||
# define up_netinitialize()
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __UP_INTERNAL_H */
|
||||
|
||||
90
arch/arm/src/common/up_mdelay.c
Normal file
90
arch/arm/src/common/up_mdelay.c
Normal file
@@ -0,0 +1,90 @@
|
||||
/****************************************************************************
|
||||
* common/up_mdelay.c
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_mdelay
|
||||
*
|
||||
* Description:
|
||||
* Delay inline for the requested number of milliseconds.
|
||||
* *** NOT multi-tasking friendly ***
|
||||
*
|
||||
* ASSUMPTIONS:
|
||||
* The setting CONFIG_BOARD_LOOPSPERMSEC has been calibrated
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_mdelay(unsigned int milliseconds)
|
||||
{
|
||||
volatile int i;
|
||||
volatile int j;
|
||||
|
||||
for (i = 0; i < milliseconds; i++)
|
||||
{
|
||||
for (j = 0; j < CONFIG_BOARD_LOOPSPERMSEC; j++)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,7 @@
|
||||
|
||||
void up_sigdeliver(void)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
uint32 regs[XCPTCONTEXT_REGS];
|
||||
sig_deliver_t sigdeliver;
|
||||
@@ -132,4 +133,5 @@ void up_sigdeliver(void)
|
||||
|
||||
up_ledoff(LED_SIGNAL);
|
||||
up_fullcontextrestore(regs);
|
||||
#endif
|
||||
}
|
||||
|
||||
128
arch/arm/src/common/up_udelay.c
Normal file
128
arch/arm/src/common/up_udelay.c
Normal file
@@ -0,0 +1,128 @@
|
||||
/****************************************************************************
|
||||
* common/up_udelay.c
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define CONFIG_BOARD_LOOPSPER100USEC ((CONFIG_BOARD_LOOPSPERMSEC+5)/10)
|
||||
#define CONFIG_BOARD_LOOPSPER10USEC ((CONFIG_BOARD_LOOPSPERMSEC+50)/100)
|
||||
#define CONFIG_BOARD_LOOPSPERUSEC ((CONFIG_BOARD_LOOPSPERMSEC+500)/1000)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_udelay
|
||||
*
|
||||
* Description:
|
||||
* Delay inline for the requested number of microseconds. NOTE: Because
|
||||
* of all of the setup, several microseconds will be lost before the actual
|
||||
* timing looop begins. Thus, the delay will always be a few microseconds
|
||||
* longer than requested.
|
||||
*
|
||||
* *** NOT multi-tasking friendly ***
|
||||
*
|
||||
* ASSUMPTIONS:
|
||||
* The setting CONFIG_BOARD_LOOPSPERMSEC has been calibrated
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_udelay(unsigned int microseconds)
|
||||
{
|
||||
volatile int i;
|
||||
|
||||
/* We'll do this a little at a time because we expect that the
|
||||
* CONFIG_BOARD_LOOPSPERUSEC is very inaccurate during to truncation in
|
||||
* the divisions of its calculation. We'll use the largest values that
|
||||
* we can in order to prevent significant error buildup in the loops.
|
||||
*/
|
||||
|
||||
while (microseconds > 1000)
|
||||
{
|
||||
for (i = 0; i < CONFIG_BOARD_LOOPSPERMSEC; i++)
|
||||
{
|
||||
}
|
||||
microseconds -= 1000;
|
||||
}
|
||||
|
||||
while (microseconds > 100)
|
||||
{
|
||||
for (i = 0; i < CONFIG_BOARD_LOOPSPER100USEC; i++)
|
||||
{
|
||||
}
|
||||
microseconds -= 100;
|
||||
}
|
||||
|
||||
while (microseconds > 10)
|
||||
{
|
||||
for (i = 0; i < CONFIG_BOARD_LOOPSPER10USEC; i++)
|
||||
{
|
||||
}
|
||||
microseconds -= 10;
|
||||
}
|
||||
|
||||
while (microseconds > 0)
|
||||
{
|
||||
for (i = 0; i < CONFIG_BOARD_LOOPSPERUSEC; i++)
|
||||
{
|
||||
}
|
||||
microseconds--;
|
||||
}
|
||||
}
|
||||
@@ -91,8 +91,6 @@ void up_unblock_task(_TCB *tcb)
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
|
||||
lldbg("Unblocking TCB=%p\n", tcb);
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
||||
sched_removeblocked(tcb);
|
||||
@@ -130,7 +128,6 @@ void up_unblock_task(_TCB *tcb)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
lldbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* Then switch contexts */
|
||||
|
||||
@@ -151,7 +148,6 @@ void up_unblock_task(_TCB *tcb)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
lldbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* Then switch contexts */
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ HEAD_ASRC = up_head.S
|
||||
CMN_ASRCS = up_cache.S up_fullcontextrestore.S up_saveusercontext.S \
|
||||
up_vectors.S up_vectortab.S
|
||||
CMN_CSRCS = up_assert.c up_blocktask.c up_copystate.c up_createstack.c \
|
||||
up_dataabort.c up_delay.c up_exit.c up_idle.c \
|
||||
up_dataabort.c up_mdelay.c up_udelay.c up_exit.c up_idle.c \
|
||||
up_initialize.c up_initialstate.c up_interruptcontext.c \
|
||||
up_prefetchabort.c up_releasepending.c up_releasestack.c \
|
||||
up_reprioritizertr.c up_schedulesigaction.c \
|
||||
|
||||
112
arch/arm/src/dm320/dm320_emif.h
Normal file
112
arch/arm/src/dm320/dm320_emif.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/************************************************************************************
|
||||
* dm320/dm320_emif.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 __DM320_DM320_EMIF_H
|
||||
#define __DM320_DM320_EMIF_H
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* External Memory Interface (EMIF) Registers */
|
||||
|
||||
#define DM320_EMIF_CS0CTRL1 (DM320_PERIPHERALS_VADDR + 0x0A00) /* CS0 Control Register #1 */
|
||||
#define DM320_EMIF_CS0CTRL2 (DM320_PERIPHERALS_VADDR + 0x0A02) /* CS0 Control Register #2 */
|
||||
#define DM320_EMIF_CS0CTRL3 (DM320_PERIPHERALS_VADDR + 0x0A04) /* CS0 Control Register #3 */
|
||||
#define DM320_EMIF_CS1CTRL1A (DM320_PERIPHERALS_VADDR + 0x0A06) /* CS1 Control Register #1A */
|
||||
#define DM320_EMIF_CS1CTRL1B (DM320_PERIPHERALS_VADDR + 0x0A08) /* CS1 Control Register #1B */
|
||||
#define DM320_EMIF_CS2CTRL2 (DM320_PERIPHERALS_VADDR + 0x0A0A) /* CS1 Control Register #2 */
|
||||
#define DM320_EMIF_CS2CTRL1 (DM320_PERIPHERALS_VADDR + 0x0A0C) /* CS2 Control Register #1 */
|
||||
#define DM320_EMIF_CS1CTRL2 (DM320_PERIPHERALS_VADDR + 0x0A0E) /* CS2 Control Register #2 */
|
||||
#define DM320_EMIF_CS3CTRL1 (DM320_PERIPHERALS_VADDR + 0x0A10) /* CS3 Control Register #1 */
|
||||
#define DM320_EMIF_CS3CTRL2 (DM320_PERIPHERALS_VADDR + 0x0A12) /* CS3 Control Register #2 */
|
||||
#define DM320_EMIF_CS4CTRL1 (DM320_PERIPHERALS_VADDR + 0x0A14) /* CS4 Control Register #1 */
|
||||
#define DM320_EMIF_CS4CTRL2 (DM320_PERIPHERALS_VADDR + 0x0A16) /* CS4 Control Register #2 */
|
||||
#define DM320_EMIF_BUSCTRL (DM320_PERIPHERALS_VADDR + 0x0A18) /* Bus Control Register */
|
||||
#define DM320_EMIF_BUSRLS (DM320_PERIPHERALS_VADDR + 0x0A1A) /* Bus Release Control Register */
|
||||
#define DM320_EMIF_CFCTRL1 (DM320_PERIPHERALS_VADDR + 0x0A1C) /* CFC ControlRegister #1 */
|
||||
#define DM320_EMIF_CFCTRL2 (DM320_PERIPHERALS_VADDR + 0x0A1E) /* CFC ControlRegister#2 */
|
||||
#define DM320_EMIF_SMCTRL (DM320_PERIPHERALS_VADDR + 0x0A20) /* SmartMedia Control Register */
|
||||
#define DM320_EMIF_BUSINTEN (DM320_PERIPHERALS_VADDR + 0x0A22) /* Bus Interrupt Enable Register */
|
||||
#define DM320_EMIF_BUSSTS (DM320_PERIPHERALS_VADDR + 0x0A24) /* Bus Status Register */
|
||||
#define DM320_EMIF_BUSWAITMD (DM320_PERIPHERALS_VADDR + 0x0A26) /* Bus Wait Mode Register */
|
||||
#define DM320_EMIF_ECC1CP (DM320_PERIPHERALS_VADDR + 0x0A28) /* ECC Area 1 CP Register */
|
||||
#define DM320_EMIF_ECC1LP (DM320_PERIPHERALS_VADDR + 0x0A2A) /* ECC Area 1 LP Register */
|
||||
#define DM320_EMIF_ECC2CP (DM320_PERIPHERALS_VADDR + 0x0A2C) /* ECC Area 2 CP Register */
|
||||
#define DM320_EMIF_ECC2LP (DM320_PERIPHERALS_VADDR + 0x0A2E) /* ECC Area 2 LP Register */
|
||||
#define DM320_EMIF_ECC3CP (DM320_PERIPHERALS_VADDR + 0x0A30) /* ECC Area 3 CP Register */
|
||||
#define DM320_EMIF_ECC3LP (DM320_PERIPHERALS_VADDR + 0x0A32) /* ECC Area 3 LP Register */
|
||||
#define DM320_EMIF_ECC4CP (DM320_PERIPHERALS_VADDR + 0x0A34) /* ECC Area 4 CP Register */
|
||||
#define DM320_EMIF_ECC4LP (DM320_PERIPHERALS_VADDR + 0x0A36) /* ECC Area 4 LP Register */
|
||||
#define DM320_EMIF_ECC5CP (DM320_PERIPHERALS_VADDR + 0x0A38) /* ECC Area 5 CP Register */
|
||||
#define DM320_EMIF_ECC5LP (DM320_PERIPHERALS_VADDR + 0x0A3A) /* ECC Area 5 LP Register */
|
||||
#define DM320_EMIF_ECC6CP (DM320_PERIPHERALS_VADDR + 0x0A3C) /* ECC Area 6 CP Register */
|
||||
#define DM320_EMIF_ECC6LP (DM320_PERIPHERALS_VADDR + 0x0A3E) /* ECC Area 6 LP Register */
|
||||
#define DM320_EMIF_ECC7CP (DM320_PERIPHERALS_VADDR + 0x0A40) /* ECC Area 7 CP Register */
|
||||
#define DM320_EMIF_ECC7LP (DM320_PERIPHERALS_VADDR + 0x0A42) /* ECC Area 7 LP Register */
|
||||
#define DM320_EMIF_ECC8CP (DM320_PERIPHERALS_VADDR + 0x0A44) /* ECC Area 8 CP Register */
|
||||
#define DM320_EMIF_ECC8LP (DM320_PERIPHERALS_VADDR + 0x0A46) /* ECC Area 8 LP Register */
|
||||
#define DM320_EMIF_ECCCLR (DM320_PERIPHERALS_VADDR + 0x0A48) /* ECC Clear Register */
|
||||
#define DM320_EMIF_PAGESZ (DM320_PERIPHERALS_VADDR + 0x0A4A) /* SmartMedia Page Size Register */
|
||||
#define DM320_EMIF_PRIORCTL (DM320_PERIPHERALS_VADDR + 0x0A4C) /* Priority control for DMA */
|
||||
#define DM320_EMIF_IMGDSPDEST (DM320_PERIPHERALS_VADDR + 0x0A4E) /* DSP/IMGBUF DMA destination */
|
||||
#define DM320_EMIF_IMGDSPADDH (DM320_PERIPHERALS_VADDR + 0x0A50) /* DSP/IMGBUF high address */
|
||||
#define DM320_EMIF_IMGDSPADDL (DM320_PERIPHERALS_VADDR + 0x0A52) /* DSP/IMGBUG low address */
|
||||
#define DM320_EMIF_AHBADDH (DM320_PERIPHERALS_VADDR + 0x0A54) /* AHB high address */
|
||||
#define DM320_EMIF_AHBADDL (DM320_PERIPHERALS_VADDR + 0x0A56) /* AHB low address */
|
||||
#define DM320_EMIF_MTCADDH (DM320_PERIPHERALS_VADDR + 0x0A58) /* MTC high address */
|
||||
#define DM320_EMIF_MTCADDL (DM320_PERIPHERALS_VADDR + 0x0A5A) /* MTC low address */
|
||||
#define DM320_EMIF_DMASIZE (DM320_PERIPHERALS_VADDR + 0x0A5C) /* DMA Transfer Size Register */
|
||||
#define DM320_EMIF_DMAMTCSEL (DM320_PERIPHERALS_VADDR + 0x0A5E) /* DMA Device Select Register */
|
||||
#define DM320_EMIF_DMACTL (DM320_PERIPHERALS_VADDR + 0x0A60) /* DMA Control Register */
|
||||
#define DM320_EMIF_TEST (DM320_PERIPHERALS_VADDR + 0x0A62) /* Test Register.Do not use */
|
||||
|
||||
/************************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __DM320_DM320_EMIF_H */
|
||||
@@ -90,7 +90,7 @@
|
||||
if ((pin) < 16) { _reg = (reg0); _pin = (pin); } \
|
||||
else if ((pin) < 32) { _reg = (reg1); _pin = ((pin) - 16); } \
|
||||
else { _reg = (reg2); _pin = ((pin) - 32); } \
|
||||
putreg16((getreg16(_reg) | (1 << _pin)), _reg)); \
|
||||
putreg16((getreg16(_reg) | (1 << _pin)), _reg); \
|
||||
} while (0)
|
||||
|
||||
#define _GIO_CLEAR_REG(pin, reg0, reg1, reg2) \
|
||||
@@ -99,7 +99,7 @@
|
||||
if ((pin) < 16) { _reg = (reg0); _pin = (pin); } \
|
||||
else if ((pin) < 32) { _reg = (reg1); _pin = ((pin) - 16); } \
|
||||
else { _reg = (reg2); _pin = ((pin) - 32); } \
|
||||
putreg16((getreg16(_reg) & ~(1 << _pin)), _reg)); \
|
||||
putreg16((getreg16(_reg) & ~(1 << _pin)), _reg); \
|
||||
} while (0)
|
||||
|
||||
/* Select GIO input or output */
|
||||
|
||||
@@ -84,10 +84,10 @@
|
||||
up_lowputc:
|
||||
/* On entry, r0 holds the character to be printed */
|
||||
|
||||
#ifdef CONFIG_UART0_SERIAL_CONSOLE
|
||||
ldr r2, =DM320_UART0_REGISTER_BASE /* r2=UART0 base */
|
||||
#else
|
||||
#ifdef CONFIG_UART1_SERIAL_CONSOLE
|
||||
ldr r2, =DM320_UART1_REGISTER_BASE /* r2=UART1 base */
|
||||
#else
|
||||
ldr r2, =DM320_UART0_REGISTER_BASE /* r2=UART0 base */
|
||||
#endif
|
||||
|
||||
/* Poll the TX fifo trigger level bit of the UART_SSR
|
||||
|
||||
@@ -38,20 +38,25 @@
|
||||
************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <semaphore.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/serial.h>
|
||||
#include <arch/serial.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
@@ -723,3 +728,59 @@ int up_putc(int ch)
|
||||
return ch;
|
||||
}
|
||||
|
||||
#else /* CONFIG_NFILE_DESCRIPTORS > 0 */
|
||||
|
||||
/************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
|
||||
# ifdef CONFIG_UART1_SERIAL_CONSOLE
|
||||
# define DM320_REGISTER_BASE DM320_UART1_REGISTER_BASE
|
||||
# else
|
||||
# define DM320_REGISTER_BASE DM320_UART0_REGISTER_BASE
|
||||
# endif
|
||||
|
||||
/************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
|
||||
static inline void up_waittxfifonotfull(void)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
for (tmp = 1000 ; tmp > 0 ; tmp--)
|
||||
{
|
||||
|
||||
if ((getreg16(DM320_REGISTER_BASE + UART_SR) & UART_SR_TFTI) != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
|
||||
int up_putc(int ch)
|
||||
{
|
||||
up_waittxfifonotfull();
|
||||
putreg16((uint16)ch, DM320_REGISTER_BASE + UART_DTRR);
|
||||
|
||||
/* Check for LF */
|
||||
|
||||
if (ch == '\n')
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
up_waittxfifonotfull();
|
||||
putreg16((uint16)'\r', DM320_REGISTER_BASE + UART_DTRR);
|
||||
}
|
||||
|
||||
up_waittxfifonotfull();
|
||||
return ch;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ HEAD_ASRC = lpc214x_head.S
|
||||
|
||||
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S
|
||||
CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
|
||||
up_createstack.c up_dataabort.c up_delay.c up_exit.c \
|
||||
up_idle.c up_initialize.c up_initialstate.c \
|
||||
up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c \
|
||||
up_exit.c up_idle.c up_initialize.c up_initialstate.c \
|
||||
up_interruptcontext.c up_prefetchabort.c up_releasepending.c \
|
||||
up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c \
|
||||
up_sigdeliver.c up_syscall.c up_unblocktask.c \
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include "clock_internal.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
@@ -97,11 +98,11 @@ void up_unblock_task(_TCB *tcb)
|
||||
sched_removeblocked(tcb);
|
||||
|
||||
/* Reset its timeslice. This is only meaningful for round
|
||||
* robin tasks but it doesn't here to do it for everything
|
||||
* robin tasks but it doesn't hurt to do it for all tasks
|
||||
*/
|
||||
|
||||
#if CONFIG_RR_INTERVAL > 0
|
||||
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC;
|
||||
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
|
||||
#endif
|
||||
|
||||
/* Add the task in the correct location in the prioritized
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include "clock_internal.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
@@ -96,11 +97,11 @@ void up_unblock_task(_TCB *tcb)
|
||||
sched_removeblocked(tcb);
|
||||
|
||||
/* Reset its timeslice. This is only meaningful for round
|
||||
* robin tasks but it doesn't here to do it for everything
|
||||
* robin tasks but it doesn't hurt to do it for all tasks.
|
||||
*/
|
||||
|
||||
#if CONFIG_RR_INTERVAL > 0
|
||||
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC;
|
||||
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
|
||||
#endif
|
||||
|
||||
/* Add the task in the correct location in the prioritized
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/mm.h>
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
#include "up_mem.h"
|
||||
|
||||
@@ -49,11 +49,16 @@ CSRCS = up_initialize.c up_idle.c up_interruptcontext.c \
|
||||
ifeq ($(CONFIG_FS_FAT),y)
|
||||
CSRCS += up_blockdevice.c up_deviceimage.c
|
||||
endif
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
CSRCS += up_uipdriver.c
|
||||
SPECSRCS += up_tapdev.c
|
||||
endif
|
||||
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
SPECOBJS = $(SPECSRCS:.c=$(OBJEXT))
|
||||
|
||||
SRCS = $(ASRCS) $(CSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS)
|
||||
SRCS = $(ASRCS) $(CSRCS) $(SPECSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS) $(SPECOBJS)
|
||||
|
||||
LDFLAGS = $(ARCHSCRIPT)
|
||||
EXTRA_LIBS = -lc
|
||||
@@ -74,31 +79,33 @@ $(AOBJS): %$(OBJEXT): %.S
|
||||
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
$(SPECOBJS): %$(OBJEXT): %.c
|
||||
$(CC) -c $(HOSTCFLAGS) $< -o $@
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
( for obj in $(OBJS) ; do \
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
done ; )
|
||||
|
||||
nuttx: $(LINKOBJS)
|
||||
nuttx$(EXEEXT): $(LINKOBJS)
|
||||
$(CC) $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ $(LINKOBJS) \
|
||||
-Wl,--start-group $(LDLIBS) -Wl,--end-group $(EXTRA_LIBS)
|
||||
@$(NM) $(TOPDIR)/$@ | \
|
||||
grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
sort > $(TOPDIR)/System.map
|
||||
|
||||
grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
sort > $(TOPDIR)/System.map
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
touch $@
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
rm -f libarch$(LIBEXT) *~
|
||||
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
||||
@rm -f libarch$(LIBEXT) *~
|
||||
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
||||
|
||||
distclean: clean
|
||||
rm -f Make.dep .depend
|
||||
@rm -f Make.dep .depend
|
||||
|
||||
-include Make.dep
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
@@ -94,7 +94,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
boolean switch_needed;
|
||||
|
||||
dbg("Blocking TCB=%p\n", tcb);
|
||||
sdbg("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
|
||||
@@ -134,7 +134,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
dbg("New Active Task TCB=%p\n", rtcb);
|
||||
sdbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@@ -143,7 +143,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
dbg("Delivering signals TCB=%p\n", rtcb);
|
||||
sdbg("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
*
|
||||
************************************************************/
|
||||
|
||||
#if !defined(linux) && !defined(__CYGWIN__)
|
||||
# error "Sorry, this will only work with Linux"
|
||||
#else
|
||||
|
||||
/************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
@@ -134,3 +138,6 @@ int up_putc(int ch)
|
||||
(void)up_write(1, &b, 1);
|
||||
return ch;
|
||||
}
|
||||
|
||||
#endif /* linux */
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef VFAT_STANDALONE
|
||||
# define dbg(format, arg...) printf(format, ##arg)
|
||||
# define sdbg(format, arg...) printf(format, ##arg)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -218,7 +218,7 @@ char *up_deviceimage(void)
|
||||
ret = inflateInit(&strm);
|
||||
if (ret != Z_OK)
|
||||
{
|
||||
dbg("inflateInit FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
|
||||
sdbg("inflateInit FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ char *up_deviceimage(void)
|
||||
case Z_DATA_ERROR:
|
||||
case Z_MEM_ERROR:
|
||||
case Z_STREAM_ERROR:
|
||||
dbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
|
||||
sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
|
||||
(void)inflateEnd(&strm);
|
||||
free(pbuffer);
|
||||
return NULL;
|
||||
|
||||
@@ -74,7 +74,7 @@ void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
|
||||
dbg("TCB=%p exitting\n", 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
|
||||
@@ -113,7 +113,7 @@ void _exit(int status)
|
||||
*/
|
||||
|
||||
tcb = (_TCB*)g_readytorun.head;
|
||||
dbg("New Active Task TCB=%p\n", tcb);
|
||||
sdbg("New Active Task TCB=%p\n", tcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@@ -122,7 +122,7 @@ void _exit(int status)
|
||||
|
||||
if (tcb->xcp.sigdeliver)
|
||||
{
|
||||
dbg("Delivering signals TCB=%p\n", tcb);
|
||||
sdbg("Delivering signals TCB=%p\n", tcb);
|
||||
((sig_deliver_t)tcb->xcp.sigdeliver)(tcb);
|
||||
tcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
#include <assert.h>
|
||||
#include <nuttx/os_external.h>
|
||||
#include <nuttx/init.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
/************************************************************
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
@@ -80,5 +80,11 @@ void up_idle(void)
|
||||
*/
|
||||
|
||||
sched_process_timer();
|
||||
|
||||
/* Run the network if enabled */
|
||||
|
||||
#if defined(CONFIG_NET) && defined(linux)
|
||||
uipdriver_loop();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -86,4 +86,7 @@ void up_initialize(void)
|
||||
devnull_register(); /* Standard /dev/null */
|
||||
up_devconsole(); /* Our private /dev/console */
|
||||
up_registerblockdevice(); /* Our simulated block device /dev/blkdev */
|
||||
#if defined(CONFIG_NET) && defined(linux)
|
||||
uipdriver_init(); /* Our "real" netwok driver */
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -107,5 +107,22 @@ extern void up_registerblockdevice(void);
|
||||
|
||||
extern char *up_deviceimage(void);
|
||||
|
||||
/* up_tapdev.c ************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
extern unsigned long up_getwalltime( void );
|
||||
extern void tapdev_init(void);
|
||||
extern int tapdev_getmacaddr(unsigned char *macaddr);
|
||||
extern unsigned int tapdev_read(unsigned char *buf, unsigned int buflen);
|
||||
extern void tapdev_send(unsigned char *buf, unsigned int buflen);
|
||||
#endif
|
||||
|
||||
/* up_uipdriver.c *********************************************************/
|
||||
|
||||
#if defined(CONFIG_NET) && defined(linux)
|
||||
extern int uipdriver_init(void);
|
||||
extern void uipdriver_loop(void);
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_UP_INTERNAL_H */
|
||||
|
||||
@@ -76,7 +76,7 @@ void up_release_pending(void)
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
|
||||
dbg("From TCB=%p\n", rtcb);
|
||||
sdbg("From TCB=%p\n", rtcb);
|
||||
|
||||
/* Merge the g_pendingtasks list into the g_readytorun task list */
|
||||
|
||||
@@ -96,7 +96,7 @@ void up_release_pending(void)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
dbg("New Active Task TCB=%p\n", rtcb);
|
||||
sdbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@@ -105,7 +105,7 @@ void up_release_pending(void)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
dbg("Delivering signals TCB=%p\n", rtcb);
|
||||
sdbg("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
boolean switch_needed;
|
||||
|
||||
dbg("TCB=%p PRI=%d\n", tcb, priority);
|
||||
sdbg("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return TRUE if we just
|
||||
@@ -146,7 +146,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
dbg("New Active Task TCB=%p\n", rtcb);
|
||||
sdbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@@ -155,7 +155,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
dbg("Delivering signals TCB=%p\n", rtcb);
|
||||
sdbg("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,12 @@
|
||||
/**************************************************************************
|
||||
* Private Definitions
|
||||
**************************************************************************/
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# define SYMBOL(s) _##s
|
||||
#else
|
||||
# define SYMBOL(s) s
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
* Private Types
|
||||
@@ -72,58 +78,65 @@
|
||||
**************************************************************************/
|
||||
|
||||
.text
|
||||
.globl up_setjmp
|
||||
.type up_setjmp, @function
|
||||
up_setjmp:
|
||||
.globl SYMBOL(up_setjmp)
|
||||
#ifndef __CYGWIN__
|
||||
.type SYMBOL(up_setjmp), @function
|
||||
#endif
|
||||
SYMBOL(up_setjmp):
|
||||
|
||||
/* %ebx, %esi, %edi, and %ebp must be preserved.
|
||||
* save %ebx, $esi, and %edi now... */
|
||||
|
||||
movl 4(%esp), %eax
|
||||
movl %ebx, (JB_EBX)(%eax)
|
||||
movl %esi, (JB_ESI)(%eax)
|
||||
movl %edi, (JB_EDI)(%eax)
|
||||
movl 4(%esp), %eax
|
||||
movl %ebx, (JB_EBX)(%eax)
|
||||
movl %esi, (JB_ESI)(%eax)
|
||||
movl %edi, (JB_EDI)(%eax)
|
||||
|
||||
/* Save the value of SP as will be after we return */
|
||||
/* Save the value of SP as will be after we return */
|
||||
|
||||
leal 4(%esp), %ecx
|
||||
movl %ecx, (JB_SP)(%eax)
|
||||
leal 4(%esp), %ecx
|
||||
movl %ecx, (JB_SP)(%eax)
|
||||
|
||||
/* Save the return PC */
|
||||
/* Save the return PC */
|
||||
|
||||
movl 0(%esp), %ecx
|
||||
movl %ecx, (JB_PC)(%eax)
|
||||
movl 0(%esp), %ecx
|
||||
movl %ecx, (JB_PC)(%eax)
|
||||
|
||||
/* Save the framepointer */
|
||||
/* Save the framepointer */
|
||||
|
||||
movl %ebp, (JB_EBP)(%eax)
|
||||
movl %ebp, (JB_EBP)(%eax)
|
||||
|
||||
/* And return 0 */
|
||||
|
||||
xorl %eax, %eax
|
||||
ret
|
||||
.size up_setjmp, . - up_setjmp
|
||||
ret
|
||||
#ifndef __CYGWIN__
|
||||
.size SYMBOL(up_setjmp), . - SYMBOL(up_setjmp)
|
||||
#endif
|
||||
.globl SYMBOL(up_longjmp)
|
||||
#ifndef __CYGWIN__
|
||||
.type SYMBOL(up_longjmp), @function
|
||||
#endif
|
||||
SYMBOL(up_longjmp):
|
||||
movl 4(%esp), %ecx /* U_pthread_jmpbuf in %ecx. */
|
||||
movl 8(%esp), %eax /* Second argument is return value. */
|
||||
|
||||
.globl up_longjmp
|
||||
.type up_longjmp, @function
|
||||
up_longjmp:
|
||||
movl 4(%esp), %ecx /* U_pthread_jmpbuf in %ecx. */
|
||||
movl 8(%esp), %eax /* Second argument is return value. */
|
||||
/* Save the return address now. */
|
||||
|
||||
/* Save the return address now. */
|
||||
movl (JB_PC)(%ecx), %edx
|
||||
|
||||
movl (JB_PC)(%ecx), %edx
|
||||
/* Restore registers. */
|
||||
|
||||
/* Restore registers. */
|
||||
movl (JB_EBX)(%ecx), %ebx
|
||||
movl (JB_ESI)(%ecx), %esi
|
||||
movl (JB_EDI)(%ecx), %edi
|
||||
movl (JB_EBP)(%ecx), %ebp
|
||||
movl (JB_SP)(%ecx), %esp
|
||||
|
||||
movl (JB_EBX)(%ecx), %ebx
|
||||
movl (JB_ESI)(%ecx), %esi
|
||||
movl (JB_EDI)(%ecx), %edi
|
||||
movl (JB_EBP)(%ecx), %ebp
|
||||
movl (JB_SP)(%ecx), %esp
|
||||
/* Jump to saved PC. */
|
||||
|
||||
/* Jump to saved PC. */
|
||||
|
||||
jmp *%edx
|
||||
.size up_longjmp, . - up_longjmp
|
||||
jmp *%edx
|
||||
#ifndef __CYGWIN__
|
||||
.size SYMBOL(up_longjmp), . - SYMBOL(up_longjmp)
|
||||
#endif
|
||||
|
||||
|
||||
375
arch/sim/src/up_tapdev.c
Normal file
375
arch/sim/src/up_tapdev.c
Normal file
@@ -0,0 +1,375 @@
|
||||
|
||||
/****************************************************************************
|
||||
* up_tapdev.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Based on code from uIP which also has a BSD-like license:
|
||||
*
|
||||
* Copyright (c) 2001, Adam Dunkels.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef linux
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_tun.h>
|
||||
#include <linux/net.h>
|
||||
|
||||
extern int lib_rawprintf(const char *format, ...);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define TAPDEV_DEBUG 1
|
||||
|
||||
#define DEVTAP "/dev/net/tun"
|
||||
|
||||
#ifndef CONFIG_EXAMPLE_UIP_DHCPC
|
||||
# define UIP_IPADDR0 192
|
||||
# define UIP_IPADDR1 168
|
||||
# define UIP_IPADDR2 0
|
||||
# define UIP_IPADDR3 128
|
||||
#else
|
||||
# define UIP_IPADDR0 0
|
||||
# define UIP_IPADDR1 0
|
||||
# define UIP_IPADDR2 0
|
||||
# define UIP_IPADDR3 0
|
||||
#endif
|
||||
|
||||
#define READ 3
|
||||
#define WRITE 4
|
||||
#define OPEN 5
|
||||
#define IOCTL 54
|
||||
#define SELECT 82
|
||||
#define SOCKETCALL 102
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Warning: This is very much Linux version specific! */
|
||||
|
||||
struct sel_arg_struct
|
||||
{
|
||||
unsigned long n;
|
||||
fd_set *inp;
|
||||
fd_set *outp;
|
||||
fd_set *exp;
|
||||
struct timeval *tvp;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef TAPDEV_DEBUG
|
||||
static int gdrop = 0;
|
||||
#endif
|
||||
static int gtapdevfd;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/* This is REALLY awkward.. we need to compile using the system header files,
|
||||
* but we can't use any of the libc calls because all of the symbols are
|
||||
* defined for NuttX (read, write, etc)! So we do hand rolled syscalls
|
||||
* to get to the Linux functions.
|
||||
*/
|
||||
|
||||
static inline int up_open(const char *filename, int flags, int mode)
|
||||
{
|
||||
int result;
|
||||
|
||||
__asm__ volatile ("int $0x80" \
|
||||
: "=a" (result) \
|
||||
: "0" (OPEN), "b" ((int)(filename)), "c" ((int)(flags)), "d" ((int)(mode)) \
|
||||
: "memory");
|
||||
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
static inline int up_socketcall(int call, unsigned long *args)
|
||||
{
|
||||
int result;
|
||||
|
||||
__asm__ volatile ("int $0x80" \
|
||||
: "=a" (result) \
|
||||
: "0" (SOCKETCALL), "b" (call), "c" ((int)args) \
|
||||
: "memory");
|
||||
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
static inline int up_socket(int domain, int type, int protocol)
|
||||
{
|
||||
unsigned long args[3];
|
||||
args[0] = domain;
|
||||
args[1] = type;
|
||||
args[2] = protocol;
|
||||
return up_socketcall(SYS_SOCKET, args);
|
||||
}
|
||||
|
||||
static inline int up_read(int fd, void* buf, size_t count)
|
||||
{
|
||||
ssize_t result;
|
||||
|
||||
__asm__ volatile ("int $0x80" \
|
||||
: "=a" (result) \
|
||||
: "0" (READ), "b" ((int)(fd)), "c" ((int)(buf)), "d" ((int)(count)) \
|
||||
: "memory");
|
||||
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
static inline int up_write(int fd, const void* buf, size_t count)
|
||||
{
|
||||
ssize_t result;
|
||||
|
||||
__asm__ volatile ("int $0x80" \
|
||||
: "=a" (result) \
|
||||
: "0" (WRITE), "b" ((int)(fd)), "c" ((int)(buf)), "d" ((int)(count)) \
|
||||
: "memory");
|
||||
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
static inline int up_ioctl(int fd, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
ssize_t result;
|
||||
|
||||
__asm__ volatile ("int $0x80" \
|
||||
: "=a" (result) \
|
||||
: "0" (IOCTL), "b" ((int)(fd)), "c" ((int)(cmd)), "d" ((long)(arg)) \
|
||||
: "memory");
|
||||
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
static inline int up_select(struct sel_arg_struct *arg)
|
||||
{
|
||||
ssize_t result;
|
||||
|
||||
__asm__ volatile ("int $0x80" \
|
||||
: "=a" (result) \
|
||||
: "0" (SELECT),"b" ((struct sel_arg_struct *)(arg))
|
||||
: "memory");
|
||||
|
||||
return (int)result;
|
||||
}
|
||||
|
||||
#ifdef TAPDEV_DEBUG
|
||||
static inline void dump_ethhdr(const char *msg, unsigned char *buf, int buflen)
|
||||
{
|
||||
lib_rawprintf("TAPDEV: %s %d bytes\n", msg, buflen);
|
||||
lib_rawprintf(" %02x:%02x:%02x:%02x:%02x:%02x %02x:%02x:%02x:%02x:%02x:%02x %02x%02x\n",
|
||||
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5],
|
||||
buf[6], buf[7], buf[8], buf[9], buf[10], buf[11],
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
buf[13], buf[12]);
|
||||
#else
|
||||
buf[12], buf[13]);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
# define dump_ethhdr(m,b,l)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
unsigned long up_getwalltime( void )
|
||||
{
|
||||
struct timeval tm;
|
||||
(void)gettimeofday(&tm, NULL);
|
||||
return tm.tv_sec*1000 + tm.tv_usec/1000;
|
||||
}
|
||||
|
||||
void tapdev_init(void)
|
||||
{
|
||||
struct ifreq ifr;
|
||||
char buf[1024];
|
||||
int ret;
|
||||
|
||||
/* Open the tap device */
|
||||
|
||||
gtapdevfd = up_open(DEVTAP, O_RDWR, 0644);
|
||||
if (gtapdevfd < 0)
|
||||
{
|
||||
lib_rawprintf("TAPDEV: open failed: %d\n", -gtapdevfd );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Configure the tap device */
|
||||
|
||||
memset(&ifr, 0, sizeof(ifr));
|
||||
ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
|
||||
ret = up_ioctl(gtapdevfd, TUNSETIFF, (unsigned long) &ifr);
|
||||
if (ret < 0)
|
||||
{
|
||||
lib_rawprintf("TAPDEV: ioctl failed: %d\n", -ret );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Assign an IPv4 address to the tap device */
|
||||
|
||||
snprintf(buf, sizeof(buf), "/sbin/ifconfig tap0 inet %d.%d.%d.%d\n",
|
||||
UIP_IPADDR0, UIP_IPADDR1, UIP_IPADDR2, UIP_IPADDR3);
|
||||
system(buf);
|
||||
}
|
||||
|
||||
int tapdev_getmacaddr(unsigned char *macaddr)
|
||||
{
|
||||
int ret = -1;
|
||||
if (macaddr)
|
||||
{
|
||||
/* Get a socket (only so that we get access to the INET subsystem) */
|
||||
|
||||
int sockfd = up_socket(PF_INET, SOCK_DGRAM, 0);
|
||||
if (sockfd >= 0)
|
||||
{
|
||||
struct ifreq req;
|
||||
memset (&req, 0, sizeof(struct ifreq));
|
||||
|
||||
/* Put the driver name into the request */
|
||||
|
||||
strncpy(req.ifr_name, "tap0", IFNAMSIZ);
|
||||
|
||||
/* Perform the ioctl to get the MAC address */
|
||||
|
||||
ret = up_ioctl(sockfd, SIOCGIFHWADDR, (unsigned long)&req);
|
||||
if (!ret)
|
||||
{
|
||||
/* Return the MAC address */
|
||||
|
||||
memcpy(macaddr, &req.ifr_hwaddr.sa_data, IFHWADDRLEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
unsigned int tapdev_read(unsigned char *buf, unsigned int buflen)
|
||||
{
|
||||
struct sel_arg_struct arg;
|
||||
fd_set fdset;
|
||||
struct timeval tv;
|
||||
int ret;
|
||||
|
||||
/* We can't do anything if we failed to open the tap device */
|
||||
|
||||
if (gtapdevfd < 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Wait for data on the tap device (or a timeout) */
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 1000;
|
||||
|
||||
FD_ZERO(&fdset);
|
||||
FD_SET(gtapdevfd, &fdset);
|
||||
|
||||
arg.n = gtapdevfd + 1;
|
||||
arg.inp = &fdset;
|
||||
arg.outp = NULL;
|
||||
arg.exp = NULL;
|
||||
arg.tvp = &tv;
|
||||
|
||||
ret = up_select(&arg);
|
||||
if(ret == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = up_read(gtapdevfd, buf, buflen);
|
||||
if (ret < 0)
|
||||
{
|
||||
lib_rawprintf("TAPDEV: read failed: %d\n", -ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
dump_ethhdr("read", buf, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void tapdev_send(unsigned char *buf, unsigned int buflen)
|
||||
{
|
||||
int ret;
|
||||
#ifdef TAPDEV_DEBUG
|
||||
lib_rawprintf("tapdev_send: sending %d bytes\n", buflen);
|
||||
|
||||
gdrop++;
|
||||
if(gdrop % 8 == 7)
|
||||
{
|
||||
lib_rawprintf("Dropped a packet!\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = up_write(gtapdevfd, buf, buflen);
|
||||
if (ret < 0)
|
||||
{
|
||||
lib_rawprintf("TAPDEV: write failed: %d", -ret);
|
||||
exit(1);
|
||||
}
|
||||
dump_ethhdr("write", buf, buflen);
|
||||
}
|
||||
|
||||
#endif /* linux */
|
||||
|
||||
|
||||
224
arch/sim/src/up_uipdriver.c
Normal file
224
arch/sim/src/up_uipdriver.c
Normal file
@@ -0,0 +1,224 @@
|
||||
/****************************************************************************
|
||||
* up_uipdriver.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Based on code from uIP which also has a BSD-like license:
|
||||
*
|
||||
* Copyright (c) 2001, Adam Dunkels.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef linux
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <sched.h>
|
||||
#include <nuttx/net.h>
|
||||
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <net/uip/uip-arp.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define BUF ((struct uip_eth_hdr *)g_sim_dev.d_buf)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
struct timer
|
||||
{
|
||||
uint32 interval;
|
||||
uint32 start;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static struct timer g_periodic_timer;
|
||||
static struct uip_driver_s g_sim_dev;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static void timer_set(struct timer *t, unsigned int interval)
|
||||
{
|
||||
t->interval = interval;
|
||||
t->start = up_getwalltime();
|
||||
}
|
||||
|
||||
static boolean timer_expired( struct timer *t )
|
||||
{
|
||||
return (up_getwalltime() - t->start) >= t->interval;
|
||||
}
|
||||
|
||||
void timer_reset(struct timer *t)
|
||||
{
|
||||
t->start += t->interval;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_PROMISCUOUS
|
||||
# define up_comparemac(a,b) (0)
|
||||
#else
|
||||
static inline int up_comparemac(struct uip_eth_addr *paddr1, struct uip_eth_addr *paddr2)
|
||||
{
|
||||
return memcmp(paddr1, paddr2, sizeof(struct uip_eth_addr));
|
||||
}
|
||||
#endif
|
||||
|
||||
static int sim_uiptxpoll(struct uip_driver_s *dev)
|
||||
{
|
||||
/* If the polling resulted in data that should be sent out on the network,
|
||||
* the field d_len is set to a value > 0.
|
||||
*/
|
||||
|
||||
if (g_sim_dev.d_len > 0)
|
||||
{
|
||||
uip_arp_out(&g_sim_dev);
|
||||
tapdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
|
||||
}
|
||||
|
||||
/* If zero is returned, the polling will continue until all connections have
|
||||
* been examined.
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
void uipdriver_loop(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* tapdev_read will return 0 on a timeout event and >0 on a data received event */
|
||||
|
||||
g_sim_dev.d_len = tapdev_read((unsigned char*)g_sim_dev.d_buf, CONFIG_NET_BUFSIZE);
|
||||
|
||||
/* Disable preemption through to the following so that it behaves a little more
|
||||
* like an interrupt (otherwise, the following logic gets pre-empted an behaves
|
||||
* oddly.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
if (g_sim_dev.d_len > 0)
|
||||
{
|
||||
/* Data received event. Check for valid Ethernet header with destination == our
|
||||
* MAC address
|
||||
*/
|
||||
|
||||
if (g_sim_dev.d_len > UIP_LLH_LEN && up_comparemac( &BUF->dest, &g_sim_dev.d_mac) == 0)
|
||||
{
|
||||
/* We only accept IP packets of the configured type and ARP packets */
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
if (BUF->type == htons(UIP_ETHTYPE_IP6))
|
||||
#else
|
||||
if (BUF->type == htons(UIP_ETHTYPE_IP))
|
||||
#endif
|
||||
{
|
||||
uip_arp_ipin();
|
||||
uip_input(&g_sim_dev);
|
||||
|
||||
/* If the above function invocation resulted in data that
|
||||
* should be sent out on the network, the global variable
|
||||
* d_len is set to a value > 0.
|
||||
*/
|
||||
|
||||
if (g_sim_dev.d_len > 0)
|
||||
{
|
||||
uip_arp_out(&g_sim_dev);
|
||||
tapdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
|
||||
}
|
||||
}
|
||||
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
|
||||
{
|
||||
uip_arp_arpin(&g_sim_dev);
|
||||
|
||||
/* If the above function invocation resulted in data that
|
||||
* should be sent out on the network, the global variable
|
||||
* d_len is set to a value > 0.
|
||||
*/
|
||||
|
||||
if (g_sim_dev.d_len > 0)
|
||||
{
|
||||
tapdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise, it must be a timeout event */
|
||||
|
||||
else if (timer_expired(&g_periodic_timer))
|
||||
{
|
||||
timer_reset(&g_periodic_timer);
|
||||
uip_poll(&g_sim_dev, sim_uiptxpoll, 1);
|
||||
}
|
||||
sched_unlock();
|
||||
}
|
||||
|
||||
int uipdriver_init(void)
|
||||
{
|
||||
/* Internal initalization */
|
||||
|
||||
timer_set(&g_periodic_timer, 500);
|
||||
tapdev_init();
|
||||
(void)tapdev_getmacaddr(g_sim_dev.d_mac.addr);
|
||||
|
||||
/* Register the device with the OS so that socket IOCTLs can be performed */
|
||||
|
||||
(void)netdev_register(&g_sim_dev);
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* linux */
|
||||
|
||||
@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
|
||||
dbg("Unblocking TCB=%p\n", tcb);
|
||||
sdbg("Unblocking TCB=%p\n", tcb);
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
||||
@@ -124,7 +124,7 @@ void up_unblock_task(_TCB *tcb)
|
||||
*/
|
||||
|
||||
rtcb = (_TCB*)g_readytorun.head;
|
||||
dbg("New Active Task TCB=%p\n", rtcb);
|
||||
sdbg("New Active Task TCB=%p\n", rtcb);
|
||||
|
||||
/* The way that we handle signals in the simulation is kind of
|
||||
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
|
||||
@@ -133,7 +133,7 @@ void up_unblock_task(_TCB *tcb)
|
||||
|
||||
if (rtcb->xcp.sigdeliver)
|
||||
{
|
||||
dbg("Delivering signals TCB=%p\n", rtcb);
|
||||
sdbg("Delivering signals TCB=%p\n", rtcb);
|
||||
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
|
||||
rtcb->xcp.sigdeliver = NULL;
|
||||
}
|
||||
|
||||
@@ -126,6 +126,16 @@ defconfig -- This is a configuration file similar to the Linux
|
||||
that will be used in the build
|
||||
CONFIG_DEBUG - enables built-in debug options
|
||||
CONFIG_DEBUG_VERBOSE - enables verbose debug output
|
||||
CONFIG_DEBUG_SCHED - enable OS debug output (disabled by
|
||||
default)
|
||||
CONFIG_DEBUG_MM - enable memory management debug output
|
||||
(disabld by default)
|
||||
CONFIG_DEBUG_NET - enable network debug output (disabled
|
||||
by default)
|
||||
CONFIG_DEBUG_FS - enable filesystem debug output (disabled
|
||||
by default)
|
||||
CONFIG_DEBUG_LIB - enable C library debug output (disabled
|
||||
by default)
|
||||
CONFIG_HAVE_LOWPUTC - architecture supports low-level, boot
|
||||
time console output
|
||||
CONFIG_MM_REGIONS - If the architecture includes multiple
|
||||
@@ -164,7 +174,8 @@ defconfig -- This is a configuration file similar to the Linux
|
||||
up waiting tasks.
|
||||
|
||||
CONFIG_DISABLE_CLOCK, CONFIG_DISABLE_POSIX_TIMERS, CONFIG_DISABLE_PTHREAD.
|
||||
CONFIG_DISABLE_SIGNALS, CONFIG_DISABLE_MQUEUE, CONFIG_DISABLE_MOUNTPOUNT
|
||||
CONFIG_DISABLE_SIGNALS, CONFIG_DISABLE_MQUEUE, CONFIG_DISABLE_MOUNTPOUNT,
|
||||
CONFIG_DISABLE_ENVIRON
|
||||
|
||||
|
||||
Misc libc settings
|
||||
@@ -207,6 +218,42 @@ defconfig -- This is a configuration file similar to the Linux
|
||||
structures. The system manages a pool of preallocated
|
||||
watchdog structures to minimize dynamic allocations
|
||||
|
||||
TCP/IP and UDP support via uIP
|
||||
CONFIG_NET - Enable or disable all network features
|
||||
CONFIG_NET_IPv6 - Build in support for IPv6
|
||||
CONFIG_NSOCKET_DESCRIPTORS - Maximum number of socket descriptors
|
||||
per task/thread.
|
||||
CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
|
||||
|
||||
CONFIG_NET_BUFSIZE - uIP buffer size
|
||||
CONFIG_NET_TCPURGDATA - Determines if support for TCP urgent data
|
||||
notification should be compiled in. Urgent data (out-of-band data)
|
||||
is a rarely used TCP feature that is very seldom would be required.
|
||||
CONFIG_NET_TCP - TCP support on or off
|
||||
CONFIG_NET_TCP_CONNS - Maximum number of TCP connections (all tasks)
|
||||
CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
|
||||
CONFIG_NET_TCP_READAHEAD_BUFSIZE - Size of TCP read-ahead buffers
|
||||
CONFIG_NET_NTCP_READAHEAD_BUFFERS - Number of TCP read-ahead buffers
|
||||
(may be zero)
|
||||
CONFIG_NET_UDP - UDP support on or off
|
||||
CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
|
||||
CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP
|
||||
connections
|
||||
CONFIG_NET_ICMP - ICMP ping support on or off
|
||||
CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address
|
||||
CONFIG_NET_STATISTICS - uIP statistics on or off
|
||||
CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's
|
||||
window
|
||||
CONFIG_NET_ARPTAB_SIZE - The size of the ARP table
|
||||
CONFIG_NET_BROADCAST - Broadcast support
|
||||
CONFIG_NET_LLH_LEN - The link level header length
|
||||
CONFIG_NET_FWCACHE_SIZE - number of packets to remember when
|
||||
looking for duplicates
|
||||
|
||||
UIP Network Utilities
|
||||
CONFIG_NET_DHCP_LIGHT - Reduces size of DHCP
|
||||
CONFIG_NET_RESOLV_ENTRIES - Number of resolver entries
|
||||
|
||||
Stack and heap information
|
||||
|
||||
CONFIG_BOOT_FROM_FLASH - Some configurations support XIP
|
||||
@@ -231,6 +278,9 @@ configs/sim
|
||||
This port does not support interrupts or a real timer (and hence no
|
||||
round robin scheduler) Otherwise, it is complete.
|
||||
|
||||
NOTE: This target will not run on Cygwin probably for many reasons but
|
||||
first off because it uses some of the same symbols as does cygwind.dll.
|
||||
|
||||
configs/c5471evm
|
||||
This is a port to the Spectrum Digital C5471 evaluation board. The
|
||||
C5471 is a dual core processor from TI with an ARM7TDMI general purpose
|
||||
|
||||
@@ -68,4 +68,9 @@ ifeq ("${CONFIG_DEBUG}","y")
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ CONFIG_DISABLE_PTHREAD=n
|
||||
CONFIG_DISABLE_SIGNALS=n
|
||||
CONFIG_DISABLE_MQUEUE=n
|
||||
CONFIG_DISABLE_MOUNTPOINT=y
|
||||
CONFIG_DISABLE_ENVIRON=y
|
||||
|
||||
#
|
||||
# Misc libc settings
|
||||
@@ -248,6 +249,56 @@ CONFIG_MAX_WDOGPARMS=4
|
||||
CONFIG_PREALLOC_WDOGS=32
|
||||
CONFIG_PREALLOC_TIMERS=8
|
||||
|
||||
#
|
||||
# TCP/IP and UDP support via uIP
|
||||
# CONFIG_NET - Enable or disable all network features
|
||||
# CONFIG_NET_IPv6 - Build in support for IPv6
|
||||
# CONFIG_NSOCKET_DESCRIPTORS - Maximum number of socket descriptors per task/thread.
|
||||
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
|
||||
# CONFIG_NET_BUFSIZE - uIP buffer size
|
||||
# CONFIG_NET_TCP - TCP support on or off
|
||||
# CONFIG_NET_TCP_CONNS - Maximum number of TCP connections (all tasks)
|
||||
# CONFIG_NET_TCP_READAHEAD_BUFSIZE - Size of TCP read-ahead buffers
|
||||
# CONFIG_NET_NTCP_READAHEAD_BUFFERS - Number of TCP read-ahead buffers (may be zero)
|
||||
# CONFIG_NET_MAX_LISTENPORTS - Maximum number of listening TCP ports (all tasks)
|
||||
# CONFIG_NET_UDP - UDP support on or off
|
||||
# CONFIG_NET_UDP_CHECKSUMS - UDP checksums on or off
|
||||
# CONFIG_NET_UDP_CONNS - The maximum amount of concurrent UDP connections
|
||||
# CONFIG_NET_ICMP - ICMP ping support on or off
|
||||
# CONFIG_NET_PINGADDRCONF - Use "ping" packet for setting IP address
|
||||
# CONFIG_NET_STATISTICS - uIP statistics on or off
|
||||
# CONFIG_NET_RECEIVE_WINDOW - The size of the advertised receiver's window
|
||||
# CONFIG_NET_ARPTAB_SIZE - The size of the ARP table
|
||||
# CONFIG_NET_BROADCAST - Broadcast support
|
||||
# CONFIG_NET_LLH_LEN - The link level header length
|
||||
# CONFIG_NET_FWCACHE_SIZE - number of packets to remember when looking for duplicates
|
||||
CONFIG_NET=n
|
||||
CONFIG_NET_IPv6=n
|
||||
CONFIG_NSOCKET_DESCRIPTORS=0
|
||||
CONFIG_NET_SOCKOPTS=y
|
||||
CONFIG_NET_BUFSIZE=420
|
||||
CONFIG_NET_TCP=n
|
||||
CONFIG_NET_TCP_CONNS=40
|
||||
CONFIG_NET_MAX_LISTENPORTS=40
|
||||
CONFIG_NET_UDP=n
|
||||
CONFIG_NET_UDP_CHECKSUMS=y
|
||||
#CONFIG_NET_UDP_CONNS=10
|
||||
CONFIG_NET_ICMP=n
|
||||
#CONFIG_NET_PINGADDRCONF=0
|
||||
CONFIG_NET_STATISTICS=y
|
||||
#CONFIG_NET_RECEIVE_WINDOW=
|
||||
#CONFIG_NET_ARPTAB_SIZE=8
|
||||
CONFIG_NET_BROADCAST=n
|
||||
#CONFIG_NET_LLH_LEN=14
|
||||
#CONFIG_NET_FWCACHE_SIZE=2
|
||||
|
||||
#
|
||||
# UIP Network Utilities
|
||||
# CONFIG_NET_DHCP_LIGHT - Reduces size of DHCP
|
||||
# CONFIG_NET_RESOLV_ENTRIES - Number of resolver entries
|
||||
CONFIG_NET_DHCP_LIGHT=n
|
||||
CONFIG_NET_RESOLV_ENTRIES=4
|
||||
|
||||
#
|
||||
# Stack and heap information
|
||||
#
|
||||
|
||||
@@ -68,4 +68,7 @@ ifeq ("${CONFIG_DEBUG}","y")
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user