Compare commits
517 Commits
nuttx-4.13
...
nuttx-5.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3f0d83295 | ||
|
|
84524904df | ||
|
|
73a0849535 | ||
|
|
c21d8b6661 | ||
|
|
60762e2d26 | ||
|
|
8ace6906d3 | ||
|
|
c0e6c32b1a | ||
|
|
43b3c3fa8e | ||
|
|
c4d5f3b90b | ||
|
|
8f979150db | ||
|
|
55e433f43a | ||
|
|
be6c6381f8 | ||
|
|
fede8bba58 | ||
|
|
2bfc4c660c | ||
|
|
9207b2dee1 | ||
|
|
2b587ee7a8 | ||
|
|
222305f861 | ||
|
|
5ab25331f9 | ||
|
|
1b1bd4069d | ||
|
|
0902d710b0 | ||
|
|
9480955fc4 | ||
|
|
e31478206b | ||
|
|
5891cbc3ac | ||
|
|
c79dac647c | ||
|
|
c0a0106fcb | ||
|
|
247dc3181a | ||
|
|
2b120a3269 | ||
|
|
7f382114a0 | ||
|
|
8fdd176323 | ||
|
|
f47b4baf43 | ||
|
|
738804f105 | ||
|
|
ee8c1e6a73 | ||
|
|
f2c699c3c6 | ||
|
|
1bf43e8332 | ||
|
|
317a3925a8 | ||
|
|
e65f58cc4f | ||
|
|
93dc53d93a | ||
|
|
810c6fba22 | ||
|
|
a0ccec8dd9 | ||
|
|
d692bdd4f0 | ||
|
|
a4ed1c9b1b | ||
|
|
36d284602f | ||
|
|
e659352021 | ||
|
|
8ae68d4995 | ||
|
|
b9eb264154 | ||
|
|
0eb121e5da | ||
|
|
ff2d10d6ba | ||
|
|
f82700e10c | ||
|
|
2c7fbbf4ee | ||
|
|
41382dbc16 | ||
|
|
5ca9eb3ba9 | ||
|
|
4aecb1dbc5 | ||
|
|
5fdbedef44 | ||
|
|
f940c4adac | ||
|
|
865d081e5d | ||
|
|
7cc63751a1 | ||
|
|
a8a4a47dc3 | ||
|
|
6e32ca55c0 | ||
|
|
a6004aa2bb | ||
|
|
34e5fb7d6b | ||
|
|
a74feef081 | ||
|
|
658ef2bd59 | ||
|
|
03295ded37 | ||
|
|
07634ecb5d | ||
|
|
acf80a964d | ||
|
|
4f7b600d2b | ||
|
|
311972ba4c | ||
|
|
5fd70983c5 | ||
|
|
d82de2c730 | ||
|
|
584d9209ac | ||
|
|
1f84a4428f | ||
|
|
929002b446 | ||
|
|
55cb86a4aa | ||
|
|
5d5fba072c | ||
|
|
55b8006c2d | ||
|
|
30d67668b0 | ||
|
|
4cf3b59fd9 | ||
|
|
12daeb5fdf | ||
|
|
36e5da2751 | ||
|
|
83f135da9f | ||
|
|
6541fa26bf | ||
|
|
2023634f84 | ||
|
|
7f47029021 | ||
|
|
9ccd158477 | ||
|
|
19d41ed5ff | ||
|
|
e5b5c81689 | ||
|
|
a7bb44354f | ||
|
|
393fb7daf5 | ||
|
|
1700022994 | ||
|
|
80891ed66b | ||
|
|
e244cdfeb2 | ||
|
|
28dc6e461d | ||
|
|
0e8a67f9f9 | ||
|
|
a8999e8697 | ||
|
|
9b75e76094 | ||
|
|
f4b2cc410e | ||
|
|
58d04d869a | ||
|
|
d2c87216dd | ||
|
|
25fd72992c | ||
|
|
d10ffdbfa0 | ||
|
|
4cdb09e129 | ||
|
|
23ed592d4c | ||
|
|
d464bc2867 | ||
|
|
9f024deb2e | ||
|
|
2840124ed7 | ||
|
|
529b0ba053 | ||
|
|
dabd38db68 | ||
|
|
034d5ffcdb | ||
|
|
fde8533598 | ||
|
|
c69660315d | ||
|
|
a7b7d5695d | ||
|
|
d8a9c604d5 | ||
|
|
74ef4fdabd | ||
|
|
acf82c0a9d | ||
|
|
383763a5db | ||
|
|
aa10313fce | ||
|
|
fd83a8bdc5 | ||
|
|
2244ee5177 | ||
|
|
a831ff8459 | ||
|
|
51c5e75ac0 | ||
|
|
f910556751 | ||
|
|
3f6520732b | ||
|
|
338bbcd45a | ||
|
|
5db45464f7 | ||
|
|
fae4de246f | ||
|
|
5fb74fe8f9 | ||
|
|
60cb5bd4cf | ||
|
|
b375132994 | ||
|
|
09fd60d01a | ||
|
|
5736c8327d | ||
|
|
82d28f109f | ||
|
|
0c28a7ed92 | ||
|
|
1d050f61cc | ||
|
|
b6a6c21d01 | ||
|
|
2acc43d505 | ||
|
|
f75d5d37d2 | ||
|
|
9eaf3e665f | ||
|
|
c2f52b4b65 | ||
|
|
bc80135786 | ||
|
|
c21e579097 | ||
|
|
dd133ea338 | ||
|
|
fead704f62 | ||
|
|
734fcb88a5 | ||
|
|
933cec7399 | ||
|
|
b2eac9296f | ||
|
|
311f0a13ab | ||
|
|
bd9e072309 | ||
|
|
03099d1df0 | ||
|
|
f1571fd333 | ||
|
|
60e97c0f62 | ||
|
|
179212d2ab | ||
|
|
f99686cea4 | ||
|
|
f1fe3b9f88 | ||
|
|
c6b279bab4 | ||
|
|
58c075fc9c | ||
|
|
816cb81e95 | ||
|
|
23763aacc0 | ||
|
|
7ab09d2834 | ||
|
|
31400041c4 | ||
|
|
239310f5ac | ||
|
|
b27824ec34 | ||
|
|
c9f3eb292c | ||
|
|
cfb3ffb09c | ||
|
|
4d33eea391 | ||
|
|
8ac830d057 | ||
|
|
6a503c11ea | ||
|
|
b1bf249a49 | ||
|
|
1c9d2257be | ||
|
|
d376cfa818 | ||
|
|
7435f41c20 | ||
|
|
b0166b7bcf | ||
|
|
1879b3f0f3 | ||
|
|
e0f16643cd | ||
|
|
4262f27582 | ||
|
|
4ee22ed85c | ||
|
|
03b90172f4 | ||
|
|
1bee4a3f0f | ||
|
|
da47b386c6 | ||
|
|
da2bc4cc04 | ||
|
|
63d25971ca | ||
|
|
54f11598c2 | ||
|
|
2bd1d18f1a | ||
|
|
9c671715e2 | ||
|
|
14e7598491 | ||
|
|
8eb54ceab1 | ||
|
|
5268348bf2 | ||
|
|
066c5defd6 | ||
|
|
53e57117df | ||
|
|
2501f0c6bb | ||
|
|
7b7d120995 | ||
|
|
5a39e4e761 | ||
|
|
26339f7ead | ||
|
|
47c169eadc | ||
|
|
0c12ae82a5 | ||
|
|
784a983de4 | ||
|
|
4cd0a2fd39 | ||
|
|
4b613104d0 | ||
|
|
b7eb84289d | ||
|
|
80654ef0bc | ||
|
|
c4b39cfe37 | ||
|
|
2afb66f5c9 | ||
|
|
8d8305d76c | ||
|
|
9ae2468586 | ||
|
|
7b75132de2 | ||
|
|
785ce264d9 | ||
|
|
b4a3a986cd | ||
|
|
07d5b3fa97 | ||
|
|
bfe8ad2d17 | ||
|
|
e58266b8b2 | ||
|
|
fe3d0004c1 | ||
|
|
ac6f9752d3 | ||
|
|
9d7f0319c1 | ||
|
|
b7d4137d75 | ||
|
|
cd3b35bcb2 | ||
|
|
7ec721de47 | ||
|
|
9e7daa0bf9 | ||
|
|
982c71f7ea | ||
|
|
1fa8e0c8a1 | ||
|
|
2915dbf9c2 | ||
|
|
dabb0c8f8e | ||
|
|
a0f80361d3 | ||
|
|
756cb31808 | ||
|
|
f4eee7663d | ||
|
|
f791179e4d | ||
|
|
31dd459a90 | ||
|
|
ae4a408774 | ||
|
|
5341b90399 | ||
|
|
76b0595e2d | ||
|
|
ea2fde1dd9 | ||
|
|
a71f82dcf3 | ||
|
|
32fbb68e97 | ||
|
|
4bb5f0b3ce | ||
|
|
cab1c3a330 | ||
|
|
71735de874 | ||
|
|
fdd12cabe2 | ||
|
|
f436057028 | ||
|
|
307f419f2a | ||
|
|
f016945ba8 | ||
|
|
d560096aeb | ||
|
|
c6bbe9dc3d | ||
|
|
79ddba34d2 | ||
|
|
00074fb451 | ||
|
|
ffe38b9917 | ||
|
|
68307fd710 | ||
|
|
8678ae366c | ||
|
|
622a21291c | ||
|
|
77f5e49cec | ||
|
|
543d02502e | ||
|
|
fa2f463fd6 | ||
|
|
92c96a6154 | ||
|
|
8a679d8e57 | ||
|
|
a033e46c4b | ||
|
|
75d566a1c0 | ||
|
|
5dfa34ce1c | ||
|
|
36dab07f02 | ||
|
|
858efc230e | ||
|
|
ae58e45ca9 | ||
|
|
1774c816b1 | ||
|
|
123229c00f | ||
|
|
9a8fd7c4e8 | ||
|
|
0eed3ce239 | ||
|
|
0e6f7f14a3 | ||
|
|
d912e94971 | ||
|
|
023e8bedcb | ||
|
|
8f734aa4d4 | ||
|
|
f6e010dc6e | ||
|
|
3e902483c0 | ||
|
|
778b814926 | ||
|
|
5dbfe0bf34 | ||
|
|
4e8293f237 | ||
|
|
2c73e7a36e | ||
|
|
da2c51ede5 | ||
|
|
2c6e6a683a | ||
|
|
7ce11e4e64 | ||
|
|
8efbd09b96 | ||
|
|
f714bd527b | ||
|
|
c087f4d7a2 | ||
|
|
ef593f5660 | ||
|
|
9bdde68551 | ||
|
|
3d5329e15f | ||
|
|
edb7ceef4b | ||
|
|
d75110b604 | ||
|
|
6989aae4b2 | ||
|
|
a49ee3f6cc | ||
|
|
7cdda0c614 | ||
|
|
dc75de29f4 | ||
|
|
400e54080c | ||
|
|
4998a1d531 | ||
|
|
32e70457f5 | ||
|
|
6900ff8353 | ||
|
|
758263646b | ||
|
|
1d62b58975 | ||
|
|
fb9b623fdd | ||
|
|
556280f34e | ||
|
|
d6ab15aca1 | ||
|
|
373d796598 | ||
|
|
406cb9e025 | ||
|
|
6b98ea0bd5 | ||
|
|
6e61624b98 | ||
|
|
f920a75139 | ||
|
|
62da3e6427 | ||
|
|
8530da2baf | ||
|
|
eb1cef7dc5 | ||
|
|
2c91cf6b34 | ||
|
|
06caac010f | ||
|
|
33043234be | ||
|
|
6b40c11717 | ||
|
|
f441280cf5 | ||
|
|
8271bad00b | ||
|
|
32a56a4a8f | ||
|
|
c92cef8ebd | ||
|
|
ad34a38d13 | ||
|
|
4a3b6b964c | ||
|
|
96ed7cf1b5 | ||
|
|
bdb096035f | ||
|
|
eef5f6c0bf | ||
|
|
afe3da283d | ||
|
|
d9d0e50cd4 | ||
|
|
2bc7f694d2 | ||
|
|
38cec05ccc | ||
|
|
62f39259fc | ||
|
|
db8ed56af4 | ||
|
|
96e13d651d | ||
|
|
33aa836b45 | ||
|
|
85f74b99f1 | ||
|
|
e6493cac78 | ||
|
|
f565371e86 | ||
|
|
e14d3e6954 | ||
|
|
fe898edbbb | ||
|
|
9b2b1c227e | ||
|
|
827c6d4aab | ||
|
|
dc65d64e70 | ||
|
|
ed0d056aaf | ||
|
|
afef3c3f38 | ||
|
|
63a246fa02 | ||
|
|
010cd59aac | ||
|
|
45a2c688a1 | ||
|
|
79e9b1e9a5 | ||
|
|
84ddbcaeb6 | ||
|
|
ab8adc6017 | ||
|
|
8d242507f1 | ||
|
|
68c886a3f3 | ||
|
|
49cb5d9dbe | ||
|
|
ad55faaf19 | ||
|
|
e801bbdcca | ||
|
|
5f86f0f003 | ||
|
|
7aa3ad1ff7 | ||
|
|
7a86ad53d8 | ||
|
|
91c84841f4 | ||
|
|
6d15ea0894 | ||
|
|
481a5bf792 | ||
|
|
132786bceb | ||
|
|
01797c2450 | ||
|
|
ff20157e19 | ||
|
|
bcd31a2781 | ||
|
|
e29e0362df | ||
|
|
cf10b4c23b | ||
|
|
408d3a135a | ||
|
|
43c18e6e70 | ||
|
|
92d4cb28f9 | ||
|
|
beb03cc5e6 | ||
|
|
d01304656a | ||
|
|
1f319c3c3c | ||
|
|
6c462e063e | ||
|
|
7d63ffbf72 | ||
|
|
29d789372a | ||
|
|
192d229b8d | ||
|
|
98f07f664e | ||
|
|
18dbbfbe39 | ||
|
|
3fd4a25d01 | ||
|
|
d5ff0dcf32 | ||
|
|
8ed8fb28a8 | ||
|
|
74e2893056 | ||
|
|
816071561d | ||
|
|
e92d687ebb | ||
|
|
f194ce2459 | ||
|
|
54c5a70765 | ||
|
|
7692347cfa | ||
|
|
49d1ebf6ab | ||
|
|
82807ea09d | ||
|
|
d482eb7bae | ||
|
|
e379d21a2e | ||
|
|
06fb21e3b8 | ||
|
|
13dfdf9a05 | ||
|
|
447904aae2 | ||
|
|
e6f6b90751 | ||
|
|
e385b1074b | ||
|
|
1e02bc99ff | ||
|
|
757edb2c70 | ||
|
|
9998f85110 | ||
|
|
3340acc7ae | ||
|
|
ef5600e29b | ||
|
|
cff35ed173 | ||
|
|
182c7622a4 | ||
|
|
549ab23bfd | ||
|
|
4370e6ad13 | ||
|
|
01f6a8a146 | ||
|
|
fa14119040 | ||
|
|
23931c39e6 | ||
|
|
99b0163fba | ||
|
|
8e813e8811 | ||
|
|
9ba9db7e9d | ||
|
|
05d9fdd61e | ||
|
|
b0e87ce2fe | ||
|
|
92e71b0b94 | ||
|
|
9634f25391 | ||
|
|
2f0e15334b | ||
|
|
d67e9f0ad9 | ||
|
|
eeec4073a9 | ||
|
|
a350286c7c | ||
|
|
3d1383407c | ||
|
|
2c2a85f086 | ||
|
|
12ae4d2bd7 | ||
|
|
92b110e0e2 | ||
|
|
fa0f3b582a | ||
|
|
6aa44f461e | ||
|
|
78a9df89c0 | ||
|
|
2880e1d5c2 | ||
|
|
4686cc55fa | ||
|
|
9535a28d7a | ||
|
|
25826c2bc2 | ||
|
|
7ec7f5bfa3 | ||
|
|
09e97e68e2 | ||
|
|
b9e49a9cbe | ||
|
|
2a8b7fa0cc | ||
|
|
e032d51cb5 | ||
|
|
63447fc718 | ||
|
|
2479b7c72c | ||
|
|
03df23b522 | ||
|
|
591d34b7ec | ||
|
|
c4608f8f15 | ||
|
|
50050e7858 | ||
|
|
eb2b125a68 | ||
|
|
028e8247f9 | ||
|
|
2d58691133 | ||
|
|
b558b32415 | ||
|
|
9a6462df4b | ||
|
|
53b50529e6 | ||
|
|
3910735695 | ||
|
|
77308a190e | ||
|
|
723f575d1f | ||
|
|
bea1cb5e0e | ||
|
|
b585cbbcd4 | ||
|
|
1913ff855e | ||
|
|
1b5e34b5c8 | ||
|
|
8304c3cc7e | ||
|
|
ee44d15049 | ||
|
|
381b9ed5c3 | ||
|
|
add9436ac2 | ||
|
|
9866fcecf4 | ||
|
|
00467c9bd0 | ||
|
|
1e85cbd2b0 | ||
|
|
6c5d05074a | ||
|
|
10e98ef71b | ||
|
|
aff7cccdf6 | ||
|
|
447e401fea | ||
|
|
af1830dc73 | ||
|
|
3ec785921d | ||
|
|
fd1fbf821c | ||
|
|
a9d40d6d92 | ||
|
|
d343c1879e | ||
|
|
ade895ea0c | ||
|
|
06743c5003 | ||
|
|
04f6edbaf7 | ||
|
|
c76c6b0e52 | ||
|
|
70e2fd6f6c | ||
|
|
d3ea3abde6 | ||
|
|
337b964c8b | ||
|
|
bedc751b0b | ||
|
|
8c8b5f01b7 | ||
|
|
081d8a6abc | ||
|
|
d209d47e16 | ||
|
|
e252d9d752 | ||
|
|
99646ff19a | ||
|
|
fd34e51e1c | ||
|
|
108a8ede6a | ||
|
|
dcc16a713c | ||
|
|
29395f7fd1 | ||
|
|
7ef8423ad0 | ||
|
|
2142afe747 | ||
|
|
0a24197444 | ||
|
|
2740d04258 | ||
|
|
b1742905ff | ||
|
|
498ae01164 | ||
|
|
529bbb7a2a | ||
|
|
95908c8777 | ||
|
|
daf843bcec | ||
|
|
fc6a71a647 | ||
|
|
1c036b928f | ||
|
|
ad3467a844 | ||
|
|
1ae08cf310 | ||
|
|
1ec817c5aa | ||
|
|
ec5b3cef66 | ||
|
|
35d260bda4 | ||
|
|
cd8a7958eb | ||
|
|
e12ba000d0 | ||
|
|
9f0c906935 | ||
|
|
911672589d | ||
|
|
a18a6c13c9 | ||
|
|
4196c8ce60 | ||
|
|
a1087ace92 | ||
|
|
eed2313667 | ||
|
|
19fb20b3ef | ||
|
|
cb89120bd4 | ||
|
|
4da26a9817 | ||
|
|
783d429d66 | ||
|
|
860e284bef | ||
|
|
d9413c1214 | ||
|
|
bf7555cc4a | ||
|
|
7f84a8bea1 | ||
|
|
00e7c5f8ac | ||
|
|
e9f2ab2b9c | ||
|
|
64e5bef2f6 | ||
|
|
86987e3b02 | ||
|
|
fcf4b9767c | ||
|
|
6b2827a112 | ||
|
|
c0675a0711 |
9
COPYING
@@ -3,7 +3,7 @@
|
||||
* COPYING -- Describes the terms under which Nuttx is distributed. A *
|
||||
* copy of the BSD-style licensing is included in this file. In my *
|
||||
* words -- I believe that you should free to use NuttX in any *
|
||||
* environmnet, private, private, commercial, open, closed, etc. *
|
||||
* environment, private, private, commercial, open, closed, etc. *
|
||||
* provided only that you repect the modest copyright notices as *
|
||||
* described in license (below). Please feel free to contact me if you *
|
||||
* have any licensing concerns. *
|
||||
@@ -42,3 +42,10 @@
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
If you enable floating point conversions with CONFIG_LIBC_FLOATINGPOINT,
|
||||
then some files with an unmodified BSD license will be included. That
|
||||
license is similar to the above (modified) BSD license, but has an
|
||||
additional requirement that I state the following:
|
||||
|
||||
"This product includes software developed by the University of
|
||||
California, Berkeley and its contributors."
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<h1><big><font color="#3c34ec">
|
||||
<i>NX Graphics Subsystem</i>
|
||||
</font></big></h1>
|
||||
<p>Last Updated: December 5, 2008</p>
|
||||
<p>Last Updated: April 23, 2010</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -212,7 +212,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><small>Figure 1.
|
||||
This sceen shot shows the final frame for the NuttX example at <code>examples/nx</code>
|
||||
This scren shot shows the final frame for the NuttX example at <code>examples/nx</code>
|
||||
running on the simulated, Linux x86 platform with simulated framebuffer output to
|
||||
an X window.
|
||||
This picture shows to framed windows with (blank) toolbars.
|
||||
@@ -256,12 +256,20 @@
|
||||
<i>back-end</i> logic. This back-end supports only a primitive set of graphic
|
||||
and rendering operations.
|
||||
</li>
|
||||
<li><b>Framebuffer Device Interface</b>.
|
||||
NX supports any graphics device using the NuttX framebuffer <i>driver</i>
|
||||
interface.
|
||||
(However, the dependency of NX on framebuffer drivers is minimal and the
|
||||
logic could be extended to other interfaces -- such as a serial LCD -- with
|
||||
some minimal effort).
|
||||
<li><b>Device Interface</b>.
|
||||
NX supports any graphics device either of two device interfaces:
|
||||
<ul>
|
||||
<li>
|
||||
Any device with random accesss video memory using the NuttX framebuffer driver interface
|
||||
(see <code>include/nuttx/fb.h</code>).
|
||||
</li>
|
||||
<li>
|
||||
Any LCD-like device than can accept raster line <i>runs</i> through a parallel or serial interface
|
||||
(see <code>include/nuttx/lcd.h</code>).
|
||||
By default, NX is configured to use the frame buffer driver unless <code>CONFIG_NX_LCDDRIVER</code> is defined =y in your NuttX configuration file.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><b>Transparent to NX Client</b>.
|
||||
The window client on "sees" the sub-window that is operates in
|
||||
and does not need to be concerned with the virtual, vertical space (other
|
||||
@@ -310,7 +318,7 @@
|
||||
|
||||
<p>
|
||||
NXGLIB is a standalone library that contains low-level graphics utilities and
|
||||
direct framebuffer rendering logic. NX is built on top NXGLIB.
|
||||
direct framebuffer or LCD rendering logic. NX is built on top NXGLIB.
|
||||
</p>
|
||||
|
||||
<h3>1.3.2 <a name="nx1">NX (<code>NXSU</code> and <code>NXMU</code>)</a></h3>
|
||||
@@ -335,7 +343,7 @@
|
||||
|
||||
<p><b>NXNULL?</b>
|
||||
At one time, I also envisoned a <i>NULL</i> front-end that did not support windowing
|
||||
at all but, rather, simply provided the entire framebuffer memory as one dumb window.
|
||||
at all but, rather, simply provided the entire framebuffer or LCD memory as one dumb window.
|
||||
This has the advantage that the same NX APIs can be used on the one dumb window as
|
||||
for the other NX windows.
|
||||
This would be in the NuttX spirit of scalability.
|
||||
@@ -412,7 +420,7 @@
|
||||
Only those APIs intended for application usage are documented here
|
||||
See <code>include/nuttx/nxglib.h</code> for the full set of APIs;
|
||||
those APIs might be of interest if you are rendering directly into
|
||||
framebuffer memory.
|
||||
framebuffer or LCD memory.
|
||||
</p>
|
||||
|
||||
<h3>2.2.1 <a name="nxgltypes">NXGL Types</a></h3>
|
||||
@@ -422,8 +430,8 @@
|
||||
Holds one device pixel.
|
||||
NXGLIB will select the smallest size for the <code>nxgl_mxpixel_t</code>
|
||||
that just contains the pixel: <code>byte</code> if 16, 24, and 32 resolution
|
||||
support is disabled, <code>uint16</code> if 24, and 32 resolution
|
||||
support is disabled, or <code>uint32</code>.
|
||||
support is disabled, <code>uint16_t</code> if 24, and 32 resolution
|
||||
support is disabled, or <code>uint32_t</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -433,7 +441,7 @@
|
||||
to change:
|
||||
</p>
|
||||
<ul><pre>
|
||||
typedef sint16 nxgl_coord_t;
|
||||
typedef int16_t nxgl_coord_t;
|
||||
</pre></ul>
|
||||
|
||||
<p>
|
||||
@@ -501,7 +509,7 @@ struct nxgl_trapezoid_s
|
||||
<p><b>Function Prototype:</b></p>
|
||||
<ul><pre>
|
||||
#include <nuttx/nxglib.h>
|
||||
void nxgl_rgb2yuv(ubyte r, ubyte g, ubyte b, ubyte *y, ubyte *u, ubyte *v);
|
||||
void nxgl_rgb2yuv(uint8_t r, uint8_t g, uint8_t b, uint8_t *y, uint8_t *u, uint8_t *v);
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Description:</b>
|
||||
@@ -512,7 +520,7 @@ void nxgl_rgb2yuv(ubyte r, ubyte g, ubyte b, ubyte *y, ubyte *u, ubyte *v);
|
||||
<p><b>Function Prototype:</b></p>
|
||||
<ul><pre>
|
||||
#include <nuttx/nxglib.h>
|
||||
void nxgl_yuv2rgb(ubyte y, ubyte u, ubyte v, ubyte *r, ubyte *g, ubyte *b);
|
||||
void nxgl_yuv2rgb(uint8_t y, uint8_t u, uint8_t v, uint8_t *r, uint8_t *g, uint8_t *b);
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Description:</b>
|
||||
@@ -617,24 +625,24 @@ nxgl_nonintersecting(FAR struct nxgl_rect_s result[4],
|
||||
<p><b>Function Prototype:</b></p>
|
||||
<ul><pre>
|
||||
#include <nuttx/nxglib.h>
|
||||
boolean nxgl_rectoverlap(FAR struct nxgl_rect_s *rect1,
|
||||
FAR struct nxgl_rect_s *rect2);
|
||||
bool nxgl_rectoverlap(FAR struct nxgl_rect_s *rect1,
|
||||
FAR struct nxgl_rect_s *rect2);
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Description:</b>
|
||||
Return TRUE if the two rectangles overlap.
|
||||
Return true if the two rectangles overlap.
|
||||
</p>
|
||||
|
||||
<h3>2.2.11 <a name="nxglrectinside"><code>nxgl_rectinside()</code></a></h3>
|
||||
<p><b>Function Prototype:</b></p>
|
||||
<ul><pre>
|
||||
#include <nuttx/nxglib.h>
|
||||
boolean nxgl_rectinside(FAR const struct nxgl_rect_s *rect,
|
||||
FAR const struct nxgl_point_s *pt);
|
||||
bool nxgl_rectinside(FAR const struct nxgl_rect_s *rect,
|
||||
FAR const struct nxgl_point_s *pt);
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Description:</b>
|
||||
Return TRUE if the point <code>pt</code> lies within <code>rect</code>.
|
||||
Return true if the point <code>pt</code> lies within <code>rect</code>.
|
||||
</p>
|
||||
|
||||
<h3>2.2.12 <a name="nxglrectsize"><code>nxgl_rectsize()</code></a></h3>
|
||||
@@ -653,11 +661,11 @@ void nxgl_rectsize(FAR struct nxgl_size_s *size,
|
||||
<p><b>Function Prototype:</b></p>
|
||||
<ul><pre>
|
||||
#include <nuttx/nxglib.h>
|
||||
boolean nxgl_nullrect(FAR const struct nxgl_rect_s *rect);
|
||||
bool nxgl_nullrect(FAR const struct nxgl_rect_s *rect);
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Description:</b>
|
||||
Return TRUE if the area of the retangle is <= 0.
|
||||
Return true if the area of the retangle is <= 0.
|
||||
</p>
|
||||
|
||||
<h3>2.2.14 <a name="nxglrunoffset"><code>nxgl_runoffset()</code></a></h3>
|
||||
@@ -775,17 +783,17 @@ typedef FAR void *NXWINDOW;
|
||||
struct nx_callback_s
|
||||
{
|
||||
void (*redraw)(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
|
||||
boolean more, FAR void *arg);
|
||||
bool more, FAR void *arg);
|
||||
void (*position)(NXWINDOW hwnd, FAR const struct nxgl_size_s *size,
|
||||
FAR const struct nxgl_point_s *pos,
|
||||
FAR const struct nxgl_rect_s *bounds,
|
||||
FAR void *arg);
|
||||
#ifdef CONFIG_NX_MOUSE
|
||||
void (*mousein)(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
|
||||
ubyte buttons, FAR void *arg);
|
||||
uint8_t buttons, FAR void *arg);
|
||||
#endif
|
||||
#ifdef CONFIG_NX_KBD
|
||||
void (*kbdin)(NXWINDOW hwnd, ubyte nch, FAR const ubyte *ch, FAR void *arg);
|
||||
void (*kbdin)(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg);
|
||||
#endif
|
||||
};
|
||||
</pre></ul>
|
||||
@@ -796,7 +804,7 @@ struct nx_callback_s
|
||||
<p><b>Callback Function Prototype:</b></p>
|
||||
<ul><pre>
|
||||
void redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
|
||||
boolean more, FAR void *arg);
|
||||
bool more, FAR void *arg);
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Description:</b>
|
||||
@@ -812,7 +820,7 @@ void redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
|
||||
<dt><code>rect</code>
|
||||
<dd>The rectangle that needs to be re-drawn (in window relative coordinates)
|
||||
<dt><code>more</code>
|
||||
<dd>TRUE: More re-draw requests will follow
|
||||
<dd>true: More re-draw requests will follow
|
||||
<dt><code>arg</code>
|
||||
<dd>User provided argument (see <a href="#nxopenwindow"><code>nx_openwindow()</code></a>)
|
||||
</dl></ul>
|
||||
@@ -860,7 +868,7 @@ void position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size,
|
||||
<ul><pre>
|
||||
#ifdef CONFIG_NX_MOUSE
|
||||
void mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
|
||||
ubyte buttons, FAR void *arg);
|
||||
uint8_t buttons, FAR void *arg);
|
||||
#endif
|
||||
</pre></ul>
|
||||
<p>
|
||||
@@ -889,7 +897,7 @@ void mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos,
|
||||
<p><b>Callback Function Prototype:</b></p>
|
||||
<ul><pre>
|
||||
#ifdef CONFIG_NX_KBD
|
||||
void (*kbdin)(NXWINDOW hwnd, ubyte nch, FAR const ubyte *ch, FAR void *arg);
|
||||
void (*kbdin)(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg);
|
||||
#endif
|
||||
</pre></ul>
|
||||
<p>
|
||||
@@ -922,7 +930,7 @@ void (*kbdin)(NXWINDOW hwnd, ubyte nch, FAR const ubyte *ch, FAR void *arg);
|
||||
|
||||
#ifdef CONFIG_NX_MULTIUSER
|
||||
int nx_runinstance(FAR const char *mqname, FAR struct fb_vtable_s *fb);
|
||||
#define nx_run(fb) nx_runinstance(NX_DEFAULT_SERVER_MQNAME, fb)
|
||||
#define nx_run(fb) nx_runinstance(NX_DEFAULT_SERVER_MQNAME, dev)
|
||||
#endif
|
||||
</pre></ul>
|
||||
<p>
|
||||
@@ -945,8 +953,8 @@ int nx_runinstance(FAR const char *mqname, FAR struct fb_vtable_s *fb);
|
||||
<dt><code>mqname</code>
|
||||
<dd>
|
||||
- The name for the server incoming message queue
|
||||
<dt><code>fb</code>
|
||||
<dd>Vtable "object" of the framebuffer "driver" to use
|
||||
<dt><code>dev</code>
|
||||
<dd>Framebuffer or LCD driver "object" to be used
|
||||
</dl></ul>
|
||||
</p>
|
||||
<p>
|
||||
@@ -1016,7 +1024,7 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname);
|
||||
#include <nuttx/nx.h>
|
||||
|
||||
#ifndef CONFIG_NX_MULTIUSER
|
||||
NXHANDLE nx_open(FAR struct fb_vtable_s *fb);
|
||||
NXHANDLE nx_open(FAR struct fb_vtable_s *dev);
|
||||
#endif
|
||||
</pre></ul>
|
||||
<p>
|
||||
@@ -1032,8 +1040,8 @@ NXHANDLE nx_open(FAR struct fb_vtable_s *fb);
|
||||
<p>
|
||||
<b>Input Parameters:</b>
|
||||
<ul><dl>
|
||||
<dt><code>fb</code>
|
||||
<dd>Vtable "object" of the framebuffer "driver" to use
|
||||
<dt><code>dev</code>
|
||||
<dd>Frame buffer or LCD driver "object" to be used.
|
||||
<dt><code>cb</code>
|
||||
<dd>Callbacks used to process received NX server messages
|
||||
</dl></ul>
|
||||
@@ -1677,8 +1685,8 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest,
|
||||
#include <nuttx/nx.h>
|
||||
|
||||
#ifdef CONFIG_NX_KBD
|
||||
int nx_kbdchin(NXHANDLE handle, ubyte ch);
|
||||
int nx_kbdin(NXHANDLE handle, ubyte nch, FAR const ubyte *ch);
|
||||
int nx_kbdchin(NXHANDLE handle, uint8_t ch);
|
||||
int nx_kbdin(NXHANDLE handle, uint8_t nch, FAR const uint8_t *ch);
|
||||
#endif
|
||||
</pre></ul>
|
||||
<p>
|
||||
@@ -1700,7 +1708,7 @@ int nx_kbdin(NXHANDLE handle, ubyte nch, FAR const ubyte *ch);
|
||||
#include <nuttx/nx.h>
|
||||
|
||||
#ifdef CONFIG_NX_MOUSE
|
||||
int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, ubyte buttons);
|
||||
int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons);
|
||||
#endif
|
||||
</pre></ul>
|
||||
<p>
|
||||
@@ -2341,12 +2349,12 @@ int nxtk_bitmaptoolbar(NXTKWINDOW hfwnd,
|
||||
<ul><pre>
|
||||
struct nx_fontmetic_s
|
||||
{
|
||||
uint32 stride : 2; /* Width of one font row in bytes */
|
||||
uint32 width : 6; /* Width of the font in bits */
|
||||
uint32 height : 6; /* Height of the font in rows */
|
||||
uint32 xoffset : 6; /* Top, left-hand corner X-offset in pixels */
|
||||
uint32 yoffset : 6; /* Top, left-hand corner y-offset in pixels */
|
||||
uint32 unused : 6;
|
||||
uint32_t stride : 2; /* Width of one font row in bytes */
|
||||
uint32_t width : 6; /* Width of the font in bits */
|
||||
uint32_t height : 6; /* Height of the font in rows */
|
||||
uint32_t xoffset : 6; /* Top, left-hand corner X-offset in pixels */
|
||||
uint32_t yoffset : 6; /* Top, left-hand corner y-offset in pixels */
|
||||
uint32_t unused : 6;
|
||||
};
|
||||
</pre></ul>
|
||||
|
||||
@@ -2357,7 +2365,7 @@ struct nx_fontmetic_s
|
||||
struct nx_fontbitmap_s
|
||||
{
|
||||
struct nx_fontmetic_s metric; /* Character metrics */
|
||||
FAR const ubyte *bitmap; /* Pointer to the character bitmap */
|
||||
FAR const uint8_t *bitmap; /* Pointer to the character bitmap */
|
||||
};
|
||||
</pre></ul>
|
||||
|
||||
@@ -2369,8 +2377,8 @@ struct nx_fontbitmap_s
|
||||
<ul><pre>
|
||||
struct nx_fontset_s
|
||||
{
|
||||
ubyte first; /* First bitmap character code */
|
||||
ubyte nchars; /* Number of bitmap character codes */
|
||||
uint8_t first; /* First bitmap character code */
|
||||
uint8_t nchars; /* Number of bitmap character codes */
|
||||
FAR const struct nx_fontbitmap_s *bitmap;
|
||||
};
|
||||
</pre></ul>
|
||||
@@ -2381,10 +2389,10 @@ struct nx_fontset_s
|
||||
<ul><pre>
|
||||
struct nx_font_s
|
||||
{
|
||||
ubyte mxheight; /* Max height of one glyph in rows */
|
||||
ubyte mxwidth; /* Max width of any glyph in pixels */
|
||||
ubyte mxbits; /* Max number of bits per character code */
|
||||
ubyte spwidth; /* The width of a space in pixels */
|
||||
uint8_t mxheight; /* Max height of one glyph in rows */
|
||||
uint8_t mxwidth; /* Max width of any glyph in pixels */
|
||||
uint8_t mxbits; /* Max number of bits per character code */
|
||||
uint8_t spwidth; /* The width of a space in pixels */
|
||||
};
|
||||
</pre></ul>
|
||||
|
||||
@@ -2414,7 +2422,7 @@ FAR const struct nx_font_s *nxf_getfontset(void);
|
||||
#include <nuttx/nxglib.h>
|
||||
#include <nuttx/nxfonts.h>
|
||||
|
||||
FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16 ch);
|
||||
FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch);
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Description:</b>
|
||||
@@ -2438,28 +2446,28 @@ FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16 ch);
|
||||
#include <nuttx/nxglib.h>
|
||||
#include <nuttx/nxfonts.h>
|
||||
|
||||
int nxf_convert_2bpp(FAR ubyte *dest, uint16 height,
|
||||
uint16 width, uint16 stride,
|
||||
int nxf_convert_2bpp(FAR uint8_t *dest, uint16_t height,
|
||||
uint16_t width, uint16_t stride,
|
||||
FAR const struct nx_fontbitmap_s *bm,
|
||||
nxgl_mxpixel_t color);
|
||||
int nxf_convert_4bpp(FAR ubyte *dest, uint16 height,
|
||||
uint16 width, uint16 stride,
|
||||
int nxf_convert_4bpp(FAR uint8_t *dest, uint16_t height,
|
||||
uint16_t width, uint16_t stride,
|
||||
FAR const struct nx_fontbitmap_s *bm,
|
||||
nxgl_mxpixel_t color);
|
||||
int nxf_convert_8bpp(FAR ubyte *dest, uint16 height,
|
||||
uint16 width, uint16 stride,
|
||||
int nxf_convert_8bpp(FAR uint8_t *dest, uint16_t height,
|
||||
uint16_t width, uint16_t stride,
|
||||
FAR const struct nx_fontbitmap_s *bm,
|
||||
nxgl_mxpixel_t color);
|
||||
int nxf_convert_16bpp(FAR uint16 *dest, uint16 height,
|
||||
uint16 width, uint16 stride,
|
||||
int nxf_convert_16bpp(FAR uint16_t *dest, uint16_t height,
|
||||
uint16_t width, uint16_t stride,
|
||||
FAR const struct nx_fontbitmap_s *bm,
|
||||
nxgl_mxpixel_t color);
|
||||
int nxf_convert_24bpp(FAR uint32 *dest, uint16 height,
|
||||
uint16 width, uint16 stride,
|
||||
int nxf_convert_24bpp(FAR uint32_t *dest, uint16_t height,
|
||||
uint16_t width, uint16_t stride,
|
||||
FAR const struct nx_fontbitmap_s *bm,
|
||||
nxgl_mxpixel_t color);
|
||||
int nxf_convert_32bpp(FAR uint32 *dest, uint16 height,
|
||||
uint16 width, uint16 stride,
|
||||
int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height,
|
||||
uint16_t width, uint16_t stride,
|
||||
FAR const struct nx_fontbitmap_s *bm,
|
||||
nxgl_mxpixel_t color);
|
||||
</pre></ul>
|
||||
@@ -2525,8 +2533,8 @@ int nxf_convert_32bpp(FAR uint32 *dest, uint16 height,
|
||||
<dt><code>graphics/nxglib</code>
|
||||
<dd>The NuttX tiny graphics library.
|
||||
The directory contains generic utilities support operations on primitive graphics objects
|
||||
and logic to rasterize directly into a framebuffer.
|
||||
It has no concept of windows (other than the one, framebuffer window).
|
||||
and logic to rasterize directly into a framebuffer or through an LCD driver interface.
|
||||
It has no concept of windows (other than the one, framebuffer or LCD window).
|
||||
|
||||
<dt><code>graphics/nxbe</code>
|
||||
<dd>This is the <i>back-end</i> of a tiny windowing system.
|
||||
@@ -2606,6 +2614,10 @@ int nxf_convert_32bpp(FAR uint32 *dest, uint16 height,
|
||||
<dt><code>CONFIG_NX_PACKEDMSFIRST</code>:
|
||||
<dd>If a pixel depth of less than 8-bits is used, then NX needs
|
||||
to know if the pixels pack from the MS to LS or from LS to MS
|
||||
<dt><code>CONFIG_NX_LCDDRIVER</code>:
|
||||
<dd>By default, NX builds to use a framebuffer driver (see <code>include/nuttx/fb.h</code>).
|
||||
If this option is defined, NX will build to use an LCD driver (see <code>include/nuttx/lcd.h</code>).
|
||||
</li>
|
||||
</dl>
|
||||
</ul>
|
||||
|
||||
@@ -2704,12 +2716,14 @@ make
|
||||
</pre></ul>
|
||||
</li>
|
||||
<li>
|
||||
A preferred configuration extends the test with a simulated framebuffer driver
|
||||
that uses an X window as a framebuffer.
|
||||
This configuration uses the configuration file at <code>configs/sim/nx/defconfig-x11</code>.
|
||||
This is a superior test configuration because the X window appears at your desktop
|
||||
and you can see the NX output.
|
||||
This preferred configuration can be built as follows:
|
||||
<p>
|
||||
A preferred configuration extends the test with a simulated framebuffer driver
|
||||
that uses an X window as a framebuffer.
|
||||
This configuration uses the configuration file at <code>configs/sim/nx/defconfig-x11</code>.
|
||||
This is a superior test configuration because the X window appears at your desktop
|
||||
and you can see the NX output.
|
||||
This preferred configuration can be built as follows:
|
||||
</p>
|
||||
<ul><pre>
|
||||
cd <NuttX-Directory>/tools
|
||||
./configure sim/nx
|
||||
@@ -2718,6 +2732,23 @@ cp <NuttX-Directory>/configs/sim/nx/defconfig-x11 .config
|
||||
make
|
||||
./nuttx
|
||||
</pre></ul>
|
||||
<p>
|
||||
<i>Update:</i>
|
||||
The sim target has suffered some bit-rot over the years and so the following caveats need to be added:
|
||||
<ul>
|
||||
<li>
|
||||
The X target does not build under recent Cygwin configurations.
|
||||
</li>
|
||||
<li>
|
||||
The X target does not build under current Ubuntu distributions;
|
||||
it fails to locate the X header files.
|
||||
</li>
|
||||
<li>
|
||||
The sim target itself is broken under 64-bit Linux.
|
||||
This is because the sim target is based upon some assembly language setjmp/longjmp logic that only works on 32-bit systems.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
|
||||
BIN
Documentation/NuttX.png
Executable file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
Documentation/NuttX2-a.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Documentation/NuttX2-b.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Documentation/NuttX2.png
Executable file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
Documentation/NuttX320.png
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
@@ -5,32 +5,34 @@
|
||||
<body background="backgd.gif">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td bgcolor="#e4e4e4">
|
||||
<big><b><i><font color="#3c34ec">NuttX RTOS</font></i></b></big> ...
|
||||
<a href="http://nuttx.sourceforge.net" target="_top">Home</a> ...
|
||||
<a href="freeports.html">Free Ports</a><br>
|
||||
</td>
|
||||
<td width="100" align="center">
|
||||
<a href="http://sourceforge.net/projects/nuttx" target="_top">
|
||||
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=189573&type=8" width="80" height="15" border="0" alt="Get NuttX at SourceForge.net. Fast, secure and Free Open Source software downloads" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td width="100" align="center">
|
||||
<a href="http://groups.yahoo.com/group/nuttx/join" target="_top">
|
||||
<img src="http://us.i1.yimg.com/us.yimg.com/i/yg/img/i/us/ui/join.gif"
|
||||
style="border: 0px;"
|
||||
alt="Click to join nuttx"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="80" height="100" rowspan="2">
|
||||
<img src="NuttX.png" width="80">
|
||||
</td>
|
||||
<td bgcolor="#e4e4e4" height="20">
|
||||
<a href="http://nuttx.sourceforge.net" target="_top">Home</a> ...
|
||||
<a href="http://sourceforge.net/projects/nuttx/develop" target="_top">Project</a> ...
|
||||
<a href="http://tech.groups.yahoo.com/group/nuttx/" target="_top">Forum</a> ...
|
||||
<a href="http://sourceforge.net/projects/nuttx/files/" target="_top">Downloads</a> ...
|
||||
<a href="freeports.html">Free Ports</a>
|
||||
</td>
|
||||
<td width="100" align="center">
|
||||
<a href="http://sourceforge.net/projects/nuttx" target="_top">
|
||||
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=189573&type=8" width="80" height="15" border="0" alt="Get NuttX at SourceForge.net. Fast, secure and Free Open Source software downloads" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="bottom">
|
||||
<h1><i><font color="#3c34ec">NuttX RTOS</font></i></b></h1>
|
||||
</td>
|
||||
<td width="100" align="center" valign="top">
|
||||
<a href="http://groups.yahoo.com/group/nuttx/join" target="_top">
|
||||
<img src="http://us.i1.yimg.com/us.yimg.com/i/yg/img/i/us/ui/join.gif"
|
||||
style="border: 0px;"
|
||||
alt="Click to join nuttx"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<h1><big><font color="#3c34ec"><i>NuttX Operating System<p>User's Manual</i></font></big></h1>
|
||||
<p><small>by</small></p>
|
||||
<p>Gregory Nutt<p>
|
||||
<p>Last Updated: May 22, 2009</p>
|
||||
<p>Last Updated: December 13, 2009</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -296,8 +296,8 @@ VxWorks provides the following similar interface:
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <sched.h>
|
||||
STATUS task_init(_TCB *tcb, char *name, int priority, uint32 *stack, uint32 stack_size,
|
||||
maint_t entry, const char *argv[]);
|
||||
int task_init(_TCB *tcb, char *name, int priority, uint32_t *stack, uint32_t stack_size,
|
||||
maint_t entry, const char *argv[]);
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -346,7 +346,7 @@ mechanism to initialize and start a new task.
|
||||
<b>POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
VxWorks provides the following similar interface:
|
||||
<pre>
|
||||
STATUS taskInit(WIND_TCB *pTcb, char *name, int priority, int options, uint32 *pStackBase, int stackSize,
|
||||
STATUS taskInit(WIND_TCB *pTcb, char *name, int priority, int options, uint32_t *pStackBase, int stackSize,
|
||||
FUNCPTR entryPt, int arg1, int arg2, int arg3, int arg4, int arg5,
|
||||
int arg6, int arg7, int arg8, int arg9, int arg10);
|
||||
</pre>
|
||||
@@ -368,7 +368,7 @@ VxWorks provides the following similar interface:
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <sched.h>
|
||||
STATUS task_activate( _TCB *tcb );
|
||||
int task_activate( _TCB *tcb );
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -418,7 +418,7 @@ the pointer to the WIND_TCB cast to an integer.
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <sched.h>
|
||||
STATUS task_delete( pid_t pid );
|
||||
int task_delete( pid_t pid );
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -514,7 +514,7 @@ And the UNIX interface:
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <sched.h>
|
||||
STATUS task_restart( pid_t pid );
|
||||
int task_restart( pid_t pid );
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -974,7 +974,7 @@ priority of the calling task is returned.
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <sched.h>
|
||||
STATUS sched_lock( void );
|
||||
int sched_lock( void );
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -994,7 +994,7 @@ number of times) or until it blocks itself.
|
||||
<p>
|
||||
<b>Assumptions/Limitations:</b>
|
||||
<p>
|
||||
<b> POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
<b>POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
VxWorks provides the comparable interface:
|
||||
<pre>
|
||||
STATUS taskLock( void );
|
||||
@@ -1006,7 +1006,7 @@ VxWorks provides the comparable interface:
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <sched.h>
|
||||
STATUS sched_unlock( void );
|
||||
int sched_unlock( void );
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -1027,7 +1027,7 @@ eligible to preempt the current task will execute.
|
||||
<p>
|
||||
<b>Assumptions/Limitations:</b>
|
||||
<p>
|
||||
<b> POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
<b>POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
VxWorks provides the comparable interface:
|
||||
<pre>
|
||||
STATUS taskUnlock( void );
|
||||
@@ -1039,7 +1039,7 @@ VxWorks provides the comparable interface:
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <sched.h>
|
||||
sint32 sched_lockcount( void )
|
||||
int32_t sched_lockcount( void )
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -2296,7 +2296,7 @@ initialization time).
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <wdog.h>
|
||||
STATUS wd_delete (WDOG_ID wdog);
|
||||
int wd_delete (WDOG_ID wdog);
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -2321,7 +2321,7 @@ pointer to a watchdog structure.
|
||||
caller to assure that the watchdog is inactive before deleting
|
||||
it.
|
||||
<p>
|
||||
<b> POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
<b>POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
VxWorks provides the following comparable interface:
|
||||
<pre>
|
||||
STATUS wdDelete (WDOG_ID wdog);
|
||||
@@ -2340,7 +2340,7 @@ before deallocating it (i.e., never returns ERROR).
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <wdog.h>
|
||||
STATUS wd_start( WDOG_ID wdog, int delay, wdentry_t wdentry,
|
||||
int wd_start( WDOG_ID wdog, int delay, wdentry_t wdentry,
|
||||
intt argc, ....);
|
||||
</pre>
|
||||
|
||||
@@ -2363,8 +2363,8 @@ wd_start() on a given watchdog ID has any effect.
|
||||
<li><I>wdog</I>. Watchdog ID
|
||||
<li><I>delay</I>. Delay count in clock ticks
|
||||
<li><I>wdentry</I>. Function to call on timeout
|
||||
<li><I>argc</I>. The number of uint32 parameters to pass to wdentry.
|
||||
<li><I>...</I>. uint32 size parameters to pass to wdentry
|
||||
<li><I>argc</I>. The number of uint32_t parameters to pass to wdentry.
|
||||
<li><I>...</I>. uint32_t size parameters to pass to wdentry
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -2378,7 +2378,7 @@ wd_start() on a given watchdog ID has any effect.
|
||||
context of the timer interrupt handler and is subject to all ISR
|
||||
restrictions.
|
||||
<p>
|
||||
<b> POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
<b>POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
VxWorks provides the following comparable interface:
|
||||
<pre>
|
||||
STATUS wdStart (WDOG_ID wdog, int delay, FUNCPTR wdentry, int parameter);
|
||||
@@ -2397,7 +2397,7 @@ number of parameters is determined by
|
||||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <wdog.h>
|
||||
STATUS wd_cancel (WDOG_ID wdog);
|
||||
int wd_cancel (WDOG_ID wdog);
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -2419,7 +2419,7 @@ level.
|
||||
<p>
|
||||
<b>Assumptions/Limitations:</b>
|
||||
<p>
|
||||
<b> POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
<b>POSIX Compatibility:</b> This is a NON-POSIX interface.
|
||||
VxWorks provides the following comparable interface:
|
||||
<pre>
|
||||
STATUS wdCancel (WDOG_ID wdog);
|
||||
@@ -6555,16 +6555,16 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt);
|
||||
<pre>
|
||||
struct fat_format_s
|
||||
{
|
||||
ubyte ff_nfats; /* Number of FATs */
|
||||
ubyte ff_fattype; /* FAT size: 0 (autoselect), 12, 16, or 32 */
|
||||
ubyte ff_clustshift; /* Log2 of sectors per cluster: 0-5, 0xff (autoselect) */
|
||||
ubyte ff_volumelabel[11]; /* Volume label */
|
||||
uint16 ff_backupboot; /* Sector number of the backup boot sector (0=use default)*/
|
||||
uint16 ff_rootdirentries; /* Number of root directory entries */
|
||||
uint16 ff_rsvdseccount; /* Reserved sectors */
|
||||
uint32 ff_hidsec; /* Count of hidden sectors preceding fat */
|
||||
uint32 ff_volumeid; /* FAT volume id */
|
||||
uint32 ff_nsectors; /* Number of sectors from device to use: 0: Use all */
|
||||
uint8_t ff_nfats; /* Number of FATs */
|
||||
uint8_t ff_fattype; /* FAT size: 0 (autoselect), 12, 16, or 32 */
|
||||
uint8_t ff_clustshift; /* Log2 of sectors per cluster: 0-5, 0xff (autoselect) */
|
||||
uint8_t ff_volumelabel[11]; /* Volume label */
|
||||
uint16_t ff_backupboot; /* Sector number of the backup boot sector (0=use default)*/
|
||||
uint16_t ff_rootdirentries; /* Number of root directory entries */
|
||||
uint16_t ff_rsvdseccount; /* Reserved sectors */
|
||||
uint32_t ff_hidsec; /* Count of hidden sectors preceding fat */
|
||||
uint32_t ff_volumeid; /* FAT volume id */
|
||||
uint32_t ff_nsectors; /* Number of sectors from device to use: 0: Use all */
|
||||
};
|
||||
</pre>
|
||||
</ul></li>
|
||||
@@ -7392,7 +7392,6 @@ interface include:
|
||||
<li>pid_t
|
||||
<li>size_t
|
||||
<li>sigset_t
|
||||
<li>STATUS
|
||||
<li>time_t
|
||||
</ul>
|
||||
|
||||
@@ -7589,25 +7588,25 @@ notify a task when a message is available on a queue.
|
||||
typedef void (*wdentry_t)(int argc, ...);
|
||||
</pre>
|
||||
<p>
|
||||
Where argc is the number of uint32 type arguments that follow.
|
||||
Where argc is the number of uint32_t type arguments that follow.
|
||||
</p>
|
||||
The arguments are passed as uint32 values.
|
||||
For systems where the sizeof(pointer) < sizeof(uint32), the
|
||||
The arguments are passed as uint32_t values.
|
||||
For systems where the sizeof(pointer) < sizeof(uint32_t), the
|
||||
following union defines the alignment of the pointer within the
|
||||
uint32. For example, the SDCC MCS51 general pointer is
|
||||
24-bits, but uint32 is 32-bits (of course).
|
||||
uint32_t. For example, the SDCC MCS51 general pointer is
|
||||
24-bits, but uint32_t is 32-bits (of course).
|
||||
</p>
|
||||
<pre>
|
||||
union wdparm_u
|
||||
{
|
||||
void *pvarg;
|
||||
uint32 *dwarg;
|
||||
uint32_t *dwarg;
|
||||
};
|
||||
typedef union wdparm_u wdparm_t;
|
||||
</pre>
|
||||
<p>
|
||||
For most 32-bit systems, pointers and uint32 are the same size
|
||||
For systems where sizeof(pointer) > sizeof(uint32), we will
|
||||
For most 32-bit systems, pointers and uint32_t are the same size
|
||||
For systems where sizeof(pointer) > sizeof(uint32_t), we will
|
||||
have to do some redesign.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
|
||||
<p>Last Updated: October 14, 2009</p>
|
||||
<p>Last Updated: May 8, 2010</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -47,6 +47,10 @@
|
||||
| | |- <a href="configs/c5471evm/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/c5471evm/src/README.txt">src/README.txt</a>
|
||||
| | `- <a href="configs/c5471evm/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- demo9s12ne64/
|
||||
| | `- <a href="configs/demo9s12ne64/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- ea3131/
|
||||
| | `- <a href="configs/ea3131/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- eagle100/
|
||||
| | |- <a href="configs/eagle100/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/eagle100/src/README.txt">src/README.txt</a>
|
||||
@@ -62,6 +66,10 @@
|
||||
| | |- <a href="configs/ez80f910200zco/ostest/README.txt">ostest/README.txt</a>
|
||||
| | |- <a href="configs/ez80f910200zco/poll/README.txt">poll/README.txt</a>
|
||||
| | `- <a href="configs/ez80f910200zco/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- lm3s6965-ek/
|
||||
| | |- <a href="configs/lm3s6965-ek/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/lm3s6965-ek/src/README.txt">src/README.txt</a>
|
||||
| | `- <a href="configs/lm3s6965-ek/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- m68332evb/
|
||||
| | |- <a href="configs/m68332evb/include/README.txt">include/README.txt</a>
|
||||
| | `- <a href="configs/m68332evb/src/README.txt">src/README.txt</a>
|
||||
@@ -78,14 +86,22 @@
|
||||
| | |- <a href="configs/ntosd-dm320/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/ntosd-dm320/src/README.txt">src/README.txt</a>
|
||||
| | `- <a href="configs/ntosd-dm320/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- nucleus2g/
|
||||
| | `- <a href="configs/nucleus2g/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- olimex-strp711/
|
||||
| | |- <a href="configs/olimex-strp711/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/olimex-strp711/src/README.txt">src/README.txt</a>
|
||||
| | `- <a href="configs/olimex-strp711/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- olimex-lpc2378/
|
||||
| | |- <a href="configs/olimex-lpc2378/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/olimex-lpc2378/src/README.txt">src/README.txt</a>
|
||||
| | `- <a href="configs/olimex-lpc2378/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- pjrc-8051/
|
||||
| | |- <a href="configs/pjrc-8051/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/pjrc-8051/src/README.txt">src/README.txt</a>
|
||||
| | `- <a href="configs/pjrc-8051/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- sam3u-ek/
|
||||
| | `- <a href="configs/sam3u-ek/README.txt"><b><i>README.txt</i></b></a>
|
||||
| |- sim/
|
||||
| | |- <a href="configs/sim/include/README.txt">include/README.txt</a>
|
||||
| | |- <a href="configs/sim/src/README.txt">src/README.txt</a>
|
||||
@@ -133,6 +149,8 @@
|
||||
| `- <a href="graphics/README.txt"><b><i>README.txt</i></b></a>
|
||||
|- libxx/
|
||||
| `- <a href="libxx/README.txt"><b><i>README.txt</i></b></a>
|
||||
`- netutils/
|
||||
|- <a href="netutils/telnetd/README.txt">telnetd/README.txt</a>
|
||||
`- <a href="netutils/README"><b><i>README</a></a>
|
||||
|- netutils/
|
||||
| |- <a href="netutils/telnetd/README.txt">telnetd/README.txt</a>
|
||||
| `- <a href="netutils/README"><b><i>README</i></b></a>
|
||||
`- tools/
|
||||
`- <a href="tols/README.txt"><b><i>README.txt</i></b></a>
|
||||
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 3.1 KiB |
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>NuttX</title>
|
||||
</head>
|
||||
<frameset rows="80,*" framespacing="0" border="0" frameborder="0">
|
||||
<frameset rows="96,*" framespacing="0" border="0" frameborder="0">
|
||||
<frame name="header" scrolling="no" target="main" src="NuttXBanner.html" marginwidth="0" marginheight="0">
|
||||
<frame name="main" src="NuttX.html">
|
||||
<noframes>
|
||||
|
||||
5
Makefile
@@ -71,6 +71,7 @@ ADDON_DIRS := $(PCODE_DIR) $(NX_DIR)
|
||||
|
||||
NONFSDIRS = sched lib $(ARCH_SRC) mm examples/$(CONFIG_EXAMPLE) $(ADDON_DIRS)
|
||||
FSDIRS = fs drivers binfmt
|
||||
CONTEXTDIRS =
|
||||
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
NONFSDIRS += net netutils
|
||||
@@ -78,6 +79,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_NX),y)
|
||||
NONFSDIRS += graphics
|
||||
CONTEXTDIRS += graphics
|
||||
endif
|
||||
|
||||
# CLEANDIRS are the directories that will clean in. These are
|
||||
@@ -189,6 +191,9 @@ endif
|
||||
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip
|
||||
|
||||
context: check_context include/nuttx/config.h dirlinks
|
||||
@for dir in $(CONTEXTDIRS) ; do \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" context ; \
|
||||
done
|
||||
|
||||
clean_context:
|
||||
@rm -f include/nuttx/config.h
|
||||
|
||||
64
README.txt
@@ -1,10 +1,50 @@
|
||||
README
|
||||
^^^^^^
|
||||
|
||||
o Installation
|
||||
o Configuring NuttX
|
||||
o Building NuttX
|
||||
o Documentation
|
||||
|
||||
INSTALLATION
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Download and Unpack:
|
||||
|
||||
Download and unpack the NuttX tarball. If you are reading this, then
|
||||
you have probably already done that. After unpacking, you will end
|
||||
up with a directory called nuttx-version (where version is the NuttX
|
||||
version number). You might want to rename that directory nuttx to
|
||||
match the various instructions in the documentation and some scripts
|
||||
in the source tree.
|
||||
|
||||
That nuttx build directory should reside in a path that contains no
|
||||
spaces in the higher level directory names. For example, under
|
||||
Cygwin, your home directory might be formed from your first and last
|
||||
names like: "/home/First Last". That will cause strange errors when
|
||||
the make system tries to build.
|
||||
|
||||
[Actually, that problem is probably not to difficult to fix. Some
|
||||
Makefiles probably just need some pathes within double quotes]
|
||||
|
||||
A Note about Header Files:
|
||||
|
||||
Some toolchains are built with header files extracted from a C-library
|
||||
distribution (such as newlib). For those toolchains, NuttX must be
|
||||
compiled without using the standard header files that are distributed
|
||||
with your toolchain. This prevents including conflicting, incompatible
|
||||
header files (such as stdio.h).
|
||||
|
||||
Certain header files, such as setjmp.h and varargs.h, may still be
|
||||
needed from your toolchain, however. If that is the case, one solution
|
||||
is to copy those header file from your toolchain into the NuttX include
|
||||
directory.
|
||||
|
||||
Also, if you prefer to use the stdint.h and stdbool.h header files from
|
||||
your toolchain, those could be copied into the include/ directory too.
|
||||
Using most other header files from your toolchain would probably cause
|
||||
errors.
|
||||
|
||||
CONFIGURING NUTTX
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -98,6 +138,10 @@ Below is a guide to the available README files in the NuttX source tree:
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
| | `- README.txt
|
||||
| |- demo0s12ne64/
|
||||
| | `- README.txt
|
||||
| |- ea3131/
|
||||
| | `- README.txt
|
||||
| |- eagle100/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
@@ -113,6 +157,10 @@ Below is a guide to the available README files in the NuttX source tree:
|
||||
| | |- ostest/README.txt
|
||||
| | |- poll/README.txt
|
||||
| | `- README.txt
|
||||
| |- lm3s5965-ek/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
| | `- README.txt
|
||||
| |- m68332evb/
|
||||
| | |- include/README.txt
|
||||
| | `- src/README.txt
|
||||
@@ -129,14 +177,22 @@ Below is a guide to the available README files in the NuttX source tree:
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
| | `- README.txt
|
||||
| |- nucleus1g/
|
||||
| | `- README.txt
|
||||
| |- olimex-strp711/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
| | `- README.txt
|
||||
| |- olimex-lpc2378/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
| | `- README.txt
|
||||
| |- pjrc-8051/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
| | `- README.txt
|
||||
| |- sam3u-ek/
|
||||
| | `- README.txt
|
||||
| |- sim/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
@@ -184,6 +240,8 @@ Below is a guide to the available README files in the NuttX source tree:
|
||||
| `- README.txt
|
||||
|- libxx/
|
||||
| `- README.txt
|
||||
`- netutils/
|
||||
|- telnetd/README.txt
|
||||
`- README
|
||||
|- netutils/
|
||||
| |- telnetd/README.txt
|
||||
| `- README
|
||||
`- tools/
|
||||
`- README.txt
|
||||
|
||||
271
ReleaseNotes
@@ -1007,7 +1007,7 @@ nuttx-0.4.13
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This is the 45th release of NuttX. The release extends the support for the STMicro
|
||||
STM32 microcontroller. Minimul support for the STM3210E-EVAL development board based
|
||||
STM32 microcontroller. Minimal support for the STM3210E-EVAL development board based
|
||||
around the STM32F103ZET6 MCU was released in NuttX-0.4.12. This release adds:
|
||||
|
||||
* A simple interface definition to support some FLASH, EEPROM, NVRAM, etc. devices.
|
||||
@@ -1029,3 +1029,272 @@ This release also corrects some important bugs in the early STM32 release:
|
||||
operations to failed used for interrupts in a certain range.
|
||||
|
||||
This tarball contains a complete CVS snapshot from November 4, 2009
|
||||
|
||||
nuttx-4.14
|
||||
^^^^^^^^^^
|
||||
|
||||
This is the 46th release of NuttX. The release extends the support for the STMicro
|
||||
STM32 microcontroller. Minimal support for the STM3210E-EVAL development board based
|
||||
around the STM32F103ZET6 MCU was released in NuttX-0.4.12 and extended in Nuttx-0.4.13
|
||||
to include initial USB support. This completes the STM32F103ZET6 and adds:
|
||||
|
||||
New Generic RTOS Features:
|
||||
|
||||
* Added generic support that can be included in any block driver to provide
|
||||
read-ahead buffering and write buffering for improved driver performance.
|
||||
* Added a generic worker thread that can used to defer processing from an
|
||||
interrupt to a task.
|
||||
* Defined a generic SD/SDIO interface can can be bound to a MMC/SD or SDIO
|
||||
driver to orovide SDIO support.
|
||||
* Implemented a an SDIO-based MMC/SD driver using this new SDIO interface
|
||||
|
||||
New STM32 Features:
|
||||
|
||||
* Add support to configure an STM32 input GPIO to generate an EXTI interrupt.
|
||||
* Added support for buttons on the STM3210E-EVAL board.
|
||||
* Implemented an STM32 version of the common the SDIO interface.
|
||||
* Added a configuration to exercise the STM32 with the USB mass storage
|
||||
device class example.
|
||||
|
||||
This release also corrects some important bugs in the early STM32 release:
|
||||
|
||||
* Correct error handling in the mount() logic.
|
||||
* Fixed several STM32 DMA-related issues. Integrated and debugged STM32 DMA
|
||||
functionality that was added in 0.4.12.
|
||||
* Fixed several bugs in the STM32 USB device-side driver.
|
||||
|
||||
NOTE: This version, 4.14, is equivalent to what would have been called 0.4.14
|
||||
to follow 0.4.13. The zero has been eliminated from the front of the version
|
||||
number to avoid confusion about the state of development: Some have interpreted
|
||||
the leading zero to mean that the code is in some way unstable. That was not
|
||||
the intent. Beginning in January 2010, I will switch to the 2010.nn versioning
|
||||
as many others have done to avoid such confusion.
|
||||
|
||||
This tarball contains a complete CVS snapshot from December 2, 2009
|
||||
|
||||
nuttx-5.0
|
||||
^^^^^^^^^
|
||||
|
||||
This is 47th release of NuttX and the successor to nuttx-4.14. This
|
||||
major revision number has been incremented to indicate that an
|
||||
incompatibility with previous nuttx releases has been introduced. This
|
||||
version adopts standard fixed width integer names as specified by the
|
||||
ANSII C99 standard. The core logic of NuttX is older than that
|
||||
standard and did not conform to it.
|
||||
|
||||
If you have applications running on nuttx-4.14, those applications
|
||||
should continue to build and execute without problem on nuttx-5.0.
|
||||
However, if you have device drivers or other OS-internal logic, you
|
||||
will probably have to make some minor changes to your code to use
|
||||
this version. Below is a summary of those changes:
|
||||
|
||||
o If you include sys/types.h to get the non-standard, fixed width
|
||||
integer types (uint32, uint16, ubyte, etc.), that is no longer
|
||||
necessary.
|
||||
o Instead, you will need to include stdint.h where the new fixed width
|
||||
integer types are defined (uint32_t, uint16_t, uint8_t, etc.).
|
||||
o You will have to change all occurrences of the following types:
|
||||
|
||||
uint32 -> uint32_t
|
||||
uint16 -> uint16_t
|
||||
ubyte -> uint8_t
|
||||
uint8 -> uint8_t
|
||||
sint32 -> int32_t
|
||||
sint16 -> int16_t
|
||||
sint8 -> int8_t
|
||||
|
||||
o In addition, the non-standard type 'boolean' must replaced with the
|
||||
standard type 'bool'. The type definition for 'bool' is in stdbool.h
|
||||
|
||||
This change in typing caused small changes to many, many files. It was
|
||||
verified that all configurations in the release still build correctly
|
||||
(other than the SDCC-based configurations). Regression testing was
|
||||
performed on a few configurations, but it is possible that minor build
|
||||
issues still exist (if you encounter any, please let me know and I will
|
||||
help you to fix them).
|
||||
|
||||
In the course of the regression testing, several important bugs unrelated
|
||||
to the type changes were found and corrected.
|
||||
|
||||
o Fixed an important error in the RX FIFO handling logic of the LM3S6918
|
||||
Ethernet driver.
|
||||
o Corrected the handling of TCP sequence numbers in the TCP stack.
|
||||
o And other less important bugs as detailed in the ChangeLog.
|
||||
|
||||
The primary focus of this release was standards compatibility, but a
|
||||
few new features were added including a (1) Flash Translation Layer (FTL)
|
||||
that will support filesystems on a FLASH device and (2) partial ports
|
||||
for the STM32F107VC and HCS12 C9S12NE64 MCUs. Those ports are very
|
||||
incomplete as of this writing.
|
||||
|
||||
This tarball contains a complete CVS snapshot from December 21, 2009
|
||||
|
||||
nuttx-5.1
|
||||
^^^^^^^^^
|
||||
|
||||
This is the 48th release of NuttX. This release adds support for two new
|
||||
MCU architectures in various states of development:
|
||||
|
||||
o AT91SAM3U (http://www.atmel.com/products/at91/sam3landing.asp?family_id=605)
|
||||
|
||||
This release adds support for the SAM3U-EK development board with the
|
||||
AT91SAM3U4E MCU (http://www.atmel.com/dyn/products/product_card_mcu.asp?part_id=4562).
|
||||
As with most NuttX architecutre releases, the release will be rolled out in
|
||||
two parts: A basic port and an extended port.
|
||||
|
||||
NuttX-5.1 includes the basic port for the SAM3U-EK board. This release
|
||||
passes the NuttX OS test and is proven to have a valid OS implementation.
|
||||
It supports the basic boot-up, serial console and timer interrupts. A
|
||||
configuration to support the NuttShell is also included.
|
||||
|
||||
The extended port will also include support for SDIO-based SD cards and
|
||||
USB device (and possible LCD support). These extensions may or may not
|
||||
happen by the Nuttx 5.2 release as my plate is kind of full now.
|
||||
|
||||
o LPC3131 (http://ics.nxp.com/products/lpc3000/lpc313x.lpc314x.lpc315x/)
|
||||
|
||||
This release also adds the complete implementation of the basic port for
|
||||
the NXP LPC3131 MCU on the Embedded Artists EA3131 board
|
||||
(http://www.embeddedartists.com/products/kits/lpc3131_kit.php). That port,
|
||||
unfortunately has stalled due to tools issues. Those tool issues have
|
||||
been resolved and I am confident that the verified basic port will be
|
||||
available in NuttX-5.2.
|
||||
|
||||
The extended release will follow and should include SDIO-based SD card
|
||||
support and device USB.
|
||||
|
||||
A few additional features and bugfixes of a minor nature were also incorporated
|
||||
as detailed in the ChangeLog.
|
||||
|
||||
nuttx-5.2
|
||||
^^^^^^^^^
|
||||
|
||||
This is the 49th release of NuttX. This release completes the verification of
|
||||
the basic port for the NXP LPC3131 MCU on the Embedded Artists EA3131 board
|
||||
(http://www.embeddedartists.com/products/kits/lpc3131_kit.php). This basic
|
||||
port includes basic boot-up, serial console, and timer interrupts. This port
|
||||
has been verified on the using the NuttX OS test and includes a working
|
||||
implementation of the NuttShell (NSH).
|
||||
|
||||
An extended release will follow and should include SDIO-based SD card
|
||||
support and device USB.
|
||||
|
||||
nuttx-5.3
|
||||
^^^^^^^^^
|
||||
|
||||
This is the 50th release of NuttX. This release suport for one new achitecture:
|
||||
|
||||
* A basic port for the NXP LPC2378 MCU on the Olimex-LPC2378 development board
|
||||
was contributed by Rommel Marcelo.
|
||||
|
||||
And extensions to two existing architures:
|
||||
|
||||
* David Hewson contributed a dual-speed (full/high) USB device-side driver
|
||||
for the NXP LPC3131 on the Embedded Artists EA3131 development board.
|
||||
* A DMA driver and a high speed MCI driver for the Atmel AT91SAM3U are
|
||||
included (but not fully tested in this release).
|
||||
|
||||
Two important bugfix was also included:
|
||||
|
||||
* An important fix to the USB mass storage driver was contributed by
|
||||
David Hewson.
|
||||
* A serious error in the AT91SAM3U PIO handling was fixed.
|
||||
|
||||
nuttx-5.4
|
||||
^^^^^^^^^
|
||||
|
||||
This is the 51st release of NuttX. This release includes one new, important
|
||||
extension to th NX graphics system (See http://www.nuttx.org/NXGraphicsSubsystem.html).
|
||||
|
||||
NX was develop a couple years back on hardware that supported only framebuffer
|
||||
devices, that is, video hardware with video memory directly converts the memroy
|
||||
content to video. However, most MCUs that NuttX focuses on do not support such
|
||||
video memory; rather, that typically only support LCDs via parallel or serial
|
||||
interfaces.
|
||||
|
||||
This release of NuttX extends NX so that now renders directly to the LCD device
|
||||
via its serial or parallel interface. No in-memory copy of the screen memory
|
||||
need be maintained so this solution should also work in MCUs with very limited
|
||||
SRAM.
|
||||
|
||||
This initial release of this feature includes the verified NX extensions plus
|
||||
a driver for the HX8347, 16-bit parallel LCD. This LCD supports 16-bit RGB
|
||||
(5:6:5).
|
||||
|
||||
nuttx-5.5
|
||||
^^^^^^^^^
|
||||
|
||||
This is the 52nd release of NuttX. This release includes one new port, some
|
||||
new drivers and some important bugfixes:
|
||||
|
||||
* NuttX was ported to the Luminary/TI LM3S6965 Ethernet Evaluation Kit.
|
||||
At present, that port includes an OS test configuration and a NuttShell
|
||||
(NSH) configuration with telnet support.
|
||||
|
||||
MMC/SD and Networking support are provided but not thoroughly verified
|
||||
in this release: Current development efforts are focused on porting the
|
||||
NuttX window system (NX) to work with the Evaluation Kits OLED display.
|
||||
|
||||
* A NuttX Ethernet driver for the Microchip ENC28J60 SPI Ethernet chip is
|
||||
available in the source tree (but has not yet been fully verified because
|
||||
I haven't properly connected it to hardware yet).
|
||||
|
||||
* The Olimex STR-P711 NuttX port was extended to support the ENC28J60 and
|
||||
some new networking configurations were added. The ENC28J60 has not
|
||||
been tested on the STR-P711, however, because of hardware issues (I don't
|
||||
think the USB powered board provides enough power for the ENC28J60 and
|
||||
I don't have the right wall wart yet).
|
||||
|
||||
Along the way, external interrupt support (XTI) was added to the STMicro
|
||||
STR-P711 port and some important bugs were fixed in the STR-P711 SPI
|
||||
driver.
|
||||
|
||||
* Added (optional) floating point support for printf() (contributed by
|
||||
Yolande Cates).
|
||||
|
||||
* Corrected an important UDP reference counting error. It was not a serious
|
||||
error, but it trigger an assertion was IS a serious error.
|
||||
|
||||
nuttx-5.6
|
||||
^^^^^^^^^
|
||||
|
||||
This is the 53rd release of NuttX. This release includes one several new drivers
|
||||
for existing NuttX ports:
|
||||
|
||||
* This port adds support for the RiT displays P14201 4-bpp, greyscale OLED.
|
||||
4-bpp greyscale support was integrated into the NX graphics sub-system and
|
||||
verified using the TI/Luminary LP3S6965 Ethernet Evaluation Kit.
|
||||
|
||||
* The MP25Px driver was extended for the M24P1 FLASH part (see NOTE).
|
||||
|
||||
* An I2C driver and (basic) SPI driver were added for the NXP LPC313x port.
|
||||
The I2C interface definition was extended to efficiently handle multiple I2C
|
||||
transfers (See NOTE).
|
||||
|
||||
NOTE: Contributed by David Hewson.
|
||||
|
||||
As well as a few, important USB-related bugfixes (See the ChangeLog for details).
|
||||
|
||||
This release also includes the beginnings of a port for the NXP LPC1768 MCU. However,
|
||||
it is too early for that port to be useful (stay tuned for a future announce of the
|
||||
availability of the LPC1768 port).
|
||||
|
||||
nuttx-5.7
|
||||
^^^^^^^^^
|
||||
|
||||
This is the 54th release of NuttX. This release adds basic support for one new
|
||||
ARM Cortex-M3 architecture:
|
||||
|
||||
* Added support for NXP LPC1768 MCU as provided on the Nucleus 2G board from
|
||||
2G Engineering (http://www.2g-eng.com).
|
||||
* Some initial files for the LPC17xx family were released in NuttX 5.6, but the
|
||||
first functional release for the NXP LPC1768/Nucleus2G occured with NuttX 5.7.
|
||||
* That initial basic release included timer interrupts and a serial console and was
|
||||
verified using the NuttX OS test.
|
||||
* That release includes a verified NuttShell (NSH) configuration
|
||||
(see the http://www.nuttx.org/NuttShell.html).
|
||||
* Also included are unverified SPI and USB device drivers.
|
||||
|
||||
Further efforts include: (1) development of a DMA support library, (2) SPI-based MMC/SD
|
||||
support, and (3) verification of the USB driver. Watch for announcement of the completed
|
||||
LPC1768 port expected in NuttX-5.8.
|
||||
|
||||
189
TODO
@@ -1,5 +1,5 @@
|
||||
NuttX TODO List (Last updated November 4, 2009)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
NuttX TODO List (Last updated May 19, 2010)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
(5) Task/Scheduler (sched/)
|
||||
(2) Memory Managment (mm/)
|
||||
@@ -7,15 +7,15 @@ NuttX TODO List (Last updated November 4, 2009)
|
||||
(1) pthreads (sched/)
|
||||
(1) C++ Support
|
||||
(5) Binary loaders (binfmt/)
|
||||
(13) Network (net/, netutils/)
|
||||
(4) Network Utilities (netutils/)
|
||||
(15) Network (net/, drivers/net)
|
||||
(5) Network Utilities (netutils/)
|
||||
(1) USB (drivers/usbdev)
|
||||
(5) Libraries (lib/)
|
||||
(8) File system/Generic drivers (fs/, drivers/)
|
||||
(2) Graphics subystem (graphics/)
|
||||
(12) File system/Generic drivers (fs/, drivers/)
|
||||
(3) Graphics subystem (graphics/)
|
||||
(1) Pascal add-on (pcode/)
|
||||
(1) Documentation (Documentation/)
|
||||
(5) Build system / Toolchains
|
||||
(6) Build system / Toolchains
|
||||
(3) NuttShell (NSH) (examples/nsh)
|
||||
(3) Other Applications & Tests (examples/)
|
||||
(2) Linux/Cywgin simulation (arch/sim)
|
||||
@@ -23,15 +23,16 @@ NuttX TODO List (Last updated November 4, 2009)
|
||||
(1) ARM/C5471 (arch/arm/src/c5471/)
|
||||
(3) ARM/DM320 (arch/arm/src/dm320/)
|
||||
(2) ARM/i.MX (arch/arm/src/imx/)
|
||||
(8) ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||
(7) ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||
(3) ARM/STR71x (arch/arm/src/str71x/)
|
||||
(3) ARM/LM3S6918 (arch/arm/src/lm3s/)
|
||||
(4) ARM/LM3S6918 (arch/arm/src/lm3s/)
|
||||
(5) ARM/STM32 (arch/arm/src/stm32/)
|
||||
(4) pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||
(2) Hitachi/Renesas SH-1 (arch/sh/src/sh1)
|
||||
(4) Renesas M16C/26 (arch/sh/src/m16c)
|
||||
(8) z80/z8/ez80 (arch/z80/)
|
||||
(8) z16 (arch/z16/)
|
||||
(9) z16 (arch/z16/)
|
||||
(1) mc68hc1x (arch/hc)
|
||||
|
||||
o Task/Scheduler (sched/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -138,8 +139,8 @@ o Binary loaders (binfmt/)
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
o Network (net/)
|
||||
^^^^^^^^^^^^^^
|
||||
o Network (net/, drivers/net)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: Should implement SOCK_RAW, SOCK_PACKET
|
||||
Status: Open
|
||||
@@ -196,6 +197,10 @@ o Network (net/)
|
||||
if the destination IP has not been mapped to a MAC. Could
|
||||
improve send() performance by explicitly performing ARP before
|
||||
sending the packet.
|
||||
---
|
||||
Or by enabling arpin() logic. NOTE: From the uIP forum: "You
|
||||
can use the function but it has a bug. You'll need to comment
|
||||
this line: uip_len -= sizeof(struct uip_eth_hdr);"
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
@@ -240,6 +245,17 @@ o Network (net/)
|
||||
Status: Open
|
||||
Priority: Low.
|
||||
|
||||
Description: I started coding a CrystalLan CS89x0 driver (drivers/net/cs89x0.c),
|
||||
but never finished it.
|
||||
Status: Open
|
||||
Priority: Low unless you need it.
|
||||
|
||||
Description: So far, I have not come up with a usable hardware platform to
|
||||
verify the ENC28J60 Ethernet driver (drivers/net/enc28j60.c).
|
||||
So it is untested.
|
||||
Status: Open
|
||||
Priority: Low unless you need it.
|
||||
|
||||
o Network Utilities (netutils/)
|
||||
|
||||
Description: One critical part of netutils/ apps is untested: The uIP
|
||||
@@ -266,16 +282,31 @@ o Network Utilities (netutils/)
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
Description: There are some lingering bugs in THTTPD, possibly race conditions. When debug
|
||||
is enabled, it works. But with debug disabled, there are sometimes
|
||||
mysterious hangs or crashes in the CGI. Of course, this is hard to fix
|
||||
when the problem goes away with debug output enabled (and also since
|
||||
output from the CGI program is re-directed; you can redefine bdbg to
|
||||
be lldbg in include/debug.h to get non-re-directed debug output).
|
||||
Status: Open.
|
||||
UPDATE: I have found that increasing the size of the CGI program stack
|
||||
from 1024 to 2048 (on the LM3S) eliminates the problem. So the most
|
||||
likely cause is probably a stack overflow, not a hard sofware bug.
|
||||
Priority: Probably Low
|
||||
|
||||
Description: If the network is enabled, but THTTPD is not configured, it spews out lots
|
||||
of pointless warnings. This is kind of annoying and unprofessional; needs to
|
||||
be fixed someday.
|
||||
Status: Open. An annoyance, but not a real problem.
|
||||
Priority: Low
|
||||
|
||||
o USB (drivers/usbdev)
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: The USB bulk storage class driver configuration (examples/usbstorage)
|
||||
does not work reliably when debug is disabled (CONFIG_DEBUG+CONFIG_DEBUG_VERBOSE
|
||||
+CONFIG_DEBUG_USB) on WinXP (Linux appears to be fine). A race condition would
|
||||
would be a possibility. The symptom is that that WinXP sends a MODE SENSE (6)
|
||||
command with an unsupported mode page (0x1c/0x00)
|
||||
Description: There is a workaround for a bug in drivers/usbdev/usbdev_storage.c.
|
||||
that involves delays. This needs to be redesigned to eliminate these delays.
|
||||
Status: Open
|
||||
Priority: High
|
||||
Priority: Medium
|
||||
|
||||
o Libraries (lib/)
|
||||
^^^^^^^^^^^^^^^^
|
||||
@@ -359,6 +390,30 @@ o File system / Generic drivers (fs/, drivers/)
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: Block driver read-ahead buffer and write buffer support is
|
||||
implemented but not yet tested.
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: The drivers/mmcsd/mmcsd_sdio.c driver has hooks in place to
|
||||
support read-ahead buffering and write buffering, but the logic
|
||||
is incomplete and untested.
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: A FLASH translation layer (FTL) has been implemented at
|
||||
drivers/mtd/ftl.c but has not yet been tested. This layer
|
||||
will convert a FLASH MTD interface into a block driver that
|
||||
can be used with any file system. Good performance of this
|
||||
layer will depend upon functioning write buffer support!
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: ENC28J60 driver is complete, but untested (I still haven't got
|
||||
a good ENC28J60 test platform).
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
o Graphics subystem (graphics/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -375,6 +430,15 @@ o Graphics subystem (graphics/)
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
Description: The examples/nx test using lcd/p14201.c and the configs/lm3s6965-ek
|
||||
configuration shows two single pixel-wide anomalies. One along
|
||||
column zero is clearly caused by the NX windowing logic. It is
|
||||
not certain if these are consequences of the 4bpp logic or if these
|
||||
are anomalies that have always been in NX, but are only visible
|
||||
now at the low resolution of the p14201 LCD (128x96).
|
||||
Status: Open
|
||||
Priority: Low (unless you need the p13201 then it is certainly higher).
|
||||
|
||||
o Pascal Add-On (pcode/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -423,6 +487,16 @@ o Build system
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Decription: Build of NX fails with gcc-4.2.2. When generating C files using
|
||||
arm-elf-gcc -E, the CPP fails when using -isystem. Works fine with
|
||||
older compilers. My work around for now is to use an older compiler
|
||||
for the CPP definition in the configuration Make.defs file, do
|
||||
make context, restore the original Make.defs, and then make.
|
||||
Status: Open. This may not be a real issue. I have not seen this
|
||||
happen lately so it may have nothing to do with GCC.
|
||||
Priority: High if you are using NX and a newer compiler.
|
||||
|
||||
|
||||
o NuttShell (NSH) (examples/nsh)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -573,14 +647,6 @@ o ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: The USB bulk storage class driver configuration (examples/usbstorage)
|
||||
does not work reliably when debug is disabled (CONFIG_DEBUG+CONFIG_DEBUG_VERBOSE
|
||||
+CONFIG_DEBUG_USB) on WinXP (Linux appears to be fine). A race condition would
|
||||
would be a possibility. The symptom is that that WinXP sends a MODE SENSE (6)
|
||||
command with an unsupported mode page (0x1c/0x00)
|
||||
Status: Open
|
||||
Priority: High
|
||||
|
||||
Description: At present the SPI driver is polled. Should it be interrupt driven?
|
||||
Look at arch/arm/src/imx/imx_spi.c -- that is a good example of an
|
||||
interrupt driven SPI driver. Should be very easy to part that architecture
|
||||
@@ -605,6 +671,14 @@ o ARM/LPC214x (arch/arm/src/lpc214x/)
|
||||
Status: Open
|
||||
Priority: Uncertain
|
||||
|
||||
Description: Possible errors in USB device driver reported "I suspect there<72>s a few
|
||||
issues in the lpc214x USB driver <20> in particular it doesn<73>t stall both
|
||||
in/out endpoints for unsupported setup requests and it doesn<73>t call
|
||||
CLASS_DISCONNCET on a USB reset <20> I don<6F>t have any access to that hardware
|
||||
so can<61>t pursue it really."
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
o ARM/STR71x (arch/arm/src/str71x/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -642,21 +716,22 @@ o ARM/LM3S6918 (arch/arm/src/lm3s/)
|
||||
Status: Open
|
||||
Priority: Low -- unless some dependency-related build issues is discovered.
|
||||
|
||||
Description: There are some lingering bugs in THTTPD, possibly race conditions. This
|
||||
is covered above under Network Utilities, but is duplicated here
|
||||
to point out that the LM3S suffers from this bug.
|
||||
Status: Open.
|
||||
UPDATE: I have found that increasing the size of the CGI program stack
|
||||
from 1024 to 2048 (on the LM3S) eliminates the problem. So the most
|
||||
likely cause is probably a stack overflow, not a hard sofware bug.
|
||||
Priority: Probably Low
|
||||
|
||||
o ARM/STM32 (arch/arm/src/stm32/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: DMA subsystem is untested.
|
||||
Status: Open
|
||||
Priority: Low -- for now
|
||||
|
||||
Description: NOR Flash driver and FTL layer to support a file system.
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: MMC/SD SDIO driver needed.
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
Description A USB device-side driver is in place but not well tested. At
|
||||
present, the examples/usbserial test sometimes fails. The situation
|
||||
that causes the failure is:
|
||||
@@ -679,9 +754,23 @@ o ARM/STM32 (arch/arm/src/stm32/)
|
||||
Priority: Medium-High
|
||||
|
||||
Description: FSMC external memory support is untested
|
||||
Status: Opon
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: DMA logic needs to be extended. DMA2, Channel 5, will not work
|
||||
because the DMA2 channels 4 & 5 share the same interrupt.
|
||||
Status: Open
|
||||
Priority: Low until someone needs DMA1, Channel 5 (ADC3, UART4_TX, TIM5_CH1, or
|
||||
TIM8_CH2).
|
||||
|
||||
Desription: I am unable to access a 2Gb SanDisk microSD card (in adaptor) on the
|
||||
the STM3210E-EVAL board. The card reports that it is a SDV1.x card
|
||||
with a 1Kb block size, but the CMD16 to set the block length to
|
||||
1024 fails.
|
||||
Status: Open
|
||||
Priority: Uncertain. I don't this is a bug, I think I just don't understand
|
||||
how to work with this type of SD card.
|
||||
|
||||
o pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -709,7 +798,10 @@ o pjrc-8052 / MCS51 (arch/pjrc-8051/)
|
||||
examples/ostest/barrier.c around lines 53 and 74
|
||||
examples/ostest/sighand.c at 225 and 244
|
||||
driver/serial.c in usleep calls around 347 and 354
|
||||
Status: Open
|
||||
Status: Open. Update: These were reviewed during the hcs12 port. The
|
||||
hcs12 also has 16-bit integer types (if -mshort is in the CFLAGS).
|
||||
I believe that the warnings in most of the above have been fixed
|
||||
but this has not been verified on this platform).
|
||||
Priority: Medium
|
||||
|
||||
Description Global data is not being initialized. Logic like that of SDCCs
|
||||
@@ -780,10 +872,11 @@ o Renesas M16C/26 (arch/sh/src/m16c)
|
||||
o z80/z8/ez80 (arch/z80)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: The SDCC version the same problems with interger overflow during
|
||||
Description: The SDCC version the same problems with integer overflow during
|
||||
compilation as described for pjrc-8051. At typical cause is code like
|
||||
usleep(500*1000) which exceeds the range of a 16-bit integer
|
||||
Status: See pjrc-8051
|
||||
usleep(500*1000) which exceeds the range of a 16-bit integer.
|
||||
Status: See pjrc-8051. These have probably been fixed but have not yet
|
||||
been verified on these platforms.
|
||||
Priority: See pjrc-8051
|
||||
|
||||
Description: The simulated Z80 serial console (configs/z80sim/src/z80_serial.c +
|
||||
@@ -951,5 +1044,23 @@ o z16 (arch/z16)
|
||||
Status: Open
|
||||
Priority: Low
|
||||
|
||||
Description: The file drivers/mmcsd/mmcsd_sdio.c generates an internal compiler
|
||||
error like:
|
||||
|
||||
mmcsd\mmcsd_sdio.c
|
||||
Internal Error(0503) On line 2504 of "MMCSD\MMCSD_SDIO.C"
|
||||
File <c3>, Args(562,46)
|
||||
|
||||
Status: Open. Recommended workaround: remove mmcsd_sdio.c from
|
||||
drivers/mmcsd/Make.defs. There is no SDIO support for the Z16 anyway
|
||||
Priority: Low
|
||||
|
||||
o mc68hc1x (arch/hc)
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Description: There is no script for building in banked mode (more correctly, there
|
||||
is a script, but logic inside the script has not yet been implemented).
|
||||
It would be necessary to implement banked mode to able to access more
|
||||
the 48Kb of FLASH.
|
||||
Status: Open.
|
||||
Priority: Medium/Low.
|
||||
|
||||
@@ -79,13 +79,18 @@ include/types.h
|
||||
This provides architecture/toolchain-specific definitions for
|
||||
standard types. This file should typedef:
|
||||
|
||||
sbyte, ubyte, uint8, boolean, sint16, uint16, sint32, uint32
|
||||
_int8_t, _uint8_t, _int16_t, _uint16_t, _int32_t, _uint32_t
|
||||
|
||||
and
|
||||
and if the architecture supports 64-bit integers.
|
||||
|
||||
sint64, uint64
|
||||
_int24_t, _uint24_t, int64_t, uint64_t
|
||||
|
||||
if the architecture supports 64-bit integers.
|
||||
NOTE that these type names have a leading underscore character. This
|
||||
file will be included(indirectly) by include/stdint.h and typedef'ed to
|
||||
the final name without the underscore character. This roundabout way of
|
||||
doings things allows the stdint.h to be removed from the include/
|
||||
directory in the event that the user prefers to use the definitions
|
||||
provided by their toolchain header files
|
||||
|
||||
irqstate_t
|
||||
|
||||
@@ -152,6 +157,12 @@ arch/arm - ARM-based micro-controllers
|
||||
NuttX operates on the ARM9EJS of this dual core processor. This port
|
||||
complete, verified, and included in the NuttX release 0.2.1.
|
||||
|
||||
arch/arm/include/imx and arch/arm/src/imx
|
||||
Freescale MC9328MX1 or i.MX1. This port uses the Freescale MX1ADS
|
||||
development board with a GNU arm-elf toolchain* under either Linux or Cygwin.
|
||||
STATUS: This port has stalled because of development tool issues. Coding
|
||||
is complete on the basic port (timer, serial console, SPI).
|
||||
|
||||
arch/arm/include/lm3s and arch/arm/src/lm3s
|
||||
These directories contain support for the Luminary LMS family, particularly
|
||||
for the LM3S6918. The initial, release of this port was included in NuttX version
|
||||
@@ -161,16 +172,49 @@ arch/arm - ARM-based micro-controllers
|
||||
|
||||
arch/arm/include/lpc214x and arch/arm/src/lpc214x
|
||||
These directories provide support for NXP LPC214x family of
|
||||
processors. This port boots and passes the OS test (examples/ostest).
|
||||
ARM7TDMI processors. This port boots and passes the OS test (examples/ostest).
|
||||
The port is complete and verifed. As of NuttX 0.3.17, the port includes:
|
||||
timer interrupts, serial console, USB driver, and SPI-based MMC/SD card
|
||||
support. A verifed NuttShell (NSH) configuration is also available.
|
||||
|
||||
arch/arm/include/lpc2378 and arch/arm/src/lpc2378.
|
||||
NXP LPC2378. Support is provided for the NXP LPC2378 MCU. This port was
|
||||
contributed by Rommel Marcelo is was first released in NuttX-5.3.
|
||||
STATUS: This port boots and passes the OS test (examples/ostest) and
|
||||
includes a working implementation of the NuttShell (NSH). The port is
|
||||
complete and verified. As of NuttX 5.3, the port includes only basic
|
||||
timer interrupts and serial console support.
|
||||
|
||||
arch/arm/include/lpc313x and arch/arm/src/lpc313x
|
||||
These directories provide support for NXP LPC313x family of
|
||||
ARM926EJ-S processors. The port for the NXP LPC3131 was first
|
||||
released in NuttX-5.1 (but was not functional until NuttX-5.2).
|
||||
STATUS: The basic EA3131 port is complete and verified in NuttX-5.2
|
||||
This basic port includes basic boot-up, serial console, and timer
|
||||
interrupts. This port was extended in NuttX 5.3 with a USB high
|
||||
speed driver contributed by David Hewson. This port has been
|
||||
verified using the NuttX OS test, USB serial and mass storage tests
|
||||
and includes a working implementation of the NuttShell ((NSH)).
|
||||
|
||||
arch/arm/include/sam3u and arch/arm/src/sam3u
|
||||
Atmel AT91SAM3U. This port is for Atmel AT91SAM3U4E MCU.
|
||||
STATUS: The basic AT91SAM3U port was released in NuttX version 5.1.
|
||||
The basic port includes boot-up logic, interrupt driven serial
|
||||
console, and system timer interrupts. That release passes the
|
||||
NuttX OS test and is proven to have a valid OS implementation. A
|
||||
onfiguration to support the NuttShell is also included.
|
||||
|
||||
arch/arm/include/stm32 and arch/arm/src/stm32
|
||||
These directories contain support for the STMicro STM32 family, particularly
|
||||
for the STM32F103ZET6. The initial, release of this port was included in NuttX version
|
||||
0.4.12. The current port includes timer, and serial console. Work is underway for
|
||||
USB, SPI, microSD, and LCD.
|
||||
These directories contain support for the STMicro STM32 family, particularly
|
||||
for the STM32F103ZET6.
|
||||
STATUS: The basic STM32 port was released in NuttX version 0.4.12.
|
||||
The basic port includes boot-up logic, interrupt driven serial console,
|
||||
and system timer interrupts. The 0.4.13 release added support for SPI,
|
||||
serial FLASH, and USB device.; The 4.14 release added support for
|
||||
buttons and SDIO-based MMC/SD and verifed DMA support. Verified
|
||||
configurations are available for NuttX OS test, the NuttShell (NSH)
|
||||
example, the USB serial device class, and the USB mass storage device
|
||||
lass example.
|
||||
|
||||
arch/arm/include/str71x and arch/arm/src/str71x
|
||||
These directories provide support for the STMicro STR71x processors.
|
||||
@@ -178,6 +222,14 @@ arch/arm - ARM-based micro-controllers
|
||||
but no testing has been performed due to some problems I am having with my
|
||||
JTAG wiggler and OpenOCD on Linux.
|
||||
|
||||
arch/hc
|
||||
This directory is dedicated to ports to the Freescale HC family.
|
||||
|
||||
arch/arm/include/hcs12 and arch/arm/src/hcs12
|
||||
These directories provide support for the Freescale m68hcs12 family.
|
||||
STATUS: Fragments of this port were released in nuttx-5.0, but porting effort
|
||||
has been stalled because of higher priority tasks.
|
||||
|
||||
arch/m68322
|
||||
A work in progress.
|
||||
STATUS: Stalled for the moment.
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
@@ -60,14 +63,14 @@
|
||||
#define PIC_REG_STRING "r10"
|
||||
|
||||
/* Macros to get and set the PIC base register. picbase is assumed to be
|
||||
* of type (void*) and that it will fit into a uint32. These must be
|
||||
* of type (void*) and that it will fit into a uint32_t. These must be
|
||||
* inline so that they will be compatible with the ABIs rules for
|
||||
* preserving the PIC register
|
||||
*/
|
||||
|
||||
#define up_getpicbase(ppicbase) \
|
||||
do { \
|
||||
uint32 picbase; \
|
||||
uint32_t picbase; \
|
||||
__asm__ \
|
||||
( \
|
||||
"\tmov %0, " PIC_REG_STRING "\n\t" \
|
||||
@@ -78,7 +81,7 @@ do { \
|
||||
|
||||
#define up_setpicbase(picbase) \
|
||||
do { \
|
||||
uint32 _picbase = (uint32)picbase; \
|
||||
uint32_t _picbase = (uint32_t)picbase; \
|
||||
__asm__ \
|
||||
( \
|
||||
"\tmov " PIC_REG_STRING ", %0\n\t" \
|
||||
|
||||
@@ -45,7 +45,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
@@ -147,13 +149,13 @@ struct xcptcontext
|
||||
* signal processing.
|
||||
*/
|
||||
|
||||
uint32 saved_pc;
|
||||
uint32 saved_cpsr;
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_cpsr;
|
||||
#endif
|
||||
|
||||
/* Register save area */
|
||||
|
||||
uint32 regs[XCPTCONTEXT_REGS];
|
||||
uint32_t regs[XCPTCONTEXT_REGS];
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,7 +45,10 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
@@ -137,14 +140,14 @@ struct xcptcontext
|
||||
* signal processing.
|
||||
*/
|
||||
|
||||
uint32 saved_pc;
|
||||
uint32 saved_primask;
|
||||
uint32 saved_xpsr;
|
||||
uint32_t saved_pc;
|
||||
uint32_t saved_primask;
|
||||
uint32_t saved_xpsr;
|
||||
#endif
|
||||
|
||||
/* Register save area */
|
||||
|
||||
uint32 regs[XCPTCONTEXT_REGS];
|
||||
uint32_t regs[XCPTCONTEXT_REGS];
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -195,19 +198,19 @@ static inline void irqrestore(irqstate_t primask)
|
||||
|
||||
/* Get/set the primask register */
|
||||
|
||||
static inline ubyte getprimask(void)
|
||||
static inline uint8_t getprimask(void)
|
||||
{
|
||||
uint32 primask;
|
||||
uint32_t primask;
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"\tmrs %0, primask\n"
|
||||
: "=r" (primask)
|
||||
:
|
||||
: "memory");
|
||||
return (ubyte)primask;
|
||||
return (uint8_t)primask;
|
||||
}
|
||||
|
||||
static inline void setprimask(uint32 primask)
|
||||
static inline void setprimask(uint32_t primask)
|
||||
{
|
||||
__asm__ __volatile__
|
||||
(
|
||||
@@ -219,19 +222,19 @@ static inline void setprimask(uint32 primask)
|
||||
|
||||
/* Get/set the basepri register */
|
||||
|
||||
static inline ubyte getbasepri(void)
|
||||
static inline uint8_t getbasepri(void)
|
||||
{
|
||||
uint32 basepri;
|
||||
uint32_t basepri;
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"\tmrs %0, basepri\n"
|
||||
: "=r" (basepri)
|
||||
:
|
||||
: "memory");
|
||||
return (ubyte)basepri;
|
||||
return (uint8_t)basepri;
|
||||
}
|
||||
|
||||
static inline void setbasepri(uint32 basepri)
|
||||
static inline void setbasepri(uint32_t basepri)
|
||||
{
|
||||
__asm__ __volatile__
|
||||
(
|
||||
@@ -243,9 +246,9 @@ static inline void setbasepri(uint32 basepri)
|
||||
|
||||
/* Get IPSR */
|
||||
|
||||
static inline uint32 getipsr(void)
|
||||
static inline uint32_t getipsr(void)
|
||||
{
|
||||
uint32 ipsr;
|
||||
uint32_t ipsr;
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"\tmrs %0, ipsr\n"
|
||||
@@ -257,7 +260,7 @@ static inline uint32 getipsr(void)
|
||||
|
||||
/* SVC system call */
|
||||
|
||||
static inline void svcall(uint32 cmd, uint32 arg)
|
||||
static inline void svcall(uint32_t cmd, uint32_t arg)
|
||||
{
|
||||
__asm__ __volatile__
|
||||
(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/include/limits.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -44,32 +44,38 @@
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MIN 0x80
|
||||
#define SCHAR_MAX 0x7f
|
||||
#define UCHAR_MAX 0xff
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MIN 0x80
|
||||
#define SCHAR_MAX 0x7f
|
||||
#define UCHAR_MAX 0xff
|
||||
|
||||
/* These could be different on machines where char is unsigned */
|
||||
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
|
||||
#define SHRT_MIN 0x8000
|
||||
#define SHRT_MAX 0x7fff
|
||||
#define USHRT_MAX 0xffff
|
||||
#define SHRT_MIN 0x8000
|
||||
#define SHRT_MAX 0x7fff
|
||||
#define USHRT_MAX 0xffff
|
||||
|
||||
#define INT_MIN 0x80000000
|
||||
#define INT_MAX 0x7fffffff
|
||||
#define UINT_MAX 0xffffffff
|
||||
#define INT_MIN 0x80000000
|
||||
#define INT_MAX 0x7fffffff
|
||||
#define UINT_MAX 0xffffffff
|
||||
|
||||
/* These change on 32-bit and 64-bit platforms */
|
||||
|
||||
#define LONG_MAX 0x80000000
|
||||
#define LONG_MIN 0x7fffffff
|
||||
#define ULONG_MAX 0xffffffff
|
||||
#define LONG_MAX 0x80000000
|
||||
#define LONG_MIN 0x7fffffff
|
||||
#define ULONG_MAX 0xffffffff
|
||||
|
||||
#define LLONG_MAX 0x8000000000000000
|
||||
#define LLONG_MIN 0x7fffffffffffffff
|
||||
#define ULLONG_MAX 0xffffffffffffffff
|
||||
#define LLONG_MAX 0x8000000000000000
|
||||
#define LLONG_MIN 0x7fffffffffffffff
|
||||
#define ULLONG_MAX 0xffffffffffffffff
|
||||
|
||||
/* A pointer is 4 bytes */
|
||||
|
||||
#define PTR_MIN 0x80000000
|
||||
#define PTR_MAX 0x7fffffff
|
||||
#define UPTR_MAX 0xffffffff
|
||||
|
||||
#endif /* __ARCH_ARM_INCLUDE_LIMITS_H */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* arch/arm/include/lm3s/irq.h
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -45,7 +45,6 @@
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
/************************************************************************************
|
||||
@@ -76,7 +75,7 @@
|
||||
/* External interrupts (vectors >= 16) */
|
||||
|
||||
#define LM3S_IRQ_INTERRUPTS (16) /* Vector number of the first external interrupt */
|
||||
#ifdef CONFIG_ARCH_CHIP_LM3S6918
|
||||
#if defined(CONFIG_ARCH_CHIP_LM3S6918)
|
||||
|
||||
# define LM3S_IRQ_GPIOA (16) /* Vector 16: GPIO Port A */
|
||||
# define LM3S_IRQ_GPIOB (17) /* Vector 17: GPIO Port B */
|
||||
@@ -114,13 +113,57 @@
|
||||
# define LM3S_IRQ_I2C1 (53) /* Vector 53: I2C 1 */
|
||||
/* Vectors 54-57: Reserved */
|
||||
# define LM3S_IRQ_ETHCON (58) /* Vector 58: Ethernet Controller */
|
||||
# define LM3S_IRQ_HIBERNATE (59) /* Vector 59: Hibernation Module */
|
||||
/* Vectors 60-70: Reserved */
|
||||
#elif defined(CONFIG_ARCH_CHIP_LM3S6965)
|
||||
# define LM3S_IRQ_GPIOA (16) /* Vector 16: GPIO Port A */
|
||||
# define LM3S_IRQ_GPIOB (17) /* Vector 17: GPIO Port B */
|
||||
# define LM3S_IRQ_GPIOC (18) /* Vector 18: GPIO Port C */
|
||||
# define LM3S_IRQ_GPIOD (19) /* Vector 19: GPIO Port D */
|
||||
# define LM3S_IRQ_GPIOE (20) /* Vector 20: GPIO Port E */
|
||||
# define LM3S_IRQ_UART0 (21) /* Vector 21: UART 0 */
|
||||
# define LM3S_IRQ_UART1 (22) /* Vector 22: UART 1 */
|
||||
# define LM3S_IRQ_SSI0 (23) /* Vector 23: SSI 0 */
|
||||
# define LM3S_IRQ_I2C0 (24) /* Vector 24: I2C 0 */
|
||||
# define LM3S_IRQ_PWMFAULT (25) /* Vector 25: PWM Fault */
|
||||
# define LM3S_IRQ_PWM0 (26) /* Vector 26: PWM Generator 0 */
|
||||
# define LM3S_IRQ_PWM1 (27) /* Vector 27: PWM Generator 1 */
|
||||
# define LM3S_IRQ_PWM2 (28) /* Vector 28: PWM Generator 2 */
|
||||
# define LM3S_IRQ_QEI0 (29) /* Vector 29: QEI0 */
|
||||
# define LM3S_IRQ_ADC0 (30) /* Vector 30: ADC Sequence 0 */
|
||||
# define LM3S_IRQ_ADC1 (31) /* Vector 31: ADC Sequence 1 */
|
||||
# define LM3S_IRQ_ADC2 (32) /* Vector 32: ADC Sequence 2 */
|
||||
# define LM3S_IRQ_ADC3 (33) /* Vector 33: ADC Sequence 3 */
|
||||
# define LM3S_IRQ_WDOG (34) /* Vector 34: Watchdog Timer */
|
||||
# define LM3S_IRQ_TIMER0A (35) /* Vector 35: Timer 0 A */
|
||||
# define LM3S_IRQ_TIMER0B (36) /* Vector 36: Timer 0 B */
|
||||
# define LM3S_IRQ_TIMER1A (37) /* Vector 37: Timer 1 A */
|
||||
# define LM3S_IRQ_TIMER1B (38) /* Vector 38: Timer 1 B */
|
||||
# define LM3S_IRQ_TIMER2A (39) /* Vector 39: Timer 2 A */
|
||||
# define LM3S_IRQ_TIMER2B (40) /* Vector 40: Timer 3 B */
|
||||
# define LM3S_IRQ_COMPARE0 (41) /* Vector 41: Analog Comparator 0 */
|
||||
# define LM3S_IRQ_COMPARE1 (42) /* Vector 42: Analog Comparator 1 */
|
||||
/* Vector 43: Reserved */
|
||||
# define LM3S_IRQ_SYSCON (44) /* Vector 44: System Control */
|
||||
# define LM3S_IRQ_FLASHCON (45) /* Vector 45: FLASH Control */
|
||||
# define LM3S_IRQ_GPIOF (46) /* Vector 46: GPIO Port F */
|
||||
# define LM3S_IRQ_GPIOG (47) /* Vector 47: GPIO Port G */
|
||||
/* Vector 48: Reserved */
|
||||
# define LM3S_IRQ_UART2 (49) /* Vector 49: UART 2 */
|
||||
/* Vector 50: Reserved */
|
||||
# define LM3S_IRQ_TIMER3A (51) /* Vector 51: Timer 3 A */
|
||||
# define LM3S_IRQ_TIMER3B (52) /* Vector 52: Timer 3 B */
|
||||
# define LM3S_IRQ_I2C1 (53) /* Vector 53: I2C 1 */
|
||||
# define LM3S_IRQ_QEI1 (54) /* Vector 54: QEI1 */
|
||||
/* Vectors 55-57: Reserved */
|
||||
# define LM3S_IRQ_ETHCON (58) /* Vector 58: Ethernet Controller */
|
||||
# define LM3S_IRQ_HIBERNATE (59) /* Vector 59: Hibernation Module */
|
||||
/* Vectors 60-70: Reserved */
|
||||
#else
|
||||
# error "IRQ Numbers not specified for this LM3S chip"
|
||||
#endif
|
||||
|
||||
#define NR_IRQS (60) /* Really only 43 */
|
||||
#define NR_IRQS (60) /* (Really less because of reserved vectors) */
|
||||
|
||||
/* GPIO IRQs -- Note that support for individual GPIO ports can
|
||||
* be disabled in order to reduce the size of the implemenation.
|
||||
|
||||
285
arch/arm/include/lpc17xx/irq.h
Executable file
@@ -0,0 +1,285 @@
|
||||
/****************************************************************************
|
||||
* arch/lpc17xxx/irq.h
|
||||
*
|
||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_LPC17XX_IRQ_H
|
||||
#define __ARCH_LPC17XX_IRQ_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* IRQ numbers. The IRQ number corresponds vector number and hence map
|
||||
* directly to bits in the NVIC. This does, however, waste several words of
|
||||
* memory in the IRQ to handle mapping tables.
|
||||
*/
|
||||
|
||||
/* Processor Exceptions (vectors 0-15) */
|
||||
|
||||
#define LPC17_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */
|
||||
/* Vector 0: Reset stack pointer value */
|
||||
/* Vector 1: Reset (not handler as an IRQ) */
|
||||
#define LPC17_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */
|
||||
#define LPC17_IRQ_HARDFAULT (3) /* Vector 3: Hard fault */
|
||||
#define LPC17_IRQ_MPU (4) /* Vector 4: Memory management (MPU) */
|
||||
#define LPC17_IRQ_BUSFAULT (5) /* Vector 5: Bus fault */
|
||||
#define LPC17_IRQ_USAGEFAULT (6) /* Vector 6: Usage fault */
|
||||
#define LPC17_IRQ_SVCALL (11) /* Vector 11: SVC call */
|
||||
#define LPC17_IRQ_DBGMONITOR (12) /* Vector 12: Debug Monitor */
|
||||
/* Vector 13: Reserved */
|
||||
#define LPC17_IRQ_PENDSV (14) /* Vector 14: Pendable system service request */
|
||||
#define LPC17_IRQ_SYSTICK (15) /* Vector 15: System tick */
|
||||
|
||||
/* External interrupts (vectors >= 16) */
|
||||
|
||||
#define LPC17_IRQ_EXTINT (16) /* Vector number of the first external interrupt */
|
||||
#define LPC17_IRQ_WDT (LPC17_IRQ_EXTINT+0) /* WDT Watchdog Interrupt (WDINT) */
|
||||
#define LPC17_IRQ_TMR0 (LPC17_IRQ_EXTINT+1) /* Timer 0 Match 0 - 1 (MR0, MR1)
|
||||
* Capture 0 - 1 (CR0, CR1) */
|
||||
#define LPC17_IRQ_TMR1 (LPC17_IRQ_EXTINT+2) /* Timer 1 Match 0 - 2 (MR0, MR1, MR2)
|
||||
* Capture 0 - 1 (CR0, CR1) */
|
||||
#define LPC17_IRQ_TMR2 (LPC17_IRQ_EXTINT+3) /* Timer 2 Match 0-3
|
||||
* Capture 0-1 */
|
||||
#define LPC17_IRQ_TMR3 (LPC17_IRQ_EXTINT+4) /* Timer 3 Match 0-3
|
||||
* Capture 0-1 */
|
||||
#define LPC17_IRQ_UART0 (LPC17_IRQ_EXTINT+5) /* UART 0 Rx Line Status (RLS)
|
||||
* Transmit Holding Register Empty (THRE)
|
||||
* Rx Data Available (RDA)
|
||||
* Character Time-out Indicator (CTI)
|
||||
* End of Auto-Baud (ABEO)
|
||||
* Auto-Baud Time-Out (ABTO) */
|
||||
#define LPC17_IRQ_UART1 (LPC17_IRQ_EXTINT+6) /* UART 1 Rx Line Status (RLS)
|
||||
* Transmit Holding Register Empty (THRE)
|
||||
* Rx Data Available (RDA)
|
||||
* Character Time-out Indicator (CTI)
|
||||
* Modem Control Change
|
||||
* End of Auto-Baud (ABEO)
|
||||
* Auto-Baud Time-Out (ABTO) */
|
||||
#define LPC17_IRQ_UART2 (LPC17_IRQ_EXTINT+7) /* UART 2 Rx Line Status (RLS)
|
||||
* Transmit Holding Register Empty (THRE)
|
||||
* Rx Data Available (RDA)
|
||||
* Character Time-out Indicator (CTI)
|
||||
* End of Auto-Baud (ABEO)
|
||||
* Auto-Baud Time-Out (ABTO) */
|
||||
#define LPC17_IRQ_UART3 (LPC17_IRQ_EXTINT+8) /* UART 3 Rx Line Status (RLS)
|
||||
* Transmit Holding Register Empty (THRE)
|
||||
* Rx Data Available (RDA)
|
||||
* Character Time-out Indicator (CTI)
|
||||
* End of Auto-Baud (ABEO)
|
||||
* Auto-Baud Time-Out (ABTO) */
|
||||
#define LPC17_IRQ_PWM1 (LPC17_IRQ_EXTINT+9) /* PWM1 Match 0 - 6 of PWM1
|
||||
* Capture 0-1 of PWM1 */
|
||||
#define LPC17_IRQ_I2C0 (LPC17_IRQ_EXTINT+10) /* I2C0 SI (state change) */
|
||||
#define LPC17_IRQ_I2C1 (LPC17_IRQ_EXTINT+11) /* I2C1 SI (state change) */
|
||||
#define LPC17_IRQ_I2C2 (LPC17_IRQ_EXTINT+12) /* I2C2 SI (state change) */
|
||||
#define LPC17_IRQ_SPIF (LPC17_IRQ_EXTINT+13) /* SPI SPI Interrupt Flag (SPIF)
|
||||
* Mode Fault (MODF) */
|
||||
#define LPC17_IRQ_SSP0 (LPC17_IRQ_EXTINT+14) /* SSP0 Tx FIFO half empty of SSP0
|
||||
* Rx FIFO half full of SSP0
|
||||
* Rx Timeout of SSP0
|
||||
* Rx Overrun of SSP0 */
|
||||
#define LPC17_IRQ_SSP1 (LPC17_IRQ_EXTINT+15) /* SSP 1 Tx FIFO half empty
|
||||
* Rx FIFO half full
|
||||
* Rx Timeout
|
||||
* Rx Overrun */
|
||||
#define LPC17_IRQ_PLL0 (LPC17_IRQ_EXTINT+16) /* PLL0 (Main PLL) PLL0 Lock (PLOCK0) */
|
||||
#define LPC17_IRQ_RTC (LPC17_IRQ_EXTINT+17) /* RTC Counter Increment (RTCCIF)
|
||||
* Alarm (RTCALF) */
|
||||
#define LPC17_IRQ_EINT0 (LPC17_IRQ_EXTINT+18) /* External Interrupt 0 (EINT0) */
|
||||
#define LPC17_IRQ_EINT1 (LPC17_IRQ_EXTINT+19) /* External Interrupt 1 (EINT1) */
|
||||
#define LPC17_IRQ_EINT2 (LPC17_IRQ_EXTINT+20) /* External Interrupt 2 (EINT2) */
|
||||
#define LPC17_IRQ_EINT3 (LPC17_IRQ_EXTINT+21) /* External Interrupt 3 (EINT3)
|
||||
* Note: EINT3 channel is shared with GPIO interrupts */
|
||||
#define LPC17_IRQ_ADC (LPC17_IRQ_EXTINT+22) /* ADC A/D Converter end of conversion */
|
||||
#define LPC17_IRQ_BOD (LPC17_IRQ_EXTINT+23) /* BOD Brown Out detect */
|
||||
#define LPC17_IRQ_USB (LPC17_IRQ_EXTINT+24) /* USB USB_INT_REQ_LP, USB_INT_REQ_HP,
|
||||
* USB_INT_REQ_DMA */
|
||||
#define LPC17_IRQ_CAN (LPC17_IRQ_EXTINT+25) /* CAN CAN Common, CAN 0 Tx, CAN 0 Rx,
|
||||
* CAN 1 Tx, CAN 1 Rx */
|
||||
#define LPC17_IRQ_GPDMA (LPC17_IRQ_EXTINT+26) /* GPDMA IntStatus of DMA channel 0,
|
||||
* IntStatus of DMA channel 1 */
|
||||
#define LPC17_IRQ_I2S (LPC17_IRQ_EXTINT+27) /* I2S irq, dmareq1, dmareq2 */
|
||||
#define LPC17_IRQ_ETH (LPC17_IRQ_EXTINT+28) /* Ethernet WakeupInt, SoftInt, TxDoneInt,
|
||||
* TxFinishedInt, TxErrorInt,* TxUnderrunInt,
|
||||
* RxDoneInt, RxFinishedInt, RxErrorInt,
|
||||
* RxOverrunInt */
|
||||
#define LPC17_IRQ_RITINT (LPC17_IRQ_EXTINT+29) /* Repetitive Interrupt Timer (RITINT) */
|
||||
#define LPC17_IRQ_MCPWM (LPC17_IRQ_EXTINT+30) /* Motor Control PWM IPER[2:0], IPW[2:0],
|
||||
* ICAP[2:0], FES */
|
||||
#define LPC17_IRQ_QEI (LPC17_IRQ_EXTINT+31) /* Quadrature Encoder INX_Int, TIM_Int, VELC_Int,
|
||||
* DIR_Int, ERR_Int, ENCLK_Int, POS0_Int, POS1_Int
|
||||
* POS2_Int, REV_Int, POS0REV_Int, OS1REV_Int,
|
||||
* POS2REV_Int */
|
||||
#define LPC17_IRQ_PLL1 (LPC17_IRQ_EXTINT+32) /* PLL1 (USB PLL) PLL1 Lock (PLOCK1) */
|
||||
#define LPC17_IRQ_USBACT (LPC17_IRQ_EXTINT+33) /* USB Activity Interrupt USB_NEED_CLK */
|
||||
#define LPC17_IRQ_CANACT (LPC17_IRQ_EXTINT+34) /* CAN Activity Interrupt CAN1WAKE, CAN2WAKE */
|
||||
#define LPC17_IRQ_NEXTINT (35)
|
||||
#define LPC17_IRQ_NIRQS (LPC17_IRQ_EXTINT+LPC17_IRQ_NEXTINT)
|
||||
|
||||
/* GPIO interrupts. The LPC17xx supports several interrupts on ports 0 and
|
||||
* 2 (only). We go through some special efforts to keep the number of IRQs
|
||||
* to a minimum in this sparse interrupt case.
|
||||
*
|
||||
* 28 interrupts on Port 0: p0.0 - p0.11, p0.15-p0.30
|
||||
* 14 interrupts on Port 2: p2.0 - p2.13
|
||||
* --
|
||||
* 42
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_GPIO_IRQ
|
||||
# define LPC17_VALID_GPIOINT0 (0x7fff8ffful) /* GPIO port 0 interrrupt set */
|
||||
# define LPC17_VALID_GPIOINT2 (0x00003ffful) /* GPIO port 2 interrupt set */
|
||||
|
||||
/* Set 1: 12 interrupts p0.0-p0.11 */
|
||||
|
||||
# define LPC17_VALID_GPIOINT0L (0x00000ffful)
|
||||
# define LPC17_VALID_SHIFT0L (0)
|
||||
# define LPC17_VALID_FIRST0L (LPC17_IRQ_EXTINT+LPC17_IRQ_NEXTINT)
|
||||
|
||||
# define LPC17_IRQ_P0p0 (LPC17_VALID_FIRST0L+0)
|
||||
# define LPC17_IRQ_P0p1 (LPC17_VALID_FIRST0L+1)
|
||||
# define LPC17_IRQ_P0p2 (LPC17_VALID_FIRST0L+2)
|
||||
# define LPC17_IRQ_P0p3 (LPC17_VALID_FIRST0L+3)
|
||||
# define LPC17_IRQ_P0p4 (LPC17_VALID_FIRST0L+4)
|
||||
# define LPC17_IRQ_P0p5 (LPC17_VALID_FIRST0L+5)
|
||||
# define LPC17_IRQ_P0p6 (LPC17_VALID_FIRST0L+6)
|
||||
# define LPC17_IRQ_P0p7 (LPC17_VALID_FIRST0L+7)
|
||||
# define LPC17_IRQ_P0p8 (LPC17_VALID_FIRST0L+8)
|
||||
# define LPC17_IRQ_P0p9 (LPC17_VALID_FIRST0L+9)
|
||||
# define LPC17_IRQ_P0p10 (LPC17_VALID_FIRST0L+10)
|
||||
# define LPC17_IRQ_P0p11 (LPC17_VALID_FIRST0L+11)
|
||||
# define LPC17_VALID_NIRQS0L (12)
|
||||
|
||||
/* Set 2: 16 interrupts p0.15-p0.30 */
|
||||
|
||||
# define LPC17_VALID_GPIOINT0H (0x7fff8000ull)
|
||||
# define LPC17_VALID_SHIFT0H (15)
|
||||
# define LPC17_VALID_FIRST0H (LPC17_VALID_FIRST0L+LPC17_VALID_NIRQS0L)
|
||||
|
||||
# define LPC17_IRQ_P0p15 (LPC17_VALID_FIRST0H+0)
|
||||
# define LPC17_IRQ_P0p16 (LPC17_VALID_FIRST0H+1)
|
||||
# define LPC17_IRQ_P0p17 (LPC17_VALID_FIRST0H+2)
|
||||
# define LPC17_IRQ_P0p18 (LPC17_VALID_FIRST0H+3)
|
||||
# define LPC17_IRQ_P0p19 (LPC17_VALID_FIRST0H+4)
|
||||
# define LPC17_IRQ_P0p20 (LPC17_VALID_FIRST0H+5)
|
||||
# define LPC17_IRQ_P0p21 (LPC17_VALID_FIRST0H+6)
|
||||
# define LPC17_IRQ_P0p22 (LPC17_VALID_FIRST0H+7)
|
||||
# define LPC17_IRQ_P0p23 (LPC17_VALID_FIRST0H+8)
|
||||
# define LPC17_IRQ_P0p24 (LPC17_VALID_FIRST0H+9)
|
||||
# define LPC17_IRQ_P0p25 (LPC17_VALID_FIRST0H+10)
|
||||
# define LPC17_IRQ_P0p26 (LPC17_VALID_FIRST0H+11)
|
||||
# define LPC17_IRQ_P0p27 (LPC17_VALID_FIRST0H+12)
|
||||
# define LPC17_IRQ_P0p28 (LPC17_VALID_FIRST0H+13)
|
||||
# define LPC17_IRQ_P0p29 (LPC17_VALID_FIRST0H+14)
|
||||
# define LPC17_IRQ_P0p30 (LPC17_VALID_FIRST0H+15)
|
||||
# define LPC17_VALID_NIRQS0H (16)
|
||||
|
||||
/* Set 3: 14 interrupts p2.0-p2.13 */
|
||||
|
||||
# define LPC17_VALID_GPIOINT2 (0x00003ffful)
|
||||
# define LPC17_VALID_SHIFT2 (0)
|
||||
# define LPC17_VALID_FIRST2 (LPC17_VALID_FIRST0H+LPC17_VALID_NIRQS0H)
|
||||
|
||||
# define LPC17_IRQ_P2p0 (LPC17_IRQ_GPIOINT+0)
|
||||
# define LPC17_IRQ_P2p1 (LPC17_IRQ_GPIOINT+1)
|
||||
# define LPC17_IRQ_P2p2 (LPC17_IRQ_GPIOINT+2)
|
||||
# define LPC17_IRQ_P2p3 (LPC17_IRQ_GPIOINT+3)
|
||||
# define LPC17_IRQ_P2p4 (LPC17_IRQ_GPIOINT+4)
|
||||
# define LPC17_IRQ_P2p5 (LPC17_IRQ_GPIOINT+5)
|
||||
# define LPC17_IRQ_P2p6 (LPC17_IRQ_GPIOINT+6)
|
||||
# define LPC17_IRQ_P2p7 (LPC17_IRQ_GPIOINT+7)
|
||||
# define LPC17_IRQ_P2p8 (LPC17_IRQ_GPIOINT+8)
|
||||
# define LPC17_IRQ_P2p9 (LPC17_IRQ_GPIOINT+9)
|
||||
# define LPC17_IRQ_P2p10 (LPC17_IRQ_GPIOINT+10)
|
||||
# define LPC17_IRQ_P2p11 (LPC17_IRQ_GPIOINT+11)
|
||||
# define LPC17_IRQ_P2p12 (LPC17_IRQ_GPIOINT+12)
|
||||
# define LPC17_IRQ_P2p13 (LPC17_IRQ_GPIOINT+13)
|
||||
# define LPC17_VALID_NIRQS2 (14)
|
||||
# define LPC17_NGPIOAIRQS (LPC17_VALID_NIRQS0L+LPC17_VALID_NIRQS0H+LPC17_VALID_NIRQS2)
|
||||
#else
|
||||
# define LPC17_NGPIOAIRQS (0)
|
||||
#endif
|
||||
|
||||
/* Total number of IRQ numbers */
|
||||
|
||||
#define NR_IRQS (LPC17_IRQ_EXTINT+LPC17_IRQ_NEXTINT+LPC17_NGPIOAIRQS)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
typedef void (*vic_vector_t)(uint32_t *regs);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_LPC17XX_IRQ_H */
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
@@ -88,7 +92,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
typedef void (*vic_vector_t)(uint32 *regs);
|
||||
typedef void (*vic_vector_t)(uint32_t *regs);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
151
arch/arm/include/lpc2378/irq.h
Executable file
@@ -0,0 +1,151 @@
|
||||
/****************************************************************************
|
||||
* arch/lpc2378/irq.h
|
||||
*
|
||||
* Copyright (C) 2010 Rommel Marcelo. All rights reserved.
|
||||
* Author: Rommel Marcelo
|
||||
*
|
||||
* This file is part of the NuttX RTOS and based on the lpc2148 port:
|
||||
*
|
||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_LPC2378_IRQ_H
|
||||
#define __ARCH_LPC2378_IRQ_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* LPC2378 Interrupts */
|
||||
|
||||
#define WDT_IRQ 0 /* Watchdog */
|
||||
#define RESERVED_IRQ 1 /* SWI only */
|
||||
#define DBGCOMMRX_IRQ 2 /* Embedded debug */
|
||||
#define DBGCOMMTX_IRQ 3 /* Embedded debug */
|
||||
#define TIMER0_IRQ 4 /* Timer 0 */
|
||||
#define TIMER1_IRQ 5 /* Timer 1 */
|
||||
#define UART0_IRQ 6 /* UART 0 */
|
||||
#define UART1_IRQ 7 /* UART 1 */
|
||||
#define PWM0_IRQ 8 /* PWM 0 */
|
||||
#define I2C0_IRQ 9 /* I2C 0 */
|
||||
#define SPI0_IRQ 10 /* SPI 0 */
|
||||
#define SSP0_IRQ 10 /* SSP 0 */
|
||||
#define SSP1_IRQ 11 /* SSP 1 */
|
||||
#define PLL_IRQ 12 /* PLL Lock IRQ */
|
||||
#define RTC_IRQ 13 /* Real Time Clock */
|
||||
#define EINT0_IRQ 14 /* External interrupt 0 */
|
||||
#define EINT1_IRQ 15 /* External interrupt 1 */
|
||||
#define EINT2_IRQ 16 /* External interrupt 2 */
|
||||
#define EINT3_IRQ 17 /* External interrupt 3 */
|
||||
#define ADC0_IRQ 18 /* ADC 0 */
|
||||
#define I2C1_IRQ 19 /* I2C 1 */
|
||||
#define BOD_IRQ 20 /* Brown Out Detect */
|
||||
#define EMAC_IRQ 21 /* Ethernet */
|
||||
#define USB_IRQ 22 /* USB */
|
||||
#define CAN_IRQ 23 /* CAN */
|
||||
#define MCI_IRQ 24 /* SD/MMC Interface */
|
||||
#define GPDMA_IRQ 25 /* General Purpose DMA */
|
||||
#define TIMER2_IRQ 26 /* Timer 2 */
|
||||
#define TIMER3_IRQ 27 /* Timer 3 */
|
||||
#define UART2_IRQ 28 /* Uart 2 */
|
||||
#define UART3_IRQ 29 /* Uart 3 */
|
||||
#define I2C2_IRQ 30 /* I2C 2 */
|
||||
#define I2S_IRQ 31 /* I2S */
|
||||
|
||||
|
||||
#define IRQ_SYSTIMER TIMER0_IRQ
|
||||
|
||||
#define NR_IRQS 32
|
||||
|
||||
/* There are 32 vectored interrupts. If vectored interrupts are enabled, the
|
||||
* following will be used by the system.
|
||||
*/
|
||||
#define SYSTIMER_VEC 0 /* System timer */
|
||||
|
||||
#define CLASS_IRQ 0
|
||||
#define CLASS_FIQ 1
|
||||
#define PRIORITY_LOWEST 15
|
||||
#define PRIORITY_HIGHEST 0 /* System timer */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
typedef void (*vic_vector_t)(uint32_t *regs);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_VECTORED_INTERRUPTS
|
||||
EXTERN void up_attach_vector(int irq, int priority, vic_vector_t handler);
|
||||
EXTERN void up_detach_vector(int vector);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_LPC2378_IRQ_H */
|
||||
|
||||
118
arch/arm/include/lpc313x/irq.h
Executable file
@@ -0,0 +1,118 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/include/lpc313x/irq.h
|
||||
*
|
||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_INCLUDE_LPC313X_IRQ_H
|
||||
#define __ARCH_ARM_INCLUDE_LPC313X_IRQ_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* LPC313X Interrupts */
|
||||
|
||||
/* IRQ0: Reserved */
|
||||
#define LPC313X_IRQ_IRQ0 0 /* IRQ1: Event router cascaded IRQ0 */
|
||||
#define LPC313X_IRQ_IRQ1 1 /* IRQ2: Event router cascaded IRQ1 */
|
||||
#define LPC313X_IRQ_IRQ2 2 /* IRQ3: Event router cascaded IRQ2 */
|
||||
#define LPC313X_IRQ_IRQ3 3 /* IRQ4: Event router cascaded IRQ3 */
|
||||
#define LPC313X_IRQ_TMR0 4 /* IRQ5: Timer 0 Interrupt */
|
||||
#define LPC313X_IRQ_TMR1 5 /* IRQ6: Timer 1 Interrupt */
|
||||
#define LPC313X_IRQ_TMR2 6 /* IRQ7: Timer 2 Interrupt */
|
||||
#define LPC313X_IRQ_TMR3 7 /* IRQ8: Timer 3 Interrupt */
|
||||
#define LPC313X_IRQ_ADC 8 /* IRQ9: ADC 10-bit */
|
||||
#define LPC313X_IRQ_UART 9 /* IRQ10: UART */
|
||||
#define LPC313X_IRQ_I2C0 10 /* IRQ11: I2C0 */
|
||||
#define LPC313X_IRQ_I2C1 11 /* IRQ12: I2C1 */
|
||||
#define LPC313X_IRQ_I2STX0 12 /* IRQ13: I2S0 Transmit */
|
||||
#define LPC313X_IRQ_I2STX1 13 /* IRQ14: I2S1 Transmit */
|
||||
#define LPC313X_IRQ_I2SRX0 14 /* IRQ15: I2S0 Receive */
|
||||
#define LPC313X_IRQ_I2SRX1 15 /* IRQ16: I2S1 Receive */
|
||||
/* IRQ17: Reserved */
|
||||
#define LPC313X_IRQ_LCD 17 /* IRQ18: LCD Interface */
|
||||
#define LPC313X_IRQ_SPISMS 18 /* IRQ19: SPI SMS */
|
||||
#define LPC313X_IRQ_SPITX 19 /* IRQ20: SPI Transmit */
|
||||
#define LPC313X_IRQ_SPIRX 20 /* IRQ21: SPI Receive */
|
||||
#define LPC313X_IRQ_SPIOVF 21 /* IRQ22: SPI Overflow */
|
||||
#define LPC313X_IRQ_SPI 22 /* IRQ23: SPI */
|
||||
#define LPC313X_IRQ_DMA 23 /* IRQ24: DMA */
|
||||
#define LPC313X_IRQ_NAND 24 /* IRQ25: NAND FLASH Controller */
|
||||
#define LPC313X_IRQ_MCI 25 /* IRQ26: MCI */
|
||||
#define LPC313X_IRQ_USBOTG 26 /* IRQ27: USB OTG */
|
||||
#define LPC313X_IRQ_ISRAM0 27 /* IRQ28: ISRAM0 MRC Finished */
|
||||
#define LPC313X_IRQ_ISRAM1 28 /* IRQ29: ISRAM1 MRC Finished */
|
||||
|
||||
#define LPC313X_IRQ_SYSTIMER LPC313X_IRQ_TMR0
|
||||
#define NR_IRQS (LPC313X_IRQ_ISRAM1+1)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARM_INCLUDE_LPC313X_IRQ_H */
|
||||
|
||||
297
arch/arm/include/sam3u/irq.h
Executable file
@@ -0,0 +1,297 @@
|
||||
/****************************************************************************************
|
||||
* arch/arm/include/sam3u/irq.h
|
||||
*
|
||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through nuttx/irq.h
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_INCLUDE_SAM3U_IRQ_H
|
||||
#define __ARCH_ARM_INCLUDE_SAM3U_IRQ_H
|
||||
|
||||
/****************************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************************/
|
||||
|
||||
/****************************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************************/
|
||||
|
||||
/* SAM3U Peripheral Identifiers */
|
||||
|
||||
#define SAM3U_PID_SUPC (0) /* Supply Controller */
|
||||
#define SAM3U_PID_RSTC (1) /* Reset Controller */
|
||||
#define SAM3U_PID_RTC (2) /* Real Time Clock */
|
||||
#define SAM3U_PID_RTT (3) /* Real Time Timer */
|
||||
#define SAM3U_PID_WDT (4) /* Watchdog Timer */
|
||||
#define SAM3U_PID_PMC (5) /* Power Management Controller */
|
||||
#define SAM3U_PID_EEFC0 (6) /* Enhanced Embedded Flash Controller 0 */
|
||||
#define SAM3U_PID_EEFC1 (7) /* Enhanced Embedded Flash Controller 1 */
|
||||
#define SAM3U_PID_UART (8) /* Universal Asynchronous Receiver Transmitter */
|
||||
#define SAM3U_PID_SMC (9) /* Static Memory Controller */
|
||||
#define SAM3U_PID_PIOA (10) /* Parallel I/O Controller A */
|
||||
#define SAM3U_PID_PIOB (11) /* Parallel I/O Controller B */
|
||||
#define SAM3U_PID_PIOC (12) /* Parallel I/O Controller C */
|
||||
#define SAM3U_PID_USART0 (13) /* USART 0 */
|
||||
#define SAM3U_PID_USART1 (14) /* USART 1 */
|
||||
#define SAM3U_PID_USART2 (15) /* USART 2 */
|
||||
#define SAM3U_PID_USART3 (16) /* USART 3 */
|
||||
#define SAM3U_PID_HSMCI (17) /* High Speed Multimedia Card Interface */
|
||||
#define SAM3U_PID_TWI0 (18) /* Two-Wire Interface 0 */
|
||||
#define SAM3U_PID_TWI1 (19) /* Two-Wire Interface 1 */
|
||||
#define SAM3U_PID_SPI (20) /* Serial Peripheral Interface */
|
||||
#define SAM3U_PID_SSC (21) /* Synchronous Serial Controller */
|
||||
#define SAM3U_PID_TC0 (22) /* Timer Counter 0 */
|
||||
#define SAM3U_PID_TC1 (23) /* Timer Counter 1 */
|
||||
#define SAM3U_PID_TC2 (24) /* Timer Counter 2 */
|
||||
#define SAM3U_PID_PWM (25) /* Pulse Width Modulation Controller */
|
||||
#define SAM3U_PID_ADC12B (26) /* 12-bit ADC Controller */
|
||||
#define SAM3U_PID_ADC (27) /* 10-bit ADC Controller */
|
||||
#define SAM3U_PID_DMAC (28) /* DMA Controller */
|
||||
#define SAM3U_PID_UDPHS (29) /* USB Device High Speed */
|
||||
#define NR_PIDS (30) /* Number of peripheral identifiers */
|
||||
|
||||
/* IRQ numbers. The IRQ number corresponds vector number and hence map directly to
|
||||
* bits in the NVIC. This does, however, waste several words of memory in the IRQ
|
||||
* to handle mapping tables.
|
||||
*/
|
||||
|
||||
/* Processor Exceptions (vectors 0-15) */
|
||||
|
||||
#define SAM3U_IRQ_RESERVED (0) /* Reserved vector (only used with CONFIG_DEBUG) */
|
||||
/* Vector 0: Reset stack pointer value */
|
||||
/* Vector 1: Reset (not handler as an IRQ) */
|
||||
#define SAM3U_IRQ_NMI (2) /* Vector 2: Non-Maskable Interrupt (NMI) */
|
||||
#define SAM3U_IRQ_HARDFAULT (3) /* Vector 3: Hard fault */
|
||||
#define SAM3U_IRQ_MPU (4) /* Vector 4: Memory management (MPU) */
|
||||
#define SAM3U_IRQ_BUSFAULT (5) /* Vector 5: Bus fault */
|
||||
#define SAM3U_IRQ_USAGEFAULT (6) /* Vector 6: Usage fault */
|
||||
#define SAM3U_IRQ_SVCALL (11) /* Vector 11: SVC call */
|
||||
#define SAM3U_IRQ_DBGMONITOR (12) /* Vector 12: Debug Monitor */
|
||||
/* Vector 13: Reserved */
|
||||
#define SAM3U_IRQ_PENDSV (14) /* Vector 14: Pendable system service request */
|
||||
#define SAM3U_IRQ_SYSTICK (15) /* Vector 15: System tick */
|
||||
|
||||
/* External interrupts (vectors >= 16) */
|
||||
|
||||
#define SAM3U_IRQ_EXTINT (16) /* Vector number of the first external interrupt */
|
||||
#define SAM3U_IRQ_SUPC (SAM3U_IRQ_EXTINT+SAM3U_PID_SUPC) /* Supply Controller */
|
||||
#define SAM3U_IRQ_RSTC (SAM3U_IRQ_EXTINT+SAM3U_PID_RSTC) /* Reset Controller */
|
||||
#define SAM3U_IRQ_RTC (SAM3U_IRQ_EXTINT+SAM3U_PID_RTC) /* Real Time Clock */
|
||||
#define SAM3U_IRQ_RTT (SAM3U_IRQ_EXTINT+SAM3U_PID_RTT) /* Real Time Timer */
|
||||
#define SAM3U_IRQ_WDT (SAM3U_IRQ_EXTINT+SAM3U_PID_WDT) /* Watchdog Timer */
|
||||
#define SAM3U_IRQ_PMC (SAM3U_IRQ_EXTINT+SAM3U_PID_PMC) /* Power Management Controller */
|
||||
#define SAM3U_IRQ_EEFC0 (SAM3U_IRQ_EXTINT+SAM3U_PID_EEFC0) /* Enhanced Embedded Flash Controller 0 */
|
||||
#define SAM3U_IRQ_EEFC1 (SAM3U_IRQ_EXTINT+SAM3U_PID_EEFC1) /* Enhanced Embedded Flash Controller 1 */
|
||||
#define SAM3U_IRQ_UART (SAM3U_IRQ_EXTINT+SAM3U_PID_UART) /* Universal Asynchronous Receiver Transmitter */
|
||||
#define SAM3U_IRQ_SMC (SAM3U_IRQ_EXTINT+SAM3U_PID_SMC) /* Static Memory Controller */
|
||||
#define SAM3U_IRQ_PIOA (SAM3U_IRQ_EXTINT+SAM3U_PID_PIOA) /* Parallel I/O Controller A */
|
||||
#define SAM3U_IRQ_PIOB (SAM3U_IRQ_EXTINT+SAM3U_PID_PIOB) /* Parallel I/O Controller B */
|
||||
#define SAM3U_IRQ_PIOC (SAM3U_IRQ_EXTINT+SAM3U_PID_PIOC) /* Parallel I/O Controller C */
|
||||
#define SAM3U_IRQ_USART0 (SAM3U_IRQ_EXTINT+SAM3U_PID_USART0) /* USART 0 */
|
||||
#define SAM3U_IRQ_USART1 (SAM3U_IRQ_EXTINT+SAM3U_PID_USART1) /* USART 1 */
|
||||
#define SAM3U_IRQ_USART2 (SAM3U_IRQ_EXTINT+SAM3U_PID_USART2) /* USART 2 */
|
||||
#define SAM3U_IRQ_USART3 (SAM3U_IRQ_EXTINT+SAM3U_PID_USART3) /* USART 3 */
|
||||
#define SAM3U_IRQ_HSMCI (SAM3U_IRQ_EXTINT+SAM3U_PID_HSMCI) /* High Speed Multimedia Card Interface */
|
||||
#define SAM3U_IRQ_TWI0 (SAM3U_IRQ_EXTINT+SAM3U_PID_TWI0) /* Two-Wire Interface 0 */
|
||||
#define SAM3U_IRQ_TWI1 (SAM3U_IRQ_EXTINT+SAM3U_PID_TWI1) /* Two-Wire Interface 1 */
|
||||
#define SAM3U_IRQ_SPI (SAM3U_IRQ_EXTINT+SAM3U_PID_SPI) /* Serial Peripheral Interface */
|
||||
#define SAM3U_IRQ_SSC (SAM3U_IRQ_EXTINT+SAM3U_PID_SSC) /* Synchronous Serial Controller */
|
||||
#define SAM3U_IRQ_TC0 (SAM3U_IRQ_EXTINT+SAM3U_PID_TC0) /* Timer Counter 0 */
|
||||
#define SAM3U_IRQ_TC1 (SAM3U_IRQ_EXTINT+SAM3U_PID_TC1) /* Timer Counter 1 */
|
||||
#define SAM3U_IRQ_TC2 (SAM3U_IRQ_EXTINT+SAM3U_PID_TC2) /* Timer Counter 2 */
|
||||
#define SAM3U_IRQ_PWM (SAM3U_IRQ_EXTINT+SAM3U_PID_PWM) /* Pulse Width Modulation Controller */
|
||||
#define SAM3U_IRQ_ADC12B (SAM3U_IRQ_EXTINT+SAM3U_PID_ADC12B) /* 12-bit ADC Controller */
|
||||
#define SAM3U_IRQ_ADC (SAM3U_IRQ_EXTINT+SAM3U_PID_ADC) /* 10-bit ADC Controller */
|
||||
#define SAM3U_IRQ_DMAC (SAM3U_IRQ_EXTINT+SAM3U_PID_DMAC) /* DMA Controller */
|
||||
#define SAM3U_IRQ_UDPHS (SAM3U_IRQ_EXTINT+SAM3U_PID_UDPHS) /* USB Device High Speed */
|
||||
#define SAM3U_IRQ_NEXTINT NR_PIDS /* Total number of external interrupt numbers */
|
||||
#define SAM3U_IRQ_NIRQS (SAM3U_IRQ_EXTINT+NR_PIDS) /* The number of real IRQs */
|
||||
|
||||
/* GPIO interrupts (derived from SAM3U_IRQ_PIOA/B/C) */
|
||||
|
||||
#ifdef CONFIG_GPIOA_IRQ
|
||||
# define SAM3U_IRQ_GPIOA_PINS (SAM3U_IRQ_EXTINT+SAM3U_IRQ_NEXTINT)
|
||||
# define SAM3U_IRQ_PA0 (SAM3U_IRQ_GPIOA_PINS+0) /* GPIOA, PIN 0 */
|
||||
# define SAM3U_IRQ_PA1 (SAM3U_IRQ_GPIOA_PINS+1) /* GPIOA, PIN 1 */
|
||||
# define SAM3U_IRQ_PA2 (SAM3U_IRQ_GPIOA_PINS+2) /* GPIOA, PIN 2 */
|
||||
# define SAM3U_IRQ_PA3 (SAM3U_IRQ_GPIOA_PINS+3) /* GPIOA, PIN 3 */
|
||||
# define SAM3U_IRQ_PA4 (SAM3U_IRQ_GPIOA_PINS+4) /* GPIOA, PIN 4 */
|
||||
# define SAM3U_IRQ_PA5 (SAM3U_IRQ_GPIOA_PINS+5) /* GPIOA, PIN 5 */
|
||||
# define SAM3U_IRQ_PA6 (SAM3U_IRQ_GPIOA_PINS+6) /* GPIOA, PIN 6 */
|
||||
# define SAM3U_IRQ_PA7 (SAM3U_IRQ_GPIOA_PINS+7) /* GPIOA, PIN 7 */
|
||||
# define SAM3U_IRQ_PA8 (SAM3U_IRQ_GPIOA_PINS+8) /* GPIOA, PIN 8 */
|
||||
# define SAM3U_IRQ_PA9 (SAM3U_IRQ_GPIOA_PINS+9) /* GPIOA, PIN 9 */
|
||||
# define SAM3U_IRQ_PA10 (SAM3U_IRQ_GPIOA_PINS+10) /* GPIOA, PIN 10 */
|
||||
# define SAM3U_IRQ_PA11 (SAM3U_IRQ_GPIOA_PINS+11) /* GPIOA, PIN 11 */
|
||||
# define SAM3U_IRQ_PA12 (SAM3U_IRQ_GPIOA_PINS+12) /* GPIOA, PIN 12 */
|
||||
# define SAM3U_IRQ_PA13 (SAM3U_IRQ_GPIOA_PINS+13) /* GPIOA, PIN 13 */
|
||||
# define SAM3U_IRQ_PA14 (SAM3U_IRQ_GPIOA_PINS+14) /* GPIOA, PIN 14 */
|
||||
# define SAM3U_IRQ_PA15 (SAM3U_IRQ_GPIOA_PINS+15) /* GPIOA, PIN 15 */
|
||||
# define SAM3U_IRQ_PA16 (SAM3U_IRQ_GPIOA_PINS+16) /* GPIOA, PIN 16 */
|
||||
# define SAM3U_IRQ_PA17 (SAM3U_IRQ_GPIOA_PINS+17) /* GPIOA, PIN 17 */
|
||||
# define SAM3U_IRQ_PA18 (SAM3U_IRQ_GPIOA_PINS+18) /* GPIOA, PIN 18 */
|
||||
# define SAM3U_IRQ_PA19 (SAM3U_IRQ_GPIOA_PINS+19) /* GPIOA, PIN 19 */
|
||||
# define SAM3U_IRQ_PA20 (SAM3U_IRQ_GPIOA_PINS+20) /* GPIOA, PIN 20 */
|
||||
# define SAM3U_IRQ_PA21 (SAM3U_IRQ_GPIOA_PINS+21) /* GPIOA, PIN 21 */
|
||||
# define SAM3U_IRQ_PA22 (SAM3U_IRQ_GPIOA_PINS+22) /* GPIOA, PIN 22 */
|
||||
# define SAM3U_IRQ_PA23 (SAM3U_IRQ_GPIOA_PINS+23) /* GPIOA, PIN 23 */
|
||||
# define SAM3U_IRQ_PA24 (SAM3U_IRQ_GPIOA_PINS+24) /* GPIOA, PIN 24 */
|
||||
# define SAM3U_IRQ_PA25 (SAM3U_IRQ_GPIOA_PINS+25) /* GPIOA, PIN 25 */
|
||||
# define SAM3U_IRQ_PA26 (SAM3U_IRQ_GPIOA_PINS+26) /* GPIOA, PIN 26 */
|
||||
# define SAM3U_IRQ_PA27 (SAM3U_IRQ_GPIOA_PINS+27) /* GPIOA, PIN 27 */
|
||||
# define SAM3U_IRQ_PA28 (SAM3U_IRQ_GPIOA_PINS+28) /* GPIOA, PIN 28 */
|
||||
# define SAM3U_IRQ_PA29 (SAM3U_IRQ_GPIOA_PINS+29) /* GPIOA, PIN 29 */
|
||||
# define SAM3U_IRQ_PA30 (SAM3U_IRQ_GPIOA_PINS+30) /* GPIOA, PIN 30 */
|
||||
# define SAM3U_IRQ_PA31 (SAM3U_IRQ_GPIOA_PINS+31) /* GPIOA, PIN 31 */
|
||||
# define SAM3U_NGPIOAIRQS 32
|
||||
#else
|
||||
# define SAM3U_NGPIOAIRQS 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GPIOB_IRQ
|
||||
# define SAM3U_IRQ_GPIOB_PINS (SAM3U_IRQ_EXTINT+SAM3U_IRQ_NEXTINT+SAM3U_IRQ_GPIOA_PINS)
|
||||
# define SAM3U_IRQ_PB0 (SAM3U_IRQ_GPIOB_PINS+0) /* GPIOB, PIN 0 */
|
||||
# define SAM3U_IRQ_PB1 (SAM3U_IRQ_GPIOB_PINS+1) /* GPIOB, PIN 1 */
|
||||
# define SAM3U_IRQ_PB2 (SAM3U_IRQ_GPIOB_PINS+2) /* GPIOB, PIN 2 */
|
||||
# define SAM3U_IRQ_PB3 (SAM3U_IRQ_GPIOB_PINS+3) /* GPIOB, PIN 3 */
|
||||
# define SAM3U_IRQ_PB4 (SAM3U_IRQ_GPIOB_PINS+4) /* GPIOB, PIN 4 */
|
||||
# define SAM3U_IRQ_PB5 (SAM3U_IRQ_GPIOB_PINS+5) /* GPIOB, PIN 5 */
|
||||
# define SAM3U_IRQ_PB6 (SAM3U_IRQ_GPIOB_PINS+6) /* GPIOB, PIN 6 */
|
||||
# define SAM3U_IRQ_PB7 (SAM3U_IRQ_GPIOB_PINS+7) /* GPIOB, PIN 7 */
|
||||
# define SAM3U_IRQ_PB8 (SAM3U_IRQ_GPIOB_PINS+8) /* GPIOB, PIN 8 */
|
||||
# define SAM3U_IRQ_PB9 (SAM3U_IRQ_GPIOB_PINS+9) /* GPIOB, PIN 9 */
|
||||
# define SAM3U_IRQ_PB10 (SAM3U_IRQ_GPIOB_PINS+10) /* GPIOB, PIN 10 */
|
||||
# define SAM3U_IRQ_PB11 (SAM3U_IRQ_GPIOB_PINS+11) /* GPIOB, PIN 11 */
|
||||
# define SAM3U_IRQ_PB12 (SAM3U_IRQ_GPIOB_PINS+12) /* GPIOB, PIN 12 */
|
||||
# define SAM3U_IRQ_PB13 (SAM3U_IRQ_GPIOB_PINS+13) /* GPIOB, PIN 13 */
|
||||
# define SAM3U_IRQ_PB14 (SAM3U_IRQ_GPIOB_PINS+14) /* GPIOB, PIN 14 */
|
||||
# define SAM3U_IRQ_PB15 (SAM3U_IRQ_GPIOB_PINS+15) /* GPIOB, PIN 15 */
|
||||
# define SAM3U_IRQ_PB16 (SAM3U_IRQ_GPIOB_PINS+16) /* GPIOB, PIN 16 */
|
||||
# define SAM3U_IRQ_PB17 (SAM3U_IRQ_GPIOB_PINS+17) /* GPIOB, PIN 17 */
|
||||
# define SAM3U_IRQ_PB18 (SAM3U_IRQ_GPIOB_PINS+18) /* GPIOB, PIN 18 */
|
||||
# define SAM3U_IRQ_PB19 (SAM3U_IRQ_GPIOB_PINS+19) /* GPIOB, PIN 19 */
|
||||
# define SAM3U_IRQ_PB20 (SAM3U_IRQ_GPIOB_PINS+20) /* GPIOB, PIN 20 */
|
||||
# define SAM3U_IRQ_PB21 (SAM3U_IRQ_GPIOB_PINS+21) /* GPIOB, PIN 21 */
|
||||
# define SAM3U_IRQ_PB22 (SAM3U_IRQ_GPIOB_PINS+22) /* GPIOB, PIN 22 */
|
||||
# define SAM3U_IRQ_PB23 (SAM3U_IRQ_GPIOB_PINS+23) /* GPIOB, PIN 23 */
|
||||
# define SAM3U_IRQ_PB24 (SAM3U_IRQ_GPIOB_PINS+24) /* GPIOB, PIN 24 */
|
||||
# define SAM3U_IRQ_PB25 (SAM3U_IRQ_GPIOB_PINS+25) /* GPIOB, PIN 25 */
|
||||
# define SAM3U_IRQ_PB26 (SAM3U_IRQ_GPIOB_PINS+26) /* GPIOB, PIN 26 */
|
||||
# define SAM3U_IRQ_PB27 (SAM3U_IRQ_GPIOB_PINS+27) /* GPIOB, PIN 27 */
|
||||
# define SAM3U_IRQ_PB28 (SAM3U_IRQ_GPIOB_PINS+28) /* GPIOB, PIN 28 */
|
||||
# define SAM3U_IRQ_PB29 (SAM3U_IRQ_GPIOB_PINS+29) /* GPIOB, PIN 29 */
|
||||
# define SAM3U_IRQ_PB30 (SAM3U_IRQ_GPIOB_PINS+30) /* GPIOB, PIN 30 */
|
||||
# define SAM3U_IRQ_PB31 (SAM3U_IRQ_GPIOB_PINS+31) /* GPIOB, PIN 31 */
|
||||
# define SAM3U_NGPIOAIRQS 32
|
||||
#else
|
||||
# define SAM3U_NGPIOBIRQS 0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GPIOC_IRQ
|
||||
# define SAM3U_IRQ_GPIOC_PINS (SAM3U_IRQ_EXTINT+SAM3U_IRQ_NEXTINT+SAM3U_IRQ_GPIOA_PINS+SAM3U_IRQ_GPIOB_PINS)
|
||||
# define SAM3U_IRQ_PC0 (SAM3U_IRQ_GPIOC_PINS+0) /* GPIOC, PIN 0 */
|
||||
# define SAM3U_IRQ_PC1 (SAM3U_IRQ_GPIOC_PINS+1) /* GPIOC, PIN 1 */
|
||||
# define SAM3U_IRQ_PC2 (SAM3U_IRQ_GPIOC_PINS+2) /* GPIOC, PIN 2 */
|
||||
# define SAM3U_IRQ_PC3 (SAM3U_IRQ_GPIOC_PINS+3) /* GPIOC, PIN 3 */
|
||||
# define SAM3U_IRQ_PC4 (SAM3U_IRQ_GPIOC_PINS+4) /* GPIOC, PIN 4 */
|
||||
# define SAM3U_IRQ_PC5 (SAM3U_IRQ_GPIOC_PINS+5) /* GPIOC, PIN 5 */
|
||||
# define SAM3U_IRQ_PC6 (SAM3U_IRQ_GPIOC_PINS+6) /* GPIOC, PIN 6 */
|
||||
# define SAM3U_IRQ_PC7 (SAM3U_IRQ_GPIOC_PINS+7) /* GPIOC, PIN 7 */
|
||||
# define SAM3U_IRQ_PC8 (SAM3U_IRQ_GPIOC_PINS+8) /* GPIOC, PIN 8 */
|
||||
# define SAM3U_IRQ_PC9 (SAM3U_IRQ_GPIOC_PINS+9) /* GPIOC, PIN 9 */
|
||||
# define SAM3U_IRQ_PC10 (SAM3U_IRQ_GPIOC_PINS+10) /* GPIOC, PIN 10 */
|
||||
# define SAM3U_IRQ_PC11 (SAM3U_IRQ_GPIOC_PINS+11) /* GPIOC, PIN 11 */
|
||||
# define SAM3U_IRQ_PC12 (SAM3U_IRQ_GPIOC_PINS+12) /* GPIOC, PIN 12 */
|
||||
# define SAM3U_IRQ_PC13 (SAM3U_IRQ_GPIOC_PINS+13) /* GPIOC, PIN 13 */
|
||||
# define SAM3U_IRQ_PC14 (SAM3U_IRQ_GPIOC_PINS+14) /* GPIOC, PIN 14 */
|
||||
# define SAM3U_IRQ_PC15 (SAM3U_IRQ_GPIOC_PINS+15) /* GPIOC, PIN 15 */
|
||||
# define SAM3U_IRQ_PC16 (SAM3U_IRQ_GPIOC_PINS+16) /* GPIOC, PIN 16 */
|
||||
# define SAM3U_IRQ_PC17 (SAM3U_IRQ_GPIOC_PINS+17) /* GPIOC, PIN 17 */
|
||||
# define SAM3U_IRQ_PC18 (SAM3U_IRQ_GPIOC_PINS+18) /* GPIOC, PIN 18 */
|
||||
# define SAM3U_IRQ_PC19 (SAM3U_IRQ_GPIOC_PINS+19) /* GPIOC, PIN 19 */
|
||||
# define SAM3U_IRQ_PC20 (SAM3U_IRQ_GPIOC_PINS+20) /* GPIOC, PIN 20 */
|
||||
# define SAM3U_IRQ_PC21 (SAM3U_IRQ_GPIOC_PINS+21) /* GPIOC, PIN 21 */
|
||||
# define SAM3U_IRQ_PC22 (SAM3U_IRQ_GPIOC_PINS+22) /* GPIOC, PIN 22 */
|
||||
# define SAM3U_IRQ_PC23 (SAM3U_IRQ_GPIOC_PINS+23) /* GPIOC, PIN 23 */
|
||||
# define SAM3U_IRQ_PC24 (SAM3U_IRQ_GPIOC_PINS+24) /* GPIOC, PIN 24 */
|
||||
# define SAM3U_IRQ_PC25 (SAM3U_IRQ_GPIOC_PINS+25) /* GPIOC, PIN 25 */
|
||||
# define SAM3U_IRQ_PC26 (SAM3U_IRQ_GPIOC_PINS+26) /* GPIOC, PIN 26 */
|
||||
# define SAM3U_IRQ_PC27 (SAM3U_IRQ_GPIOC_PINS+27) /* GPIOC, PIN 27 */
|
||||
# define SAM3U_IRQ_PC28 (SAM3U_IRQ_GPIOC_PINS+28) /* GPIOC, PIN 28 */
|
||||
# define SAM3U_IRQ_PC29 (SAM3U_IRQ_GPIOC_PINS+29) /* GPIOC, PIN 29 */
|
||||
# define SAM3U_IRQ_PC30 (SAM3U_IRQ_GPIOC_PINS+30) /* GPIOC, PIN 30 */
|
||||
# define SAM3U_IRQ_PC31 (SAM3U_IRQ_GPIOC_PINS+31) /* GPIOC, PIN 31 */
|
||||
# define SAM3U_NGPIOAIRQS 32
|
||||
#else
|
||||
# define SAM3U_NGPIOCIRQS 0
|
||||
#endif
|
||||
|
||||
/* Total number of IRQ numbers */
|
||||
|
||||
#define NR_IRQS (SAM3U_IRQ_EXTINT+SAM3U_IRQ_NEXTINT+\
|
||||
SAM3U_NGPIOAIRQS+SAM3U_NGPIOBIRQS+SAM3U_NGPIOCIRQS)
|
||||
|
||||
/****************************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************************/
|
||||
|
||||
/****************************************************************************************
|
||||
* Inline functions
|
||||
****************************************************************************************/
|
||||
|
||||
/****************************************************************************************
|
||||
* Public Variables
|
||||
****************************************************************************************/
|
||||
|
||||
/****************************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_ARM_INCLUDE_SAM3U_IRQ_H */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/include/serial.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -40,6 +40,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************************
|
||||
* arch/arm/include/str71x/irq.h
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -45,7 +45,6 @@
|
||||
************************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
@@ -53,36 +52,68 @@
|
||||
|
||||
/* IRQ channels */
|
||||
|
||||
#define STR71X_IRQ_T0TIMI (0)
|
||||
#define STR71X_IRQ_FLASH (1)
|
||||
#define STR71X_IRQ_RCCU (2)
|
||||
#define STR71X_IRQ_RTC (3)
|
||||
#define STR71X_IRQ_WDG (4)
|
||||
#define STR71X_IRQ_XTI (5)
|
||||
#define STR71X_IRQ_USBHP (6)
|
||||
#define STR71X_IRQ_I2C0ITERR (7)
|
||||
#define STR71X_IRQ_I2C1ITERR (8)
|
||||
#define STR71X_IRQ_UART0 (9)
|
||||
#define STR71X_IRQ_UART1 (10)
|
||||
#define STR71X_IRQ_UART2 (11)
|
||||
#define STR71X_IRQ_UART3 (12)
|
||||
#define STR71X_IRQ_SPI0 (13)
|
||||
#define STR71X_IRQ_SPI1 (14)
|
||||
#define STR71X_IRQ_I2C0 (15)
|
||||
#define STR71X_IRQ_I2C1 (16)
|
||||
#define STR71X_IRQ_CAN (17)
|
||||
#define STR71X_IRQ_ADC (18)
|
||||
#define STR71X_IRQ_T1TIMI (19)
|
||||
#define STR71X_IRQ_T2TIMI (20)
|
||||
#define STR71X_IRQ_T3TIMI (21)
|
||||
#define STR71X_IRQ_HDLC (25)
|
||||
#define STR71X_IRQ_USBLP (26)
|
||||
#define STR71X_IRQ_T0TOI (29)
|
||||
#define STR71X_IRQ_T0OC1 (30)
|
||||
#define STR71X_IRQ_T0OC2 (31)
|
||||
#define STR71X_IRQ_T0TIMI (0) /* IRQ 0: T0.EFTI Timer 0 global interrupt */
|
||||
#define STR71X_IRQ_FLASH (1) /* IRQ 1: FLASH FLASH global interrupt */
|
||||
#define STR71X_IRQ_RCCU (2) /* IRQ 2: PRCCU PRCCU global interrupt */
|
||||
#define STR71X_IRQ_RTC (3) /* IRQ 3: RTC Real Time Clock global interrupt */
|
||||
#define STR71X_IRQ_WDG (4) /* IRQ 4: WDG.IRQ Watchdog timer interrupt */
|
||||
#define STR71X_IRQ_XTI (5) /* IRQ 5: XTI.IRQ XTI external interrupt */
|
||||
#define STR71X_IRQ_USBHP (6) /* IRQ 6: USB.HPIRQ USB high priority event interrupt */
|
||||
#define STR71X_IRQ_I2C0ITERR (7) /* IRQ 7: I2C0.ITERR I2C 0 error interrupt */
|
||||
#define STR71X_IRQ_I2C1ITERR (8) /* IRQ 8: I2C1.ITERR I2C 1 error interrupt */
|
||||
#define STR71X_IRQ_UART0 (9) /* IRQ 9: UART0.IRQ UART 0 global interrupt */
|
||||
#define STR71X_IRQ_UART1 (10) /* IRQ 10: UART1.IRQ UART 1 global interrupt */
|
||||
#define STR71X_IRQ_UART2 (11) /* IRQ 11: UART2.IRQ UART 2 global interrupt */
|
||||
#define STR71X_IRQ_UART3 (12) /* IRQ 12: UART3.IRQ UART 3 global interrupt */
|
||||
#define STR71X_IRQ_SPI0 (13) /* IRQ 13: BSPI0.IRQ BSPI 0 global interrupt */
|
||||
#define STR71X_IRQ_SPI1 (14) /* IRQ 14: BSPI1.IRQ BSPI 1 global interrupt */
|
||||
#define STR71X_IRQ_I2C0 (15) /* IRQ 15: I2C0.IRQ I2C 0 tx/rx interrupt */
|
||||
#define STR71X_IRQ_I2C1 (16) /* IRQ 16: I2C1.IRQ I2C 1 tx/rx interrupt */
|
||||
#define STR71X_IRQ_CAN (17) /* IRQ 17: CAN.IRQ CAN module global interrupt */
|
||||
#define STR71X_IRQ_ADC (18) /* IRQ 18: ADC.IRQ ADC sample ready interrupt */
|
||||
#define STR71X_IRQ_T1TIMI (19) /* IRQ 19: T1.GI Timer 1 global interrupt */
|
||||
#define STR71X_IRQ_T2TIMI (20) /* IRQ 20: T2.GI Timer 2 global interrupt */
|
||||
#define STR71X_IRQ_T3TIMI (21) /* IRQ 21: T3.GI Timer 3 global interrupt */
|
||||
/* IRQ 22-24: Reserved */
|
||||
#define STR71X_IRQ_HDLC (25) /* IRQ 25: HDLC.IRQ HDLC global interrupt */
|
||||
#define STR71X_IRQ_USBLP (26) /* IRQ 26: USB.LPIRQ USB low priority event interrupt */
|
||||
/* IRQ 27-28: Reserved */
|
||||
#define STR71X_IRQ_T0TOI (29) /* IRQ 29: T0.TOI Timer 0 Overflow interrupt */
|
||||
#define STR71X_IRQ_T0OC1 (30) /* IRQ 30: T0.OCMPA Timer 0 Output Compare A interrupt */
|
||||
#define STR71X_IRQ_T0OC2 (31) /* IRQ 31: T0.OCMPB Timer 0 Output Compare B interrupt */
|
||||
|
||||
#define STR71X_NBASEIRQS (32)
|
||||
|
||||
#ifdef CONFIG_STR71X_XTI
|
||||
# define STR71X_IRQ_FIRSTXTI (32)
|
||||
# define STR71X_IRQ_SW (32) /* Line 0: SW interrupt - no HW connection */
|
||||
# define STR71X_IRQ_USBWKUP (33) /* Line 1: USB wake-up event: generated while exiting
|
||||
* from suspend mode */
|
||||
# define STR71X_IRQ_PORT2p8 (34) /* Line 2: Port 2.8 - External Interrupt */
|
||||
# define STR71X_IRQ_PORT2p9 (35) /* Line 3: Port 2.9 - External Interrupt */
|
||||
# define STR71X_IRQ_PORT2p10 (36) /* Line 4: Port 2.10 - External Interrupt */
|
||||
# define STR71X_IRQ_PORT2p11 (37) /* Line 5: Port 2.11 - External Interrupt */
|
||||
# define STR71X_IRQ_PORT1p11 (38) /* Line 6: Port 1.11 - CAN module receive pin (CANRX). */
|
||||
# define STR71X_IRQ_PORT1p13 (39) /* Line 7: Port 1.13 - HDLC clock (HCLK) or I2C.0 Clock
|
||||
* (I0.SCL) */
|
||||
# define STR71X_IRQ_PORT1p14 (40) /* Line 8: Port 1.14 - HDLC receive pin (HRXD) or I2C.0
|
||||
* Data (SDA) */
|
||||
# define STR71X_IRQ_PORT0p1 (41) /* Line 9: Port 0.1 - BSPI0 Slave Input data (S0.MOSI)
|
||||
* or UART3 Receive Data Input (U3.Rx) */
|
||||
# define STR71X_IRQ_PORT0p2 (42) /* Line 10: Port 0.2 - BSPI0 Slave Input serial clock
|
||||
* (S0.SCLK) or I2C.1 Clock (I1.SCL) */
|
||||
# define STR71X_IRQ_PORT0p6 (43) /* Line 11: Port 0.6 - BSPI1 Slave Input serial clock
|
||||
* (S1.SCLK) */
|
||||
# define STR71X_IRQ_PORT0p8 (44) /* Line 12: Port 0.8 - UART0 Receive Data Input (U0.Rx) */
|
||||
# define STR71X_IRQ_PORT0p10 (45) /* Line 13: Port 0.10 - UART1 Receive Data Input (U1.Rx) */
|
||||
# define STR71X_IRQ_PORT0p13 (46) /* Line 14: Port 0.13 - UART2 Receive Data Input (U2.Rx) */
|
||||
# define STR71X_IRQ_PORT0p15 (47) /* Line 15: Port 0.15 - WAKEUP pin or RTC ALARM */
|
||||
# define NR_IRQS (48)
|
||||
#else
|
||||
# define NR_IRQS (32)
|
||||
#endif
|
||||
|
||||
#define STR71X_IRQ_SYSTIMER STR71X_IRQ_T0TIMI
|
||||
#define NR_IRQS 32
|
||||
|
||||
/* FIQ channels */
|
||||
|
||||
@@ -114,7 +145,7 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ARCH_ARM_INCLUDE_STR71X_IRQ_H */
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/include/types.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -54,18 +54,32 @@
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/* These are the sizes of the standard GNU types */
|
||||
/* These are the sizes of the standard integer types. NOTE that these type
|
||||
* names have a leading underscore character. This file will be included
|
||||
* (indirectly) by include/stdint.h and typedef'ed to the final name without
|
||||
* the underscore character. This roundabout way of doings things allows
|
||||
* the stdint.h to be removed from the include/ directory in the event that
|
||||
* the user prefers to use the definitions provided by their toolchain header
|
||||
* files
|
||||
*/
|
||||
|
||||
typedef char sbyte;
|
||||
typedef unsigned char ubyte;
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned char boolean;
|
||||
typedef short sint16;
|
||||
typedef unsigned short uint16;
|
||||
typedef int sint32;
|
||||
typedef unsigned int uint32;
|
||||
typedef long long sint64;
|
||||
typedef unsigned long long uint64;
|
||||
typedef char _int8_t;
|
||||
typedef unsigned char _uint8_t;
|
||||
|
||||
typedef short _int16_t;
|
||||
typedef unsigned short _uint16_t;
|
||||
|
||||
typedef int _int32_t;
|
||||
typedef unsigned int _uint32_t;
|
||||
|
||||
typedef long long _int64_t;
|
||||
typedef unsigned long long _uint64_t;
|
||||
#define __INT64_DEFINED
|
||||
|
||||
/* A pointer is 4 bytes */
|
||||
|
||||
typedef int _intptr_t;
|
||||
typedef unsigned int _uintptr_t;
|
||||
|
||||
/* This is the size of the interrupt state save returned by irqsave(). For
|
||||
* ARM, a 32 register value is returned, for the thumb2, Cortex-M3, the 16-bit
|
||||
|
||||
@@ -40,12 +40,8 @@
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
#undef CONFIG_ALIGNMENT_TRAP
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/arm/up_assert.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -39,20 +39,21 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
@@ -64,6 +65,19 @@
|
||||
# define lldbg lib_lowprintf
|
||||
#endif
|
||||
|
||||
/* The following is just intended to keep some ugliness out of the mainline
|
||||
* code. We are going to print the task name if:
|
||||
*
|
||||
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
||||
* (defined(CONFIG_DEBUG) || <-- And the debug is enabled (lldbg used)
|
||||
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lib_lowprintf() is used
|
||||
*/
|
||||
|
||||
#undef CONFIG_PRINT_TASKNAME
|
||||
#if CONFIG_TASK_NAME_SIZE > 0 && (defined(CONFIG_DEBUG) || defined(CONFIG_ARCH_STACKDUMP))
|
||||
# define CONFIG_PRINT_TASKNAME 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
@@ -78,9 +92,9 @@
|
||||
|
||||
/* I don't know if the builtin to get SP is enabled */
|
||||
|
||||
static inline uint32 up_getsp(void)
|
||||
static inline uint32_t up_getsp(void)
|
||||
{
|
||||
uint32 sp;
|
||||
uint32_t sp;
|
||||
__asm__
|
||||
(
|
||||
"\tmov %0, sp\n\t"
|
||||
@@ -94,13 +108,13 @@ static inline uint32 up_getsp(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_stackdump(uint32 sp, uint32 stack_base)
|
||||
static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
{
|
||||
uint32 stack ;
|
||||
uint32_t stack ;
|
||||
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32 *ptr = (uint32*)stack;
|
||||
uint32_t *ptr = (uint32_t*)stack;
|
||||
lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
@@ -127,7 +141,7 @@ static inline void up_registerdump(void)
|
||||
|
||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||
{
|
||||
uint32 *ptr = (uint32*)¤t_regs[regs];
|
||||
uint32_t *ptr = (uint32_t*)¤t_regs[regs];
|
||||
lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
@@ -147,13 +161,13 @@ static inline void up_registerdump(void)
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_dumpstate(void)
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
uint32 sp = up_getsp();
|
||||
uint32 ustackbase;
|
||||
uint32 ustacksize;
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
uint32_t sp = up_getsp();
|
||||
uint32_t ustackbase;
|
||||
uint32_t ustacksize;
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
uint32 istackbase;
|
||||
uint32 istacksize;
|
||||
uint32_t istackbase;
|
||||
uint32_t istacksize;
|
||||
#endif
|
||||
|
||||
/* Get the limits on the user stack memory */
|
||||
@@ -165,14 +179,14 @@ static void up_dumpstate(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
ustackbase = (uint32)rtcb->adj_stack_ptr;
|
||||
ustacksize = (uint32)rtcb->adj_stack_size;
|
||||
ustackbase = (uint32_t)rtcb->adj_stack_ptr;
|
||||
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
||||
}
|
||||
|
||||
/* Get the limits on the interrupt stack memory */
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
istackbase = (uint32)&g_userstack;
|
||||
istackbase = (uint32_t)&g_userstack;
|
||||
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4;
|
||||
|
||||
/* Show interrupt stack info */
|
||||
@@ -269,14 +283,14 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
|
||||
* Name: up_assert
|
||||
****************************************************************************/
|
||||
|
||||
void up_assert(const ubyte *filename, int lineno)
|
||||
void up_assert(const uint8_t *filename, int lineno)
|
||||
{
|
||||
#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG)
|
||||
#ifdef CONFIG_PRINT_TASKNAME
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
#endif
|
||||
|
||||
up_ledon(LED_ASSERTION);
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
#ifdef CONFIG_PRINT_TASKNAME
|
||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
@@ -291,14 +305,15 @@ void up_assert(const ubyte *filename, int lineno)
|
||||
* Name: up_assert_code
|
||||
****************************************************************************/
|
||||
|
||||
void up_assert_code(const ubyte *filename, int lineno, int errorcode)
|
||||
void up_assert_code(const uint8_t *filename, int lineno, int errorcode)
|
||||
{
|
||||
#if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_DEBUG)
|
||||
#ifdef CONFIG_PRINT_TASKNAME
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
#endif
|
||||
|
||||
up_ledon(LED_ASSERTION);
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
|
||||
#ifdef CONFIG_PRINT_TASKNAME
|
||||
lldbg("Assertion failed at file:%s line: %d task: %s error code: %d\n",
|
||||
filename, lineno, rtcb->name, errorcode);
|
||||
#else
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -96,7 +96,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
|
||||
else
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
boolean switch_needed;
|
||||
bool switch_needed;
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
* are blocking the task at the head of the task list (the
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/* A little faster than most memcpy's */
|
||||
|
||||
void up_copystate(uint32 *dest, uint32 *src)
|
||||
void up_copystate(uint32_t *dest, uint32_t *src)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -38,14 +38,17 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
@@ -73,7 +76,7 @@
|
||||
* Name: up_dataabort
|
||||
****************************************************************************/
|
||||
|
||||
void up_dataabort(uint32 *regs)
|
||||
void up_dataabort(uint32_t *regs)
|
||||
{
|
||||
lldbg("Data abort at 0x%x\n", regs[REG_PC]);
|
||||
current_regs = regs;
|
||||
|
||||
@@ -38,16 +38,20 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -66,7 +70,7 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
void up_doirq(int irq, uint32 *regs)
|
||||
void up_doirq(int irq, uint32_t *regs)
|
||||
{
|
||||
up_ledon(LED_INIRQ);
|
||||
#ifdef CONFIG_SUPPRESS_INTERRUPTS
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "arm.h"
|
||||
#include "chip.h"
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
|
||||
@@ -58,29 +59,33 @@
|
||||
* 1. We execute in place in FLASH (CONFIG_BOOT_RUNFROMFLASH=y). In this case
|
||||
* the boot logic must:
|
||||
*
|
||||
* - Configure SDRAM and,
|
||||
* - Initialize the .data section in RAM.
|
||||
* - Configure SDRAM,
|
||||
* - Initialize the .data section in RAM, and
|
||||
* - Clear .bss section
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_BOOT_RUNFROMFLASH
|
||||
# error "Configuration not implemented"
|
||||
# define CONFIGURE_SDRAM
|
||||
|
||||
/* 2. We boot in FLASH but copy ourselves to DRAM from better performance.
|
||||
* (CONFIG_BOOT_RUNFROMFLASH=n && CONFIG_BOOT_COPYTORAM=y). In this case
|
||||
* the boot logic must:
|
||||
*
|
||||
* - Configure SDRAM and,
|
||||
* - Copy ourself to DRAM (after mapping it)
|
||||
* - Configure SDRAM,
|
||||
* - Copy ourself to DRAM (after mapping it), and
|
||||
* - Clear .bss section
|
||||
*/
|
||||
|
||||
#elif defined(CONFIG_BOOT_COPYTORAM)
|
||||
# error "configuration not implemented
|
||||
# define CONFIG_SDRAM
|
||||
|
||||
/* 3. There is bootloader that copies us to DRAM (but probably not to the beginning)
|
||||
* (CONFIG_BOOT_RUNFROMFLASH=n && CONFIG_BOOT_COPYTORAM=n). In this case the
|
||||
* boot logic must:
|
||||
*
|
||||
* - Nothing special.
|
||||
* - Clear .bss section
|
||||
*/
|
||||
|
||||
#endif
|
||||
@@ -89,13 +94,14 @@
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* The physical address of the beginning of SDRAM is provided by
|
||||
* CONFIG_DRAM_START. The size of installed SDRAM is provided by
|
||||
* CONFIG_DRAM_SIZE. The virtual address of SDRAM is provided by
|
||||
* CONFIG_DRAM_VSTART.
|
||||
/* EXE_NSECTIONS determines the number of 1Mb pages to map for the executable
|
||||
* address region. This is based on CONFIG_DRAM_SIZE. For most ARM9
|
||||
* architectures, CONFIG_DRAM_SIZE describes the size of installed SDRAM.
|
||||
* But for other architectures, this might refer to the size of FLASH or
|
||||
* SRAM regions. (bad choice of naming).
|
||||
*/
|
||||
|
||||
#define NSDRAM_SECTIONS (CONFIG_DRAM_SIZE >> 20)
|
||||
#define EXE_NSECTIONS ((CONFIG_DRAM_SIZE+0x000fffff) >> 20)
|
||||
|
||||
/****************************************************************************
|
||||
* Assembly Macros
|
||||
@@ -126,12 +132,11 @@
|
||||
* Name: __start
|
||||
****************************************************************************/
|
||||
|
||||
/* We assume the bootloader has already initialized most of the h/w for
|
||||
* us and that only leaves us having to do some os specific things
|
||||
* below.
|
||||
/* We assume the bootloader has already initialized most of the h/w for us
|
||||
* and that only leaves us having to do some os specific things below.
|
||||
*/
|
||||
.text
|
||||
.global __start
|
||||
.global __start
|
||||
.type __start, #function
|
||||
__start:
|
||||
/* Make sure that we are in SVC mode with all IRQs disabled */
|
||||
@@ -147,6 +152,7 @@ __start:
|
||||
/* Clear the 16K level 1 page table */
|
||||
|
||||
ldr r4, .LCppgtable /* r4=phys. page table */
|
||||
#ifndef CONFIG_ARCH_ROMPGTABLE
|
||||
mov r0, r4
|
||||
mov r1, #0
|
||||
add r2, r0, #PGTABLE_SIZE
|
||||
@@ -158,10 +164,9 @@ __start:
|
||||
teq r0, r2
|
||||
bne .Lpgtableclear
|
||||
|
||||
/* Create identity mapping for first MB section to support
|
||||
* this startup logic executing out of the physical address
|
||||
* space. This identity mapping will be removed by .Lvstart
|
||||
* (see below).
|
||||
/* Create identity mapping for first MB section to support this startup
|
||||
* logic executing out of the physical address space. This identity
|
||||
* mapping will be removed by .Lvstart (see below).
|
||||
*/
|
||||
|
||||
mksection r0, r4 /* r0=phys. base section */
|
||||
@@ -179,6 +184,7 @@ __start:
|
||||
ldr r2, .LCvpgtable /* r2=virt. page table */
|
||||
mksection r0, r2 /* r0=virt. base section */
|
||||
str r3, [r4, r0, lsr #18] /* identity mapping */
|
||||
#endif /* CONFIG_ARCH_ROMPGTABLE */
|
||||
|
||||
/* The following logic will set up the ARM920/ARM926 for normal operation */
|
||||
|
||||
@@ -203,34 +209,61 @@ __start:
|
||||
mcr p15, 0, r0, c3, c0 /* Load domain access register */
|
||||
mrc p15, 0, r0, c1, c0 /* Get control register */
|
||||
|
||||
/* Clear bits (see arm.h) */
|
||||
/* Clear bits (see arm.h)
|
||||
*
|
||||
* CR_R - ROM MMU protection
|
||||
* CR_F - Implementation defined
|
||||
* CR_Z - Implementation defined
|
||||
*
|
||||
* CR_A - Alignment abort enable
|
||||
* CR_C - Dcache enable
|
||||
* CR_W - Write buffer enable
|
||||
*
|
||||
* CR_I - Icache enable
|
||||
*/
|
||||
|
||||
bic r0, r0, #(CR_R|CR_F|CR_Z)
|
||||
bic r0, r0, #(CR_A|CR_C|CR_W)
|
||||
bic r0, r0, #(CR_I)
|
||||
|
||||
/* Set bits (see arm.h) */
|
||||
/* Set bits (see arm.h)
|
||||
*
|
||||
* CR_M - MMU enable
|
||||
* CR_P - 32-bit exception handler
|
||||
* CR_D - 32-bit data address range
|
||||
*/
|
||||
|
||||
orr r0, r0, #(CR_M|CR_P|CR_D)
|
||||
|
||||
/* In most architectures, vectors are reloated to 0xffff0000.
|
||||
/* In most architectures, vectors are relocated to 0xffff0000.
|
||||
* -- but not all
|
||||
*
|
||||
* CR_S - System MMU protection
|
||||
* CR_V - Vectors relocated to 0xffff0000
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_ARCH_LOWVECTORS
|
||||
orr r0, r0, #(CR_S)
|
||||
#else
|
||||
orr r0, r0, #(CR_S|CR_V)
|
||||
#else
|
||||
orr r0, r0, #(CR_S)
|
||||
#endif
|
||||
/* CR_RR - Round Robin cache replacement */
|
||||
|
||||
#ifdef CPU_CACHE_ROUND_ROBIN
|
||||
orr r0, r0, #(CR_RR)
|
||||
#endif
|
||||
/* CR_C - Dcache enable */
|
||||
|
||||
#ifndef CPU_DCACHE_DISABLE
|
||||
orr r0, r0, #(CR_C)
|
||||
#endif
|
||||
/* CR_C - Dcache enable */
|
||||
|
||||
#ifndef CPU_ICACHE_DISABLE
|
||||
orr r0, r0, #(CR_I)
|
||||
#endif
|
||||
/* CR_A - Alignment abort enable */
|
||||
|
||||
#ifdef ALIGNMENT_TRAP
|
||||
orr r0, r0, #(CR_A)
|
||||
#endif
|
||||
@@ -244,29 +277,36 @@ __start:
|
||||
|
||||
mov pc, lr
|
||||
|
||||
/**********************************************************************************
|
||||
/****************************************************************************
|
||||
* PC_Relative Data
|
||||
**********************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* These addresses are all virtual address */
|
||||
|
||||
.type .LCvstart, %object
|
||||
.LCvstart:
|
||||
.long .Lvstart
|
||||
|
||||
#ifndef CONFIG_ARCH_ROMPGTABLE
|
||||
.type .LCmmuflags, %object
|
||||
.LCmmuflags:
|
||||
.long MMU_MEMFLAGS
|
||||
#endif
|
||||
|
||||
.type .LCppagetable, %object
|
||||
.LCppgtable:
|
||||
.long CONFIG_DRAM_START /* Physical start of DRAM */
|
||||
.long PGTABLE_BASE_PADDR /* Physical start of DRAM */
|
||||
|
||||
#ifndef CONFIG_ARCH_ROMPGTABLE
|
||||
.type .LCvpagetable, %object
|
||||
.LCvpgtable:
|
||||
.long CONFIG_DRAM_VSTART /* Virtual start of DRAM */
|
||||
.long PGTABLE_BASE_VADDR /* Virtual start of DRAM */
|
||||
#endif
|
||||
.size _start, .-_start
|
||||
|
||||
/**********************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: .Lvstart
|
||||
**********************************************************************************/
|
||||
***************************************************************************/
|
||||
|
||||
/* The following is executed after the MMU has been enabled. This uses
|
||||
* absolute addresses; this is not position independent.
|
||||
@@ -278,15 +318,15 @@ __start:
|
||||
|
||||
/* Remove the temporary null mapping */
|
||||
|
||||
#ifndef CONFIG_ARCH_ROMPGTABLE
|
||||
ldr r4, .LCvpgtable /* r4=virtual page table */
|
||||
ldr r1, .LCppgtable /* r1=phys. page table */
|
||||
mksection r3, r1 /* r2=phys. base addr */
|
||||
mov r0, #0 /* flags + base = 0 */
|
||||
str r0, [r4, r3, lsr #18] /* Undo identity mapping */
|
||||
|
||||
/* Now setup the pagetables for our normal SDRAM mappings
|
||||
* mapped region. We round NUTTX_START_VADDR down to the
|
||||
* nearest megabyte boundary.
|
||||
/* Now setup the pagetables for our normal SDRAM mappings mapped region.
|
||||
* We round NUTTX_START_VADDR down to the nearest megabyte boundary.
|
||||
*/
|
||||
|
||||
ldr r1, .LCmmuflags /* FLGS=MMU_MEMFLAGS */
|
||||
@@ -299,12 +339,15 @@ __start:
|
||||
add r0, r0, #(NUTTX_START_VADDR & 0x00f00000) >> 18
|
||||
str r3, [r0], #4
|
||||
|
||||
/* Now map the remaining NSDRAM_SECTIONS-1 SDRAM sections */
|
||||
/* Now map the remaining EXE_NSECTIONS-1 sections of the executable
|
||||
* memory region.
|
||||
*/
|
||||
|
||||
.rept NSDRAM_SECTIONS-1
|
||||
.rept EXE_NSECTIONS-1
|
||||
add r3, r3, #SECTION_SIZE
|
||||
str r3, [r0], #4
|
||||
.endr
|
||||
#endif /* CONFIG_ARCH_ROMPGTABLE */
|
||||
|
||||
/* Zero BSS and set up the stack pointer */
|
||||
|
||||
@@ -320,33 +363,23 @@ __start:
|
||||
strcc fp, [r0],#4
|
||||
bcc .Lbssinit
|
||||
|
||||
/* Perform early C-level initialization */
|
||||
/* Perform early C-level, platform-specific initialization */
|
||||
|
||||
bl up_boot
|
||||
|
||||
/* Set up the LEDs */
|
||||
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
bl up_ledinit
|
||||
#endif
|
||||
/* Perform early serial initialization */
|
||||
|
||||
#ifdef CONFIG_USE_EARLYSERIALINIT
|
||||
bl up_earlyserialinit
|
||||
#endif
|
||||
|
||||
/* Finally branch to the OS entry point */
|
||||
|
||||
mov lr, #0
|
||||
b os_start
|
||||
|
||||
/* Variables:
|
||||
* _sbss is the start of the BSS region (see ld.script)
|
||||
* _ebss is the end of the BSS regsion (see ld.script)
|
||||
* The idle task stack starts at the end of BSS and is
|
||||
* of size CONFIG_IDLETHREAD_STACKSIZE. The heap continues
|
||||
* from there until the end of memory. See g_heapbase
|
||||
* below.
|
||||
*
|
||||
* _sbss is the start of the BSS region (see ld.script)
|
||||
* _ebss is the end of the BSS regsion (see ld.script)
|
||||
*
|
||||
* The idle task stack starts at the end of BSS and is of size
|
||||
* CONFIG_IDLETHREAD_STACKSIZE. The heap continues from there until the
|
||||
* end of memory. See g_heapbase below.
|
||||
*/
|
||||
|
||||
.Linitparms:
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
@@ -48,7 +49,7 @@
|
||||
#include "up_arch.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -87,11 +88,11 @@ void up_initial_state(_TCB *tcb)
|
||||
|
||||
/* Save the initial stack pointer */
|
||||
|
||||
xcp->regs[REG_SP] = (uint32)tcb->adj_stack_ptr;
|
||||
xcp->regs[REG_SP] = (uint32_t)tcb->adj_stack_ptr;
|
||||
|
||||
/* Save the task entry point */
|
||||
|
||||
xcp->regs[REG_PC] = (uint32)tcb->start;
|
||||
xcp->regs[REG_PC] = (uint32_t)tcb->start;
|
||||
|
||||
/* If this task is running PIC, then set the PIC base register to the
|
||||
* address of the allocated D-Space region.
|
||||
@@ -104,7 +105,7 @@ void up_initial_state(_TCB *tcb)
|
||||
* alloacated D-Space region.
|
||||
*/
|
||||
|
||||
xcp->regs[REG_PIC] = (uint32)tcb->dspace->region;
|
||||
xcp->regs[REG_PIC] = (uint32_t)tcb->dspace->region;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -38,14 +38,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
@@ -73,7 +75,7 @@
|
||||
* Name: up_prefetchabort
|
||||
****************************************************************************/
|
||||
|
||||
void up_prefetchabort(uint32 *regs)
|
||||
void up_prefetchabort(uint32_t *regs)
|
||||
{
|
||||
lldbg("Prefetch abort at 0x%x\n", regs[REG_PC]);
|
||||
current_regs = regs;
|
||||
|
||||
@@ -38,15 +38,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -38,15 +38,18 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -81,26 +84,31 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
|
||||
void up_reprioritize_rtr(_TCB *tcb, uint8_t priority)
|
||||
{
|
||||
/* Verify that the caller is sane */
|
||||
|
||||
if (tcb->task_state < FIRST_READY_TO_RUN_STATE ||
|
||||
tcb->task_state > LAST_READY_TO_RUN_STATE ||
|
||||
priority < SCHED_PRIORITY_MIN ||
|
||||
priority > SCHED_PRIORITY_MAX)
|
||||
tcb->task_state > LAST_READY_TO_RUN_STATE
|
||||
#if SCHED_PRIORITY_MIN > 0
|
||||
|| priority < SCHED_PRIORITY_MIN
|
||||
#endif
|
||||
#if SCHED_PRIORITY_MAX < UINT8_MAX
|
||||
|| priority > SCHED_PRIORITY_MAX
|
||||
#endif
|
||||
)
|
||||
{
|
||||
PANIC(OSERR_BADREPRIORITIZESTATE);
|
||||
}
|
||||
else
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
boolean switch_needed;
|
||||
bool switch_needed;
|
||||
|
||||
slldbg("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return TRUE if we just
|
||||
* sched_removereadytorun will return true if we just
|
||||
* remove the head of the ready to run list.
|
||||
*/
|
||||
|
||||
@@ -108,10 +116,10 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
|
||||
|
||||
/* Setup up the new task priority */
|
||||
|
||||
tcb->sched_priority = (ubyte)priority;
|
||||
tcb->sched_priority = (uint8_t)priority;
|
||||
|
||||
/* Return the task to the specified blocked task list.
|
||||
* sched_addreadytorun will return TRUE if the task was
|
||||
* sched_addreadytorun will return true if the task was
|
||||
* added to the new list. We will need to perform a context
|
||||
* switch only if the EXCLUSIVE or of the two calls is non-zero
|
||||
* (i.e., one and only one the calls changes the head of the
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -161,7 +161,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
|
||||
* disabled
|
||||
*/
|
||||
|
||||
current_regs[REG_PC] = (uint32)up_sigdeliver;
|
||||
current_regs[REG_PC] = (uint32_t)up_sigdeliver;
|
||||
current_regs[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT;
|
||||
|
||||
/* And make sure that the saved context in the TCB
|
||||
@@ -193,7 +193,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
|
||||
* disabled
|
||||
*/
|
||||
|
||||
tcb->xcp.regs[REG_PC] = (uint32)up_sigdeliver;
|
||||
tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver;
|
||||
tcb->xcp.regs[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,12 +39,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
@@ -53,7 +54,7 @@
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
@@ -82,7 +83,7 @@
|
||||
void up_sigdeliver(void)
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
uint32 regs[XCPTCONTEXT_REGS];
|
||||
uint32_t regs[XCPTCONTEXT_REGS];
|
||||
sig_deliver_t sigdeliver;
|
||||
|
||||
/* Save the errno. This must be preserved throughout the
|
||||
|
||||
@@ -38,14 +38,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "up_arch.h"
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
@@ -86,7 +88,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_syscall(uint32 *regs)
|
||||
void up_syscall(uint32_t *regs)
|
||||
{
|
||||
lldbg("Syscall from 0x%x\n", regs[REG_PC]);
|
||||
current_regs = regs;
|
||||
|
||||
@@ -38,16 +38,17 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "clock_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Private Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Output debug info if stack dump is selected -- even if
|
||||
@@ -73,7 +73,7 @@
|
||||
* Name: up_undefinedinsn
|
||||
****************************************************************************/
|
||||
|
||||
void up_undefinedinsn(uint32 *regs)
|
||||
void up_undefinedinsn(uint32_t *regs)
|
||||
{
|
||||
lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||
current_regs = regs;
|
||||
|
||||