mirror of
https://github.com/apache/nuttx.git
synced 2025-12-17 18:25:22 +08:00
Compare commits
457 Commits
nuttx-2.5
...
nuttx-3.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
714c61c361 | ||
|
|
15926d2f9e | ||
|
|
e8339c2aba | ||
|
|
a9b64a7469 | ||
|
|
b5d6002463 | ||
|
|
397ac05b87 | ||
|
|
7b52111997 | ||
|
|
bdf74c42f2 | ||
|
|
be2a62af5a | ||
|
|
ae5cc87281 | ||
|
|
9a18c880a1 | ||
|
|
62d058a834 | ||
|
|
b08da21f90 | ||
|
|
7bbfd7880d | ||
|
|
07475ddcaf | ||
|
|
4daf380c0c | ||
|
|
52ca776537 | ||
|
|
c93316bf89 | ||
|
|
ab876969dd | ||
|
|
536a458525 | ||
|
|
7caf0ae3b6 | ||
|
|
0125c5989f | ||
|
|
ec531944df | ||
|
|
5b5b6af723 | ||
|
|
cc67653244 | ||
|
|
8b84d88550 | ||
|
|
7984beaa4b | ||
|
|
976ff7a822 | ||
|
|
6cf70e0e2a | ||
|
|
71105edc9f | ||
|
|
7b5c4e515b | ||
|
|
8d31154e34 | ||
|
|
bb2a525bac | ||
|
|
990820d579 | ||
|
|
12dea795b3 | ||
|
|
460aa35bb4 | ||
|
|
b1234a6bda | ||
|
|
2dda17684f | ||
|
|
bcc151c414 | ||
|
|
5f80286cc5 | ||
|
|
b1b50a6bad | ||
|
|
dd90e2f273 | ||
|
|
85d947640a | ||
|
|
aae7fd5432 | ||
|
|
aab9267f38 | ||
|
|
4b331938fa | ||
|
|
f8e0254f63 | ||
|
|
c1d789accf | ||
|
|
cbc6fcce57 | ||
|
|
34974400b3 | ||
|
|
491f5b42b5 | ||
|
|
cb4390a8a0 | ||
|
|
da700355ed | ||
|
|
fed8278b13 | ||
|
|
96565fd538 | ||
|
|
e6756626f8 | ||
|
|
cb2cc8c22e | ||
|
|
28366b75d0 | ||
|
|
295a7a1fd5 | ||
|
|
feccbf06e2 | ||
|
|
352eb0fb64 | ||
|
|
daa2610d07 | ||
|
|
e173b3ff73 | ||
|
|
1bada71e80 | ||
|
|
b8b16ad1f0 | ||
|
|
c447d1ff47 | ||
|
|
81f4b8dbf0 | ||
|
|
7629c2c811 | ||
|
|
fb76a5e579 | ||
|
|
98f52d9f61 | ||
|
|
b125ca88c2 | ||
|
|
6ab50706bb | ||
|
|
aace60d986 | ||
|
|
0823879b84 | ||
|
|
c558d34600 | ||
|
|
c90fc3b5e6 | ||
|
|
67a6ec5ddb | ||
|
|
65280ba602 | ||
|
|
f906f80359 | ||
|
|
b3969170d5 | ||
|
|
1ce0745dd8 | ||
|
|
4a157c8855 | ||
|
|
3ee215ef6f | ||
|
|
b41956664f | ||
|
|
a6623735c0 | ||
|
|
a7e1b7b8eb | ||
|
|
9657fa43d8 | ||
|
|
dfcedbcac5 | ||
|
|
cabaa75a43 | ||
|
|
ce8536d51f | ||
|
|
0bfed5e52d | ||
|
|
9a955f0901 | ||
|
|
8d2f18e709 | ||
|
|
ba6cd0d3e2 | ||
|
|
0067b7a08c | ||
|
|
ad2155cd0c | ||
|
|
f0c6f2f44b | ||
|
|
50a54fc544 | ||
|
|
c4b3cf7095 | ||
|
|
efb733dfc4 | ||
|
|
dda4565ed9 | ||
|
|
432da54d46 | ||
|
|
0fca25b777 | ||
|
|
ee5f02dae5 | ||
|
|
9a7c5c29c5 | ||
|
|
54242efbcd | ||
|
|
f90fb7cdbe | ||
|
|
53a99eb382 | ||
|
|
b252be9bb9 | ||
|
|
3c494bbc9a | ||
|
|
669118c68e | ||
|
|
14570ca238 | ||
|
|
2d8db3fabc | ||
|
|
325e4e3833 | ||
|
|
bf2225c26c | ||
|
|
4dd560c5f0 | ||
|
|
b114621101 | ||
|
|
e3bd6172aa | ||
|
|
75253df209 | ||
|
|
d0a0accc99 | ||
|
|
5622797411 | ||
|
|
507914b3b4 | ||
|
|
2ab10a107f | ||
|
|
97a52f1b17 | ||
|
|
039efd6e2b | ||
|
|
7dffca15a1 | ||
|
|
978b0f79ad | ||
|
|
0bd70f78e4 | ||
|
|
28b1b8fdac | ||
|
|
757eff86e8 | ||
|
|
f116c153b9 | ||
|
|
174a9f77c6 | ||
|
|
3fd8bd65f4 | ||
|
|
2f1acf6786 | ||
|
|
09af7cf6ce | ||
|
|
00ad2ca2c4 | ||
|
|
ce1c48f5b6 | ||
|
|
ee8c1a2d58 | ||
|
|
4c564b97dc | ||
|
|
ac37ac75e0 | ||
|
|
1e52a8f36a | ||
|
|
7b3c17b1c1 | ||
|
|
ad8140f162 | ||
|
|
fac0d203bc | ||
|
|
e3035d2dff | ||
|
|
2134001f0f | ||
|
|
aa7ecab89c | ||
|
|
ce50defd4c | ||
|
|
3dc0fee9ba | ||
|
|
94ef1222d8 | ||
|
|
40f92a9da4 | ||
|
|
cb79ddc9a0 | ||
|
|
0a07af9fc7 | ||
|
|
1358cc1911 | ||
|
|
9654e2d4b4 | ||
|
|
c773c4e139 | ||
|
|
59451ae6c0 | ||
|
|
715cc89148 | ||
|
|
4a7a565ef3 | ||
|
|
c55f4a3783 | ||
|
|
89c63fc635 | ||
|
|
675205a5de | ||
|
|
3ae27c3c9e | ||
|
|
8aa92af787 | ||
|
|
46f139066c | ||
|
|
b4557a830a | ||
|
|
37d20db817 | ||
|
|
5db8af3015 | ||
|
|
16aff5292e | ||
|
|
4b07e6ffa4 | ||
|
|
d15ab7811c | ||
|
|
6e5c4b2316 | ||
|
|
4ad0370f60 | ||
|
|
b65bbad338 | ||
|
|
3616465288 | ||
|
|
c4ddb4980f | ||
|
|
948c8bd2d4 | ||
|
|
76d4673969 | ||
|
|
299dc971dd | ||
|
|
62f7d251ae | ||
|
|
e1f5aeaf51 | ||
|
|
fb4253bfb2 | ||
|
|
30984a7eed | ||
|
|
6bf63d8d35 | ||
|
|
ee1d841569 | ||
|
|
bf27d79c0d | ||
|
|
ad12689460 | ||
|
|
dfca90057b | ||
|
|
9291ec957f | ||
|
|
1f115108e6 | ||
|
|
9108a01f1d | ||
|
|
b07eb44e4e | ||
|
|
0d102fa42e | ||
|
|
1b853a92bb | ||
|
|
0dd2134fa8 | ||
|
|
9dbc6e1c2f | ||
|
|
517d951c67 | ||
|
|
8f3ef9954e | ||
|
|
0a32f4d20b | ||
|
|
544a21b80c | ||
|
|
291270beb5 | ||
|
|
af73c158f2 | ||
|
|
d387191f04 | ||
|
|
0e4924079a | ||
|
|
435528e7a0 | ||
|
|
e881da738c | ||
|
|
83f36eac7d | ||
|
|
748bcdbe11 | ||
|
|
e59f302e50 | ||
|
|
817b284a13 | ||
|
|
3dffab3aca | ||
|
|
0156bc785f | ||
|
|
32c3e79ece | ||
|
|
03d8c867cf | ||
|
|
3f1c7dc771 | ||
|
|
c691f1db9d | ||
|
|
d8b91b19e5 | ||
|
|
8216d763a6 | ||
|
|
131931c877 | ||
|
|
71f2d3d25d | ||
|
|
11e06742c2 | ||
|
|
eda24c6c3a | ||
|
|
c5a589f25b | ||
|
|
7a9bfd3ccb | ||
|
|
93dd5f44cb | ||
|
|
f14e8056ce | ||
|
|
1fd8bd11af | ||
|
|
dc5142224c | ||
|
|
662d64f8e0 | ||
|
|
731e425116 | ||
|
|
d586fa633b | ||
|
|
eda17b05f7 | ||
|
|
7202b1b19d | ||
|
|
d54f596884 | ||
|
|
424eae4cfb | ||
|
|
db57264e1f | ||
|
|
d9080fb256 | ||
|
|
c2c6b55515 | ||
|
|
b6f43e7144 | ||
|
|
ab44069b4b | ||
|
|
c690cf8df5 | ||
|
|
8403a62cdf | ||
|
|
f038ce79e9 | ||
|
|
821975f7bd | ||
|
|
c61ade4480 | ||
|
|
772ad744e0 | ||
|
|
c2f88659b5 | ||
|
|
b516dfa9b6 | ||
|
|
62062f5873 | ||
|
|
36c2c9800f | ||
|
|
0a98dad76d | ||
|
|
e5cb54d8d5 | ||
|
|
b1ac023250 | ||
|
|
98c638416d | ||
|
|
932463210f | ||
|
|
26a0534734 | ||
|
|
48a5b245df | ||
|
|
28b8f4a2e6 | ||
|
|
cd2decaedb | ||
|
|
bacff222e1 | ||
|
|
e0bee0e36b | ||
|
|
8027ff2a0e | ||
|
|
0800757e00 | ||
|
|
a9a9fb489e | ||
|
|
23e67efbbd | ||
|
|
ea50c50b47 | ||
|
|
8ff7a809b4 | ||
|
|
84ff909d06 | ||
|
|
15c9ab962a | ||
|
|
4bd249117a | ||
|
|
69303fea5f | ||
|
|
a13244eeaf | ||
|
|
32b30abf8f | ||
|
|
1a98fe8a63 | ||
|
|
f09cdabc0d | ||
|
|
977d4d8779 | ||
|
|
47b3a226af | ||
|
|
a932e62067 | ||
|
|
cba8fa9596 | ||
|
|
98f35925e5 | ||
|
|
3988e65c46 | ||
|
|
1557e9befc | ||
|
|
13505c52fc | ||
|
|
c3b6c26c1b | ||
|
|
5efd8589a7 | ||
|
|
55358e04c8 | ||
|
|
3e64d53637 | ||
|
|
4c54d7d07e | ||
|
|
929a52b3e0 | ||
|
|
fedadd3064 | ||
|
|
c3669a3104 | ||
|
|
4ca632d1e6 | ||
|
|
3dc55ecc72 | ||
|
|
6f89e7df29 | ||
|
|
5fe8b2974d | ||
|
|
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 | ||
|
|
1479e0d35d | ||
|
|
7ac971d7ee | ||
|
|
bece513004 | ||
|
|
40513d77ab | ||
|
|
9ab11697a8 | ||
|
|
aca030153f | ||
|
|
da19e798e6 | ||
|
|
79457a04ab | ||
|
|
cfdfa7b3c9 | ||
|
|
a48fe435f8 | ||
|
|
c574123ca4 | ||
|
|
637618e8bb | ||
|
|
a54e55c432 | ||
|
|
5abe9f896c | ||
|
|
826ae7f951 | ||
|
|
c3ed839a4e | ||
|
|
4a18d1f253 | ||
|
|
f1170204c5 | ||
|
|
cf935803a0 | ||
|
|
9dd25d7965 | ||
|
|
5bdefbb8a0 | ||
|
|
3f5d4be4a9 | ||
|
|
a0153a1ed2 | ||
|
|
0c8bb6aac5 | ||
|
|
1d82a44d73 | ||
|
|
955bf72f06 | ||
|
|
49e73e6d62 | ||
|
|
84e1cf94cf | ||
|
|
48b2897974 | ||
|
|
0528705d81 | ||
|
|
2a7e55b1fc | ||
|
|
f0634f5588 | ||
|
|
d7b254d2e6 | ||
|
|
0cb1595215 |
232
ChangeLog
232
ChangeLog
@@ -138,7 +138,235 @@
|
||||
* Added fsync()
|
||||
* Added strspn() and strcspn()
|
||||
|
||||
0.2.6 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
0.2.6 2007-05-26 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Started m68322
|
||||
* Added unlink(), mkdir(), rmdir(), and rename()
|
||||
* Fixed several serious FAT errors with oflags handling (&& instead of &)
|
||||
* Added FAT support for unlink(), mkdir(), rmdir(), and rename
|
||||
* Added FAT support for opendir(), closedir(), readdir(), seekdir(),
|
||||
telldir(), rewindir().
|
||||
* Fixed ARM compilation errors introduced in 0.2.5 (that is what I get
|
||||
for only testing on the simulation).
|
||||
|
||||
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
|
||||
* Added fat_getattrib() and fat_setattrib()
|
||||
* Added statfs() to fs layer and to FAT
|
||||
* Correct file name extension in tools/zipme.sh
|
||||
* Fix error in dependencies in 8051/2 Makefile
|
||||
* sched/Makefile: Don't build sleep() or usleep() if signals are disabled
|
||||
* sched/sched_setparam.c: Remove redundant disabling of interrupts
|
||||
* sched/usleep.c: Fixed nsec calculation
|
||||
* lib/lib_strcspn.c: Function incorrectly named strspn().
|
||||
* examples/ostest/main.c: Errors in SDCC version of a memcpy() call
|
||||
* examples/ostest/sighand.c: Don't call fflush() if streams are disabled
|
||||
* include/limits.h, include/time.h, sched/clock_internal.h: A support for
|
||||
using selectable system timer frequency.
|
||||
* Fixed error in mountpoint related conditional compilation introduced
|
||||
in 0.2.5
|
||||
* 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 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: 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-12-10 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added and partially verified DHCP server logic (netutils/dhcpd)
|
||||
* Fix BROADCAST=y compilation problems
|
||||
* Fix UDP recvfrom timeout bug
|
||||
* Correct processing of input UDP broadcast packets.
|
||||
* Verfied basic DHCP client functionality (netutils/dhcpc)
|
||||
* Implemented send() timeout logic
|
||||
* Added and verifed a TELNETD front end to NSH (examples/nsh)
|
||||
* Add a skeleton Ethernet device driver (drivers/net/skeleton.c)
|
||||
* Added C5471 Ethernet device driver (arch/arm/src/c5471/c5471_ethernet.c)
|
||||
* Found and fixed several problems in uIP when compiled for ARM with optimization.
|
||||
|
||||
0.3.5 2007-12-18 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added inet_ntoa() and ether_ntoa()
|
||||
* Added netdev_foreach() to support traversal of registered network devices
|
||||
* Added support for 'ifconfig' command to NSH (examples/nsh)
|
||||
* Moved MAC and ethernet definitions to net/ethernet.h
|
||||
* Fix sim and DM90x0 compilation errors introduced in 0.3.4
|
||||
* Fixed errors in C5471 configuration files for examples/uip
|
||||
* Modified DHCPC (netutils/dhcpc) so that it should work in environments where
|
||||
there are more than one DHCPD server.
|
||||
* NSH ifconfig command now shows uIP status was well (examples/nsh)
|
||||
|
||||
0.3.6 2008-01-06 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Changes for use with SDCC compiler
|
||||
* Added a simulated z80 target
|
||||
* Fix deadlock errors when using stdio but with no buffering
|
||||
* Add support for Pascal P-Code interpreter
|
||||
|
||||
0.3.6.1 2008-01-07 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* The initial 0.3.6 release including an error that prevented
|
||||
building successfully if the Pascal add-on was
|
||||
was not present.
|
||||
|
||||
0.3.7 2008-01-31 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added support for the Zilog Z16F using the Zilog Z16F2800100ZCOG
|
||||
Development Kit.
|
||||
* Add support toolchains that do not support making of dependencies
|
||||
* Fix Cygwin build with spaces in directory names
|
||||
* Name make system changes to deal with non-GNU toolchains (i.e., Zilog)
|
||||
* Add support for Windows native toolchains that cannot follow Cygwin soft links
|
||||
* Modified serial driver interface to handle hardware with non-16550A-like
|
||||
interrupt architecture (like the Z16F)
|
||||
* Added a "dumb" serial console driver to simplify OS bringup
|
||||
* Corrected a bug that caused the errno value of one task to be clobbered
|
||||
when a different task exits. Effects all architectures.
|
||||
|
||||
0.3.8 2008-02-10 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Added a test case to verify the Pascal P-Code interpreter
|
||||
* Added /dev/zero
|
||||
* 'errno' is now defined to be *get_errno_ptr() with no name conflicts
|
||||
* Added lseek() and fseek()
|
||||
* Integrated Pascal interpreter test case on the simulation platform. Needs
|
||||
pascal-0.1.1.
|
||||
* Add Pascal test case on the z16f platform. Needs pascal-0.1.2 (does not
|
||||
yet work due to some tool issues).
|
||||
* C buffered I/O fixes:
|
||||
- Fix fflush() return value,
|
||||
- Add correct fflush behavior when the FILE argument is null.
|
||||
- Add logic to a correctly handle read/write access on the same FILE
|
||||
- fseek() flushes read/write data when before moving the file pointer
|
||||
- When read data is flushed, reposition the file pointer to account for
|
||||
buffered, but unread data
|
||||
* Pascal P-Code files are now standardized to big-endian for portability
|
||||
* Fix a build problem with z80 and SDCC 2.7.0 (format of a map file changed)
|
||||
(see bug 1887170)
|
||||
* Pascal P-Code runtime now compiles with the SDCC toolchain.
|
||||
* Added a generic CAN driver. This driver is untested as of this writing.
|
||||
* Corrected DM320 UART configuration problem
|
||||
|
||||
0.3.9 2008-03-09 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Began adding support for the ZiLOG Z8Encore! microcontroller for the Z8Encore000ZCO
|
||||
development board and the Z8F6403 part.
|
||||
* Fix broken 'clean' target on z80sim configurations
|
||||
* Re-structure arch/z80 to provide support for all ZiLOG 8-bit microcontrollers (ez8
|
||||
in particular for now).
|
||||
* Add support for TRS80-Model 3 based on the xtrs emulation (http://www.tim-mann.org/xtrs.html)
|
||||
Per patch from Jacques Pelletier.
|
||||
* In all shell scripts, change #!/bin/sh to #!/bin/bash to resolve problems in
|
||||
Ubuntu where /bin/sh is a link to dash.
|
||||
* Z8Encore! port verified on ZDS-II instruction set/chip simulator.
|
||||
|
||||
0.3.10 2008-05-15 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add support for the ZiLOG EZ80Acclaim microcontrooler (EZ80F91 chip).
|
||||
* Add configuration for the ZiLOG z8f64200100kit development kit, Z8F6423 part.
|
||||
* Add configuration for the ZiLOG ez80f0910200kitg development kit, EZ80F091 part.
|
||||
* Correct critical list handling errors in task shutdown logic: One in timer
|
||||
deletion logic (timer_delete.c) and one in stream logic (lib_init.c) reported
|
||||
by kwonsk.
|
||||
|
||||
0.3.11 2008-06-01 Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* Add support for recursive mutexes.
|
||||
* Eliminate a memory leak -- contained watchdog instance was not being
|
||||
deleted with a POSIX timer was deleted reported by kwonsk.
|
||||
* Eliminate a deadlock condition in opendir() reported by kwonsk.
|
||||
* Fix several FAT filesystem problems reported by kwonsk (Changes not yet
|
||||
verified).
|
||||
* Host simulator no longer uses Linux system calls directly; Now works with Cygwin.
|
||||
* Fix an error that occurs when a POSIX timer is deleted by the timer signal handler.
|
||||
* Add logic to allow the examples/ostest to be run repetitively as an endurance test.
|
||||
* Add a ramdisk block driver
|
||||
|
||||
0.3.12 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="210">
|
||||
<a href="freeports.html" target="_blank">
|
||||
<img src="freeports.gif" width="210" height="62" border="0"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
Documentation/freeports.gif
Normal file
BIN
Documentation/freeports.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
20
Documentation/freeports.html
Normal file
20
Documentation/freeports.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Free NuttX Ports</title>
|
||||
</head>
|
||||
<body background="backgd.gif">
|
||||
<center>
|
||||
<table border="1" width="80%" bgcolor="#eeeeee">
|
||||
<tr><td>
|
||||
<big><b><i>Free</i> Ports</b></big>.
|
||||
If you have a hardware platform that you would like to see NuttX ported to then have I got a deal for you:
|
||||
I am willing to port NuttX to run on your hardware <b><i>FREE</i></b>.
|
||||
You would, of course, have to provide all hardware, development tools, and documentation.
|
||||
The functionality would be limited to basic boot-up, serial console, networking, ...
|
||||
I would need to retain the hardware throught the support cycle.
|
||||
Of course, this offer depends the availability of free time to do the port.
|
||||
If you are interested, contact <a href="http://sourceforge.net/users/patacongo/">patacongo</a> at SourceForge.
|
||||
</td></tr></table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
196
Makefile
196
Makefile
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
############################################################################
|
||||
# Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
@@ -31,23 +31,88 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
TOPDIR = ${shell pwd}
|
||||
TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'}
|
||||
-include ${TOPDIR}/.config
|
||||
-include ${TOPDIR}/Make.defs
|
||||
|
||||
# Default tools
|
||||
|
||||
ifeq ($(DIRLINK),)
|
||||
DIRLINK = $(TOPDIR)/tools/link.sh
|
||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||
endif
|
||||
|
||||
# Process architecture and board-specific directories
|
||||
|
||||
ARCH_DIR = arch/$(CONFIG_ARCH)
|
||||
ARCH_SRC = $(ARCH_DIR)/src
|
||||
ARCH_INC = $(ARCH_DIR)/include
|
||||
BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
|
||||
|
||||
SUBDIRS = sched lib $(ARCH_SRC) mm fs drivers examples/$(CONFIG_EXAMPLE)
|
||||
# Add-on directories. These may or may not be in place in the
|
||||
# NuttX source tree (they must be specifically installed)
|
||||
|
||||
PCODE_DIR := ${shell if [ -r pcode/Makefile ]; then echo "pcode"; fi}
|
||||
|
||||
# FSDIRS depend on file descriptor support; NONFSDIRS do not
|
||||
# (except for parts of FSDIRS). We will exclude FSDIRS
|
||||
# from the build if file descriptor support is disabled
|
||||
|
||||
NONFSDIRS = sched lib $(ARCH_SRC) mm examples/$(CONFIG_EXAMPLE) $(PCODE_DIR)
|
||||
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)
|
||||
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
|
||||
MAKEDIRS += fs
|
||||
endif
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
MAKEDIRS += drivers
|
||||
endif
|
||||
else
|
||||
MAKEDIRS += $(FSDIRS)
|
||||
endif
|
||||
|
||||
# LINKLIBS is the list of NuttX libraries that is passed to the
|
||||
# processor-specific Makefile to build the final target.
|
||||
# Libraries in FSDIRS are excluded if file descriptor support
|
||||
# is disabled.
|
||||
|
||||
LINKLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT) mm/libmm$(LIBEXT) \
|
||||
fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT) lib/liblib$(LIBEXT) \
|
||||
examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
lib/liblib$(LIBEXT) examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(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
|
||||
|
||||
ifneq ($(PCODE_DIR),)
|
||||
LINKLIBS += pcode/libpcode$(LIBEXT)
|
||||
endif
|
||||
|
||||
# This is the name of the final target
|
||||
BIN = nuttx$(EXEEXT)
|
||||
|
||||
all: $(BIN)
|
||||
@@ -55,7 +120,7 @@ all: $(BIN)
|
||||
|
||||
# Build the mkconfig tool used to create include/nuttx/config.h
|
||||
tools/mkconfig:
|
||||
$(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) mkconfig
|
||||
@$(MAKE) -C tools -f Makefile.mkconfig TOPDIR="$(TOPDIR)" mkconfig
|
||||
|
||||
# Create the include/nuttx/config.h file
|
||||
include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
|
||||
@@ -63,79 +128,39 @@ include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
|
||||
|
||||
# link the arch/<arch-name>/include dir to include/arch
|
||||
include/arch: Make.defs
|
||||
@if [ -h include/arch ]; then \
|
||||
rm -f include/arch ; \
|
||||
else \
|
||||
if [ -e include/arch ]; then \
|
||||
echo "include/arch exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(TOPDIR)/$(ARCH_DIR)/include include/arch
|
||||
@$(DIRLINK) $(TOPDIR)/$(ARCH_DIR)/include include/arch
|
||||
|
||||
# Link the configs/<board-name>/include dir to include/arch/board
|
||||
include/arch/board: Make.defs include/arch
|
||||
@if [ -h include/arch/board ]; then \
|
||||
rm -f include/arch/board ; \
|
||||
else \
|
||||
if [ -e include/arch/board ]; then \
|
||||
echo "include/arch/board exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
|
||||
include/arch/board: include/arch Make.defs include/arch
|
||||
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
|
||||
|
||||
# Link the configs/<board-name>/src dir to arch/<arch-name>/src/board
|
||||
$(ARCH_SRC)/board: Make.defs
|
||||
@if [ -h $(ARCH_SRC)/board ]; then \
|
||||
rm -f $(ARCH_SRC)/board ; \
|
||||
else \
|
||||
if [ -e $(ARCH_SRC)/board ]; then \
|
||||
echo "$(ARCH_SRC)/board exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
|
||||
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
|
||||
|
||||
# Link arch/<arch-name>/include/<chip-name> to arch/<arch-name>/include/chip
|
||||
$(ARCH_SRC)/chip: Make.defs
|
||||
ifneq ($(CONFIG_ARCH_CHIP),)
|
||||
@if [ -h $(ARCH_SRC)/chip ]; then \
|
||||
rm -f $(ARCH_SRC)/chip ; \
|
||||
else \
|
||||
if [ -e $(ARCH_SRC)/chip ]; then \
|
||||
echo "$(ARCH_SRC)/chip exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
|
||||
@$(DIRLINK) $(TOPDIR)/$(ARCH_SRC)/$(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
|
||||
endif
|
||||
|
||||
# Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip
|
||||
$(ARCH_INC)/chip: Make.defs
|
||||
include/arch/chip: include/arch Make.defs
|
||||
ifneq ($(CONFIG_ARCH_CHIP),)
|
||||
@if [ -e $(ARCH_INC)/chip ]; then \
|
||||
if [ -h $(ARCH_INC)/chip ]; then \
|
||||
rm -f $(ARCH_INC)/chip ; \
|
||||
else \
|
||||
echo "$(ARCH_INC)/chip exists but is not a symbolic link" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
fi
|
||||
@ln -s $(CONFIG_ARCH_CHIP) $(ARCH_INC)/chip
|
||||
@$(DIRLINK) $(TOPDIR)/$(ARCH_INC)/$(CONFIG_ARCH_CHIP) include/arch/chip
|
||||
endif
|
||||
|
||||
dirlinks: include/arch include/arch/board $(ARCH_SRC)/board $(ARCH_SRC)/chip $(ARCH_INC)/chip
|
||||
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip
|
||||
|
||||
context: check_context include/nuttx/config.h dirlinks
|
||||
|
||||
clean_context:
|
||||
@rm -f include/nuttx/config.h include/arch
|
||||
@if [ -h include/arch ]; then rm -f include/arch ; fi
|
||||
@if [ -h $(ARCH_INC)/board ]; then rm -f $(ARCH_INC)/board ; fi
|
||||
@if [ -h $(ARCH_SRC)/board ]; then rm -f $(ARCH_SRC)/board ; fi
|
||||
@if [ -h $(ARCH_INC)/chip ]; then rm -f $(ARCH_INC)/chip ; fi
|
||||
@if [ -h $(ARCH_SRC)/chip ]; then rm -f $(ARCH_SRC)/chip ; fi
|
||||
@rm -f include/nuttx/config.h
|
||||
@$(DIRUNLINK) include/arch/board
|
||||
@$(DIRUNLINK) include/arch/chip
|
||||
@$(DIRUNLINK) include/arch
|
||||
@$(DIRUNLINK) $(ARCH_SRC)/board
|
||||
@$(DIRUNLINK) $(ARCH_SRC)/chip
|
||||
|
||||
check_context:
|
||||
@if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \
|
||||
@@ -145,54 +170,63 @@ check_context:
|
||||
fi
|
||||
|
||||
sched/libsched$(LIBEXT): context
|
||||
$(MAKE) -C sched TOPDIR=$(TOPDIR) libsched$(LIBEXT)
|
||||
@$(MAKE) -C sched TOPDIR="$(TOPDIR)" libsched$(LIBEXT)
|
||||
|
||||
lib/liblib$(LIBEXT): context
|
||||
$(MAKE) -C lib TOPDIR=$(TOPDIR) liblib$(LIBEXT)
|
||||
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
|
||||
|
||||
$(ARCH_SRC)/libarch$(LIBEXT): context
|
||||
$(MAKE) -C $(ARCH_SRC) TOPDIR=$(TOPDIR) libarch$(LIBEXT)
|
||||
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
|
||||
|
||||
mm/libmm$(LIBEXT): context
|
||||
$(MAKE) -C mm TOPDIR=$(TOPDIR) libmm$(LIBEXT)
|
||||
@$(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT)
|
||||
|
||||
net/libnet$(LIBEXT): context
|
||||
@$(MAKE) -C net TOPDIR="$(TOPDIR)" libnet$(LIBEXT)
|
||||
|
||||
netutils/libnetutils$(LIBEXT): context
|
||||
@$(MAKE) -C netutils TOPDIR="$(TOPDIR)" libnetutils$(LIBEXT)
|
||||
|
||||
fs/libfs$(LIBEXT): context
|
||||
$(MAKE) -C fs TOPDIR=$(TOPDIR) libfs$(LIBEXT)
|
||||
@$(MAKE) -C fs TOPDIR="$(TOPDIR)" libfs$(LIBEXT)
|
||||
|
||||
drivers/libdrivers$(LIBEXT): context
|
||||
$(MAKE) -C drivers TOPDIR=$(TOPDIR) libdrivers$(LIBEXT)
|
||||
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT)
|
||||
|
||||
pcode/libpcode$(LIBEXT): context
|
||||
@$(MAKE) -C pcode TOPDIR="$(TOPDIR)" libpcode$(LIBEXT)
|
||||
|
||||
examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT): context
|
||||
$(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR=$(TOPDIR) lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
@$(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR="$(TOPDIR)" lib$(CONFIG_EXAMPLE)$(LIBEXT)
|
||||
|
||||
$(BIN): context depend $(LINKLIBS)
|
||||
$(MAKE) -C $(ARCH_SRC) TOPDIR=$(TOPDIR) LINKLIBS="$(LINKLIBS)" $(BIN)
|
||||
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" LINKLIBS="$(LINKLIBS)" $(BIN)
|
||||
|
||||
depend:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) depend ; \
|
||||
@for dir in $(MAKEDIRS) ; do \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
|
||||
done
|
||||
|
||||
subdir_clean:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
@for dir in $(CLEANDIRS) ; do \
|
||||
if [ -e $$dir/Makefile ]; then \
|
||||
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) clean ; \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean ; \
|
||||
fi \
|
||||
done
|
||||
$(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) clean
|
||||
$(MAKE) -C mm -f Makefile.test TOPDIR=$(TOPDIR) clean
|
||||
@$(MAKE) -C tools -f Makefile.mkconfig TOPDIR="$(TOPDIR)" clean
|
||||
@$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
|
||||
|
||||
clean: subdir_clean
|
||||
rm -f $(BIN) $(BIN).* mm_test *.map *~
|
||||
@rm -f $(BIN) $(BIN).* mm_test *.map *~
|
||||
|
||||
subdir_distclean:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
@for dir in $(CLEANDIRS) ; do \
|
||||
if [ -e $$dir/Makefile ]; then \
|
||||
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) distclean ; \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" distclean ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
distclean: clean subdir_distclean clean_context
|
||||
rm -f Make.defs setenv.sh .config
|
||||
@rm -f Make.defs setenv.sh .config
|
||||
|
||||
|
||||
|
||||
472
ReleaseNotes
472
ReleaseNotes
@@ -1,18 +1,476 @@
|
||||
nuttx-0.1.0
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the initial. This initial includes the complete NuttX RTOS
|
||||
with support for the Linux user mode simulation and the TI TMS320C5471
|
||||
(Arm7) processor. Partial support for the 87C52 is included.
|
||||
|
||||
This release has been verified on both the Linux user-mode and C5471
|
||||
platforms using the test program under examples/ostest. Test results
|
||||
for the C5471 can be found in arch/c5471/doc/test-results.txt.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 9,2007.
|
||||
|
||||
nuttx-0.1.1
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the second release of NuttX. This release includes the following.
|
||||
See the ChangeLog for more detailed description of the changes.
|
||||
|
||||
(1) General OS bugfixes (see the ChangeLog for details),
|
||||
(2) bugfixes for the TI TMS320C5471 (Arm7) platform (see
|
||||
the ChangeLog)
|
||||
(3) Complete support for the 87C52. (However, the 87C52
|
||||
release is not stable enough for general usage).
|
||||
(4) Added the beginning of a shell call NuttShell (nsh)
|
||||
|
||||
This release has been verified on the Linux user-mode platform, the
|
||||
Spectrum Digital TMS320C5471 EVM, and the PJRC 87C52 development board
|
||||
using the test program under examples/ostest.
|
||||
|
||||
STATUS: The development status remains as ALPHA until further testing
|
||||
is performed.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 14, 2007.
|
||||
|
||||
nuttx-0.1.2
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the third release of NuttX. This release is
|
||||
primarily a bugfix release with minimal new features. See
|
||||
the ChangeLog for a more detailed description of the
|
||||
changes.
|
||||
|
||||
(1) Several important OS and ARM7 bugfixes,
|
||||
(2) opendir(), closedir(), readdir(), etc. added
|
||||
(3) Added C5471 watchdog timer.
|
||||
(4) Created a shareable, serial driver.
|
||||
(5) Added 'ls' command to NuttShell (nsh)
|
||||
(6) Added a test of the round robin scheduler
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform, the Spectrum Digital TMS320C5471 EVM using the
|
||||
test program under examples/ostest.
|
||||
|
||||
This tarball contains a CVS snapshot from March 19, 2007.
|
||||
|
||||
nuttx-0.2.1
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the fourth relese of NuttX. This release adds adds
|
||||
support for a new platform, restructures many header files,
|
||||
and adds a few new features:
|
||||
|
||||
(1) Support for Neuros OSD / DM320
|
||||
(2) Restructuring of header files for better POSIX compliance
|
||||
(3) Added kill()
|
||||
(4) Added POSIX timers
|
||||
(5) bugfixes and documentation updates
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform, the Spectrum Digital TMS320C5471 EVM, and the
|
||||
Neuros OSD using the test program under examples/ostest. Because
|
||||
of the stability of these tests, the project status
|
||||
has been upgraded to 'beta.'
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 22, 2007.
|
||||
|
||||
nuttx-0.2.2
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the fifth release of NuttX. There is no major new
|
||||
functionality in this release. This release adds support
|
||||
for new pthread barrier APIs, changes the directory
|
||||
structure, to better handle different board configurations
|
||||
using the same processor architecture, and corrects a few
|
||||
defects.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform and the Neuros OSD using the test program under
|
||||
examples/ostest. There are no known, critical defects but
|
||||
the project development status remains at 'beta' status
|
||||
pending further test and evaluation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from
|
||||
March 26, 2007.
|
||||
|
||||
nuttx-0.2.3
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the sixth release of NuttX. This release is
|
||||
primarily a bugfix release. Numerous problems were fixed
|
||||
as detailedin the change log. New functionality includes
|
||||
support for timed message queues.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified on the Linux user-mode
|
||||
platform and the Neuros OSD using the test program under
|
||||
examples/ostest. The results of the testing is available in
|
||||
the source tree under configs/ntosd-dm320/doc/test-results.
|
||||
There are no known, critical defects but the project
|
||||
development status remains at 'beta' status pending further
|
||||
test and evaluation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 29,
|
||||
2007.
|
||||
|
||||
nuttx-0.2.4
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 7th release of NuttX. This release is only to roll out
|
||||
build changes to better support different SoC's that use the same
|
||||
processor architecture. In particular, the two existing ARM architectures,
|
||||
c5471 and DM320 were combined into a single ARM directory. This was done
|
||||
in preparation for an LPC2148 port that is currently in progress. There
|
||||
is NO new functionality or significant bufixes in this release.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified on the Linux user-mode platform
|
||||
and the Neuros OSD using the test program under examples/ostest.
|
||||
The results of the testing is available in the source tree under
|
||||
configs/ntosd-dm320/doc/test-results and under configs/sim/doc/test-results.
|
||||
There are no known, critical defects but the project development status
|
||||
remains at 'beta' status pending further test and evaluation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from April 28, 2007.
|
||||
|
||||
nuttx-0.2.5
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 8th release of NuttX. This release includes:
|
||||
|
||||
(1) Several bug fixes
|
||||
(2) Initial support for FAT filesystems. Testing has not been
|
||||
exhaustive and some functionality is missing (mkdir, stat, unlink
|
||||
chmod, and rename functionality is not yet implemented).
|
||||
(3) Support for the NXP lpc2148 processor is included but is
|
||||
untested as of this writing. The current implementation includes
|
||||
only support for serial console and timer interrupt.
|
||||
(2) Initial support for FAT filesystems. Testing has not
|
||||
been exhaustive and some functionality is missing
|
||||
(mkdir, stat, unlink chmod, and rename functionality is
|
||||
not yet implemented).
|
||||
(3) Support for the NXP lpc2148 processor is included but
|
||||
is untested as of this writing. The current
|
||||
implementation includes only support for serial console
|
||||
and timer interrupt.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode
|
||||
platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from May 19,
|
||||
2007.
|
||||
|
||||
nuttx-0.2.6
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 9th release of NuttX. This is primarily a
|
||||
bugfix release to correct a number of problems introduced
|
||||
with the 0.2.5 release. This release does include some FAT
|
||||
filesystem extensions including unlink(), mkdir(), rmdir(),
|
||||
rename(), opendir(), closedir(), readdir(), seekdir(),
|
||||
telldir(), rewindir(). There are some pending FAT changes
|
||||
that did not make it into this release including stat(),
|
||||
truncate(), and long file names.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode
|
||||
platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from May 26,
|
||||
2007.
|
||||
|
||||
nuttx-0.2.7
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 10th release of NuttX. This is primarily a bugfix releaseto correct a
|
||||
number of problems reported to me (thanks Didier!). This release does include the
|
||||
final changes complete the FAT filesystem logic including stat(), tatfs(), and non-
|
||||
standard APIs to manage FAT
|
||||
attributes. At present,FAT long file names and file trunction() are still not
|
||||
supported.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from May 19, 2007.
|
||||
This tarball contains a complete CVS snapshot from June 9, 2007.
|
||||
|
||||
nuttx-0.2.8
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 11th release of NuttX. This release (1) corrects important bugs
|
||||
in opendir and realloc, (2) adds support for environment variables, (3) adds
|
||||
several new C library interfaces, and (4) extends several example programs.
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Linux user-mode platform.
|
||||
|
||||
This tarball contains a complete CVS snapshot from July 2, 2007.
|
||||
|
||||
nuttx-0.3.0
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 12th release of NuttX. This release includes the initial
|
||||
integration of a network subsystem and the uIP TCP/IP stack into NuttX
|
||||
(see http://www.sics.se/~adam/uip/index.php/Main_Page). Also included
|
||||
is a device driver for the Davicom DM90x0 ethernet controller.
|
||||
|
||||
This integration is very preliminary. Only a small portion of the
|
||||
network functionality has been integrated and there are a number of
|
||||
open issues (see the TODO file). The network subsystem is pre-alpha
|
||||
at this point in time. I expect that it will stabilize and mature
|
||||
over the next few releases.
|
||||
|
||||
The baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta (as long as the network is not used).
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 6, 2007.
|
||||
|
||||
nuttx-0.3.1
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 13th release of NuttX and the second release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
Many network-related problems have been fixed and the implementation
|
||||
has matured significantly. However, the level of network reliability
|
||||
is probably still at the pre-alpha or early level. It is sufficiently
|
||||
complete that you may begin to perform some network integration and
|
||||
is exepcted to achieve beta level of reliability over the next few
|
||||
releases.
|
||||
|
||||
The baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta (as long as the network is not used).
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 19, 2007.
|
||||
|
||||
nuttx-0.3.2
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 14th release of NuttX and the 3rd release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
Many network-related problems have been fixed and the implementation
|
||||
has matured significantly. This release consists of:
|
||||
|
||||
o TCP-related bug-fixes
|
||||
o TCP performance improvements
|
||||
o Initial UDP integration
|
||||
o Initial uIP micro webserver integration
|
||||
|
||||
See the ChangeLog for a complete list of changes.
|
||||
|
||||
The level of network reliability is at alpha level is expected to
|
||||
achieve beta level of reliability over the next few releases.
|
||||
|
||||
The baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 23, 2007.
|
||||
|
||||
nuttx-0.3.3
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 15th release of NuttX and the 4th release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
Many network-related problems have been fixed and the implementation
|
||||
has matured significantly. This release consists of:
|
||||
|
||||
o TCP-related bug-fixes for disconnecting sockets
|
||||
o Correction of some TCP read-ahead logic
|
||||
o TCP performance improvements
|
||||
o Misc. additions and cleanup (See the ChangeLog for a complete list of
|
||||
changes).
|
||||
|
||||
The level of network reliability is at an early beta release level. The
|
||||
baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta. Open network-related issues include only:
|
||||
|
||||
o Some minor unimplemented BSD socket functionality,
|
||||
o Thread safety issues: the same socket cannot be used concurrently on
|
||||
different threads.
|
||||
o Pending design changes necessary to support multiple network interfaces.
|
||||
o IPv6 support is incomplete.
|
||||
|
||||
This release has been verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 driver. Any feedback for improving the network
|
||||
reliability/performance would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 28, 2007.
|
||||
|
||||
nuttx-0.3.4
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 16th release of NuttX and the 5th release containing
|
||||
the integration of a network subsystem and the uIP TCP/IP, UDP, and
|
||||
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
|
||||
|
||||
This release is primarily a bug-fix release. New features include
|
||||
only:
|
||||
|
||||
o TELNET front-end to NSH,
|
||||
o DHCPC server functionality, and
|
||||
o C5471 Ethernet driver.
|
||||
|
||||
Numerous network related problems were fixed related to DHCPC, UDP
|
||||
input processing, UDP broadcast, send timeouts, and bad compilation when
|
||||
uIP is compiled at high levels of optimization.
|
||||
|
||||
The level of network reliability is at a strong beta release level. The
|
||||
baseline functionality of NuttX continues to mature and remains at
|
||||
post-beta or production level.
|
||||
|
||||
Parts of this release were verified only on the Neuros OSD (DM320 ARM9)
|
||||
platform using the DM90x0 Ethernet driver and other parts on the Spectrum
|
||||
Digital C5471 EVM using the C5471 Ethernet driver. Any feedback about bugs
|
||||
or suggestions for improving the network reliability/performance would be
|
||||
greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from December 10, 2007.
|
||||
|
||||
nuttx-0.3.5
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 17th release of NuttX this release is primarily a bug-fix
|
||||
release and intended to synchronize with the current CVS contents. See
|
||||
the ChangeLog for a detailed list of changes and fixes.
|
||||
|
||||
This release were verified only on the Spectrum Digital C5471 EVM using
|
||||
the C5471 Ethernet driver. Any feedback about bugs or suggestions for
|
||||
improvement would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from December 18, 2007.
|
||||
|
||||
nuttx-0.3.6
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 18th release of NuttX. This release contains on a few
|
||||
changes. The primary purpose of this release is to synchronize with
|
||||
the release of the pascal-0.1.0 add-on package.
|
||||
|
||||
This release of NuttX includes the following changes:
|
||||
|
||||
* Fixes for use with SDCC compiler
|
||||
* Added a simulated z80 target (arch/z80)
|
||||
* Fix deadlock errors when using stdio but with no buffering
|
||||
* Add support for the add-on Pascal P-Code interpreter (pcode/)
|
||||
(see the pascal-0.1.0 package)
|
||||
|
||||
This release were verified only on the simulated Z80 and and host
|
||||
simulation targets. As usual, any feedback about bugs or suggestions
|
||||
for improvement would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from January 6, 2007.
|
||||
|
||||
====
|
||||
|
||||
There was an error in the initial 0.3.6 release that prevented
|
||||
a successful build unless the Pascal add-on was present. The
|
||||
tarball was patched to include the fix. Make sure that you download
|
||||
the nuttx-0.3.6.1.tar.gz version to avoid this problem.
|
||||
|
||||
nuttx-0.3.7
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 19th release of NuttX. This release includes the
|
||||
preliminary port of NuttX to the ZiLOG z16f 16-bit microcontroller.
|
||||
This port was verified using the ZiLOG z16f2800100zcog Development
|
||||
and the ZiLOG ZDS-II toolchain. See http://www.zilog.com for
|
||||
further information.
|
||||
|
||||
I emphasize that this is a preliminary release of the z16f port and
|
||||
is only alpha or, perhaps, pre-alpha quality as of this writing.
|
||||
There are a list of known issues in the TODO file in the root of
|
||||
the NuttX directory. The overall quality of NuttX (excluding the
|
||||
z16f port) continues to improve beyond the late beta level.
|
||||
|
||||
The z16f port required numerous changes to NuttX to handle:
|
||||
|
||||
* NEAR and FAR addressing, and
|
||||
* Use of a Windows native toolchain in a Cygwin build environment.
|
||||
|
||||
In addition to the z16f port, at least one very critical bug was
|
||||
found and corrected in NuttX: The thread-specific errno value of one
|
||||
task was being randomly trashed when a different thread exitted.
|
||||
|
||||
This release were verified on the ZiLOG z16f2800100zcog, Neuros OSD
|
||||
(ARM9), and the simulation platforms. As usual, any feedback about bugs
|
||||
or suggestions for improvement would be greatly appreciated.
|
||||
|
||||
This tarball contains a complete CVS snapshot from January 31, 2008.
|
||||
|
||||
nuttx-0.3.8
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 20th release of NuttX. This is a minor bugfix release.
|
||||
It corrects a few minor problems, adds a few minor features, and
|
||||
continues the integration of the ZiLOG Z18F and of the Pascal P-Code
|
||||
add-on. This release is synchronized with the release of Pascal-0.1.2.
|
||||
|
||||
This tarball contains a complete CVS snapshot from February 10, 2008.
|
||||
|
||||
nuttx-0.3.9
|
||||
^^^^^^^^^^^
|
||||
|
||||
This is the 21st release of NuttX. This is a minor future enhancement
|
||||
release. This release includes support for the ZiLOG Z8Encore! micro-
|
||||
controller. Also included is the initial framework for support for
|
||||
the Z80, XTRS platform (http://www.tim-mann.org/xtrs.html).
|
||||
|
||||
This released has been verified only on the ZiLOG ZDS-II Z8Encore!
|
||||
chip simulation.
|
||||
|
||||
This tarball contains a complete CVS snapshot from March 9, 2008.
|
||||
|
||||
nuttx-0.3.10
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 22nd release of NuttX. This is an important bug fix release.
|
||||
This release incorporates fixes to correct critical list handling errors
|
||||
in task shutdown logic: One in timer deletion logic (timer_delete.c) and one
|
||||
in stream logic (lib_init.c). This release also includes support to ZiLOG EZ80Acclaim
|
||||
microcontrooler (EZ80F91 chip) and configurations fot the ZiLOG z8f64200100kit (Z8F6423)
|
||||
and ez80f0910200kitg (EZ80F091) development kit.
|
||||
|
||||
nuttx=0.3.11
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 23rd release of NuttX. This is another important bugfix release.
|
||||
This releases fixes several bugs:
|
||||
|
||||
* Two POSIX timer bugs: a memory leak as well a fatal sequencing error.
|
||||
* Several FAT filesystem errors.
|
||||
* A deadlock that can occur in opendir()
|
||||
|
||||
A few new features were also added:
|
||||
|
||||
* Support for recursive mutexes
|
||||
* Added a RAM disk block driver
|
||||
* The host simulator no longer uses direct Linux system calls and now also works on Cygwin.
|
||||
* The OS test was strengthen and now runs as an endurance test
|
||||
|
||||
These changes were verified only on the Host simulator under Cygwin. Please report
|
||||
any errors to me.
|
||||
|
||||
This tarball contains a complete CVS snapshot from June 1, 2008.
|
||||
|
||||
|
||||
@@ -123,13 +123,13 @@ src/Makefile
|
||||
Supported Architectures
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
arch/sim
|
||||
arch/sim - Linux simulation
|
||||
A user-mode port of NuttX to the x86 Linux platform is available.
|
||||
The purpose of this port is primarily to support OS feature developement.
|
||||
The purpose of this port is primarily to support OS feature development.
|
||||
This port does not support interrupts or a real timer (and hence no
|
||||
round robin scheduler) Otherwise, it is complete.
|
||||
|
||||
arch/arm
|
||||
arch/arm - ARM-based micro-controllers
|
||||
This directory holds common ARM architectures. At present, this includes
|
||||
the following subdirectories:
|
||||
|
||||
@@ -156,12 +156,40 @@ arch/m68322
|
||||
A work in progress.
|
||||
STATUS: Stalled for the moment.
|
||||
|
||||
arch/pjrc-8051
|
||||
arch/pjrc-8051 - 8051/52 microcontrollers
|
||||
8051 Microcontroller. This port is not quite ready for prime time.
|
||||
|
||||
arch/z16 - ZiLOG 16-bit processors
|
||||
This directory holds related, 16-bit architectures from ZiLOG. At
|
||||
present, this includes the following subdirectories:
|
||||
|
||||
arch/z16/include and arch/z16/common
|
||||
Common microcontroller logic.
|
||||
|
||||
arch/z16/include/z16f and arch/z16/src/z16f
|
||||
ZiLOG z16f Microcontroller.
|
||||
STATUS: Released in nuttx-0.3.7. Fully functional other than issues
|
||||
addressed in ${TOPDIR}/TODO.
|
||||
|
||||
arch/z80 - ZiLOG 8-bit microcontrollers
|
||||
This directory holds related, 8-bit architectures from ZiLOG. At
|
||||
present, this includes the following subdirectories:
|
||||
|
||||
arch/z80/include and arch/z80/common
|
||||
Common microcontroller logic.
|
||||
|
||||
arch/z80/include/z80 and arch/z80/src/z80
|
||||
Classic ZiLOG z80 Microcontroller.
|
||||
STATUS: Functional with no known defects. There are still several
|
||||
OS features that have not yet been tested (e.g., networking).
|
||||
|
||||
arch/z80/include/z8 and arch/z80/src/z8
|
||||
ZiLOG Z8Encore! Microcontroller
|
||||
This is a work in progress.
|
||||
|
||||
The following architecture directories are deprecated. They have been
|
||||
replaced by the logic in arm/arm and will deleted when arch/arm is fully
|
||||
verified.
|
||||
replaced by the logic in arm/arm and will deleted at some point in the
|
||||
future.
|
||||
|
||||
arch/c5471
|
||||
Replaced with arch/arm/include/c5471 and arch/arm/src/c5471
|
||||
|
||||
@@ -77,4 +77,3 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARCH_H */
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
* Included Files
|
||||
************************************************************/
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/chip/irq.h>
|
||||
|
||||
/************************************************************
|
||||
@@ -133,7 +134,9 @@ struct xcptcontext
|
||||
* are pending signals to be processed.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
void *sigdeliver; /* Actual type is sig_deliver_t */
|
||||
#endif
|
||||
|
||||
/* These are saved copies of LR and CPSR used during
|
||||
* signal processing.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# Makefile
|
||||
# arch/arm/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
@@ -36,7 +36,6 @@
|
||||
-include $(TOPDIR)/Make.defs
|
||||
-include chip/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(TOPDIR)/sched
|
||||
|
||||
@@ -67,22 +66,22 @@ VPATH = chip:common
|
||||
all: $(HEAD_OBJ) libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
|
||||
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %$(OBJEXT): %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT):
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) libboard$(LIBEXT)
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
|
||||
@echo "LD: nuttx"
|
||||
@$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
@$(NM) $(TOPDIR)/$@ | \
|
||||
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
|
||||
@@ -101,23 +100,23 @@ endif
|
||||
|
||||
.depend: Makefile chip/Make.defs $(SRCS)
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
|
||||
fi
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
|
||||
fi
|
||||
@rm -f libarch$(LIBEXT) *~
|
||||
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
|
||||
fi
|
||||
@rm -f Make.dep .depend
|
||||
|
||||
|
||||
@@ -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_udelay.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 \
|
||||
@@ -45,4 +45,5 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
|
||||
up_undefinedinsn.c up_usestack.c
|
||||
|
||||
CHIP_ASRCS = c5471_lowputc.S c5471_vectors.S
|
||||
CHIP_CSRCS = c5471_irq.c c5471_serial.c c5471_timerisr.c c5471_watchdog.c
|
||||
CHIP_CSRCS = c5471_irq.c c5471_serial.c c5471_timerisr.c c5471_watchdog.c \
|
||||
c5471_ethernet.c
|
||||
|
||||
2147
arch/arm/src/c5471/c5471_ethernet.c
Normal file
2147
arch/arm/src/c5471/c5471_ethernet.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* c5471/chip.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
@@ -31,20 +31,61 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __C5471_CHIP_H
|
||||
#define __C5471_CHIP_H
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* UARTs ****************************************************/
|
||||
#define EIM_RAM_START 0xffd00000
|
||||
|
||||
/* Ethernet Interface Module (EIM) ******************************************/
|
||||
|
||||
#define EIM_CTRL 0xffff0000 /* ESM control register */
|
||||
#define EIM_STATUS 0xffff0004 /* ESM status register */
|
||||
#define EIM_CPU_TXBA 0xffff0008 /* CPU TX descriptors base address */
|
||||
#define EIM_CPU_RXBA 0xffff000c /* CPU RX descriptors base address */
|
||||
#define EIM_BUFSIZE 0xffff0010 /* Packet buffer size register */
|
||||
#define EIM_CPU_FILTER 0xffff0014 /* CPU filtering contol registers */
|
||||
#define EIM_CPU_DAHI 0xffff0018 /* CPU destination address (HI) */
|
||||
#define EIM_CPU_DALO 0xffff001c /* CPU destination address (LO) */
|
||||
#define EIM_MFVHI 0xffff0020 /* Multicast filter valid (HI) */
|
||||
#define EIM_MFVLO 0xffff0024 /* Multicast filter valid (LO) */
|
||||
#define EIM_MFMHI 0xffff0028 /* Multicast filter mask (HI) */
|
||||
#define EIM_MFMLO 0xffff002c /* Multicast filter mask (LO) */
|
||||
#define EIM_RXTH 0xffff0030 /* RX threshold register */
|
||||
#define EIM_CPU_RXREADY 0xffff0034 /* CPU RX ready register */
|
||||
#define EIM_INTEN 0xffff0038 /* ESM interrupt enable register */
|
||||
#define EIM_ENET0_TXDESC 0xffff0040 /* ENET0 TX Queue pointer */
|
||||
#define EIM_ENET0_RXDESC 0xffff0044 /* ENET0 RX Queue pointer */
|
||||
#define EIM_CPU_TXDESC 0xffff0050 /* CPU TX Queue pointer */
|
||||
#define EIM_CPU_RXDESC 0xffff0054 /* CPU RX Queue pointer */
|
||||
|
||||
#define ENET0_MODE 0xffff0100 /* Mode register */
|
||||
#define ENET0_BOFFSEED 0xffff0104 /* Backoff seed register */
|
||||
#define ENET0_BCOUNT 0xffff0108 /* Backoff count register */
|
||||
#define ENET0_FLWPAUSE 0xffff010c /* TX flow pause count register */
|
||||
#define ENET0_FLWCONTROL 0xffff0110 /* Flow control register */
|
||||
#define ENET0_VTYPE 0xffff0114 /* VTYPE tag register */
|
||||
#define ENET0_SEISR 0xffff0118 /* System error int status register */
|
||||
#define ENET0_TXBUFRDY 0xffff011c /* TX descripter buffer ready */
|
||||
#define ENET0_TDBA 0xffff0120 /* TX descriptor base address */
|
||||
#define ENET0_RDBA 0xffff0124 /* RX descriptor base address */
|
||||
#define ENET0_PARHI 0xffff0128 /* Dest phys address match (HI) */
|
||||
#define ENET0_PARLO 0xffff012c /* Dest phys address match (LO) */
|
||||
#define ENET0_LARHI 0xffff0130 /* Log address hash filter (HI) */
|
||||
#define ENET0_LARLO 0xffff0134 /* Log address hash filter (LO) */
|
||||
#define ENET0_ADRMODE_EN 0xffff0138 /* Address mode enable register */
|
||||
#define ENET0_DRP 0xffff013c /* Desc ring poll interval count */
|
||||
|
||||
/* UARTs ********************************************************************/
|
||||
|
||||
#define UART_IRDA_BASE 0xffff0800
|
||||
#define UART_MODEM_BASE 0xffff1000
|
||||
@@ -110,7 +151,7 @@
|
||||
#define UART_MODEM_RDPTR_UTX 0xffff1064 /* TX FIFO Read Pointer Register */
|
||||
#define UART_MODEM_WRPTR_UTX 0xffff1068 /* TX FIFO Write Pointer Register */
|
||||
|
||||
/* UART Settings ********************************************/
|
||||
/* UART Settings ************************************************************/
|
||||
|
||||
/* Miscellaneous UART settings. */
|
||||
|
||||
@@ -164,13 +205,13 @@
|
||||
#define MDR_AUTOBAUDING_MODE 0x00000002 /* Modem UART only */
|
||||
#define MDR_RESET_MODE 0x00000007 /* Both IrDA and Modem UARTs */
|
||||
|
||||
/* SPI ******************************************************/
|
||||
/* SPI **********************************************************************/
|
||||
|
||||
#define MAX_SPI 3
|
||||
|
||||
#define SPI_REGISTER_BASE 0xffff2000
|
||||
|
||||
/* GIO ******************************************************/
|
||||
/* GIO **********************************************************************/
|
||||
|
||||
#define MAX_GIO (35)
|
||||
|
||||
@@ -211,7 +252,7 @@
|
||||
#define KBGPIO_EN 0xffff2914 /* Selects register for muxed
|
||||
* KBGPIOs */
|
||||
|
||||
/* Timers ***************************************************/
|
||||
/* Timers *******************************************************************/
|
||||
|
||||
#define C5471_TIMER0_CTRL 0xffff2a00
|
||||
#define C5471_TIMER0_CNT 0xffff2a04
|
||||
@@ -241,8 +282,8 @@
|
||||
#define ILR_IRQ3_REG 0xffff2d28 /* 3-GPIO0 */
|
||||
#define ILR_IRQ4_REG 0xffff2d2c /* 4-Ethernet */
|
||||
#define ILR_IRQ5_REG 0xffff2d30 /* 5-KBGPIO[7:0] */
|
||||
#define ILR_IRQ6_REG 0xffff2d34 /* 6-Uart serial */
|
||||
#define ILR_IRQ7_REG 0xffff2d38 /* 7-Uart IRDA */
|
||||
#define ILR_IRQ6_REG 0xffff2d34 /* 6-Uart serial */
|
||||
#define ILR_IRQ7_REG 0xffff2d38 /* 7-Uart IRDA */
|
||||
#define ILR_IRQ8_REG 0xffff2d3c /* 8-KBGPIO[15:8] */
|
||||
#define ILR_IRQ9_REG 0xffff2d40 /* 9-GPIO3 */
|
||||
#define ILR_IRQ10_REG 0xffff2d44 /* 10-GPIO2 */
|
||||
@@ -252,11 +293,22 @@
|
||||
#define ILR_IRQ14_REG 0xffff2d54 /* 14-GPIO[19:4] */
|
||||
#define ILR_IRQ15_REG 0xffff2d58 /* 15-API */
|
||||
|
||||
/* I2C ******************************************************/
|
||||
/* CLKM *********************************************************************/
|
||||
|
||||
#define CLKM 0xffff2f00
|
||||
#define CLKM_CTL_RST 0xffff2f10
|
||||
#define CLKM_RESET 0xffff2f18
|
||||
|
||||
#define CLKM_RESET_EIM 0x00000008
|
||||
#define CLKM_EIM_CLK_STOP 0x00000010
|
||||
#define CLKM_CTL_RST_LEAD_RESET 0x00000000
|
||||
#define CLKM_CTL_RST_EXT_RESET 0x00000002
|
||||
|
||||
/* I2C **********************************************************************/
|
||||
|
||||
#define MAX_I2C 1
|
||||
|
||||
/* API ******************************************************/
|
||||
/* API **********************************************************************/
|
||||
|
||||
#define DSPRAM_BASE 0xffe00000 /* DSPRAM base address */
|
||||
#define DSPRAM_END 0xffe03fff
|
||||
@@ -308,12 +360,12 @@
|
||||
#define DSPMEM_ARM_TO_DSP(addr) \
|
||||
((((__u32)(addr) - DSPMEM_ARM_START) >> 1) + DSPMEM_DSP_START)
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __C5471_CHIP_H */
|
||||
|
||||
@@ -84,7 +84,7 @@ static inline void putreg16(uint16 val, unsigned int addr)
|
||||
|
||||
/* Most DM320 registers are 16-bits wide */
|
||||
|
||||
#define getreg(a) getreg16(1)
|
||||
#define getreg(a) getreg16(a)
|
||||
#define putreg(v,a) putreg16(v,a)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* common/up_assert.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -31,25 +31,29 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
* debug is not selected.
|
||||
@@ -60,17 +64,17 @@
|
||||
# define lldbg lib_lowprintf
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_getsp
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* I don't know if the builtin to get SP is enabled */
|
||||
|
||||
@@ -85,9 +89,9 @@ static inline uint32 up_getsp(void)
|
||||
return sp;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_stackdump
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_stackdump(void)
|
||||
@@ -148,9 +152,9 @@ static void up_stackdump(void)
|
||||
# define up_stackdump()
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _up_assert
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
||||
{
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -175,13 +179,13 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_assert
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_assert(const ubyte *filename, int lineno)
|
||||
{
|
||||
@@ -201,9 +205,9 @@ void up_assert(const ubyte *filename, int lineno)
|
||||
_up_assert(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_assert_code
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_assert_code(const ubyte *filename, int lineno, int errorcode)
|
||||
{
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* common/up_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -49,34 +49,38 @@
|
||||
#include <nuttx/fs.h>
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _up_dumponexit
|
||||
*
|
||||
* Description:
|
||||
* Dump the state of all tasks whenever on task exits. This
|
||||
* is debug instrumentation that was added to check file-
|
||||
* related reference counting but could be useful again
|
||||
* sometime in the future.
|
||||
* Dump the state of all tasks whenever on task exits. This is debug
|
||||
* instrumentation that was added to check file-related reference counting
|
||||
* but could be useful again sometime in the future.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
{
|
||||
#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 +96,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",
|
||||
@@ -103,31 +109,38 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
struct file_struct *filep = &tcb->streams->sl_streams[i];
|
||||
if (filep->fs_filedes >= 0)
|
||||
{
|
||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
dbg(" fd=%d nbytes=%d\n",
|
||||
filep->fs_filedes,
|
||||
filep->fs_bufpos - filep->fs_bufstart);
|
||||
#else
|
||||
dbg(" fd=%d\n", filep->fs_filedes);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
_TCB* tcb;
|
||||
|
||||
/* Disable interrupts. They will be restored when the next
|
||||
* task is started.
|
||||
@@ -138,41 +151,13 @@ void _exit(int status)
|
||||
lldbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
dbg("Other tasks:\n");
|
||||
lldbg("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -284,7 +284,7 @@ __start:
|
||||
#endif
|
||||
/* Perform early serial initialization */
|
||||
|
||||
#ifdef CONFIG_DEV_CONSOLE
|
||||
#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
|
||||
bl up_earlyserialinit
|
||||
#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);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* common/up_internal.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -31,41 +31,41 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __UP_INTERNAL_H
|
||||
#define __UP_INTERNAL_H
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Bring-up debug configurations. These are here (vs defconfig)
|
||||
* because these should only be controlled during low level
|
||||
* board bring-up and not part of normal platform configuration.
|
||||
*/
|
||||
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
|
||||
#define CONFIG_DUMP_ON_EXIT 1 /* Dump task state on exit */
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
typedef void (*up_vector_t)(void);
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* This holds a references to the current interrupt level
|
||||
@@ -84,14 +84,14 @@ extern uint32 *current_regs;
|
||||
extern uint32 g_heapbase;
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,10 +104,13 @@ __start:
|
||||
blt 1b
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS >0
|
||||
/* Perform early serial initialization */
|
||||
|
||||
mov fp, #0
|
||||
bl up_earlyserialinit
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
mov r0, #'C'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* common/up_sigdeliver.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -47,23 +47,23 @@
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: up_sigdeliver
|
||||
*
|
||||
* Description:
|
||||
@@ -72,10 +72,11 @@
|
||||
* with and forced to branch to this location with interrupts
|
||||
* disabled.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void up_sigdeliver(void)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
uint32 regs[XCPTCONTEXT_REGS];
|
||||
sig_deliver_t sigdeliver;
|
||||
@@ -85,7 +86,7 @@ void up_sigdeliver(void)
|
||||
* the correct errno value (probably EINTR).
|
||||
*/
|
||||
|
||||
int saved_errno = rtcb->errno;
|
||||
int saved_errno = rtcb->pterrno;
|
||||
|
||||
up_ledon(LED_SIGNAL);
|
||||
|
||||
@@ -124,7 +125,7 @@ void up_sigdeliver(void)
|
||||
*/
|
||||
|
||||
dbg("Resuming\n");
|
||||
rtcb->errno = saved_errno;
|
||||
rtcb->pterrno = saved_errno;
|
||||
|
||||
/* Then restore the correct state for this thread of
|
||||
* execution.
|
||||
@@ -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--;
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include "os_internal.h"
|
||||
#include "clock_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/************************************************************
|
||||
@@ -90,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);
|
||||
@@ -101,7 +100,7 @@ void up_unblock_task(_TCB *tcb)
|
||||
*/
|
||||
|
||||
#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
|
||||
@@ -129,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 */
|
||||
|
||||
@@ -150,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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -70,24 +70,28 @@
|
||||
#define UART_DTRR_DTR_MASK 0x00ff /* Data transmit/receive */
|
||||
|
||||
/* UART BRSR register bit definitions */
|
||||
/* The UART clock is half of the ARM clock */
|
||||
/* The UART module is clocked by either the AHB clock or PLLIN / 16 */
|
||||
|
||||
#define UART_CLK (DM320_ARM_CLOCK / 2)
|
||||
#ifdef CONFIG_DM320_UARTPPLIN
|
||||
# define UART_REFCLK (27000000 / 16)
|
||||
#else
|
||||
# define UART_REFCLK (DM320_AHB_CLOCK / 16)
|
||||
#endif
|
||||
|
||||
/* And baud rate = UART_CLK / 16 / (VALUE+1) */
|
||||
/* And baud = UART_REFCLK / (brsr+1) */
|
||||
|
||||
#define UART_BAUD_2400 ((uint16)(((UART_CLK / 16) / 2400 ) - 1))
|
||||
#define UART_BAUD_4800 ((uint16)(((UART_CLK / 16) / 4800 ) - 1))
|
||||
#define UART_BAUD_9600 ((uint16)(((UART_CLK / 16) / 9600 ) - 1))
|
||||
#define UART_BAUD_14400 ((uint16)(((UART_CLK / 16) / 14400 ) - 1))
|
||||
#define UART_BAUD_19200 ((uint16)(((UART_CLK / 16) / 19200 ) - 1))
|
||||
#define UART_BAUD_28800 ((uint16)(((UART_CLK / 16) / 28800 ) - 1))
|
||||
#define UART_BAUD_38400 ((uint16)(((UART_CLK / 16) / 38400 ) - 1))
|
||||
#define UART_BAUD_57600 ((uint16)(((UART_CLK / 16) / 57600 ) - 1))
|
||||
#define UART_BAUD_115200 ((uint16)(((UART_CLK / 16) / 115200) - 1))
|
||||
#define UART_BAUD_230400 ((uint16)(((UART_CLK / 16) / 230400) - 1))
|
||||
#define UART_BAUD_460800 ((uint16)(((UART_CLK / 16) / 460800) - 1))
|
||||
#define UART_BAUD_921600 ((uint16)(((UART_CLK / 16) / 921600) - 1))
|
||||
#define UART_BAUD_2400 ((uint16)((UART_REFCLK / 2400 ) - 1))
|
||||
#define UART_BAUD_4800 ((uint16)((UART_REFCLK / 4800 ) - 1))
|
||||
#define UART_BAUD_9600 ((uint16)((UART_REFCLK / 9600 ) - 1))
|
||||
#define UART_BAUD_14400 ((uint16)((UART_REFCLK / 14400 ) - 1))
|
||||
#define UART_BAUD_19200 ((uint16)((UART_REFCLK / 19200 ) - 1))
|
||||
#define UART_BAUD_28800 ((uint16)((UART_REFCLK / 28800 ) - 1))
|
||||
#define UART_BAUD_38400 ((uint16)((UART_REFCLK / 38400 ) - 1))
|
||||
#define UART_BAUD_57600 ((uint16)((UART_REFCLK / 57600 ) - 1))
|
||||
#define UART_BAUD_115200 ((uint16)((UART_REFCLK / 115200) - 1))
|
||||
#define UART_BAUD_230400 ((uint16)((UART_REFCLK / 230400) - 1))
|
||||
#define UART_BAUD_460800 ((uint16)((UART_REFCLK / 460800) - 1))
|
||||
#define UART_BAUD_921600 ((uint16)((UART_REFCLK / 921600) - 1))
|
||||
|
||||
/* UART MSR register bit definitions */
|
||||
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**************************************************************************
|
||||
* lpc214x/lpc214X_lowputc.S
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -92,7 +92,7 @@
|
||||
# error "No CONFIG_UARTn_PARITY Setting"
|
||||
#endif
|
||||
|
||||
#ifdef LPC214X_UART_2STOP != 0
|
||||
#if LPC214X_UART_2STOP != 0
|
||||
# define LPC214X_LCR_STOP LPC214X_LCR_STOP_2
|
||||
#else
|
||||
# define LPC214X_LCR_STOP LPC214X_LCR_STOP_1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* lpc214x/lpc214x_serial.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -82,15 +82,17 @@ struct up_dev_s
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev);
|
||||
static void up_shutdown(struct uart_dev_s *dev);
|
||||
static int up_attach(struct uart_dev_s *dev);
|
||||
static void up_detach(struct uart_dev_s *dev);
|
||||
static int up_interrupt(int irq, void *context);
|
||||
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
|
||||
static int up_receive(struct uart_dev_s *dev, uint32 *status);
|
||||
static void up_rxint(struct uart_dev_s *dev, boolean enable);
|
||||
static boolean up_rxfifonotempty(struct uart_dev_s *dev);
|
||||
static boolean up_rxavailable(struct uart_dev_s *dev);
|
||||
static void up_send(struct uart_dev_s *dev, int ch);
|
||||
static void up_txint(struct uart_dev_s *dev, boolean enable);
|
||||
static boolean up_txfifonotfull(struct uart_dev_s *dev);
|
||||
static boolean up_txfifoempty(struct uart_dev_s *dev);
|
||||
static boolean up_txready(struct uart_dev_s *dev);
|
||||
static boolean up_txempty(struct uart_dev_s *dev);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
@@ -100,15 +102,16 @@ struct uart_ops_s g_uart_ops =
|
||||
{
|
||||
.setup = up_setup,
|
||||
.shutdown = up_shutdown,
|
||||
.handler = up_interrupt,
|
||||
.attach = up_attach,
|
||||
.detach = up_detach,
|
||||
.ioctl = up_ioctl,
|
||||
.receive = up_receive,
|
||||
.rxint = up_rxint,
|
||||
.rxfifonotempty = up_rxfifonotempty,
|
||||
.rxavailable = up_rxavailable,
|
||||
.send = up_send,
|
||||
.txint = up_txint,
|
||||
.txfifonotfull = up_txfifonotfull,
|
||||
.txfifoempty = up_txfifoempty,
|
||||
.txready = up_txready,
|
||||
.txempty = up_txempty,
|
||||
};
|
||||
|
||||
/* I/O buffers */
|
||||
@@ -124,6 +127,7 @@ static struct up_dev_s g_uart0priv =
|
||||
{
|
||||
.uartbase = LPC214X_UART0_BASE,
|
||||
.baud = CONFIG_UART0_BAUD,
|
||||
.irq = LPC214X_UART0_IRQ,
|
||||
.parity = CONFIG_UART0_PARITY,
|
||||
.bits = CONFIG_UART0_BITS,
|
||||
.stopbits2 = CONFIG_UART0_2STOP,
|
||||
@@ -131,7 +135,6 @@ static struct up_dev_s g_uart0priv =
|
||||
|
||||
static uart_dev_t g_uart0port =
|
||||
{
|
||||
.irq = LPC214X_UART0_IRQ,
|
||||
.recv =
|
||||
{
|
||||
.size = CONFIG_UART0_RXBUFSIZE,
|
||||
@@ -152,6 +155,7 @@ static struct up_dev_s g_uart1priv =
|
||||
{
|
||||
.uartbase = LPC214X_UART1_BASE,
|
||||
.baud = CONFIG_UART1_BAUD,
|
||||
.irq = LPC214X_UART1_IRQ,
|
||||
.parity = CONFIG_UART1_PARITY,
|
||||
.bits = CONFIG_UART1_BITS,
|
||||
.stopbits2 = CONFIG_UART1_2STOP,
|
||||
@@ -159,7 +163,6 @@ static struct up_dev_s g_uart1priv =
|
||||
|
||||
static uart_dev_t g_uart1port =
|
||||
{
|
||||
.irq = LPC214X_UART1_IRQ,
|
||||
.recv =
|
||||
{
|
||||
.size = CONFIG_UART1_RXBUFSIZE,
|
||||
@@ -234,10 +237,10 @@ static inline void up_restoreuartint(struct up_dev_s *priv, ubyte ier)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_waittxfifonotfull
|
||||
* Name: up_waittxready
|
||||
****************************************************************************/
|
||||
|
||||
static inline void up_waittxfifonotfull(struct up_dev_s *priv)
|
||||
static inline void up_waittxready(struct up_dev_s *priv)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
@@ -283,7 +286,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, boolean enable)
|
||||
|
||||
static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
#ifdef CONFIG_SUPPRESS_LPC214X_UART_CONFIG
|
||||
#ifndef CONFIG_SUPPRESS_LPC214X_UART_CONFIG
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
uint16 baud;
|
||||
ubyte lcr;
|
||||
@@ -299,11 +302,11 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
/* Set up the IER */
|
||||
|
||||
priv->ier = up_serialin(priv, LPC214X_UART_IER_OFFSET);
|
||||
|
||||
|
||||
/* Set up the LCR */
|
||||
|
||||
|
||||
lcr = 0;
|
||||
|
||||
|
||||
if (priv->bits == 7)
|
||||
{
|
||||
lcr |= LPC214X_LCR_CHAR_7;
|
||||
@@ -317,7 +320,7 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
{
|
||||
lcr |= LPC214X_LCR_STOP_2;
|
||||
}
|
||||
|
||||
|
||||
if (priv->parity == 1)
|
||||
{
|
||||
lcr |= LPC214X_LCR_PAR_ODD;
|
||||
@@ -328,15 +331,15 @@ static int up_setup(struct uart_dev_s *dev)
|
||||
}
|
||||
|
||||
/* Enter DLAB=1 */
|
||||
|
||||
|
||||
up_serialout(priv, LPC214X_UART_LCR_OFFSET, (lcr | LPC214X_LCR_DLAB_ENABLE));
|
||||
|
||||
|
||||
/* Set the BAUD divisor */
|
||||
|
||||
baud = UART_BAUD(priv->baud);
|
||||
up_serialout(priv, LPC214X_UART_DLM_OFFSET, baud >> 8);
|
||||
up_serialout(priv, LPC214X_UART_DLL_OFFSET, baud & 0xff);
|
||||
|
||||
|
||||
/* Clear DLAB */
|
||||
|
||||
up_serialout(priv, LPC214X_UART_LCR_OFFSET, lcr);
|
||||
@@ -359,6 +362,57 @@ static void up_shutdown(struct uart_dev_s *dev)
|
||||
up_disableuartint(priv, NULL);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_attach
|
||||
*
|
||||
* Description:
|
||||
* Configure the UART to operation in interrupt driven mode. This method is
|
||||
* called when the serial port is opened. Normally, this is just after the
|
||||
* the setup() method is called, however, the serial console may operate in
|
||||
* a non-interrupt driven mode during the boot phase.
|
||||
*
|
||||
* RX and TX interrupts are not enabled when by the attach method (unless the
|
||||
* hardware supports multiple levels of interrupt enabling). The RX and TX
|
||||
* interrupts are not enabled until the txint() and rxint() methods are called.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int up_attach(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
int ret;
|
||||
|
||||
/* Attach and enable the IRQ */
|
||||
|
||||
ret = irq_attach(priv->irq, up_interrupt);
|
||||
if (ret == OK)
|
||||
{
|
||||
/* Enable the interrupt (RX and TX interrupts are still disabled
|
||||
* in the UART
|
||||
*/
|
||||
|
||||
up_enable_irq(priv->irq);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_detach
|
||||
*
|
||||
* Description:
|
||||
* Detach UART interrupts. This method is called when the serial port is
|
||||
* closed normally just before the shutdown method is called. The exception is
|
||||
* the serial console which is never shutdown.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void up_detach(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
up_disable_irq(priv->irq);
|
||||
irq_detach(priv->irq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_interrupt
|
||||
*
|
||||
@@ -379,11 +433,11 @@ static int up_interrupt(int irq, void *context)
|
||||
ubyte status;
|
||||
int passes;
|
||||
|
||||
if (g_uart1port.irq == irq)
|
||||
if (g_uart1priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart1port;
|
||||
}
|
||||
else if (g_uart0port.irq == irq)
|
||||
else if (g_uart0priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart0port;
|
||||
}
|
||||
@@ -548,14 +602,14 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_rxfifonotempty
|
||||
* Name: up_rxavailable
|
||||
*
|
||||
* Description:
|
||||
* Return TRUE if the receive fifo is not empty
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static boolean up_rxfifonotempty(struct uart_dev_s *dev)
|
||||
static boolean up_rxavailable(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_RDR) != 0);
|
||||
@@ -600,28 +654,28 @@ static void up_txint(struct uart_dev_s *dev, boolean enable)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_txfifonotfull
|
||||
* Name: up_txready
|
||||
*
|
||||
* Description:
|
||||
* Return TRUE if the tranmsit fifo is not full
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static boolean up_txfifonotfull(struct uart_dev_s *dev)
|
||||
static boolean up_txready(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_THRE) != 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_txfifoempty
|
||||
* Name: up_txempty
|
||||
*
|
||||
* Description:
|
||||
* Return TRUE if the transmit fifo is empty
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static boolean up_txfifoempty(struct uart_dev_s *dev)
|
||||
static boolean up_txempty(struct uart_dev_s *dev)
|
||||
{
|
||||
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
|
||||
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_THRE) != 0);
|
||||
@@ -692,7 +746,7 @@ int up_putc(int ch)
|
||||
ubyte ier;
|
||||
|
||||
up_disableuartint(priv, &ier);
|
||||
up_waittxfifonotfull(priv);
|
||||
up_waittxready(priv);
|
||||
up_serialout(priv, LPC214X_UART_THR_OFFSET, (ubyte)ch);
|
||||
|
||||
/* Check for LF */
|
||||
@@ -701,11 +755,11 @@ int up_putc(int ch)
|
||||
{
|
||||
/* Add CR */
|
||||
|
||||
up_waittxfifonotfull(priv);
|
||||
up_waittxready(priv);
|
||||
up_serialout(priv, LPC214X_UART_THR_OFFSET, '\r');
|
||||
}
|
||||
|
||||
up_waittxfifonotfull(priv);
|
||||
up_waittxready(priv);
|
||||
up_restoreuartint(priv, ier);
|
||||
return ch;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
# Makefile
|
||||
############################################################################
|
||||
# arch/c5471/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
@@ -31,11 +31,10 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
|
||||
ASRCS = up_vectors.S up_saveusercontext.S up_fullcontextrestore.S
|
||||
@@ -72,15 +71,14 @@ LIBGCC = ${shell $(CC) -print-libgcc-file-name}
|
||||
all: up_head.o libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(LINKOBJS): %.o: %.S
|
||||
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %.o: %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT):
|
||||
@@ -105,9 +103,9 @@ ifeq ($(CONFIG_RRLOAD_BINARY),y)
|
||||
endif
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend
|
||||
touch $@
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@$(MAKE) -C board TOPDIR=$(TOPDIR) depend
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
@@ -115,7 +113,8 @@ clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||
fi
|
||||
rm -f libarch$(LIBEXT) *.o *~
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* up_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -49,28 +49,27 @@
|
||||
#include <nuttx/fs.h>
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _up_dumponexit
|
||||
*
|
||||
* Description:
|
||||
* Dump the state of all tasks whenever on task exits. This
|
||||
* is debug instrumentation that was added to check file-
|
||||
* related reference counting but could be useful again
|
||||
* sometime in the future.
|
||||
* Dump the state of all tasks whenever on task exits. This is debug
|
||||
* instrumentation that was added to check file-related reference counting
|
||||
* but could be useful again sometime in the future.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
@@ -113,23 +112,30 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
irqstate_t flags = irqsave();
|
||||
_TCB* tcb;
|
||||
|
||||
/* Disable interrupts. They will be restored when the next
|
||||
* task is started.
|
||||
*/
|
||||
|
||||
(void)irqsave();
|
||||
|
||||
lldbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
@@ -138,37 +144,9 @@ void _exit(int status)
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
|
||||
#define CONFIG_SUPPRESS_UART_CONFIG 1 /* Do not reconfig UART */
|
||||
#undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */
|
||||
|
||||
/************************************************************
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
# Makefile
|
||||
############################################################################
|
||||
# arch/dm320/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
@@ -31,11 +31,10 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
CFLAGS += -I$(TOPDIR)/sched
|
||||
|
||||
ASRCS = up_vectors.S up_saveusercontext.S up_fullcontextrestore.S \
|
||||
@@ -70,15 +69,14 @@ LIBGCC = ${shell $(CC) -print-libgcc-file-name}
|
||||
all: up_head.o libarch$(LIBEXT)
|
||||
|
||||
$(AOBJS) $(LINKOBJS): %.o: %.S
|
||||
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
||||
$(COBJS): %.o: %.c
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
$(call COMPILE, $<, $@)
|
||||
|
||||
libarch$(LIBEXT): $(OBJS)
|
||||
( for obj in $(OBJS) ; do \
|
||||
$(AR) $@ $${obj} || \
|
||||
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
|
||||
@( for obj in $(OBJS) ; do \
|
||||
$(call ARCHIVE, $@, $${obj}); \
|
||||
done ; )
|
||||
|
||||
board/libboard$(LIBEXT):
|
||||
@@ -106,8 +104,8 @@ endif
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
|
||||
if
|
||||
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
touch $@
|
||||
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||
@touch $@
|
||||
|
||||
depend: .depend
|
||||
|
||||
@@ -115,12 +113,13 @@ clean:
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
|
||||
fi
|
||||
rm -f libarch$(LIBEXT) *.o *~
|
||||
@rm -f libarch$(LIBEXT) *~ .*.swp
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
@if [ -e board/Makefile ]; then \
|
||||
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
|
||||
fi
|
||||
rm -f Make.dep .depend
|
||||
@rm -f Make.dep .depend
|
||||
|
||||
-include Make.dep
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* up_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
@@ -49,28 +49,27 @@
|
||||
#include <nuttx/fs.h>
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Private Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _up_dumponexit
|
||||
*
|
||||
* Description:
|
||||
* Dump the state of all tasks whenever on task exits. This
|
||||
* is debug instrumentation that was added to check file-
|
||||
* related reference counting but could be useful again
|
||||
* sometime in the future.
|
||||
* Dump the state of all tasks whenever on task exits. This is debug
|
||||
* instrumentation that was added to check file-related reference counting
|
||||
* but could be useful again sometime in the future.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
@@ -112,22 +111,24 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
* Public Funtions
|
||||
************************************************************/
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: _exit
|
||||
*
|
||||
* Description:
|
||||
* This function causes the currently executing task to cease
|
||||
* to exist. This is a special case of task_delete().
|
||||
* to exist. This is a special case of task_delete() where the task to
|
||||
* be deleted is the currently executing task. It is more complex because
|
||||
* a context switch must be perform to the the next ready to run task.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
_TCB* tcb = (_TCB*)g_readytorun.head;
|
||||
_TCB* tcb;
|
||||
|
||||
/* Disable interrupts. They will be restored when the next
|
||||
* task is started.
|
||||
@@ -138,41 +139,13 @@ void _exit(int status)
|
||||
lldbg("TCB=%p exitting\n", tcb);
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
|
||||
dbg("Other tasks:\n");
|
||||
lldbg("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. We can
|
||||
* ignore the return value because we know that a context
|
||||
* switch is needed.
|
||||
*/
|
||||
/* Destroy the task at the head of the ready to run list. */
|
||||
|
||||
(void)sched_removereadytorun(tcb);
|
||||
|
||||
/* We are not in a bad stack-- the head of the ready to run task list
|
||||
* does not correspond to the thread that is running. Disabling pre-
|
||||
* emption on this TCB should be enough to keep things stable.
|
||||
*/
|
||||
|
||||
sched_lock();
|
||||
|
||||
/* Move the TCB to the specified blocked task list and delete it */
|
||||
|
||||
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
|
||||
task_delete(tcb->pid);
|
||||
|
||||
/* If there are any pending tasks, then add them to the g_readytorun
|
||||
* task list now
|
||||
*/
|
||||
|
||||
if (g_pendingtasks.head)
|
||||
{
|
||||
(void)sched_mergepending();
|
||||
}
|
||||
|
||||
/* Now calling sched_unlock() should have no effect */
|
||||
|
||||
sched_unlock();
|
||||
(void)task_deletecurrent();
|
||||
|
||||
/* Now, perform the context switch to the new ready-to-run task at the
|
||||
* head of the list.
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
|
||||
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
|
||||
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
|
||||
#define CONFIG_SUPPRESS_UART_CONFIG 1 /* Do not reconfig UART */
|
||||
#define CONFIG_DUMP_ON_EXIT 1 /* Dump task state on exit */
|
||||
|
||||
/************************************************************
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user