mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-16 12:34:29 +00:00
Compare commits
1175 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82862bb153 | ||
|
|
a70c881207 | ||
|
|
89bf1cf24f | ||
|
|
7ca26d943a | ||
|
|
e5696339e7 | ||
|
|
37de268af4 | ||
|
|
a1842621eb | ||
|
|
87b622e0e8 | ||
|
|
8fc0c27ea5 | ||
|
|
9133ceb44d | ||
|
|
3baaba8800 | ||
|
|
19bc9c8a48 | ||
|
|
f74e406997 | ||
|
|
0e62058edb | ||
|
|
afe9c0face | ||
|
|
8bd2d2f682 | ||
|
|
876caa2967 | ||
|
|
85096f6159 | ||
|
|
eeeb001d86 | ||
|
|
d8bab825bc | ||
|
|
ce3d65938d | ||
|
|
5421388be5 | ||
|
|
fdac74427d | ||
|
|
04c5d88e9d | ||
|
|
53b611d97a | ||
|
|
89f0b2c0be | ||
|
|
ead29065e0 | ||
|
|
eb16629f11 | ||
|
|
c85523f870 | ||
|
|
329c36c6bc | ||
|
|
15c46025ab | ||
|
|
0ced5cc699 | ||
|
|
d53e65ed82 | ||
|
|
8a3fa98a2f | ||
|
|
0e133bc0fc | ||
|
|
553a8389cc | ||
|
|
a9558864b7 | ||
|
|
605155cbcd | ||
|
|
06899603f3 | ||
|
|
7b0841b1e9 | ||
|
|
3f10f92340 | ||
|
|
95b2901ba6 | ||
|
|
cb238fc1fa | ||
|
|
3c6ae51faf | ||
|
|
0c95f33e9f | ||
|
|
2c1a85c90c | ||
|
|
8b5a004be1 | ||
|
|
8a9fb9554d | ||
|
|
5c98d0eb7c | ||
|
|
efc3ba9d73 | ||
|
|
50dcd0c682 | ||
|
|
7759f7c973 | ||
|
|
58a700b8f7 | ||
|
|
412c2cc9a7 | ||
|
|
38821bf732 | ||
|
|
7d76fd568f | ||
|
|
b4ff4820cb | ||
|
|
07a2021676 | ||
|
|
3ba433ed39 | ||
|
|
7ee534e4c2 | ||
|
|
671ca2724e | ||
|
|
0552fc86bf | ||
|
|
f9148de3cc | ||
|
|
8c9d8bcf0d | ||
|
|
aceb8db846 | ||
|
|
91f0fc9cdd | ||
|
|
559532329d | ||
|
|
9d9b00b669 | ||
|
|
7b97fe26c7 | ||
|
|
1cfa8cd9d8 | ||
|
|
8db5ded4b3 | ||
|
|
896d8c5d94 | ||
|
|
4a5f1529d0 | ||
|
|
812632fd1c | ||
|
|
4d2adb720b | ||
|
|
f5e7f9957c | ||
|
|
a5820e2b2a | ||
|
|
c26b230d28 | ||
|
|
1374a17f73 | ||
|
|
a22c519f5d | ||
|
|
80a942e964 | ||
|
|
46c4d33d28 | ||
|
|
14472a9499 | ||
|
|
fc56459b46 | ||
|
|
381785b968 | ||
|
|
27effd446c | ||
|
|
d89c43c7aa | ||
|
|
0079d00fec | ||
|
|
063a1538c7 | ||
|
|
6bf111e94a | ||
|
|
c679af3ba8 | ||
|
|
bc87cc4cb7 | ||
|
|
334e0e2e70 | ||
|
|
139b80f57e | ||
|
|
6fac5cfd4c | ||
|
|
96ab89d253 | ||
|
|
399d8c47c7 | ||
|
|
7004e0308a | ||
|
|
a7b2373bcc | ||
|
|
5cc153cfb1 | ||
|
|
9e00460ce1 | ||
|
|
7a337142ff | ||
|
|
fb18eeb96c | ||
|
|
411364dab6 | ||
|
|
749edf57e7 | ||
|
|
6b661d03a5 | ||
|
|
01f4b87dba | ||
|
|
89669ae861 | ||
|
|
7676ec0b66 | ||
|
|
4b895698ca | ||
|
|
1b04552233 | ||
|
|
10bc087ef9 | ||
|
|
5a0782e3a8 | ||
|
|
8d33f44809 | ||
|
|
dccbf6a271 | ||
|
|
6f4805423f | ||
|
|
e4f2ba1913 | ||
|
|
7a71523712 | ||
|
|
d493958052 | ||
|
|
95080a22f2 | ||
|
|
f57fa8bf72 | ||
|
|
12949b4507 | ||
|
|
25bc4acc6a | ||
|
|
6331341d97 | ||
|
|
ad3207a226 | ||
|
|
17e1e7dfd3 | ||
|
|
3ff33205eb | ||
|
|
b77d801de0 | ||
|
|
50cc4026db | ||
|
|
20ddcce965 | ||
|
|
9a24d4a37f | ||
|
|
2c894e0f55 | ||
|
|
16daa60de7 | ||
|
|
b41417d89b | ||
|
|
d195639bc1 | ||
|
|
19fcd2d505 | ||
|
|
4059be7918 | ||
|
|
1b96233cf1 | ||
|
|
2b92b7a5d9 | ||
|
|
947524522b | ||
|
|
8d532ab4a7 | ||
|
|
811413d95a | ||
|
|
a9b61c4e00 | ||
|
|
ab56e7ccbb | ||
|
|
304495350c | ||
|
|
a6132cbbad | ||
|
|
2cf5546e11 | ||
|
|
34f15ddecd | ||
|
|
eb94f856a8 | ||
|
|
0249ad47f4 | ||
|
|
7bc73115a5 | ||
|
|
b236356621 | ||
|
|
b54a5232c6 | ||
|
|
ae6380f70b | ||
|
|
df4e7ceba0 | ||
|
|
38055abf18 | ||
|
|
98720fb72e | ||
|
|
96e499775a | ||
|
|
a109f862a7 | ||
|
|
c7a110a853 | ||
|
|
0a31276719 | ||
|
|
e7e623f853 | ||
|
|
b20be831b7 | ||
|
|
c83d421388 | ||
|
|
f6a1714b46 | ||
|
|
ecc01bdbe8 | ||
|
|
556fc15e99 | ||
|
|
52b4c95301 | ||
|
|
7fd1d847fb | ||
|
|
a67c624894 | ||
|
|
6046eea342 | ||
|
|
7b9a3e0707 | ||
|
|
9c507b93d7 | ||
|
|
7243d65797 | ||
|
|
d26c31e518 | ||
|
|
c015ea5cfe | ||
|
|
69d1fc1a13 | ||
|
|
ed2a5c4ed0 | ||
|
|
71fd1adbad | ||
|
|
dc8f964534 | ||
|
|
14dbfbb861 | ||
|
|
5347d4fa8f | ||
|
|
1677ec5c60 | ||
|
|
19cdcbd681 | ||
|
|
9fa197fa9c | ||
|
|
93b74b6f8d | ||
|
|
97ce25072a | ||
|
|
f3dbcaf725 | ||
|
|
853250260c | ||
|
|
ab9bf58818 | ||
|
|
0ecde20ab3 | ||
|
|
a3c26cad3d | ||
|
|
b09733cdfc | ||
|
|
ba18beae47 | ||
|
|
6b9379ee87 | ||
|
|
d50618f375 | ||
|
|
bbcdcb0ba1 | ||
|
|
abadea4557 | ||
|
|
37b6fb5773 | ||
|
|
60bea08b22 | ||
|
|
2fc309624b | ||
|
|
1ae93fbb63 | ||
|
|
e867904a89 | ||
|
|
ab2eb016c1 | ||
|
|
8133188eee | ||
|
|
a49f0aa88a | ||
|
|
0de50e377c | ||
|
|
c30b4242bb | ||
|
|
93b07f3db7 | ||
|
|
9a0b608591 | ||
|
|
7a623479dd | ||
|
|
3b6ed5341f | ||
|
|
86e6ede04c | ||
|
|
4778bd45e7 | ||
|
|
7ce7d21ca8 | ||
|
|
ad451e8b70 | ||
|
|
fd5aeffadd | ||
|
|
bdef78d6a2 | ||
|
|
f352dc846b | ||
|
|
66c1a9b76d | ||
|
|
c92128869d | ||
|
|
eea2ab0385 | ||
|
|
8c8efdcc4e | ||
|
|
b4d26652b9 | ||
|
|
f4aa3f61e1 | ||
|
|
45fad778a4 | ||
|
|
17add98d2f | ||
|
|
07006b001e | ||
|
|
828d8df74e | ||
|
|
270a06fb9a | ||
|
|
edfeb212ae | ||
|
|
296c1eabfc | ||
|
|
f052e7c00f | ||
|
|
1ec24e1d46 | ||
|
|
b2238eb8c0 | ||
|
|
1c56717a0f | ||
|
|
0ef04cd7bd | ||
|
|
c788ecec17 | ||
|
|
0615862c9e | ||
|
|
ef35a4aab1 | ||
|
|
18f5af7195 | ||
|
|
8f6f5820aa | ||
|
|
d7d63dbe77 | ||
|
|
47354eddcb | ||
|
|
55c6e20370 | ||
|
|
feecfc5319 | ||
|
|
25f980aabe | ||
|
|
d27e63a8ca | ||
|
|
59204f7720 | ||
|
|
e77c5ca723 | ||
|
|
84394bf0a9 | ||
|
|
2a44b5641d | ||
|
|
0723a674f2 | ||
|
|
5f95494dff | ||
|
|
f43bd20a6d | ||
|
|
2cf67be590 | ||
|
|
9c3e8b0228 | ||
|
|
c7fbe1d601 | ||
|
|
2641267c85 | ||
|
|
904e22b667 | ||
|
|
e4c8a7957f | ||
|
|
3780491aeb | ||
|
|
23ca0009e3 | ||
|
|
2fca46e3e4 | ||
|
|
ccf36aeed4 | ||
|
|
a91ec6efe7 | ||
|
|
a4893aed60 | ||
|
|
2e0af9b6e6 | ||
|
|
f14011feb3 | ||
|
|
817859005a | ||
|
|
ee077a6b9a | ||
|
|
659a27800f | ||
|
|
0363b47c66 | ||
|
|
a47ead46e8 | ||
|
|
bb26ea557f | ||
|
|
c1dca1a069 | ||
|
|
9f83e74cb1 | ||
|
|
50b4b6619d | ||
|
|
5c75dd907e | ||
|
|
a418d78163 | ||
|
|
7768a4e02c | ||
|
|
9af437a3a9 | ||
|
|
c4217432f2 | ||
|
|
23b1023a7a | ||
|
|
ddf4f4eb1e | ||
|
|
0fcac53cf8 | ||
|
|
314b692440 | ||
|
|
1ee62d835d | ||
|
|
8c5b77635e | ||
|
|
ac19e40336 | ||
|
|
a33e3b3979 | ||
|
|
4b8e4c7520 | ||
|
|
cfc3911721 | ||
|
|
9391d8a186 | ||
|
|
68201d2f99 | ||
|
|
cc7c4acf02 | ||
|
|
27683e7360 | ||
|
|
4b3cf6221b | ||
|
|
810f45a61c | ||
|
|
64fc1907ec | ||
|
|
df410c7e27 | ||
|
|
49c5f327fc | ||
|
|
383f0b0f2f | ||
|
|
21898cc9d9 | ||
|
|
6052827afe | ||
|
|
3e4eb6e7ae | ||
|
|
fc050c4ab9 | ||
|
|
c8e98a097e | ||
|
|
b2929dc036 | ||
|
|
e854ebf1f5 | ||
|
|
8f6e5062d4 | ||
|
|
65d501d718 | ||
|
|
28b5ea32a4 | ||
|
|
4ab0313273 | ||
|
|
47cfc16aa0 | ||
|
|
8405dbe3d5 | ||
|
|
d31b403659 | ||
|
|
52ceb8de51 | ||
|
|
025b08cddf | ||
|
|
7bee13dfdc | ||
|
|
357f7fe56a | ||
|
|
1b2d31eac4 | ||
|
|
d09fcd3abe | ||
|
|
61dc1e332a | ||
|
|
c63be7c451 | ||
|
|
e03f239692 | ||
|
|
02db572328 | ||
|
|
5472e527b5 | ||
|
|
fa73924b8d | ||
|
|
f89b22f9d1 | ||
|
|
6818a478c6 | ||
|
|
9a54446449 | ||
|
|
c73b3dc304 | ||
|
|
4a5ea9e237 | ||
|
|
18d6c565e6 | ||
|
|
1aca141247 | ||
|
|
a2b1a64ba1 | ||
|
|
f4d8802850 | ||
|
|
1ae4ae2348 | ||
|
|
0821d5201e | ||
|
|
afe2d4fc38 | ||
|
|
f8b7288033 | ||
|
|
c848059d5f | ||
|
|
a671be77bf | ||
|
|
b492b7eb89 | ||
|
|
a93c8d6659 | ||
|
|
e65ab7222c | ||
|
|
1aed974822 | ||
|
|
0d8229a087 | ||
|
|
2596728679 | ||
|
|
808bb8e159 | ||
|
|
71b23456fd | ||
|
|
c4a14fc1ef | ||
|
|
3382b13855 | ||
|
|
73ee7479e4 | ||
|
|
c981185506 | ||
|
|
8fc041a994 | ||
|
|
85e6e01995 | ||
|
|
e262d95404 | ||
|
|
ec0f5ed043 | ||
|
|
450e344455 | ||
|
|
e35180acd9 | ||
|
|
9b27b75715 | ||
|
|
04c48138a8 | ||
|
|
b25f24cb75 | ||
|
|
0978152144 | ||
|
|
804d39fb69 | ||
|
|
d60032cec3 | ||
|
|
7c54dfea37 | ||
|
|
90ec8c2b57 | ||
|
|
92ae2d0724 | ||
|
|
bbe10cf550 | ||
|
|
2ce61bafdc | ||
|
|
416fcd3a3d | ||
|
|
073e831bcf | ||
|
|
06c89adf1e | ||
|
|
61dacf99ab | ||
|
|
ef57fa8947 | ||
|
|
9849c9ccab | ||
|
|
99cc14b365 | ||
|
|
73b49130c6 | ||
|
|
8dd9c7dfd9 | ||
|
|
ebffeb7ae4 | ||
|
|
094945625d | ||
|
|
65b947b50f | ||
|
|
b75ec97ea9 | ||
|
|
b60eba005a | ||
|
|
559e2a850f | ||
|
|
188a2c0cc1 | ||
|
|
1aa471d0ec | ||
|
|
68074c03d6 | ||
|
|
c99f3c55cd | ||
|
|
4f59d550c6 | ||
|
|
f902211804 | ||
|
|
b016c8bfb5 | ||
|
|
bf9b20e6b8 | ||
|
|
ac94fdddf1 | ||
|
|
a3cb76d07a | ||
|
|
2dc8e16e68 | ||
|
|
e170cdef52 | ||
|
|
bc0e754d87 | ||
|
|
dbb3361ed9 | ||
|
|
0840882d46 | ||
|
|
50ab249849 | ||
|
|
0bcacda16b | ||
|
|
e439365343 | ||
|
|
c0fae3b4dd | ||
|
|
d41bc9028e | ||
|
|
9ec30de7f4 | ||
|
|
db87c0ac06 | ||
|
|
a9625ce462 | ||
|
|
a06c91fcc1 | ||
|
|
7c09eb2da7 | ||
|
|
eb89065789 | ||
|
|
a75aec78ed | ||
|
|
0db3b5c258 | ||
|
|
26bf0da04e | ||
|
|
aedbbb8a5c | ||
|
|
11ed4d6fba | ||
|
|
7dbf3304b3 | ||
|
|
e00afda1b1 | ||
|
|
8560e094f2 | ||
|
|
8bbd6c243e | ||
|
|
dc5c2a5371 | ||
|
|
d80bf5e055 | ||
|
|
2c761c6626 | ||
|
|
448f83eb43 | ||
|
|
9557f14233 | ||
|
|
16612fb796 | ||
|
|
cacf4036b9 | ||
|
|
7c927d69d5 | ||
|
|
9c349886af | ||
|
|
d3f5c5348c | ||
|
|
205b0dd863 | ||
|
|
176aafbe00 | ||
|
|
e90ba3e57f | ||
|
|
9468e36040 | ||
|
|
f625cf929a | ||
|
|
23a5a73219 | ||
|
|
4322b8d649 | ||
|
|
64c701aff7 | ||
|
|
7f0c4ef656 | ||
|
|
506dd1b7c8 | ||
|
|
26f0258688 | ||
|
|
804d114420 | ||
|
|
334bd8b66c | ||
|
|
ee5608ddc2 | ||
|
|
a7462db433 | ||
|
|
1b3ceba83f | ||
|
|
2b2324a7e7 | ||
|
|
8c5f57a134 | ||
|
|
d138104369 | ||
|
|
5eeea3373f | ||
|
|
c9b5c1332a | ||
|
|
b5f93ce546 | ||
|
|
cf717acaae | ||
|
|
291ea26bfe | ||
|
|
6b7397ee92 | ||
|
|
b7da8d7a1b | ||
|
|
ad441634f0 | ||
|
|
afaa3321ba | ||
|
|
b500ab8be2 | ||
|
|
2cb1578b30 | ||
|
|
2d958d3d2c | ||
|
|
98ed4f2a20 | ||
|
|
7dacae2ae9 | ||
|
|
c3473a1e49 | ||
|
|
3c09399524 | ||
|
|
1f12f80eb7 | ||
|
|
a961f6daa3 | ||
|
|
13f92818a7 | ||
|
|
bb17e05f63 | ||
|
|
a9f422ed7c | ||
|
|
b0f9c55325 | ||
|
|
87c8d2f87a | ||
|
|
b7e0d0753a | ||
|
|
46b1b9f99d | ||
|
|
c5c32913c9 | ||
|
|
e30b39e09f | ||
|
|
00462893c9 | ||
|
|
75c6804bb1 | ||
|
|
07990a8c0c | ||
|
|
d7ca9be54d | ||
|
|
8a6518c3b3 | ||
|
|
b04f886ebd | ||
|
|
5f896f1640 | ||
|
|
4640196beb | ||
|
|
531faedf63 | ||
|
|
7ff79ca26b | ||
|
|
6bdf14c33f | ||
|
|
9a76bc39cb | ||
|
|
4b7c5b07c1 | ||
|
|
b401621a85 | ||
|
|
2d4ed1801b | ||
|
|
19216099d0 | ||
|
|
ed06a0400a | ||
|
|
1831418ec8 | ||
|
|
5a5be9567c | ||
|
|
a4708c9fc8 | ||
|
|
fb01731f41 | ||
|
|
87bb2c58b2 | ||
|
|
790bacc8f2 | ||
|
|
e9830a7ee3 | ||
|
|
27135c4a1c | ||
|
|
44b4467b26 | ||
|
|
df338c84c3 | ||
|
|
a83d9d93e8 | ||
|
|
d2a29ece23 | ||
|
|
3f3a091728 | ||
|
|
d2a9f9624b | ||
|
|
ddb7c49f3c | ||
|
|
523ffada03 | ||
|
|
5d6acacd7a | ||
|
|
6358344ea1 | ||
|
|
3a883a776c | ||
|
|
87eb48c97c | ||
|
|
af6c245366 | ||
|
|
0528691833 | ||
|
|
276356d9b5 | ||
|
|
4a1fbbca99 | ||
|
|
7a3ac3c503 | ||
|
|
f312118bf9 | ||
|
|
42f3130b20 | ||
|
|
d4b8c84409 | ||
|
|
af4a71e6b5 | ||
|
|
f59ba6d86a | ||
|
|
e6f3fa02dc | ||
|
|
b686daaa40 | ||
|
|
09f28cb98c | ||
|
|
28482990e0 | ||
|
|
9dace4de75 | ||
|
|
079f9f4ee2 | ||
|
|
b4eea4fa68 | ||
|
|
312b19b236 | ||
|
|
ee0ff3a207 | ||
|
|
fdcc3676cd | ||
|
|
836860067f | ||
|
|
32105816be | ||
|
|
0cc071f88a | ||
|
|
b92dd21bc5 | ||
|
|
83c2470ead | ||
|
|
ec5827a601 | ||
|
|
fe9d735641 | ||
|
|
428dbc9342 | ||
|
|
f154711652 | ||
|
|
f42b1510fa | ||
|
|
3634ebb497 | ||
|
|
b49cf69600 | ||
|
|
9815654538 | ||
|
|
e36ece8d42 | ||
|
|
09f991277e | ||
|
|
0a9fddb5d4 | ||
|
|
0b86cb1e2c | ||
|
|
f1d6aa1a06 | ||
|
|
fe1295fd25 | ||
|
|
7818ed5a97 | ||
|
|
c2e02c0488 | ||
|
|
4fda9b25f3 | ||
|
|
303da1a725 | ||
|
|
fb32554dc1 | ||
|
|
f525e50307 | ||
|
|
a5060cd1e2 | ||
|
|
e52a6e390e | ||
|
|
90874f8c2e | ||
|
|
1513fb6807 | ||
|
|
16434894ee | ||
|
|
1f501bb518 | ||
|
|
01ffe66a83 | ||
|
|
8f26ec2474 | ||
|
|
c134405914 | ||
|
|
ae23ad7395 | ||
|
|
c0223a28fe | ||
|
|
151c72ab7c | ||
|
|
b5ab3cd823 | ||
|
|
c36f76a062 | ||
|
|
756a1bb4ec | ||
|
|
e739c978b8 | ||
|
|
5bb9537bef | ||
|
|
d79f029d9f | ||
|
|
5dcbec38e3 | ||
|
|
aad5dce4a1 | ||
|
|
c012651a66 | ||
|
|
4bf5521db6 | ||
|
|
f24533b765 | ||
|
|
1ead7d162a | ||
|
|
cae143cbbf | ||
|
|
b57e4f4c36 | ||
|
|
3af07deca2 | ||
|
|
695eed8eb4 | ||
|
|
2ebb35d75d | ||
|
|
9a1a7cb4d2 | ||
|
|
5ae2d11145 | ||
|
|
6003973d5e | ||
|
|
a9a108a751 | ||
|
|
53efcbb6c9 | ||
|
|
b42009def0 | ||
|
|
25194d5918 | ||
|
|
3db39eb99d | ||
|
|
cd7fb3fda1 | ||
|
|
28aa468bd0 | ||
|
|
4965cdb367 | ||
|
|
f626f8ce19 | ||
|
|
9b2035aa90 | ||
|
|
ef3795d7c0 | ||
|
|
51404a713e | ||
|
|
245bb81bc0 | ||
|
|
25644cbf5d | ||
|
|
27934607e5 | ||
|
|
1c1f614404 | ||
|
|
2293b8ca53 | ||
|
|
c66301ac9e | ||
|
|
8243645ac8 | ||
|
|
8b4ef53b69 | ||
|
|
886be58c58 | ||
|
|
4c232cdc4e | ||
|
|
b76158a10d | ||
|
|
6ed4d1d3da | ||
|
|
a7f134911a | ||
|
|
f1e278e193 | ||
|
|
794edd476e | ||
|
|
6f8158082a | ||
|
|
515cd42702 | ||
|
|
b4eddb4992 | ||
|
|
8395c9a633 | ||
|
|
da0c104de4 | ||
|
|
5af3321022 | ||
|
|
2f40ad7393 | ||
|
|
975f102de9 | ||
|
|
5f8b420aa5 | ||
|
|
42b60ed69c | ||
|
|
fa9a58c9c0 | ||
|
|
143c58e032 | ||
|
|
55c96044b0 | ||
|
|
aaeb4790de | ||
|
|
dae13395ed | ||
|
|
4f2654fb0b | ||
|
|
a25d111613 | ||
|
|
eb6a668a8f | ||
|
|
d46a1e9699 | ||
|
|
52ba0e651e | ||
|
|
2b388dacd1 | ||
|
|
cd8c28b070 | ||
|
|
9323cea425 | ||
|
|
fe73d24184 | ||
|
|
8981a8539a | ||
|
|
3741d47db2 | ||
|
|
8a52afda6e | ||
|
|
aac296a7c8 | ||
|
|
c4a68ac620 | ||
|
|
e31fe0ef80 | ||
|
|
812e63f87f | ||
|
|
223feee46c | ||
|
|
ea209490e1 | ||
|
|
4a3e471fda | ||
|
|
8c1495a57d | ||
|
|
23d63def3b | ||
|
|
2d77a49535 | ||
|
|
035abe8707 | ||
|
|
e4319d7f88 | ||
|
|
e311bdb650 | ||
|
|
617ddbb61f | ||
|
|
c1a2e601a6 | ||
|
|
bfd67da1e7 | ||
|
|
299557fed2 | ||
|
|
46425b4099 | ||
|
|
7acae9e570 | ||
|
|
eef9900e23 | ||
|
|
d4376e4bcc | ||
|
|
c8b25f8bf2 | ||
|
|
18797cb689 | ||
|
|
e602554120 | ||
|
|
33597ce971 | ||
|
|
37402a9960 | ||
|
|
97de395ad0 | ||
|
|
7a83c44856 | ||
|
|
4e1b587af3 | ||
|
|
0e91b60a7d | ||
|
|
269de4b1e7 | ||
|
|
46c3268670 | ||
|
|
f88f5afa3b | ||
|
|
d71ed5975c | ||
|
|
d61373702a | ||
|
|
7551ede806 | ||
|
|
d62f5ef24a | ||
|
|
667493bed2 | ||
|
|
4b4aecf217 | ||
|
|
c7ff0f4b53 | ||
|
|
38511e8174 | ||
|
|
1e29358197 | ||
|
|
08464adb74 | ||
|
|
99d615a7dd | ||
|
|
adc5c7142b | ||
|
|
ccb960ca8b | ||
|
|
e2e988191c | ||
|
|
5acfec1f7c | ||
|
|
f1890708e1 | ||
|
|
4d39dfe5a0 | ||
|
|
34333e3d27 | ||
|
|
77fbf587ee | ||
|
|
42d07bc94b | ||
|
|
f622836e18 | ||
|
|
a256024aaa | ||
|
|
87253992aa | ||
|
|
b93186e975 | ||
|
|
761540892b | ||
|
|
2fd4047164 | ||
|
|
f5e095e34f | ||
|
|
dd9ed87596 | ||
|
|
0adf3d96c4 | ||
|
|
4555f696a8 | ||
|
|
cadd182942 | ||
|
|
d811a00690 | ||
|
|
9025468276 | ||
|
|
37bee0c18b | ||
|
|
f8e9f4071b | ||
|
|
baa287be9a | ||
|
|
8fa8b7c7a9 | ||
|
|
5ebd915502 | ||
|
|
296514e80a | ||
|
|
7164e04294 | ||
|
|
19e2d266b6 | ||
|
|
d92156e85a | ||
|
|
f2114d04f2 | ||
|
|
395aec25ff | ||
|
|
c1cb5dac54 | ||
|
|
c87cff51c2 | ||
|
|
c10e20be42 | ||
|
|
06265d2313 | ||
|
|
e41454c461 | ||
|
|
aee92373cf | ||
|
|
8d724f682d | ||
|
|
d94151bca7 | ||
|
|
6b8a71ba29 | ||
|
|
12d86511c9 | ||
|
|
adad8eab83 | ||
|
|
c82aa9b224 | ||
|
|
eefea4b753 | ||
|
|
6ee8deece7 | ||
|
|
441a1fec6d | ||
|
|
a859c59080 | ||
|
|
ea30213367 | ||
|
|
f374044a1c | ||
|
|
5bb82e7660 | ||
|
|
68a24a415e | ||
|
|
2f795214d7 | ||
|
|
c5f0933f49 | ||
|
|
46d4beaba8 | ||
|
|
151e000be0 | ||
|
|
e540f0abf4 | ||
|
|
efc8243397 | ||
|
|
5e6d50864c | ||
|
|
8471147b5a | ||
|
|
eb16fc814d | ||
|
|
f9e0da0358 | ||
|
|
aa03bff58d | ||
|
|
d6728eb2fc | ||
|
|
e785527326 | ||
|
|
57e58b25af | ||
|
|
5e238dd6f4 | ||
|
|
d28eda8634 | ||
|
|
a9404cd88a | ||
|
|
43bb138290 | ||
|
|
6633583d98 | ||
|
|
c5991e5f68 | ||
|
|
4e8383be43 | ||
|
|
5366162bcd | ||
|
|
2f8d10dc34 | ||
|
|
b3f0fb2804 | ||
|
|
0cd598fc66 | ||
|
|
9073424aa9 | ||
|
|
ea547e79ba | ||
|
|
bca87dcf54 | ||
|
|
acbdd47bee | ||
|
|
2389e3e25a | ||
|
|
bee2975d02 | ||
|
|
a5412bed75 | ||
|
|
d07b337786 | ||
|
|
dbf2ff1400 | ||
|
|
a35f4c69d8 | ||
|
|
3cfee24fe6 | ||
|
|
d5e3e282ec | ||
|
|
f3001b6156 | ||
|
|
fbf1f69a10 | ||
|
|
b56d2c8d6b | ||
|
|
b8104d386f | ||
|
|
89ccc31af1 | ||
|
|
a520f5c7e3 | ||
|
|
4b141c691e | ||
|
|
90ac00641c | ||
|
|
aa8a0d04b9 | ||
|
|
18f84c805f | ||
|
|
31606543da | ||
|
|
f7a168e184 | ||
|
|
86ae395879 | ||
|
|
5e1da95319 | ||
|
|
b5777916ac | ||
|
|
59d108028b | ||
|
|
85701eb0b1 | ||
|
|
86a84a1477 | ||
|
|
03acab14b2 | ||
|
|
b6e93f2e42 | ||
|
|
f03b362ee9 | ||
|
|
44b7c8b6ac | ||
|
|
05167fb0f6 | ||
|
|
4d302265c2 | ||
|
|
48a34c5fd1 | ||
|
|
151882a872 | ||
|
|
758b1c7c59 | ||
|
|
f147249a11 | ||
|
|
f93deff134 | ||
|
|
b2303011c3 | ||
|
|
842a7244cf | ||
|
|
cefe46cdbe | ||
|
|
4c8a5cfdad | ||
|
|
9157e9cfef | ||
|
|
31d448cbf9 | ||
|
|
53b376b6b8 | ||
|
|
a91c6302e7 | ||
|
|
eee1043e33 | ||
|
|
cf638edfaf | ||
|
|
8347299546 | ||
|
|
c59af80374 | ||
|
|
6ae55f3d6d | ||
|
|
ce7301b3e3 | ||
|
|
36815b949f | ||
|
|
cfa31e4205 | ||
|
|
6bf7776dec | ||
|
|
58f3f932ee | ||
|
|
094be62ef0 | ||
|
|
de519dd34e | ||
|
|
549dcfa148 | ||
|
|
0463a4814b | ||
|
|
86edfb7dd4 | ||
|
|
518d5e538a | ||
|
|
3c4c58dc6d | ||
|
|
5bccc20356 | ||
|
|
f9e47722ce | ||
|
|
a18e5c0bc5 | ||
|
|
317d2004dd | ||
|
|
5c189beb42 | ||
|
|
60c87c8364 | ||
|
|
709b7ee223 | ||
|
|
8e219f83f0 | ||
|
|
285fa0420a | ||
|
|
de5a4b3fb5 | ||
|
|
5e89d113be | ||
|
|
40f4287921 | ||
|
|
4f631de793 | ||
|
|
c873e088bf | ||
|
|
0773e6b805 | ||
|
|
e12614df23 | ||
|
|
b6690dfc9a | ||
|
|
603ec6a42b | ||
|
|
799cccac42 | ||
|
|
130e2f2c0a | ||
|
|
1d0cf84e80 | ||
|
|
36471ef3e8 | ||
|
|
c3a33e5e7c | ||
|
|
10edc1088a | ||
|
|
aa2ffbfde5 | ||
|
|
d6ec78a568 | ||
|
|
ed240e58a1 | ||
|
|
9d1ab2c90b | ||
|
|
aa7485ab0f | ||
|
|
a91d3d8afe | ||
|
|
f8abff1e04 | ||
|
|
3b34009b75 | ||
|
|
223bd9c75f | ||
|
|
8e264c901e | ||
|
|
172114c49f | ||
|
|
cb12d3a973 | ||
|
|
0a8889d62b | ||
|
|
a36ef26b0c | ||
|
|
8f33ce9c30 | ||
|
|
4c0c3038cc | ||
|
|
049459af87 | ||
|
|
5d83f61228 | ||
|
|
54dbbc3cdf | ||
|
|
be92c862be | ||
|
|
9c2512f54e | ||
|
|
5116051604 | ||
|
|
e5d85bc87e | ||
|
|
aeea09e21e | ||
|
|
6eec108bdd | ||
|
|
d427489391 | ||
|
|
513b1a25e0 | ||
|
|
a2bdba02ad | ||
|
|
0dffe8d801 | ||
|
|
cebb479b0a | ||
|
|
bfdbfce22f | ||
|
|
60da4247dd | ||
|
|
a943ccd85a | ||
|
|
adf9eb9fb0 | ||
|
|
f68aab980d | ||
|
|
53a8d172df | ||
|
|
3a8161372d | ||
|
|
3ea597543a | ||
|
|
431d1c009d | ||
|
|
181889d6b1 | ||
|
|
5ff84b9869 | ||
|
|
4953c7d030 | ||
|
|
3f2375c020 | ||
|
|
78d3b371fd | ||
|
|
35be76b9b7 | ||
|
|
216fcb10c9 | ||
|
|
5d60a388e0 | ||
|
|
1c3c04f121 | ||
|
|
a2d86ba1fb | ||
|
|
16b6baf10c | ||
|
|
a1edce40d2 | ||
|
|
2ff6ab158f | ||
|
|
597fbaacde | ||
|
|
56d5f4ac9b | ||
|
|
6eed669d06 | ||
|
|
ae6d081ebe | ||
|
|
512c86194f | ||
|
|
8b02e015ba | ||
|
|
7580c6b817 | ||
|
|
794b6546b2 | ||
|
|
32592e1385 | ||
|
|
3ab4d1f87f | ||
|
|
e4c0740eaa | ||
|
|
5ba1afe8b5 | ||
|
|
b25bb7e4f5 | ||
|
|
619cd7a43d | ||
|
|
3244fd67dc | ||
|
|
91805dd051 | ||
|
|
c3acf82f70 | ||
|
|
090da3b518 | ||
|
|
d091cf740f | ||
|
|
1d4e319aa7 | ||
|
|
ea07e0b934 | ||
|
|
e72748b18f | ||
|
|
eea5d82a8f | ||
|
|
8a795bd375 | ||
|
|
7d034a24be | ||
|
|
1e83961601 | ||
|
|
48eff41955 | ||
|
|
42ebfc5227 | ||
|
|
4fcb98ef1d | ||
|
|
cd38538425 | ||
|
|
90064444af | ||
|
|
6128d1a86e | ||
|
|
642a74c5b4 | ||
|
|
ac0630af91 | ||
|
|
192cc29ebc | ||
|
|
8ce7a79937 | ||
|
|
576a25a098 | ||
|
|
6391f4160b | ||
|
|
4154eec4e1 | ||
|
|
03a82c5bc8 | ||
|
|
a4d3bf8f5d | ||
|
|
91c26c9868 | ||
|
|
ab37826715 | ||
|
|
a5f3797949 | ||
|
|
15881cdf39 | ||
|
|
f689c709ab | ||
|
|
b6aa1d6ca8 | ||
|
|
a87f9df3d8 | ||
|
|
bb64640f0a | ||
|
|
98ebaac850 | ||
|
|
b8695fa787 | ||
|
|
eb9d172082 | ||
|
|
0f7c3939e1 | ||
|
|
9d1b078a8f | ||
|
|
61a5a25a7f | ||
|
|
c24a713859 | ||
|
|
01ce621748 | ||
|
|
b19ede773a | ||
|
|
bea704342a | ||
|
|
dd1ef6a777 | ||
|
|
2888b15b7e | ||
|
|
5a2790a998 | ||
|
|
4b9fe1e28a | ||
|
|
fb3b17a37c | ||
|
|
b9b3e521f7 | ||
|
|
ecc072e58b | ||
|
|
66fc3b8092 | ||
|
|
f3eb5028a3 | ||
|
|
31bda54b75 | ||
|
|
f146124bca | ||
|
|
0965823a67 | ||
|
|
684b898abc | ||
|
|
6c275b9ca5 | ||
|
|
ba90821242 | ||
|
|
d7e9d4d397 | ||
|
|
d184cdc09d | ||
|
|
dc897a35dd | ||
|
|
45fceb4bdd | ||
|
|
6177c6e4a4 | ||
|
|
5d27f3ccf7 | ||
|
|
676139e920 | ||
|
|
9d0e60493a | ||
|
|
5a1129c315 | ||
|
|
ad52311deb | ||
|
|
bd44f90e50 | ||
|
|
bafcf8901e | ||
|
|
b7f66b9db6 | ||
|
|
4304c07ebf | ||
|
|
0eae0f7549 | ||
|
|
a9393b891d | ||
|
|
3f620024fc | ||
|
|
a918bd9825 | ||
|
|
019ab1b908 | ||
|
|
9c87f922b3 | ||
|
|
0d29807e93 | ||
|
|
b08411ec5a | ||
|
|
d7ca9ad0c3 | ||
|
|
7e529c281f | ||
|
|
4c8425da01 | ||
|
|
e939542f32 | ||
|
|
57a83227d0 | ||
|
|
8ffe2b49e8 | ||
|
|
98daf5a1b8 | ||
|
|
c95cae5a99 | ||
|
|
dc307b270b | ||
|
|
360d357e15 | ||
|
|
09bfc2d862 | ||
|
|
9cea94ccce | ||
|
|
c1d5690da6 | ||
|
|
7920c29ad1 | ||
|
|
49c84f0d41 | ||
|
|
ac58b5b285 | ||
|
|
8cf6a70c9e | ||
|
|
c1e9f859c8 | ||
|
|
f4dd20dffc | ||
|
|
7eb7201b46 | ||
|
|
b24032d4b0 | ||
|
|
a6053582fc | ||
|
|
af939eb0a9 | ||
|
|
a9ed428422 | ||
|
|
da6d27b627 | ||
|
|
b73dafb1f4 | ||
|
|
2bc9dfa3f8 | ||
|
|
ed543197e0 | ||
|
|
24cb048892 | ||
|
|
ada4744871 | ||
|
|
06e8e93eb5 | ||
|
|
a3677612d2 | ||
|
|
2ca3985a8c | ||
|
|
7ed94acdff | ||
|
|
cfcad6e78a | ||
|
|
5cefef5074 | ||
|
|
637619dcb7 | ||
|
|
d1b9463e29 | ||
|
|
bc7068a690 | ||
|
|
c2a6dc193e | ||
|
|
3fd422ff2f | ||
|
|
9596b04eff | ||
|
|
527fb6a907 | ||
|
|
3b4545cdf6 | ||
|
|
8704fd145b | ||
|
|
343a6101c2 | ||
|
|
a08969154a | ||
|
|
829f5cda65 | ||
|
|
6ec6b4508a | ||
|
|
96b7e685a7 | ||
|
|
7e3a04602d | ||
|
|
c366fa96f9 | ||
|
|
945ffc1a38 | ||
|
|
998e9699f4 | ||
|
|
1ef0e22ca1 | ||
|
|
3d099d43f5 | ||
|
|
6e9d6a2bdf | ||
|
|
5024d47769 | ||
|
|
8502ee5b1c | ||
|
|
534d26e4ef | ||
|
|
0ec39d206f | ||
|
|
2e3f4ad506 | ||
|
|
b593401cfe | ||
|
|
3686ab1dcb | ||
|
|
85c789dc2a | ||
|
|
62f9bdef17 | ||
|
|
a702fc53a7 | ||
|
|
7596b7f45d | ||
|
|
87575c5cfe | ||
|
|
ed28aa2046 | ||
|
|
5ebd39bfc9 | ||
|
|
58905b6fb4 | ||
|
|
a8d03f24e3 | ||
|
|
b53d20dfd2 | ||
|
|
ebfede454f | ||
|
|
5cb4e9b5a6 | ||
|
|
1217e8ce06 | ||
|
|
1aecde4efd | ||
|
|
640675e76b | ||
|
|
6e4a303cdb | ||
|
|
09803ca31e | ||
|
|
2e76895839 | ||
|
|
89c922a586 | ||
|
|
ebe6e14f25 | ||
|
|
ade2da38ed | ||
|
|
bf5cd55c55 | ||
|
|
f39424feee | ||
|
|
f73e663411 | ||
|
|
643c94a5a8 | ||
|
|
7008ebb8c9 | ||
|
|
39b68e7fc5 | ||
|
|
ebcac1c4b5 | ||
|
|
8e856177c9 | ||
|
|
47a7f0165b | ||
|
|
6e59817356 | ||
|
|
dab366cd77 | ||
|
|
88548253ec | ||
|
|
60bead5003 | ||
|
|
39f6b0b5de | ||
|
|
71ef3153ea | ||
|
|
b8b70528f4 | ||
|
|
2b174e556c | ||
|
|
ebf69dab5d | ||
|
|
9a9cd41098 | ||
|
|
3c2306ed72 | ||
|
|
fedf9c7ba0 | ||
|
|
8c0260568e | ||
|
|
3e94695fb4 | ||
|
|
12e207f913 | ||
|
|
1398ff5f3b | ||
|
|
30eb33aa89 | ||
|
|
c8de9a1cd8 | ||
|
|
280a78ac5b | ||
|
|
6e9b21812b | ||
|
|
1e95bfc6b6 | ||
|
|
cf10f33866 | ||
|
|
ad75bb3b77 | ||
|
|
4ed46aaef9 | ||
|
|
303fb84de3 | ||
|
|
6bc6cc282d | ||
|
|
95189f40d2 | ||
|
|
babd7f05f7 | ||
|
|
125a9ef81d | ||
|
|
2855dbaa43 | ||
|
|
2f75980fca | ||
|
|
7306d9b428 | ||
|
|
c8b4248e5d | ||
|
|
91a1b614f8 | ||
|
|
79dd981500 | ||
|
|
61efe2504c | ||
|
|
991624461f | ||
|
|
f44fc2c665 | ||
|
|
89d7f37094 | ||
|
|
226d78fcab | ||
|
|
f315c91f38 | ||
|
|
c6965bc253 | ||
|
|
040475fca6 | ||
|
|
3f0ee56dbb | ||
|
|
bc590036e0 | ||
|
|
b2ec747412 | ||
|
|
0c6913bfab | ||
|
|
0fef4cbaf9 | ||
|
|
613c764189 | ||
|
|
5a418b56fa | ||
|
|
c3e153145b | ||
|
|
961e402e12 | ||
|
|
97bee57daa | ||
|
|
0faf33fbca | ||
|
|
bdea62587e | ||
|
|
161e266c97 | ||
|
|
b31c9e18f9 | ||
|
|
1eb00d2045 | ||
|
|
35afa63a47 | ||
|
|
b4ed11bddb | ||
|
|
7e5450acd1 | ||
|
|
eb64d935dc | ||
|
|
6610911d3e | ||
|
|
7e6a2b0bd5 | ||
|
|
ba4d636307 | ||
|
|
778b0d13ef | ||
|
|
3b1b99c0d7 | ||
|
|
b5d4e08320 | ||
|
|
93dd04d5dd | ||
|
|
5afe5250e5 | ||
|
|
eed758709c | ||
|
|
e6e5add7d8 | ||
|
|
7d0f249fad | ||
|
|
05920be92a |
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -55,15 +66,20 @@
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*----------------------------------------------------------*/
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*/
|
||||
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 66000000 ) /* = 66.000MHz clk gen */
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 66000000 ) /* = 66.000MHz clk gen */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 25 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
|
||||
@@ -1,32 +1,55 @@
|
||||
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#/*
|
||||
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
#
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
# * Complete, revised, and edited pdf reference manuals are also *
|
||||
# * available. *
|
||||
# * *
|
||||
# * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
# * ensuring you get running as quickly as possible and with an *
|
||||
# * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
# * the FreeRTOS project to continue with its mission of providing *
|
||||
# * professional grade, cross platform, de facto standard solutions *
|
||||
# * for microcontrollers - completely free of charge! *
|
||||
# * *
|
||||
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
# * *
|
||||
# * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
#
|
||||
# FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This file is part of the FreeRTOS distribution.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with FreeRTOS.org; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License (version 2) as published by the
|
||||
# Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
# >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
# distribute a combined work that includes FreeRTOS without being obliged to
|
||||
# provide the source code for proprietary components outside of the FreeRTOS
|
||||
# kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details. You should have received a copy of the GNU General Public
|
||||
# License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
# by writing to Richard Barry, contact details for whom are available on the
|
||||
# FreeRTOS WEB site.
|
||||
#
|
||||
# A special exception to the GPL can be applied should you wish to distribute
|
||||
# a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
# the source code for any proprietary components. See the licensing section
|
||||
# of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
# can be applied.
|
||||
# 1 tab == 4 spaces!
|
||||
#
|
||||
# ***************************************************************************
|
||||
# See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
# and contact details. Please ensure to read the configuration and relevant
|
||||
# port sections of the online documentation.
|
||||
# ***************************************************************************
|
||||
# http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
# contact details.
|
||||
#
|
||||
# http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
# critical systems.
|
||||
#
|
||||
# http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
# licensing and training services.
|
||||
#*/
|
||||
|
||||
CC=arm-elf-gcc
|
||||
OBJCOPY=arm-elf-objcopy
|
||||
@@ -36,9 +59,10 @@ CRT0=boot.s
|
||||
#
|
||||
# CFLAGS common to both the THUMB and ARM mode builds
|
||||
#
|
||||
CFLAGS=-Wall -D $(RUN_MODE) -D GCC_AT91FR40008 -I. -I../../Source/include \
|
||||
CFLAGS=-Wall -Wextra -D $(RUN_MODE) -D GCC_AT91FR40008 -I. -I../../Source/include \
|
||||
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
|
||||
-Wcast-align $(OPTIM) -fomit-frame-pointer
|
||||
-Wcast-align $(OPTIM) -fomit-frame-pointer -fno-strict-aliasing \
|
||||
-fno-dwarf2-cfi-asm
|
||||
|
||||
ifeq ($(USE_THUMB_MODE),YES)
|
||||
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
|
||||
@@ -96,4 +120,6 @@ $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
|
||||
|
||||
clean :
|
||||
touch Makefile
|
||||
rm $(ARM_OBJ)
|
||||
rm $(THUMB_OBJ)
|
||||
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
@@ -53,9 +64,9 @@
|
||||
#include "aic.h"
|
||||
|
||||
#define partstNUM_LEDS ( 8 )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) ~(0xFFFFFFFF << partstNUM_LEDS) )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned long ) ~(0xFFFFFFFF << partstNUM_LEDS) )
|
||||
|
||||
static unsigned portLONG ulLEDReg;
|
||||
static unsigned long ulLEDReg;
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
@@ -63,7 +74,7 @@ static unsigned portLONG ulLEDReg;
|
||||
|
||||
static void SetLeds (unsigned int leds)
|
||||
{
|
||||
unsigned portLONG ulPIOSetReg, ulPIOClearReg;
|
||||
unsigned long ulPIOSetReg, ulPIOClearReg;
|
||||
|
||||
/* LEDs are grouped in different port bits: P3-P6 and P16-P19.
|
||||
A port bit set to '0' turns an LED on, '1' turns it off. */
|
||||
|
||||
@@ -35,6 +35,12 @@ SECTIONS
|
||||
*(.bss)
|
||||
} >ram
|
||||
|
||||
. = ALIGN(4);
|
||||
.eh_frame :
|
||||
{
|
||||
KEEP (*(.eh_frame))
|
||||
} > ram
|
||||
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
|
||||
@@ -36,6 +36,12 @@ SECTIONS
|
||||
*(.bss)
|
||||
} >ram
|
||||
|
||||
. = ALIGN(4);
|
||||
.eh_frame :
|
||||
{
|
||||
KEEP (*(.eh_frame))
|
||||
} > ram
|
||||
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -100,7 +111,7 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 5 )
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
@@ -115,10 +126,10 @@
|
||||
error. */
|
||||
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
#define mainON_BOARD_LED_BIT ( ( unsigned portLONG ) 7 )
|
||||
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 )
|
||||
|
||||
/* Constants used by the vMemCheckTask() task. */
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )
|
||||
#define mainNO_TASK ( 0 )
|
||||
|
||||
/* The size of the memory blocks allocated by the vMemCheckTask() task. */
|
||||
@@ -127,7 +138,7 @@ error. */
|
||||
#define mainMEM_CHECK_SIZE_3 ( ( size_t ) 151 )
|
||||
|
||||
#define MAX_WAIT_STATES 8
|
||||
static const unsigned portLONG ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] =
|
||||
static const unsigned long ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] =
|
||||
{
|
||||
WaitState1,/* There is no "zero wait state" value, so use one wait state */
|
||||
WaitState1,
|
||||
@@ -145,7 +156,7 @@ static const unsigned portLONG ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] =
|
||||
* Checks that all the demo application tasks are still executing without error
|
||||
* - as described at the top of the file.
|
||||
*/
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount );
|
||||
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount );
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
@@ -188,7 +199,7 @@ int main( void )
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Now all the tasks have been started - start the scheduler.
|
||||
|
||||
@@ -207,9 +218,12 @@ int main( void )
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
unsigned portLONG ulMemCheckTaskRunningCount;
|
||||
unsigned long ulMemCheckTaskRunningCount;
|
||||
xTaskHandle xCreatedTask;
|
||||
|
||||
/* Just to stop compiler warnings. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Cycle for ever, delaying then checking all the other tasks are still
|
||||
operating without error. If an error is detected then the delay period
|
||||
is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so
|
||||
@@ -230,7 +244,7 @@ xTaskHandle xCreatedTask;
|
||||
/* Dynamically create a task - passing ulMemCheckTaskRunningCount as a
|
||||
parameter. */
|
||||
ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE;
|
||||
if( xTaskCreate( vMemCheckTask, ( signed portCHAR * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
|
||||
if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
|
||||
{
|
||||
/* Could not create the task - we have probably run out of heap. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
@@ -263,13 +277,13 @@ xTaskHandle xCreatedTask;
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
portLONG lCount;
|
||||
long lCount;
|
||||
|
||||
#ifdef RUN_FROM_ROM
|
||||
{
|
||||
portFLOAT nsecsPerClockTick;
|
||||
portLONG lNumWaitStates;
|
||||
unsigned portLONG ulCSRWaitValue;
|
||||
long lNumWaitStates;
|
||||
unsigned long ulCSRWaitValue;
|
||||
|
||||
/* We are compiling to run from ROM (either on-chip or off-chip flash).
|
||||
Leave the RAM/flash mapped the way they are on reset
|
||||
@@ -281,7 +295,7 @@ portLONG lCount;
|
||||
based on constants. But the compiler should still produce
|
||||
a correct wait state register value. */
|
||||
nsecsPerClockTick = ( portFLOAT ) 1000000000 / configCPU_CLOCK_HZ;
|
||||
lNumWaitStates = ( portLONG )( ( configFLASH_SPEED_NSEC / nsecsPerClockTick ) + 0.5 ) - 1;
|
||||
lNumWaitStates = ( long )( ( configFLASH_SPEED_NSEC / nsecsPerClockTick ) + 0.5 ) - 1;
|
||||
|
||||
if( lNumWaitStates < 0 )
|
||||
{
|
||||
@@ -338,9 +352,9 @@ portLONG lCount;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
||||
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) pdPASS;
|
||||
long lReturn = ( long ) pdPASS;
|
||||
|
||||
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||
that they are all still running, and that none of them have detected
|
||||
@@ -348,44 +362,44 @@ portLONG lReturn = ( portLONG ) pdPASS;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )
|
||||
{
|
||||
/* The vMemCheckTask did not increment the counter - it must
|
||||
have failed. */
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
@@ -394,9 +408,9 @@ portLONG lReturn = ( portLONG ) pdPASS;
|
||||
|
||||
static void vMemCheckTask( void *pvParameters )
|
||||
{
|
||||
unsigned portLONG *pulMemCheckTaskRunningCounter;
|
||||
unsigned long *pulMemCheckTaskRunningCounter;
|
||||
void *pvMem1, *pvMem2, *pvMem3;
|
||||
static portLONG lErrorOccurred = pdFALSE;
|
||||
static long lErrorOccurred = pdFALSE;
|
||||
|
||||
/* This task is dynamically created then deleted during each cycle of the
|
||||
vErrorChecks task to check the operation of the memory allocator. Each time
|
||||
@@ -409,7 +423,7 @@ static portLONG lErrorOccurred = pdFALSE;
|
||||
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
|
||||
vErrorChecks() task that this task is still executing without error. */
|
||||
|
||||
pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;
|
||||
pulMemCheckTaskRunningCounter = ( unsigned long * ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -66,7 +77,7 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup and access the UART. */
|
||||
#define portUSART0_AIC_CHANNEL ( ( unsigned portLONG ) 2 )
|
||||
#define portUSART0_AIC_CHANNEL ( ( unsigned long ) 2 )
|
||||
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
#define serHANDLE ( ( xComPortHandle ) 1 )
|
||||
@@ -89,10 +100,10 @@ extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueu
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulSpeed;
|
||||
unsigned portLONG ulCD;
|
||||
unsigned long ulSpeed;
|
||||
unsigned long ulCD;
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
extern void ( vUART_ISR_Wrapper )( void );
|
||||
|
||||
@@ -103,7 +114,7 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||
if(
|
||||
( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 0 )
|
||||
( ulWantedBaud != ( unsigned long ) 0 )
|
||||
)
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
@@ -174,7 +185,7 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
@@ -192,18 +203,19 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed portCHAR *pxNext;
|
||||
signed char *pxNext;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
( void ) usStringLength;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed portCHAR * ) pcString;
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
@@ -212,8 +224,10 @@ signed portCHAR *pxNext;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
( void ) pxPort;
|
||||
|
||||
/* Place the character in the queue of characters to be transmitted. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
{
|
||||
@@ -233,6 +247,7 @@ signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOut
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
/* Not supported as not required by the demo application. */
|
||||
( void ) xPort;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,33 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
and contact details. Please ensure to read the configuration and relevant
|
||||
port sections of the online documentation.
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
|
||||
@@ -56,14 +77,14 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constant to access the AIC. */
|
||||
#define serCLEAR_AIC_INTERRUPT ( ( unsigned portLONG ) 0 )
|
||||
#define serCLEAR_AIC_INTERRUPT ( ( unsigned long ) 0 )
|
||||
|
||||
/* Constants to determine the ISR source. */
|
||||
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portLONG ) (US_RXRDY | US_TXRDY | US_RXBRK | US_OVRE | US_FRAME | US_PARE) )
|
||||
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned long ) (US_RXRDY | US_TXRDY | US_RXBRK | US_OVRE | US_FRAME | US_PARE) )
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
@@ -78,14 +99,14 @@ void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
|
||||
|
||||
/* The ISR function that actually performs the work. This must be separate
|
||||
from the wrapper to ensure the correct stack frame is set up. */
|
||||
void vUART_ISR_Handler( void );
|
||||
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )
|
||||
{
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Pass back a reference to the queues so the serial API file can
|
||||
post/receive characters. */
|
||||
@@ -101,7 +122,7 @@ void vUART_ISR_Wrapper( void )
|
||||
|
||||
/* Call the handler. This must be a separate function to ensure the
|
||||
stack frame is correctly set up. */
|
||||
vUART_ISR_Handler();
|
||||
__asm volatile( "bl vUART_ISR_Handler" );
|
||||
|
||||
/* Restore the context of whichever task will run next. */
|
||||
portRESTORE_CONTEXT();
|
||||
@@ -111,9 +132,9 @@ void vUART_ISR_Wrapper( void )
|
||||
void vUART_ISR_Handler( void )
|
||||
{
|
||||
/* Now we can declare the local variables. These must be static. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned long ulStatus;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
ulStatus = AT91C_BASE_US0->US_CSR & AT91C_BASE_US0->US_IMR;
|
||||
@@ -122,7 +143,7 @@ unsigned portLONG ulStatus;
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
@@ -140,10 +161,7 @@ unsigned portLONG ulStatus;
|
||||
/* The interrupt was caused by the receiver getting data. */
|
||||
cChar = AT91C_BASE_US0->US_RHR;
|
||||
|
||||
if (xQueueSendFromISR(xRxedChars, &cChar, pdFALSE))
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
xQueueSendFromISR(xRxedChars, &cChar, &xHigherPriorityTaskWoken);
|
||||
}
|
||||
|
||||
/* Acknowledge the interrupt at AIC level... */
|
||||
@@ -153,7 +171,7 @@ unsigned portLONG ulStatus;
|
||||
ensure that the unblocked task is the task that executes when the interrupt
|
||||
completes if the unblocked task has a priority higher than the interrupted
|
||||
task. */
|
||||
if( xTaskWokenByTx || xTaskWokenByRx )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -53,16 +64,18 @@
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*----------------------------------------------------------*/
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
-----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 47923200 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 100 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
@@ -48,7 +59,7 @@
|
||||
* Simple parallel port IO routines for the LED's.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
const unsigned portLONG led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
|
||||
const unsigned long led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#define Board_h
|
||||
|
||||
#include "AT91SAM7S64.h"
|
||||
#define __inline inline
|
||||
#define __inline static inline
|
||||
#include "lib_AT91SAM7S64.h"
|
||||
|
||||
#define true -1
|
||||
|
||||
@@ -1,55 +1,66 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
Sample interrupt driven USB device driver. This is a minimal implementation
|
||||
Sample interrupt driven USB device driver. This is a minimal implementation
|
||||
for demonstration only. Although functional, it is not a full and compliant
|
||||
implementation.
|
||||
implementation.
|
||||
|
||||
The USB device enumerates as a simple 3 axis joystick, and once configured
|
||||
transmits 3 axis of data which can be viewed from the USB host machine.
|
||||
|
||||
This file implements the USB interrupt service routine, and a demo FreeRTOS
|
||||
task. The interrupt service routine handles the USB hardware - taking a
|
||||
This file implements the USB interrupt service routine, and a demo FreeRTOS
|
||||
task. The interrupt service routine handles the USB hardware - taking a
|
||||
snapshot of the USB status at the point of the interrupt. The task receives
|
||||
the status information from the interrupt for processing at the task level.
|
||||
|
||||
@@ -60,7 +71,7 @@
|
||||
Changes from V2.5.5
|
||||
|
||||
+ Descriptors that have a length that is an exact multiple of usbFIFO_LENGTH
|
||||
can now be transmitted. To this end an extra parameter has been
|
||||
can now be transmitted. To this end an extra parameter has been
|
||||
added to the prvSendControlData() function, and the state
|
||||
eSENDING_EVEN_DESCRIPTOR has been introduced. Thanks to Scott Miller for
|
||||
assisting with this contribution.
|
||||
@@ -120,7 +131,7 @@
|
||||
#define usbINTERFACE_STRING ( 4 )
|
||||
|
||||
/* Data indexes for reading the request from the xISRStatus.ucFifoData[]
|
||||
into xUSB_REQUEST. The data order is designed for speed - so looks a
|
||||
into xUSB_REQUEST. The data order is designed for speed - so looks a
|
||||
little odd. */
|
||||
#define usbREQUEST_TYPE_INDEX ( 7 )
|
||||
#define usbREQUEST_INDEX ( 6 )
|
||||
@@ -134,7 +145,7 @@ little odd. */
|
||||
/* Misc application definitions. */
|
||||
#define usbINTERRUPT_PRIORITY ( 3 )
|
||||
#define usbQUEUE_LENGTH ( 0x3 ) /* Must have all bits set! */
|
||||
#define usbFIFO_LENGTH ( ( unsigned portLONG ) 8 )
|
||||
#define usbFIFO_LENGTH ( ( unsigned long ) 8 )
|
||||
#define usbEND_POINT_0 ( 0 )
|
||||
#define usbEND_POINT_1 ( 1 )
|
||||
#define usbXUP ( 1 )
|
||||
@@ -143,14 +154,14 @@ little odd. */
|
||||
#define usbYDOWN ( 4 )
|
||||
#define usbMAX_COORD ( 120 )
|
||||
#define usbMAX_TX_MESSAGE_SIZE ( 128 )
|
||||
#define usbRX_COUNT_MASK ( ( unsigned portLONG ) 0x7ff )
|
||||
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )
|
||||
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR
|
||||
#define usbSHORTEST_DELAY ( ( portTickType ) 1 )
|
||||
#define usbINIT_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )
|
||||
#define usbEND_POINT_RESET_MASK ( ( unsigned portLONG ) 0x0f )
|
||||
#define usbDATA_INC ( ( portCHAR ) 5 )
|
||||
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned portLONG ) 8 )
|
||||
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )
|
||||
#define usbDATA_INC ( ( char ) 5 )
|
||||
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )
|
||||
|
||||
/* Control request types. */
|
||||
#define usbSTANDARD_DEVICE_REQUEST ( 0 )
|
||||
@@ -163,19 +174,19 @@ little odd. */
|
||||
/* Structure used to take a snapshot of the USB status from within the ISR. */
|
||||
typedef struct X_ISR_STATUS
|
||||
{
|
||||
unsigned portLONG ulISR;
|
||||
unsigned portLONG ulCSR0;
|
||||
unsigned portCHAR ucFifoData[ 8 ];
|
||||
unsigned long ulISR;
|
||||
unsigned long ulCSR0;
|
||||
unsigned char ucFifoData[ 8 ];
|
||||
} xISRStatus;
|
||||
|
||||
/* Structure used to hold the received requests. */
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
unsigned portCHAR ucReqType;
|
||||
unsigned portCHAR ucRequest;
|
||||
unsigned portSHORT usValue;
|
||||
unsigned portSHORT usIndex;
|
||||
unsigned portSHORT usLength;
|
||||
unsigned char ucReqType;
|
||||
unsigned char ucRequest;
|
||||
unsigned short usValue;
|
||||
unsigned short usIndex;
|
||||
unsigned short usLength;
|
||||
} xUSB_REQUEST;
|
||||
|
||||
typedef enum
|
||||
@@ -191,14 +202,14 @@ typedef enum
|
||||
/* Structure used to control the data being sent to the host. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned portCHAR ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
|
||||
unsigned portLONG ulNextCharIndex;
|
||||
unsigned portLONG ulTotalDataLength;
|
||||
unsigned char ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
|
||||
unsigned long ulNextCharIndex;
|
||||
unsigned long ulTotalDataLength;
|
||||
} xTX_MESSAGE;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* The USB interrupt service routine. This takes a snapshot of the USB
|
||||
* device at the time of the interrupt, clears the interrupts, and posts
|
||||
* the data to the USB processing task.
|
||||
@@ -212,7 +223,7 @@ __arm void vUSB_ISR( void );
|
||||
static void prvResetEndPoints( void );
|
||||
|
||||
/*
|
||||
* Setup the USB hardware, install the interrupt service routine and
|
||||
* Setup the USB hardware, install the interrupt service routine and
|
||||
* initialise all the state variables.
|
||||
*/
|
||||
static void vInitUSBInterface( void );
|
||||
@@ -222,17 +233,17 @@ static void vInitUSBInterface( void );
|
||||
*/
|
||||
static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle standard device requests originating on the control
|
||||
* end point.
|
||||
* end point.
|
||||
*/
|
||||
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle standard interface requests originating on the control
|
||||
@@ -241,7 +252,7 @@ static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest );
|
||||
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle standard end point requests originating on the control
|
||||
@@ -250,7 +261,7 @@ static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest );
|
||||
static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle the class interface requests.
|
||||
@@ -266,11 +277,11 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest );
|
||||
* in response to TXCOMP interrupts until the entire buffer has been
|
||||
* sent.
|
||||
*/
|
||||
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthLeftToSend, portLONG lSendingDescriptor );
|
||||
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthLeftToSend, long lSendingDescriptor );
|
||||
|
||||
/*
|
||||
* Examine the Tx buffer to see if there is any more data to be transmitted.
|
||||
*
|
||||
*
|
||||
* If there is data to be transmitted then send the next segment. A segment
|
||||
* can have a maximum of 8 bytes (this is defined as the maximum for the end
|
||||
* point by the descriptor). The final segment may be less than 8 bytes if
|
||||
@@ -281,36 +292,36 @@ static void prvSendNextSegment( void );
|
||||
/*
|
||||
* A stall condition is forced each time the host makes a request that is not
|
||||
* supported by this minimal implementation.
|
||||
*
|
||||
*
|
||||
* A stall is forced by setting the appropriate bit in the end points control
|
||||
* and status register.
|
||||
* and status register.
|
||||
*/
|
||||
static void prvSendStall( void );
|
||||
|
||||
/*
|
||||
* A NULL (or zero length packet) is transmitted in acknowledge the reception
|
||||
* A NULL (or zero length packet) is transmitted in acknowledge the reception
|
||||
* of certain events from the host.
|
||||
*/
|
||||
static void prvUSBTransmitNull( void );
|
||||
|
||||
/*
|
||||
* When the host requests a descriptor this function is called to determine
|
||||
/*
|
||||
* When the host requests a descriptor this function is called to determine
|
||||
* which descriptor is being requested and start its transmission.
|
||||
*/
|
||||
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* This demo USB device enumerates as a simple 3 axis joystick. Once
|
||||
* This demo USB device enumerates as a simple 3 axis joystick. Once
|
||||
* configured this function is periodically called to generate some sample
|
||||
* joystick data.
|
||||
*
|
||||
* The x and y axis are made to move in a square. The z axis is made to
|
||||
* The x and y axis are made to move in a square. The z axis is made to
|
||||
* repeatedly increment up to its maximum.
|
||||
*/
|
||||
static void prvTransmitSampleValues( void );
|
||||
|
||||
/*
|
||||
* The created task to handle the USB demo functionality.
|
||||
* The created task to handle the USB demo functionality.
|
||||
*/
|
||||
void vUSBDemoTask( void *pvParameters );
|
||||
|
||||
@@ -329,14 +340,14 @@ These take the form:
|
||||
Data
|
||||
}
|
||||
*/
|
||||
const portCHAR pxLanguageStringDescriptor[] =
|
||||
const char pxLanguageStringDescriptor[] =
|
||||
{
|
||||
4,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
0x09, 0x04
|
||||
};
|
||||
|
||||
const portCHAR pxManufacturerStringDescriptor[] =
|
||||
const char pxManufacturerStringDescriptor[] =
|
||||
{
|
||||
18,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -351,7 +362,7 @@ const portCHAR pxManufacturerStringDescriptor[] =
|
||||
'S', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxProductStringDescriptor[] =
|
||||
const char pxProductStringDescriptor[] =
|
||||
{
|
||||
44,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -379,7 +390,7 @@ const portCHAR pxProductStringDescriptor[] =
|
||||
'k', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxConfigurationStringDescriptor[] =
|
||||
const char pxConfigurationStringDescriptor[] =
|
||||
{
|
||||
38,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -404,7 +415,7 @@ const portCHAR pxConfigurationStringDescriptor[] =
|
||||
'e', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxInterfaceStringDescriptor[] =
|
||||
const char pxInterfaceStringDescriptor[] =
|
||||
{
|
||||
30,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -426,7 +437,7 @@ const portCHAR pxInterfaceStringDescriptor[] =
|
||||
};
|
||||
|
||||
/* Enumeration descriptors. */
|
||||
const portCHAR pxReportDescriptor[] =
|
||||
const char pxReportDescriptor[] =
|
||||
{
|
||||
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
|
||||
0x09, 0x04, /* USAGE (Joystick) */
|
||||
@@ -446,7 +457,7 @@ const portCHAR pxReportDescriptor[] =
|
||||
0xc0 /* END_COLLECTION */
|
||||
};
|
||||
|
||||
const char pxDeviceDescriptor[] =
|
||||
const char pxDeviceDescriptor[] =
|
||||
{
|
||||
/* Device descriptor */
|
||||
0x12, /* bLength */
|
||||
@@ -508,8 +519,8 @@ const char pxConfigDescriptor[] = {
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* File scope state variables. */
|
||||
static unsigned portCHAR ucUSBConfig = ( unsigned portCHAR ) 0;
|
||||
static unsigned portLONG ulReceivedAddress = ( unsigned portLONG ) 0;
|
||||
static unsigned char ucUSBConfig = ( unsigned char ) 0;
|
||||
static unsigned long ulReceivedAddress = ( unsigned long ) 0;
|
||||
static eDRIVER_STATE eDriverState = eNOTHING;
|
||||
|
||||
/* Array in which the USB interrupt status is passed between the ISR and task. */
|
||||
@@ -519,7 +530,7 @@ static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ];
|
||||
static xTX_MESSAGE pxCharsForTx;
|
||||
|
||||
/* Queue used to pass messages between the ISR and the task. */
|
||||
static xQueueHandle xUSBInterruptQueue;
|
||||
static xQueueHandle xUSBInterruptQueue;
|
||||
|
||||
/* ISR entry has to be written in the asm file as we want a context switch
|
||||
to occur from within the ISR. See the port documentation on the FreeRTOS.org
|
||||
@@ -528,9 +539,9 @@ extern void vUSBISREntry( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Macros to manipulate the control and status registers. These registers
|
||||
cannot be accessed using a direct read modify write operation outside of the
|
||||
ISR as some bits are left unchanged by writing with a 0, and some are left
|
||||
/* Macros to manipulate the control and status registers. These registers
|
||||
cannot be accessed using a direct read modify write operation outside of the
|
||||
ISR as some bits are left unchanged by writing with a 0, and some are left
|
||||
unchanged by writing with a 1. */
|
||||
|
||||
#define usbINT_CLEAR_MASK (AT91C_UDP_TXCOMP | AT91C_UDP_STALLSENT | AT91C_UDP_RXSETUP | AT91C_UDP_RX_DATA_BK0 | AT91C_UDP_RX_DATA_BK1 )
|
||||
@@ -540,14 +551,14 @@ unchanged by writing with a 1. */
|
||||
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
|
||||
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
|
||||
/* write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
|
||||
\
|
||||
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
|
||||
/* so the write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
|
||||
\
|
||||
/* Set whichever bit we want set. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( ulBit ); \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) |= ( ulBit ); \
|
||||
}
|
||||
|
||||
#define usbCSR_CLEAR_BIT( pulValueNow, ulBit ) \
|
||||
@@ -555,24 +566,24 @@ unchanged by writing with a 1. */
|
||||
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
|
||||
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
|
||||
/* write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
|
||||
\
|
||||
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
|
||||
/* so the write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
|
||||
\
|
||||
/* Clear whichever bit we want clear. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( ~ulBit ); \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) &= ( ~ulBit ); \
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
__arm void vUSB_ISR( void )
|
||||
{
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
static volatile unsigned portLONG ulNextMessage = 0;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
static volatile unsigned long ulNextMessage = 0;
|
||||
xISRStatus *pxMessage;
|
||||
unsigned portLONG ulTemp, ulRxBytes;
|
||||
unsigned long ulTemp, ulRxBytes;
|
||||
|
||||
/* Take the next message from the queue. Note that usbQUEUE_LENGTH *must*
|
||||
be all 1's, as in 0x01, 0x03, 0x07, etc. */
|
||||
@@ -588,7 +599,7 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
cleared separately as it does not appear in the mask register. */
|
||||
AT91C_BASE_UDP->UDP_ICR = AT91C_BASE_UDP->UDP_IMR | AT91C_UDP_ENDBUSRES;
|
||||
|
||||
/* If there are bytes in the FIFO then we have to retrieve them here.
|
||||
/* If there are bytes in the FIFO then we have to retrieve them here.
|
||||
Ideally this would be done at the task level. However we need to clear the
|
||||
RXSETUP interrupt before leaving the ISR, and this may cause the data in
|
||||
the FIFO to be overwritten. Also the DIR bit has to be changed before the
|
||||
@@ -599,7 +610,7 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
ulRxBytes = ulTemp >> 16;
|
||||
ulRxBytes &= usbRX_COUNT_MASK;
|
||||
|
||||
/* With this minimal implementation we are only interested in receiving
|
||||
/* With this minimal implementation we are only interested in receiving
|
||||
setup bytes on the control end point. */
|
||||
if( ( ulRxBytes > 0 ) && ( ulTemp & AT91C_UDP_RXSETUP ) )
|
||||
{
|
||||
@@ -628,11 +639,11 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
/* The message now contains the entire state and optional data from
|
||||
the USB interrupt. This can now be posted on the Rx queue ready for
|
||||
processing at the task level. */
|
||||
xTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, &xHigherPriorityTaskWoken );
|
||||
|
||||
/* We may want to switch to the USB task, if this message has made
|
||||
it the highest priority task that is ready to execute. */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* Clear the AIC ready for the next interrupt. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
@@ -651,7 +662,7 @@ xISRStatus *pxMessage;
|
||||
vInitUSBInterface();
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
/* Process interrupts as they arrive. The ISR takes a snapshot of the
|
||||
/* Process interrupts as they arrive. The ISR takes a snapshot of the
|
||||
interrupt status then posts the information on this queue for processing
|
||||
at the task level. This simple demo implementation only processes
|
||||
a few interrupt sources. */
|
||||
@@ -686,11 +697,11 @@ xISRStatus *pxMessage;
|
||||
|
||||
static void prvTransmitSampleValues( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
static portLONG lState = usbXUP;
|
||||
unsigned long ulStatus;
|
||||
static long lState = usbXUP;
|
||||
|
||||
/* Variables to hold dummy x, y and z joystick axis data. */
|
||||
static signed portCHAR x = 0, y = 0, z = 0;
|
||||
static signed char x = 0, y = 0, z = 0;
|
||||
|
||||
/* Generate some sample data in the x and y axis - draw a square. */
|
||||
switch( lState )
|
||||
@@ -749,7 +760,7 @@ static signed portCHAR x = 0, y = 0, z = 0;
|
||||
|
||||
static void prvUSBTransmitNull( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
unsigned long ulStatus;
|
||||
|
||||
/* Wait until the FIFO is free - even though we are not going to use it.
|
||||
THERE IS NO TIMEOUT HERE! */
|
||||
@@ -776,7 +787,7 @@ unsigned portLONG ulStatus;
|
||||
|
||||
static void prvSendStall( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
unsigned long ulStatus;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
@@ -791,13 +802,13 @@ unsigned portLONG ulStatus;
|
||||
|
||||
static void prvResetEndPoints( void )
|
||||
{
|
||||
unsigned portLONG ulTemp;
|
||||
unsigned long ulTemp;
|
||||
|
||||
eDriverState = eJUST_RESET;
|
||||
|
||||
/* Reset all the end points. */
|
||||
AT91C_BASE_UDP->UDP_RSTEP = usbEND_POINT_RESET_MASK;
|
||||
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned portLONG ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned long ) 0x00;
|
||||
|
||||
/* Enable data to be sent and received. */
|
||||
AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN;
|
||||
@@ -806,7 +817,7 @@ unsigned portLONG ulTemp;
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
|
||||
usbCSR_SET_BIT( &ulTemp, ( ( unsigned portLONG ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
|
||||
usbCSR_SET_BIT( &ulTemp, ( ( unsigned long ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
|
||||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;
|
||||
AT91F_UDP_EnableIt( AT91C_BASE_UDP, AT91C_UDP_EPINT0 );
|
||||
}
|
||||
@@ -818,7 +829,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
{
|
||||
if( pxMessage->ulCSR0 & AT91C_UDP_RX_DATA_BK0 )
|
||||
{
|
||||
/* We only expect to receive zero length data here as ACK's.
|
||||
/* We only expect to receive zero length data here as ACK's.
|
||||
Set the data pointer to the end of the current Tx packet to
|
||||
ensure we don't send out any more data. */
|
||||
pxCharsForTx.ulNextCharIndex = pxCharsForTx.ulTotalDataLength;
|
||||
@@ -838,7 +849,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
/* Read the end point for data transfer. */
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
unsigned portLONG ulTemp;
|
||||
unsigned long ulTemp;
|
||||
|
||||
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
|
||||
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );
|
||||
@@ -853,7 +864,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
{
|
||||
/* We sent an acknowledgement of a SET_ADDRESS request. Move
|
||||
to the addressed state. */
|
||||
if( ulReceivedAddress != ( unsigned portLONG ) 0 )
|
||||
if( ulReceivedAddress != ( unsigned long ) 0 )
|
||||
{
|
||||
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;
|
||||
}
|
||||
@@ -876,8 +887,8 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
if( pxMessage->ulCSR0 & AT91C_UDP_RXSETUP )
|
||||
{
|
||||
xUSB_REQUEST xRequest;
|
||||
unsigned portCHAR ucRequest;
|
||||
unsigned portLONG ulRxBytes;
|
||||
unsigned char ucRequest;
|
||||
unsigned long ulRxBytes;
|
||||
|
||||
/* A data packet is available. */
|
||||
ulRxBytes = pxMessage->ulCSR0 >> 16;
|
||||
@@ -903,9 +914,9 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
xRequest.usLength <<= 8;
|
||||
xRequest.usLength |= pxMessage->ucFifoData[ usbLENGTH_LOW_BYTE ];
|
||||
|
||||
/* Manipulate the ucRequestType and the ucRequest parameters to
|
||||
generate a zero based request selection. This is just done to
|
||||
break up the requests into subsections for clarity. The
|
||||
/* Manipulate the ucRequestType and the ucRequest parameters to
|
||||
generate a zero based request selection. This is just done to
|
||||
break up the requests into subsections for clarity. The
|
||||
alternative would be to have more huge switch statement that would
|
||||
be difficult to optimise. */
|
||||
ucRequest = ( ( xRequest.ucReqType & 0x60 ) >> 3 );
|
||||
@@ -947,11 +958,11 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
switch( ( pxRequest->usValue & 0xff00 ) >> 8 )
|
||||
{
|
||||
case usbDESCRIPTOR_TYPE_DEVICE:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbDESCRIPTOR_TYPE_CONFIGURATION:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbDESCRIPTOR_TYPE_STRING:
|
||||
@@ -960,23 +971,23 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
switch( pxRequest->usValue & 0xff )
|
||||
{
|
||||
case usbLANGUAGE_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbMANUFACTURER_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbPRODUCT_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbCONFIGURATION_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbINTERFACE_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -997,13 +1008,13 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
unsigned portSHORT usStatus = 0;
|
||||
unsigned short usStatus = 0;
|
||||
|
||||
switch( pxRequest->ucRequest )
|
||||
{
|
||||
case usbGET_STATUS_REQUEST:
|
||||
/* Just send two byte dummy status. */
|
||||
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
break;
|
||||
|
||||
case usbGET_DESCRIPTOR_REQUEST:
|
||||
@@ -1013,7 +1024,7 @@ unsigned portSHORT usStatus = 0;
|
||||
|
||||
case usbGET_CONFIGURATION_REQUEST:
|
||||
/* Send selected device configuration */
|
||||
prvSendControlData( ( unsigned portCHAR * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
|
||||
prvSendControlData( ( unsigned char * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
|
||||
break;
|
||||
|
||||
case usbSET_FEATURE_REQUEST:
|
||||
@@ -1028,16 +1039,16 @@ unsigned portSHORT usStatus = 0;
|
||||
address and set our state so we know we have received the address. */
|
||||
prvUSBTransmitNull();
|
||||
eDriverState = eJUST_GOT_ADDRESS;
|
||||
ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue;
|
||||
ulReceivedAddress = ( unsigned long ) pxRequest->usValue;
|
||||
break;
|
||||
|
||||
case usbSET_CONFIGURATION_REQUEST:
|
||||
|
||||
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
|
||||
we cannot actually move to the configured state until we get a
|
||||
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
|
||||
we cannot actually move to the configured state until we get a
|
||||
TXCOMP interrupt from this NULL packet. Therefore we just remember the
|
||||
config and set our state so we know we have received the go ahead. */
|
||||
ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );
|
||||
ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );
|
||||
eDriverState = eJUST_GOT_CONFIG;
|
||||
prvUSBTransmitNull();
|
||||
break;
|
||||
@@ -1075,10 +1086,10 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
switch( ( pxRequest->usValue & ( unsigned portSHORT ) 0xff00 ) >> 8 )
|
||||
switch( ( pxRequest->usValue & ( unsigned short ) 0xff00 ) >> 8 )
|
||||
{
|
||||
case usbHID_REPORT_DESCRIPTOR:
|
||||
prvSendControlData( ( unsigned portCHAR * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1092,17 +1103,17 @@ static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
unsigned portSHORT usStatus = 0;
|
||||
unsigned short usStatus = 0;
|
||||
|
||||
switch( pxRequest->ucRequest )
|
||||
{
|
||||
case usbGET_STATUS_REQUEST:
|
||||
/* Send dummy 2 bytes. */
|
||||
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
break;
|
||||
|
||||
case usbGET_DESCRIPTOR_REQUEST:
|
||||
prvGetStandardInterfaceDescriptor( pxRequest );
|
||||
prvGetStandardInterfaceDescriptor( pxRequest );
|
||||
break;
|
||||
|
||||
/* This minimal implementation does not respond to these. */
|
||||
@@ -1123,7 +1134,7 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
/* This minimal implementation does not expect to respond to these. */
|
||||
case usbGET_STATUS_REQUEST:
|
||||
case usbCLEAR_FEATURE_REQUEST:
|
||||
case usbCLEAR_FEATURE_REQUEST:
|
||||
case usbSET_FEATURE_REQUEST:
|
||||
|
||||
default:
|
||||
@@ -1135,14 +1146,14 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void vInitUSBInterface( void )
|
||||
{
|
||||
volatile unsigned portLONG ulTemp;
|
||||
volatile unsigned long ulTemp;
|
||||
|
||||
/* Create the queue used to communicate between the USB ISR and task. */
|
||||
xUSBInterruptQueue = xQueueCreate( usbQUEUE_LENGTH + 1, sizeof( xISRStatus * ) );
|
||||
|
||||
/* Initialise a few state variables. */
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
|
||||
ucUSBConfig = ( unsigned portCHAR ) 0;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
|
||||
ucUSBConfig = ( unsigned char ) 0;
|
||||
eDriverState = eNOTHING;
|
||||
|
||||
/* HARDWARE SETUP */
|
||||
@@ -1157,24 +1168,24 @@ volatile unsigned portLONG ulTemp;
|
||||
/* Setup the PIO for the USB pull up resistor. */
|
||||
AT91F_PIO_CfgOutput(AT91C_BASE_PIOA,AT91C_PIO_PA16);
|
||||
|
||||
/* Start without the pullup - this will get set at the end of this
|
||||
/* Start without the pullup - this will get set at the end of this
|
||||
function. */
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, AT91C_PIO_PA16 );
|
||||
|
||||
/* When using the USB debugger the peripheral registers do not always get
|
||||
set to the correct default values. To make sure set the relevant registers
|
||||
manually here. */
|
||||
AT91C_BASE_UDP->UDP_IDR = ( unsigned portLONG ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_ICR = ( unsigned portLONG ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned portLONG ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned portLONG ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_IDR = ( unsigned long ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_ICR = ( unsigned long ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned long ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned long ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_GLBSTATE = 0;
|
||||
AT91C_BASE_UDP->UDP_FADDR = 0;
|
||||
|
||||
/* Enable the transceiver. */
|
||||
AT91C_UDP_TRANSCEIVER_ENABLE = 0;
|
||||
|
||||
/* Enable the USB interrupts - other interrupts get enabled as the
|
||||
/* Enable the USB interrupts - other interrupts get enabled as the
|
||||
enumeration process progresses. */
|
||||
AT91F_AIC_ConfigureIt( AT91C_BASE_AIC, AT91C_ID_UDP, usbINTERRUPT_PRIORITY, AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE, ( void (*)( void ) ) vUSBISREntry );
|
||||
AT91F_AIC_EnableIt( AT91C_BASE_AIC, AT91C_ID_UDP );
|
||||
@@ -1185,16 +1196,16 @@ volatile unsigned portLONG ulTemp;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthToSend, portLONG lSendingDescriptor )
|
||||
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthToSend, long lSendingDescriptor )
|
||||
{
|
||||
if( ( ( unsigned portLONG ) usRequestedLength < ulLengthToSend ) )
|
||||
if( ( ( unsigned long ) usRequestedLength < ulLengthToSend ) )
|
||||
{
|
||||
/* Cap the data length to that requested. */
|
||||
ulLengthToSend = ( unsigned portSHORT ) usRequestedLength;
|
||||
ulLengthToSend = ( unsigned short ) usRequestedLength;
|
||||
}
|
||||
else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor )
|
||||
else if( ( ulLengthToSend < ( unsigned long ) usRequestedLength ) && lSendingDescriptor )
|
||||
{
|
||||
/* We are sending a descriptor. If the descriptor is an exact
|
||||
/* We are sending a descriptor. If the descriptor is an exact
|
||||
multiple of the FIFO length then it will have to be terminated
|
||||
with a NULL packet. Set the state to indicate this if
|
||||
necessary. */
|
||||
@@ -1211,12 +1222,12 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
||||
(if it is greater than 8 bytes in length). */
|
||||
memcpy( pxCharsForTx.ucTxBuffer, pucData, ulLengthToSend );
|
||||
|
||||
/* Reinitialise the buffer index so we start sending from the start of
|
||||
/* Reinitialise the buffer index so we start sending from the start of
|
||||
the data. */
|
||||
pxCharsForTx.ulTotalDataLength = ulLengthToSend;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
|
||||
|
||||
/* Send the first 8 bytes now. The rest will get sent in response to
|
||||
/* Send the first 8 bytes now. The rest will get sent in response to
|
||||
TXCOMP interrupts. */
|
||||
prvSendNextSegment();
|
||||
}
|
||||
@@ -1224,7 +1235,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
||||
|
||||
static void prvSendNextSegment( void )
|
||||
{
|
||||
volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
|
||||
/* Is there any data to send? */
|
||||
if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )
|
||||
@@ -1249,7 +1260,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
}
|
||||
|
||||
/* Write the data to the FIFO. */
|
||||
while( ulNextLength > ( unsigned portLONG ) 0 )
|
||||
while( ulNextLength > ( unsigned long ) 0 )
|
||||
{
|
||||
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];
|
||||
|
||||
@@ -1261,14 +1272,14 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
|
||||
usbCSR_SET_BIT( &ulStatus, ( ( unsigned portLONG ) 0x10 ) );
|
||||
usbCSR_SET_BIT( &ulStatus, ( ( unsigned long ) 0x10 ) );
|
||||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There is no data to send. If we were sending a descriptor and the
|
||||
/* There is no data to send. If we were sending a descriptor and the
|
||||
descriptor was an exact multiple of the max packet size then we need
|
||||
to send a null to terminate the transmission. */
|
||||
if( eDriverState == eSENDING_EVEN_DESCRIPTOR )
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -100,7 +111,7 @@
|
||||
#define mainCHECK_TASK_LED ( 3 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 4 ) /* Off the board. */
|
||||
|
||||
/*
|
||||
@@ -121,7 +132,7 @@ static void prvSetupHardware( void );
|
||||
* Checks that all the demo application tasks are still executing without error
|
||||
* - as described at the top of the file.
|
||||
*/
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void );
|
||||
static long prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -217,9 +228,9 @@ portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void )
|
||||
static long prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) pdPASS;
|
||||
long lReturn = ( long ) pdPASS;
|
||||
|
||||
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||
that they are all still running, and that none of them have detected
|
||||
@@ -227,32 +238,32 @@ portLONG lReturn = ( portLONG ) pdPASS;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
/*-Editor annotation file-*/
|
||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
||||
/*-Specials-*/
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x00100000;
|
||||
/*-Memory Regions-*/
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x00000100;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x0000FFFF;
|
||||
define symbol __ICFEDIT_region_RAM_start__ = 0x00200000;
|
||||
define symbol __ICFEDIT_region_RAM_end__ = 0x00203FFF;
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x00100040;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x10FFFF;
|
||||
define symbol __ICFEDIT_region_RAM_start__ = 0x200000;
|
||||
define symbol __ICFEDIT_region_RAM_end__ = 0x203FFF;
|
||||
/*-Sizes-*/
|
||||
define symbol __ICFEDIT_size_cstack__ = 0x200;
|
||||
define symbol __ICFEDIT_size_svcstack__ = 0x200;
|
||||
define symbol __ICFEDIT_size_irqstack__ = 0x200;
|
||||
define symbol __ICFEDIT_size_fiqstack__ = 0x4;
|
||||
define symbol __ICFEDIT_size_undstack__ = 0x4;
|
||||
define symbol __ICFEDIT_size_abtstack__ = 0x4;
|
||||
define symbol __ICFEDIT_size_heap__ = 0x4;
|
||||
define symbol __ICFEDIT_size_cstack__ = 0x400;
|
||||
define symbol __ICFEDIT_size_svcstack__ = 0x100;
|
||||
define symbol __ICFEDIT_size_irqstack__ = 0x100;
|
||||
define symbol __ICFEDIT_size_fiqstack__ = 0x0;
|
||||
define symbol __ICFEDIT_size_undstack__ = 0x0;
|
||||
define symbol __ICFEDIT_size_abtstack__ = 0x0;
|
||||
define symbol __ICFEDIT_size_heap__ = 0x0;
|
||||
/**** End of ICF editor section. ###ICF###*/
|
||||
|
||||
|
||||
@@ -40,3 +40,4 @@ place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite,
|
||||
block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
|
||||
block UND_STACK, block ABT_STACK, block HEAP };
|
||||
|
||||
|
||||
73
Demo/ARM7_AT91SAM7S64_IAR/resource/at91sam7s-ek-flash.mac
Normal file
73
Demo/ARM7_AT91SAM7S64_IAR/resource/at91sam7s-ek-flash.mac
Normal file
@@ -0,0 +1,73 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
||||
// ----------------------------------------------------------------------------
|
||||
// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL ATMEL 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.
|
||||
// ----------------------------------------------------------------------------
|
||||
// File Name : SAM7_FLASH.mac
|
||||
// Object : Generic Macro File for IAR
|
||||
// 1.0 17/Aug/05 FBr : Creation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* _InitRSTC()
|
||||
*
|
||||
* Function description
|
||||
* Initializes the RSTC (Reset controller).
|
||||
* This makes sense since the default is to not allow user resets, which makes it impossible to
|
||||
* apply a second RESET via J-Link
|
||||
*/
|
||||
_InitRSTC() {
|
||||
__writeMemory32(0xA5000001, 0xFFFFFD08,"Memory"); // Allow user reset
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* _InitPLL()
|
||||
* Function description
|
||||
* Initializes the PMC.
|
||||
* 1. Enable the Main Oscillator
|
||||
* 2. Configure PLL to 96MHz
|
||||
* 3. Switch Master Clock (MCK) on PLL/2 = 48MHz
|
||||
*/
|
||||
_InitPLL() {
|
||||
|
||||
__message "Enable Main Oscillator";
|
||||
__writeMemory32(0x00000601,0xFFFFFc20,"Memory"); // MOSC
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x1) );
|
||||
|
||||
__message "Set PLL to 96MHz";
|
||||
__writeMemory32(0x10191c05,0xFFFFFc2c,"Memory"); // LOCK
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x4) );
|
||||
|
||||
__message "Set Master Clock to 48MHz";
|
||||
__writeMemory32(0x00000004,0xFFFFFc30,"Memory"); // MCKRDY
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x8) );
|
||||
__writeMemory32(0x00000007,0xFFFFFc30,"Memory"); // MCKRDY
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x8) );
|
||||
|
||||
// Set 1 WS for Flash accesses on each EFC
|
||||
__writeMemory32(0x00480100,0xFFFFFF60,"Memory");
|
||||
__writeMemory32(0x00480100,0xFFFFFF70,"Memory");
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* execUserReset() : JTAG set initially to Full Speed
|
||||
*/
|
||||
execUserReset() {
|
||||
__message "execUserReset()";
|
||||
__hwReset(0); // Hardware Reset: CPU is automatically halted after the reset (JTAG is already configured to 32kHz)
|
||||
_InitPLL(); // Allow to debug at JTAG Full Speed
|
||||
_InitRSTC(); // Enable User Reset to allow execUserReset() execution
|
||||
}
|
||||
|
||||
12
Demo/ARM7_AT91SAM7S64_IAR/resource/at91sam7s64-flash.board
Normal file
12
Demo/ARM7_AT91SAM7S64_IAR/resource/at91sam7s64-flash.board
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<flash_board>
|
||||
<pass>
|
||||
<loader>$TOOLKIT_DIR$\config\flashloader\Atmel\AT91SAM7S64-EK\flash-at91sam7s64.flash</loader>
|
||||
<range>CODE 0x100000 0x110000</range>
|
||||
<rel_offset>0</rel_offset>
|
||||
<args>--flash
|
||||
--boot
|
||||
</args>
|
||||
</pass>
|
||||
</flash_board>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<fileVersion>2</fileVersion>
|
||||
<configuration>
|
||||
<name>Flash Debug</name>
|
||||
<toolchain>
|
||||
@@ -12,7 +12,7 @@
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>15</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -37,7 +37,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state>$PROJ_DIR$\resource\SAM7.mac</state>
|
||||
<state>$PROJ_DIR$\resource\at91sam7s-ek-flash.mac</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
@@ -89,16 +89,12 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>5.11.0.50615</state>
|
||||
<state>5.40.2.51615</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadAttachToProgram</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoaders</name>
|
||||
<state>,,,,(default),</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UseFlashLoader</name>
|
||||
<state>1</state>
|
||||
@@ -111,6 +107,46 @@
|
||||
<name>OCBE8Slave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CDevice</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoadersV3</name>
|
||||
<state>$TOOLKIT_DIR$\config\flashloader\Atmel\AT91SAM7S64-EK\at91sam7s64-flash.board</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck1</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath1</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck3</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath3</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OverrideDefFlashBoard</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -257,7 +293,7 @@
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>9</version>
|
||||
<version>10</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -370,13 +406,17 @@
|
||||
<version>0</version>
|
||||
<state>5</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>LMIFTDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -395,13 +435,21 @@
|
||||
<name>CCLmiftdiLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<version>3</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -476,6 +524,14 @@
|
||||
<name>CCJTagUpdateBreakpoints</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -539,6 +595,19 @@
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>STLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
@@ -566,11 +635,11 @@
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -586,7 +655,11 @@
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -597,6 +670,10 @@
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\FreeRTOS\FreeRTOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
@@ -609,6 +686,10 @@
|
||||
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
<configuration>
|
||||
@@ -621,7 +702,7 @@
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>15</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -646,7 +727,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state>$PROJ_DIR$\resource\SAM7.mac</state>
|
||||
<state>$PROJ_DIR$\resource\at91sam7s-ek-flash.mac</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
@@ -698,16 +779,12 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>5.11.0.50615</state>
|
||||
<state>5.40.2.51615</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadAttachToProgram</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoaders</name>
|
||||
<state>,,,,(default),</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UseFlashLoader</name>
|
||||
<state>1</state>
|
||||
@@ -720,6 +797,46 @@
|
||||
<name>OCBE8Slave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CDevice</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoadersV3</name>
|
||||
<state>$PROJ_DIR$\resource\at91sam7s64-flash.board</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck1</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath1</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck3</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath3</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OverrideDefFlashBoard</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -866,7 +983,7 @@
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>9</version>
|
||||
<version>10</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -979,13 +1096,17 @@
|
||||
<version>0</version>
|
||||
<state>5</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>LMIFTDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -1004,13 +1125,21 @@
|
||||
<name>CCLmiftdiLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<version>3</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -1085,6 +1214,14 @@
|
||||
<name>CCJTagUpdateBreakpoints</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -1148,6 +1285,19 @@
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>STLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
@@ -1175,11 +1325,11 @@
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -1195,7 +1345,11 @@
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -1206,6 +1360,10 @@
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\FreeRTOS\FreeRTOSPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
@@ -1218,6 +1376,10 @@
|
||||
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<fileVersion>2</fileVersion>
|
||||
<configuration>
|
||||
<name>Flash Debug</name>
|
||||
<toolchain>
|
||||
@@ -12,7 +12,7 @@
|
||||
<name>General</name>
|
||||
<archiveVersion>3</archiveVersion>
|
||||
<data>
|
||||
<version>14</version>
|
||||
<version>17</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -29,7 +29,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>Variant</name>
|
||||
<version>7</version>
|
||||
<version>11</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -93,11 +93,6 @@
|
||||
<name>OGLastSavedByProductVersion</name>
|
||||
<state>5.11.0.50615</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralEnableMisra</name>
|
||||
<state>0</state>
|
||||
@@ -122,13 +117,31 @@
|
||||
<name>OGBufferedTerminalOutput</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenStdoutInterface</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraVer</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ICCARM</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>19</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -260,11 +273,6 @@
|
||||
<name>PreInclude</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraOverride</name>
|
||||
<state>0</state>
|
||||
@@ -310,6 +318,16 @@
|
||||
<name>CCOptLevelSlave</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -491,7 +509,7 @@
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OOCOutputFormat</name>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -537,7 +555,7 @@
|
||||
<name>ILINK</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data>
|
||||
<version>5</version>
|
||||
<version>8</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -680,10 +698,6 @@
|
||||
<name>IlinkProgramEntryLabel</name>
|
||||
<state>__iar_program_start</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkNXPLPCChecksum</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoFill</name>
|
||||
<state>0</state>
|
||||
@@ -743,6 +757,18 @@
|
||||
<name>IlinkBufferedTerminalOutput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkStdoutInterfaceSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcFullSize</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIElfToolPostProcess</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -782,7 +808,7 @@
|
||||
<name>General</name>
|
||||
<archiveVersion>3</archiveVersion>
|
||||
<data>
|
||||
<version>14</version>
|
||||
<version>17</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -799,7 +825,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>Variant</name>
|
||||
<version>7</version>
|
||||
<version>11</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -863,11 +889,6 @@
|
||||
<name>OGLastSavedByProductVersion</name>
|
||||
<state>5.11.0.50615</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralEnableMisra</name>
|
||||
<state>0</state>
|
||||
@@ -892,13 +913,31 @@
|
||||
<name>OGBufferedTerminalOutput</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenStdoutInterface</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraVer</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ICCARM</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>19</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -1030,11 +1069,6 @@
|
||||
<name>PreInclude</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraOverride</name>
|
||||
<state>0</state>
|
||||
@@ -1080,6 +1114,16 @@
|
||||
<name>CCOptLevelSlave</name>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -1260,7 +1304,7 @@
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OOCOutputFormat</name>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -1306,7 +1350,7 @@
|
||||
<name>ILINK</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data>
|
||||
<version>5</version>
|
||||
<version>8</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -1449,10 +1493,6 @@
|
||||
<name>IlinkProgramEntryLabel</name>
|
||||
<state>__iar_program_start</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkNXPLPCChecksum</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoFill</name>
|
||||
<state>0</state>
|
||||
@@ -1512,6 +1552,18 @@
|
||||
<name>IlinkBufferedTerminalOutput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkStdoutInterfaceSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcFullSize</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIElfToolPostProcess</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -68,8 +79,8 @@
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
#define serHANDLE ( ( xComPortHandle ) 1 )
|
||||
#define serNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define serNO_TIMEGUARD ( ( unsigned portLONG ) 0 )
|
||||
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned portLONG ) 0 )
|
||||
#define serNO_TIMEGUARD ( ( unsigned long ) 0 )
|
||||
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 )
|
||||
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
@@ -90,14 +101,14 @@ __arm void vSerialISR( void );
|
||||
/*
|
||||
* See the serial2.h header file.
|
||||
*/
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
extern void ( vUART_ISR )( void );
|
||||
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* If the queues were created correctly then setup the serial port
|
||||
hardware. */
|
||||
@@ -108,7 +119,7 @@ extern void ( vUART_ISR )( void );
|
||||
/* Enable the USART clock. */
|
||||
AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_US0 );
|
||||
|
||||
AT91F_PIO_CfgPeriph( AT91C_BASE_PIOA, ( ( unsigned portLONG ) AT91C_PA5_RXD0 ) | ( ( unsigned portLONG ) AT91C_PA6_TXD0 ), serNO_PERIPHERAL_B_SETUP );
|
||||
AT91F_PIO_CfgPeriph( AT91C_BASE_PIOA, ( ( unsigned long ) AT91C_PA5_RXD0 ) | ( ( unsigned long ) AT91C_PA6_TXD0 ), serNO_PERIPHERAL_B_SETUP );
|
||||
|
||||
/* Set the required protocol. */
|
||||
AT91F_US_Configure( serCOM0, configCPU_CLOCK_HZ, AT91C_US_ASYNC_MODE, ulWantedBaud, serNO_TIMEGUARD );
|
||||
@@ -137,7 +148,7 @@ extern void ( vUART_ISR )( void );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports one port. */
|
||||
( void ) pxPort;
|
||||
@@ -155,9 +166,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed portCHAR *pxNext;
|
||||
signed char *pxNext;
|
||||
|
||||
/* A couple of parameters that this port does not use. */
|
||||
( void ) usStringLength;
|
||||
@@ -170,7 +181,7 @@ signed portCHAR *pxNext;
|
||||
( void ) pxPort;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed portCHAR * ) pcString;
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
@@ -179,7 +190,7 @@ signed portCHAR *pxNext;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Place the character in the queue of characters to be transmitted. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
@@ -209,9 +220,9 @@ within serialISR.s79 which in turn calls this function. See the port
|
||||
documentation on the FreeRTOS.org website for more information. */
|
||||
__arm void vSerialISR( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
unsigned long ulStatus;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
ulStatus = serCOM0->US_CSR &= serCOM0->US_IMR;
|
||||
@@ -220,7 +231,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
@@ -239,12 +250,12 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
character from the RHR and place it in the queue or received
|
||||
characters. */
|
||||
cChar = serCOM0->US_RHR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
/* If a task was woken by either a character being received or a character
|
||||
being transmitted then we may need to switch to another task. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByPost || xTaskWokenByTx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* End the interrupt in the AIC. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly>
|
||||
<Debug-Log><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window></Windows></PreferedWindows></Debug-Log>
|
||||
<Debug-Log><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window></Windows></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
|
||||
<Build><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Build>
|
||||
<Register>
|
||||
<PreferedWindows>
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Wnd0>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-22256-14845</Identity>
|
||||
@@ -42,20 +42,20 @@
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-18517-20319</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-18517-20319</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>25</YPos><SelStart>1726</SelStart><SelEnd>1726</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s79</Filename><XPos>0</XPos><YPos>19</YPos><SelStart>1527</SelStart><SelEnd>1527</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s</Filename><XPos>0</XPos><YPos>52</YPos><SelStart>3250</SelStart><SelEnd>3250</SelEnd></Tab><ActiveTab>2</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\port.c</Filename><XPos>0</XPos><YPos>217</YPos><SelStart>8345</SelStart><SelEnd>8345</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>880</SelStart><SelEnd>880</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s</Filename><XPos>0</XPos><YPos>213</YPos><SelStart>8773</SelStart><SelEnd>8773</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\AT91SAM7S64.h</Filename><XPos>0</XPos><YPos>18</YPos><SelStart>2080</SelStart><SelEnd>2080</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\port.c</Filename><XPos>0</XPos><YPos>234</YPos><SelStart>9960</SelStart><SelEnd>9960</SelEnd></Tab><ActiveTab>3</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-01284260><key>iaridepm.enu1</key></Toolbar-01284260><Toolbar-070bd990><key>debuggergui.enu1</key></Toolbar-070bd990></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>278</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>166667</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-00abb198><key>iaridepm.enu1</key></Toolbar-00abb198><Toolbar-049f1f30><key>debuggergui.enu1</key></Toolbar-049f1f30></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>278</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>166667</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -23,6 +23,13 @@ UseTrigger=1
|
||||
TriggerName=main
|
||||
LimitSize=0
|
||||
ByteLimit=50
|
||||
[TraceHelper]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
[DebugChecksum]
|
||||
Checksum=-1701609349
|
||||
[InstructionProfiling]
|
||||
Enabled=_ 0
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
@@ -30,10 +37,11 @@ Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[DriverProfiling]
|
||||
Enabled=0
|
||||
Source=2
|
||||
Graph=0
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints]
|
||||
Count=0
|
||||
[TraceHelper]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>rtosdemo/Flash Bin</Project></CurrentConfigs></ConfigDictionary>
|
||||
<CurrentConfigs><Project>rtosdemo/Flash Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
@@ -62,14 +62,14 @@
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>880</SelStart><SelEnd>880</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-01284260><key>iaridepm.enu1</key></Toolbar-01284260></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>576</Bottom><Right>310</Right><x>-2</x><y>-2</y><xscreen>32</xscreen><yscreen>26</yscreen><sizeHorzCX>19048</sizeHorzCX><sizeHorzCY>26477</sizeHorzCY><sizeVertCX>185714</sizeVertCX><sizeVertCY>588595</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>362</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>364</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>370672</sizeHorzCY><sizeVertCX>19048</sizeVertCX><sizeVertCY>26477</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-00abb198><key>iaridepm.enu1</key></Toolbar-00abb198></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>576</Bottom><Right>310</Right><x>-2</x><y>-2</y><xscreen>32</xscreen><yscreen>26</yscreen><sizeHorzCX>19048</sizeHorzCX><sizeHorzCY>26477</sizeHorzCY><sizeVertCX>185714</sizeVertCX><sizeVertCY>588595</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>362</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>364</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>370672</sizeHorzCY><sizeVertCX>19048</sizeVertCX><sizeVertCY>26477</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -45,6 +56,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "AT91SAM7X256.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
@@ -53,15 +65,17 @@
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 1
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 47923200 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 130 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 10 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
|
||||
@@ -1,32 +1,55 @@
|
||||
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#/*
|
||||
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
#
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
# * Complete, revised, and edited pdf reference manuals are also *
|
||||
# * available. *
|
||||
# * *
|
||||
# * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
# * ensuring you get running as quickly as possible and with an *
|
||||
# * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
# * the FreeRTOS project to continue with its mission of providing *
|
||||
# * professional grade, cross platform, de facto standard solutions *
|
||||
# * for microcontrollers - completely free of charge! *
|
||||
# * *
|
||||
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
# * *
|
||||
# * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
#
|
||||
# FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This file is part of the FreeRTOS distribution.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with FreeRTOS.org; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License (version 2) as published by the
|
||||
# Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
# >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
# distribute a combined work that includes FreeRTOS without being obliged to
|
||||
# provide the source code for proprietary components outside of the FreeRTOS
|
||||
# kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details. You should have received a copy of the GNU General Public
|
||||
# License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
# by writing to Richard Barry, contact details for whom are available on the
|
||||
# FreeRTOS WEB site.
|
||||
#
|
||||
# A special exception to the GPL can be applied should you wish to distribute
|
||||
# a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
# the source code for any proprietary components. See the licensing section
|
||||
# of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
# can be applied.
|
||||
# 1 tab == 4 spaces!
|
||||
#
|
||||
# ***************************************************************************
|
||||
# See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
# and contact details. Please ensure to read the configuration and relevant
|
||||
# port sections of the online documentation.
|
||||
# ***************************************************************************
|
||||
# http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
# contact details.
|
||||
#
|
||||
# http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
# critical systems.
|
||||
#
|
||||
# http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
# licensing and training services.
|
||||
#*/
|
||||
|
||||
|
||||
RTOS_SOURCE_DIR=../../../Source
|
||||
@@ -61,7 +84,9 @@ CFLAGS= $(DEBUG) \
|
||||
-D PACK_STRUCT_END=__attribute\(\(packed\)\) \
|
||||
-D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
|
||||
-fomit-frame-pointer \
|
||||
-mthumb-interwork
|
||||
-mthumb-interwork \
|
||||
-fno-strict-aliasing \
|
||||
-fno-dwarf2-cfi-asm
|
||||
|
||||
THUMB_SOURCE= \
|
||||
main.c \
|
||||
@@ -88,11 +113,12 @@ THUMB_SOURCE= \
|
||||
$(RTOS_SOURCE_DIR)/tasks.c \
|
||||
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/port.c \
|
||||
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \
|
||||
./USB/USBSample.c
|
||||
./USB/USBSample.c \
|
||||
syscalls.c
|
||||
|
||||
ARM_SOURCE= \
|
||||
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/portISR.c \
|
||||
./webserver/emac_isr.c \
|
||||
./webserver/EMAC_ISR.c \
|
||||
./SrcAtmel/Cstartup_SAM7.c \
|
||||
./USB/USB_ISR.c
|
||||
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
@@ -53,7 +64,7 @@
|
||||
|
||||
#define partstNUM_LEDS ( 4 )
|
||||
#define partstALL_LEDS ( ulLED_Mask[ 0 ] | ulLED_Mask[ 1 ] | ulLED_Mask[ 2 ] | ulLED_Mask[ 3 ] )
|
||||
const unsigned portLONG ulLED_Mask[ partstNUM_LEDS ]= { (1<<19), (1<<20), (1<<21), (1<<22) };
|
||||
const unsigned long ulLED_Mask[ partstNUM_LEDS ]= { (1<<19), (1<<20), (1<<21), (1<<22) };
|
||||
|
||||
|
||||
void vParTestInitialise( void )
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -121,7 +132,7 @@ little odd. */
|
||||
|
||||
/* Misc application definitions. */
|
||||
#define usbINTERRUPT_PRIORITY ( 3 )
|
||||
#define usbFIFO_LENGTH ( ( unsigned portLONG ) 8 )
|
||||
#define usbFIFO_LENGTH ( ( unsigned long ) 8 )
|
||||
#define usbXUP ( 1 )
|
||||
#define usbXDOWN ( 2 )
|
||||
#define usbYUP ( 3 )
|
||||
@@ -131,9 +142,9 @@ little odd. */
|
||||
#define usbSHORTEST_DELAY ( ( portTickType ) 1 )
|
||||
#define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )
|
||||
#define usbEND_POINT_RESET_MASK ( ( unsigned portLONG ) 0x0f )
|
||||
#define usbDATA_INC ( ( portCHAR ) 5 )
|
||||
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned portLONG ) 8 )
|
||||
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )
|
||||
#define usbDATA_INC ( ( char ) 5 )
|
||||
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )
|
||||
|
||||
/* Control request types. */
|
||||
#define usbSTANDARD_DEVICE_REQUEST ( 0 )
|
||||
@@ -144,11 +155,11 @@ little odd. */
|
||||
/* Structure used to hold the received requests. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned portCHAR ucReqType;
|
||||
unsigned portCHAR ucRequest;
|
||||
unsigned portSHORT usValue;
|
||||
unsigned portSHORT usIndex;
|
||||
unsigned portSHORT usLength;
|
||||
unsigned char ucReqType;
|
||||
unsigned char ucRequest;
|
||||
unsigned short usValue;
|
||||
unsigned short usIndex;
|
||||
unsigned short usLength;
|
||||
} xUSB_REQUEST;
|
||||
|
||||
typedef enum
|
||||
@@ -164,9 +175,9 @@ typedef enum
|
||||
/* Structure used to control the data being sent to the host. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned portCHAR ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
|
||||
unsigned portLONG ulNextCharIndex;
|
||||
unsigned portLONG ulTotalDataLength;
|
||||
unsigned char ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
|
||||
unsigned long ulNextCharIndex;
|
||||
unsigned long ulTotalDataLength;
|
||||
} xTX_MESSAGE;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -239,7 +250,7 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest );
|
||||
* in response to TXCOMP interrupts until the entire buffer has been
|
||||
* sent.
|
||||
*/
|
||||
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthLeftToSend, portLONG lSendingDescriptor );
|
||||
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthLeftToSend, long lSendingDescriptor );
|
||||
|
||||
/*
|
||||
* Examine the Tx buffer to see if there is any more data to be transmitted.
|
||||
@@ -286,7 +297,7 @@ static void vUSBDemoTask( void *pvParameters );
|
||||
* Simple algorithm to ramp up the mouse cursor speed to make it easier to
|
||||
* use.
|
||||
*/
|
||||
static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 );
|
||||
static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 );
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
@@ -302,14 +313,14 @@ These take the form:
|
||||
Data
|
||||
}
|
||||
*/
|
||||
const portCHAR pxLanguageStringDescriptor[] =
|
||||
const char pxLanguageStringDescriptor[] =
|
||||
{
|
||||
4,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
0x09, 0x04
|
||||
};
|
||||
|
||||
const portCHAR pxManufacturerStringDescriptor[] =
|
||||
const char pxManufacturerStringDescriptor[] =
|
||||
{
|
||||
18,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -324,7 +335,7 @@ const portCHAR pxManufacturerStringDescriptor[] =
|
||||
'S', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxProductStringDescriptor[] =
|
||||
const char pxProductStringDescriptor[] =
|
||||
{
|
||||
38,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -349,7 +360,7 @@ const portCHAR pxProductStringDescriptor[] =
|
||||
'e', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxConfigurationStringDescriptor[] =
|
||||
const char pxConfigurationStringDescriptor[] =
|
||||
{
|
||||
38,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -374,7 +385,7 @@ const portCHAR pxConfigurationStringDescriptor[] =
|
||||
'e', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxInterfaceStringDescriptor[] =
|
||||
const char pxInterfaceStringDescriptor[] =
|
||||
{
|
||||
30,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -396,7 +407,7 @@ const portCHAR pxInterfaceStringDescriptor[] =
|
||||
};
|
||||
|
||||
/* Enumeration descriptors. */
|
||||
const portCHAR pxReportDescriptor[] =
|
||||
const char pxReportDescriptor[] =
|
||||
{
|
||||
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
|
||||
0x09, 0x02, /* USAGE (Mouse) */
|
||||
@@ -491,8 +502,8 @@ const char pxConfigDescriptor[] = {
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* File scope state variables. */
|
||||
static unsigned portCHAR ucUSBConfig = ( unsigned portCHAR ) 0;
|
||||
static unsigned portLONG ulReceivedAddress = ( unsigned portLONG ) 0;
|
||||
static unsigned char ucUSBConfig = ( unsigned char ) 0;
|
||||
static unsigned long ulReceivedAddress = ( unsigned long ) 0;
|
||||
static eDRIVER_STATE eDriverState = eNOTHING;
|
||||
|
||||
/* Structure used to control the characters being sent to the host. */
|
||||
@@ -558,9 +569,9 @@ xISRStatus *pxMessage;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 )
|
||||
static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 )
|
||||
{
|
||||
const portCHAR cSpeed = 20;
|
||||
const char cSpeed = 20;
|
||||
|
||||
if( !( ulInput & ulSwitch1 ) )
|
||||
{
|
||||
@@ -604,8 +615,8 @@ const portCHAR cSpeed = 20;
|
||||
static void prvTransmitSampleValues( void )
|
||||
{
|
||||
/* Variables to hold dummy x, y and z joystick axis data. */
|
||||
static signed portCHAR x = 0, y = 0, z = 0;
|
||||
unsigned portLONG ulStatus;
|
||||
static signed char x = 0, y = 0, z = 0;
|
||||
unsigned long ulStatus;
|
||||
|
||||
ulStatus = AT91C_BASE_PIOA->PIO_PDSR;
|
||||
|
||||
@@ -637,7 +648,7 @@ unsigned portLONG ulStatus;
|
||||
|
||||
static void prvUSBTransmitNull( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
unsigned long ulStatus;
|
||||
|
||||
/* Wait until the FIFO is free - even though we are not going to use it.
|
||||
THERE IS NO TIMEOUT HERE! */
|
||||
@@ -664,7 +675,7 @@ unsigned portLONG ulStatus;
|
||||
|
||||
static void prvSendStall( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
unsigned long ulStatus;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
@@ -679,13 +690,13 @@ unsigned portLONG ulStatus;
|
||||
|
||||
static void prvResetEndPoints( void )
|
||||
{
|
||||
unsigned portLONG ulTemp;
|
||||
unsigned long ulTemp;
|
||||
|
||||
eDriverState = eJUST_RESET;
|
||||
|
||||
/* Reset all the end points. */
|
||||
AT91C_BASE_UDP->UDP_RSTEP = usbEND_POINT_RESET_MASK;
|
||||
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned portLONG ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned long ) 0x00;
|
||||
|
||||
/* Enable data to be sent and received. */
|
||||
AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN;
|
||||
@@ -694,7 +705,7 @@ unsigned portLONG ulTemp;
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
|
||||
usbCSR_SET_BIT( &ulTemp, ( ( unsigned portLONG ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
|
||||
usbCSR_SET_BIT( &ulTemp, ( ( unsigned long ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
|
||||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;
|
||||
AT91C_BASE_UDP->UDP_IER = AT91C_UDP_EPINT0;
|
||||
}
|
||||
@@ -726,7 +737,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
/* Read the end point for data transfer. */
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
unsigned portLONG ulTemp;
|
||||
unsigned long ulTemp;
|
||||
|
||||
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
|
||||
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );
|
||||
@@ -741,7 +752,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
{
|
||||
/* We sent an acknowledgement of a SET_ADDRESS request. Move
|
||||
to the addressed state. */
|
||||
if( ulReceivedAddress != ( unsigned portLONG ) 0 )
|
||||
if( ulReceivedAddress != ( unsigned long ) 0 )
|
||||
{
|
||||
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;
|
||||
}
|
||||
@@ -764,8 +775,8 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
if( pxMessage->ulCSR0 & AT91C_UDP_RXSETUP )
|
||||
{
|
||||
xUSB_REQUEST xRequest;
|
||||
unsigned portCHAR ucRequest;
|
||||
unsigned portLONG ulRxBytes;
|
||||
unsigned char ucRequest;
|
||||
unsigned long ulRxBytes;
|
||||
|
||||
/* A data packet is available. */
|
||||
ulRxBytes = pxMessage->ulCSR0 >> 16;
|
||||
@@ -835,11 +846,11 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
switch( ( pxRequest->usValue & 0xff00 ) >> 8 )
|
||||
{
|
||||
case usbDESCRIPTOR_TYPE_DEVICE:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbDESCRIPTOR_TYPE_CONFIGURATION:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbDESCRIPTOR_TYPE_STRING:
|
||||
@@ -848,23 +859,23 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
switch( pxRequest->usValue & 0xff )
|
||||
{
|
||||
case usbLANGUAGE_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbMANUFACTURER_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbPRODUCT_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbCONFIGURATION_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
case usbINTERFACE_STRING:
|
||||
prvSendControlData( ( unsigned portCHAR * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -885,13 +896,13 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
unsigned portSHORT usStatus = 0;
|
||||
unsigned short usStatus = 0;
|
||||
|
||||
switch( pxRequest->ucRequest )
|
||||
{
|
||||
case usbGET_STATUS_REQUEST:
|
||||
/* Just send two byte dummy status. */
|
||||
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
break;
|
||||
|
||||
case usbGET_DESCRIPTOR_REQUEST:
|
||||
@@ -901,7 +912,7 @@ unsigned portSHORT usStatus = 0;
|
||||
|
||||
case usbGET_CONFIGURATION_REQUEST:
|
||||
/* Send selected device configuration */
|
||||
prvSendControlData( ( unsigned portCHAR * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
|
||||
prvSendControlData( ( unsigned char * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
|
||||
break;
|
||||
|
||||
case usbSET_FEATURE_REQUEST:
|
||||
@@ -916,7 +927,7 @@ unsigned portSHORT usStatus = 0;
|
||||
address and set our state so we know we have received the address. */
|
||||
prvUSBTransmitNull();
|
||||
eDriverState = eJUST_GOT_ADDRESS;
|
||||
ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue;
|
||||
ulReceivedAddress = ( unsigned long ) pxRequest->usValue;
|
||||
break;
|
||||
|
||||
case usbSET_CONFIGURATION_REQUEST:
|
||||
@@ -925,7 +936,7 @@ unsigned portSHORT usStatus = 0;
|
||||
we cannot actually move to the configured state until we get a
|
||||
TXCOMP interrupt from this NULL packet. Therefore we just remember the
|
||||
config and set our state so we know we have received the go ahead. */
|
||||
ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );
|
||||
ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );
|
||||
eDriverState = eJUST_GOT_CONFIG;
|
||||
prvUSBTransmitNull();
|
||||
break;
|
||||
@@ -963,10 +974,10 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
switch( ( pxRequest->usValue & ( unsigned portSHORT ) 0xff00 ) >> 8 )
|
||||
switch( ( pxRequest->usValue & ( unsigned short ) 0xff00 ) >> 8 )
|
||||
{
|
||||
case usbHID_REPORT_DESCRIPTOR:
|
||||
prvSendControlData( ( unsigned portCHAR * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
|
||||
prvSendControlData( ( unsigned char * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -980,13 +991,13 @@ static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
unsigned portSHORT usStatus = 0;
|
||||
unsigned short usStatus = 0;
|
||||
|
||||
switch( pxRequest->ucRequest )
|
||||
{
|
||||
case usbGET_STATUS_REQUEST:
|
||||
/* Send dummy 2 bytes. */
|
||||
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
|
||||
break;
|
||||
|
||||
case usbGET_DESCRIPTOR_REQUEST:
|
||||
@@ -1023,11 +1034,11 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
|
||||
|
||||
static void vInitUSBInterface( void )
|
||||
{
|
||||
volatile unsigned portLONG ulTemp;
|
||||
volatile unsigned long ulTemp;
|
||||
|
||||
/* Initialise a few state variables. */
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
|
||||
ucUSBConfig = ( unsigned portCHAR ) 0;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
|
||||
ucUSBConfig = ( unsigned char ) 0;
|
||||
eDriverState = eNOTHING;
|
||||
|
||||
/* HARDWARE SETUP */
|
||||
@@ -1051,10 +1062,10 @@ volatile unsigned portLONG ulTemp;
|
||||
/* When using the USB debugger the peripheral registers do not always get
|
||||
set to the correct default values. To make sure set the relevant registers
|
||||
manually here. */
|
||||
AT91C_BASE_UDP->UDP_IDR = ( unsigned portLONG ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_ICR = ( unsigned portLONG ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned portLONG ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned portLONG ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_IDR = ( unsigned long ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_ICR = ( unsigned long ) 0xffffffff;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned long ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned long ) 0x00;
|
||||
AT91C_BASE_UDP->UDP_GLBSTATE = 0;
|
||||
AT91C_BASE_UDP->UDP_FADDR = 0;
|
||||
|
||||
@@ -1072,14 +1083,14 @@ volatile unsigned portLONG ulTemp;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthToSend, portLONG lSendingDescriptor )
|
||||
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthToSend, long lSendingDescriptor )
|
||||
{
|
||||
if( ( ( unsigned portLONG ) usRequestedLength < ulLengthToSend ) )
|
||||
if( ( ( unsigned long ) usRequestedLength < ulLengthToSend ) )
|
||||
{
|
||||
/* Cap the data length to that requested. */
|
||||
ulLengthToSend = ( unsigned portSHORT ) usRequestedLength;
|
||||
ulLengthToSend = ( unsigned short ) usRequestedLength;
|
||||
}
|
||||
else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor )
|
||||
else if( ( ulLengthToSend < ( unsigned long ) usRequestedLength ) && lSendingDescriptor )
|
||||
{
|
||||
/* We are sending a descriptor. If the descriptor is an exact
|
||||
multiple of the FIFO length then it will have to be terminated
|
||||
@@ -1101,7 +1112,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
||||
/* Reinitialise the buffer index so we start sending from the start of
|
||||
the data. */
|
||||
pxCharsForTx.ulTotalDataLength = ulLengthToSend;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
|
||||
|
||||
/* Send the first 8 bytes now. The rest will get sent in response to
|
||||
TXCOMP interrupts. */
|
||||
@@ -1111,7 +1122,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
||||
|
||||
static void prvSendNextSegment( void )
|
||||
{
|
||||
volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
|
||||
/* Is there any data to send? */
|
||||
if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )
|
||||
@@ -1136,7 +1147,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
}
|
||||
|
||||
/* Write the data to the FIFO. */
|
||||
while( ulNextLength > ( unsigned portLONG ) 0 )
|
||||
while( ulNextLength > ( unsigned long ) 0 )
|
||||
{
|
||||
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];
|
||||
|
||||
@@ -1148,7 +1159,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
|
||||
usbCSR_SET_BIT( &ulStatus, ( ( unsigned portLONG ) 0x10 ) );
|
||||
usbCSR_SET_BIT( &ulStatus, ( ( unsigned long ) 0x10 ) );
|
||||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef USB_DEMO_H
|
||||
@@ -49,15 +60,15 @@
|
||||
#define usbQUEUE_LENGTH ( 0x3 ) /* Must have all bits set! */
|
||||
#define usbEND_POINT_0 ( 0 )
|
||||
#define usbEND_POINT_1 ( 1 )
|
||||
#define usbRX_COUNT_MASK ( ( unsigned portLONG ) 0x7ff )
|
||||
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )
|
||||
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR
|
||||
|
||||
/* Structure used to take a snapshot of the USB status from within the ISR. */
|
||||
typedef struct X_ISR_STATUS
|
||||
{
|
||||
unsigned portLONG ulISR;
|
||||
unsigned portLONG ulCSR0;
|
||||
unsigned portCHAR ucFifoData[ 8 ];
|
||||
unsigned long ulISR;
|
||||
unsigned long ulCSR0;
|
||||
unsigned char ucFifoData[ 8 ];
|
||||
} xISRStatus;
|
||||
|
||||
/* Macros to manipulate the control and status registers. These registers
|
||||
@@ -70,14 +81,14 @@ unchanged by writing with a 1. */
|
||||
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
|
||||
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
|
||||
/* write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
|
||||
\
|
||||
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
|
||||
/* so the write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
|
||||
\
|
||||
/* Set whichever bit we want set. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( ulBit ); \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) |= ( ulBit ); \
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
@@ -55,14 +66,14 @@
|
||||
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
|
||||
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
|
||||
/* write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
|
||||
\
|
||||
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
|
||||
/* so the write has no effect. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
|
||||
\
|
||||
/* Clear whichever bit we want clear. */ \
|
||||
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( ~ulBit ); \
|
||||
( * ( ( unsigned long * ) pulValueNow ) ) &= ( ~ulBit ); \
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +89,7 @@ void vUSB_ISR_Wrapper( void ) __attribute__((naked));
|
||||
* Actual ISR handler. This must be separate from the entry point as the stack
|
||||
* is used.
|
||||
*/
|
||||
void vUSB_ISR_Handler( void );
|
||||
void vUSB_ISR_Handler( void ) __attribute__((noinline));
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -92,10 +103,10 @@ extern xQueueHandle xUSBInterruptQueue;
|
||||
|
||||
void vUSB_ISR_Handler( void )
|
||||
{
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
static volatile unsigned portLONG ulNextMessage = 0;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
static volatile unsigned long ulNextMessage = 0;
|
||||
xISRStatus *pxMessage;
|
||||
unsigned portLONG ulTemp, ulRxBytes;
|
||||
unsigned long ulTemp, ulRxBytes;
|
||||
|
||||
/* To reduce the amount of time spent in this interrupt it would be
|
||||
possible to defer the majority of this processing to an 'interrupt task',
|
||||
@@ -156,11 +167,11 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
/* The message now contains the entire state and optional data from
|
||||
the USB interrupt. This can now be posted on the Rx queue ready for
|
||||
processing at the task level. */
|
||||
xTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, &xHigherPriorityTaskWoken );
|
||||
|
||||
/* We may want to switch to the USB task, if this message has made
|
||||
it the highest priority task that is ready to execute. */
|
||||
if( xTaskWokenByPost )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
@@ -177,7 +188,7 @@ void vUSB_ISR_Wrapper( void )
|
||||
|
||||
/* Call the handler itself. This must be a separate function as it uses
|
||||
the stack. */
|
||||
vUSB_ISR_Handler();
|
||||
__asm volatile ("bl vUSB_ISR_Handler");
|
||||
|
||||
/* Restore the context of the task that is going to
|
||||
execute next. This might not be the same as the originally
|
||||
|
||||
@@ -36,6 +36,12 @@ SECTIONS
|
||||
*(.bss)
|
||||
} >ram
|
||||
|
||||
. = ALIGN(4);
|
||||
.eh_frame :
|
||||
{
|
||||
KEEP (*(.eh_frame))
|
||||
} > ram
|
||||
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -81,7 +92,7 @@
|
||||
/* Demo application includes. */
|
||||
#include "partest.h"
|
||||
#include "USBSample.h"
|
||||
#include "uip_task.h"
|
||||
#include "uIP_Task.h"
|
||||
#include "BlockQ.h"
|
||||
#include "blocktim.h"
|
||||
#include "flash.h"
|
||||
@@ -176,15 +187,15 @@ static void prvSetupHardware( void )
|
||||
|
||||
void vApplicationTickHook( void )
|
||||
{
|
||||
static unsigned portLONG ulCallCount = 0, ulErrorFound = pdFALSE;
|
||||
static unsigned long ulCallCount = 0, ulErrorFound = pdFALSE;
|
||||
|
||||
/* The rate at which LED D4 will toggle if an error has been found in one or
|
||||
more of the standard demo tasks. */
|
||||
const unsigned portLONG ulErrorFlashRate = 500 / portTICK_RATE_MS;
|
||||
const unsigned long ulErrorFlashRate = 500 / portTICK_RATE_MS;
|
||||
|
||||
/* The rate at which LED D4 will toggle if no errors have been found in any
|
||||
of the standard demo tasks. */
|
||||
const unsigned portLONG ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;
|
||||
const unsigned long ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;
|
||||
|
||||
ulCallCount++;
|
||||
|
||||
|
||||
162
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/syscalls.c
Normal file
162
Demo/ARM7_AT91SAM7X256_Eclipse/RTOSDemo/syscalls.c
Normal file
@@ -0,0 +1,162 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2009 by Michael Fischer. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the author 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.
|
||||
*
|
||||
****************************************************************************
|
||||
* History:
|
||||
*
|
||||
* 28.03.09 mifi First Version, based on the original syscall.c from
|
||||
* newlib version 1.17.0
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _read_r (struct _reent *r, int file, char * ptr, int len)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
ptr = ptr;
|
||||
len = len;
|
||||
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _lseek_r (struct _reent *r, int file, int ptr, int dir)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
ptr = ptr;
|
||||
dir = dir;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _write_r (struct _reent *r, int file, char * ptr, int len)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
ptr = ptr;
|
||||
|
||||
#if 0
|
||||
int index;
|
||||
|
||||
/* For example, output string by UART */
|
||||
for(index=0; index<len; index++)
|
||||
{
|
||||
if (ptr[index] == '\n')
|
||||
{
|
||||
uart_putc('\r');
|
||||
}
|
||||
|
||||
uart_putc(ptr[index]);
|
||||
}
|
||||
#endif
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _close_r (struct _reent *r, int file)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/* Register name faking - works in collusion with the linker. */
|
||||
register char * stack_ptr asm ("sp");
|
||||
|
||||
caddr_t _sbrk_r (struct _reent *r, int incr)
|
||||
{
|
||||
extern char end asm ("end"); /* Defined by the linker. */
|
||||
static char * heap_end;
|
||||
char * prev_heap_end;
|
||||
|
||||
if (heap_end == NULL)
|
||||
heap_end = & end;
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
|
||||
if (heap_end + incr > stack_ptr)
|
||||
{
|
||||
/* Some of the libstdc++-v3 tests rely upon detecting
|
||||
out of memory errors, so do not abort here. */
|
||||
#if 0
|
||||
extern void abort (void);
|
||||
|
||||
_write (1, "_sbrk: Heap and stack collision\n", 32);
|
||||
|
||||
abort ();
|
||||
#else
|
||||
errno = ENOMEM;
|
||||
return (caddr_t) -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
heap_end += incr;
|
||||
|
||||
return (caddr_t) prev_heap_end;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _fstat_r (struct _reent *r, int file, struct stat * st)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
|
||||
memset (st, 0, sizeof (* st));
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _isatty_r(struct _reent *r, int fd)
|
||||
{
|
||||
r = r;
|
||||
fd = fd;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*** EOF ***/
|
||||
|
||||
|
||||
@@ -1,55 +1,66 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "Semphr.h"
|
||||
#include "Task.h"
|
||||
#include "semphr.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Wrapper for the EMAC interrupt. */
|
||||
void vEMACISR_Wrapper( void ) __attribute__((naked));
|
||||
|
||||
/* Handler called by the ISR wrapper. This must be kept a separate
|
||||
function to ensure the stack frame is correctly set up. */
|
||||
void vEMACISR_Handler( void );
|
||||
void vEMACISR_Handler( void ) __attribute__((noinline));
|
||||
|
||||
static xSemaphoreHandle xEMACSemaphore;
|
||||
|
||||
@@ -63,8 +74,8 @@ void vPassEMACSemaphore( xSemaphoreHandle xSemaphore )
|
||||
|
||||
void vEMACISR_Handler( void )
|
||||
{
|
||||
volatile unsigned portLONG ulIntStatus, ulRxStatus;
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
volatile unsigned long ulIntStatus, ulRxStatus;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
ulIntStatus = AT91C_BASE_EMAC->EMAC_ISR;
|
||||
ulRxStatus = AT91C_BASE_EMAC->EMAC_RSR;
|
||||
@@ -73,7 +84,7 @@ portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
{
|
||||
/* A frame has been received, signal the uIP task so it can process
|
||||
the Rx descriptors. */
|
||||
xSwitchRequired = xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE );
|
||||
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
|
||||
AT91C_BASE_EMAC->EMAC_RSR = AT91C_EMAC_REC;
|
||||
}
|
||||
|
||||
@@ -81,7 +92,7 @@ portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
/* Switch to the uIP task. */
|
||||
if( xSwitchRequired )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* If a task of higher priority than the interrupted task was
|
||||
unblocked by the ISR then this call will ensure that the
|
||||
@@ -98,7 +109,7 @@ void vEMACISR_Wrapper( void )
|
||||
|
||||
/* Call the handler task to do the actual work. This must be a separate
|
||||
function to ensure the stack frame is correctly set up. */
|
||||
vEMACISR_Handler();
|
||||
__asm volatile ("bl vEMACISR_Handler");
|
||||
|
||||
/* Restore the context of whichever task is the next to run. */
|
||||
portRESTORE_CONTEXT();
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
@@ -67,15 +78,15 @@ to use an MII interface. */
|
||||
/* The buffer addresses written into the descriptors must be aligned so the
|
||||
last few bits are zero. These bits have special meaning for the EMAC
|
||||
peripheral and cannot be used as part of the address. */
|
||||
#define emacADDRESS_MASK ( ( unsigned portLONG ) 0xFFFFFFFC )
|
||||
#define emacADDRESS_MASK ( ( unsigned long ) 0xFFFFFFFC )
|
||||
|
||||
/* Bit used within the address stored in the descriptor to mark the last
|
||||
descriptor in the array. */
|
||||
#define emacRX_WRAP_BIT ( ( unsigned portLONG ) 0x02 )
|
||||
#define emacRX_WRAP_BIT ( ( unsigned long ) 0x02 )
|
||||
|
||||
/* Bit used within the Tx descriptor status to indicate whether the
|
||||
descriptor is under the control of the EMAC or the software. */
|
||||
#define emacTX_BUF_USED ( ( unsigned portLONG ) 0x80000000 )
|
||||
#define emacTX_BUF_USED ( ( unsigned long ) 0x80000000 )
|
||||
|
||||
/* A short delay is used to wait for a buffer to become available, should
|
||||
one not be immediately available when trying to transmit a frame. */
|
||||
@@ -87,31 +98,31 @@ one not be immediately available when trying to transmit a frame. */
|
||||
#define emacNO_DELAY ( 0 )
|
||||
#define emacTOTAL_FRAME_HEADER_SIZE ( 54 )
|
||||
#define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS )
|
||||
#define emacRESET_KEY ( ( unsigned portLONG ) 0xA5000000 )
|
||||
#define emacRESET_LENGTH ( ( unsigned portLONG ) ( 0x01 << 8 ) )
|
||||
#define emacRESET_KEY ( ( unsigned long ) 0xA5000000 )
|
||||
#define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) )
|
||||
|
||||
/* The Atmel header file only defines the TX frame length mask. */
|
||||
#define emacRX_LENGTH_FRAME ( 0xfff )
|
||||
|
||||
/* Peripheral setup for the EMAC. */
|
||||
#define emacPERIPHERAL_A_SETUP ( ( unsigned portLONG ) AT91C_PB2_ETX0 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB12_ETXER ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB16_ECOL ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB11_ETX3 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB6_ERX1 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB15_ERXDV ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB13_ERX2 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB3_ETX1 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB8_EMDC ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB5_ERX0 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB14_ERX3 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB4_ECRS_ECRSDV ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB1_ETXEN ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB10_ETX2 ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB0_ETXCK_EREFCK ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB9_EMDIO ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB7_ERXER ) | \
|
||||
( ( unsigned portLONG ) AT91C_PB17_ERXCK );
|
||||
#define emacPERIPHERAL_A_SETUP ( ( unsigned long ) AT91C_PB2_ETX0 ) | \
|
||||
( ( unsigned long ) AT91C_PB12_ETXER ) | \
|
||||
( ( unsigned long ) AT91C_PB16_ECOL ) | \
|
||||
( ( unsigned long ) AT91C_PB11_ETX3 ) | \
|
||||
( ( unsigned long ) AT91C_PB6_ERX1 ) | \
|
||||
( ( unsigned long ) AT91C_PB15_ERXDV ) | \
|
||||
( ( unsigned long ) AT91C_PB13_ERX2 ) | \
|
||||
( ( unsigned long ) AT91C_PB3_ETX1 ) | \
|
||||
( ( unsigned long ) AT91C_PB8_EMDC ) | \
|
||||
( ( unsigned long ) AT91C_PB5_ERX0 ) | \
|
||||
( ( unsigned long ) AT91C_PB14_ERX3 ) | \
|
||||
( ( unsigned long ) AT91C_PB4_ECRS_ECRSDV ) | \
|
||||
( ( unsigned long ) AT91C_PB1_ETXEN ) | \
|
||||
( ( unsigned long ) AT91C_PB10_ETX2 ) | \
|
||||
( ( unsigned long ) AT91C_PB0_ETXCK_EREFCK ) | \
|
||||
( ( unsigned long ) AT91C_PB9_EMDIO ) | \
|
||||
( ( unsigned long ) AT91C_PB7_ERXER ) | \
|
||||
( ( unsigned long ) AT91C_PB17_ERXCK );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -139,9 +150,9 @@ static void prvSetupEMACInterrupt( void );
|
||||
/*
|
||||
* Some initialisation functions taken from the Atmel EMAC sample code.
|
||||
*/
|
||||
static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue );
|
||||
static void vReadPHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long *pulValue );
|
||||
#if USE_RMII_INTERFACE != 1
|
||||
static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue);
|
||||
static void vWritePHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long ulValue);
|
||||
#endif
|
||||
static portBASE_TYPE xGetLinkSpeed( void );
|
||||
static portBASE_TYPE prvProbePHY( void );
|
||||
@@ -151,12 +162,12 @@ static portBASE_TYPE prvProbePHY( void );
|
||||
/* Buffer written to by the EMAC DMA. Must be aligned as described by the
|
||||
comment above the emacADDRESS_MASK definition. */
|
||||
#pragma data_alignment=8
|
||||
static volatile portCHAR pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ];
|
||||
static volatile char pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ];
|
||||
|
||||
/* Buffer read by the EMAC DMA. Must be aligned as described by he comment
|
||||
above the emacADDRESS_MASK definition. */
|
||||
#pragma data_alignment=8
|
||||
static portCHAR pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ];
|
||||
static char pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ];
|
||||
|
||||
/* Descriptors used to communicate between the program and the EMAC peripheral.
|
||||
These descriptors hold the locations and state of the Rx and Tx buffers. */
|
||||
@@ -164,7 +175,7 @@ static volatile AT91S_TxTdDescriptor xTxDescriptors[ NB_TX_BUFFERS ];
|
||||
static volatile AT91S_RxTdDescriptor xRxDescriptors[ NB_RX_BUFFERS ];
|
||||
|
||||
/* The IP and Ethernet addresses are read from the uIP setup. */
|
||||
const portCHAR cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC_ADDR3, uipMAC_ADDR4, uipMAC_ADDR5 };
|
||||
const char cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC_ADDR3, uipMAC_ADDR4, uipMAC_ADDR5 };
|
||||
const unsigned char ucIPAddress[ 4 ] = { uipIP_ADDR0, uipIP_ADDR1, uipIP_ADDR2, uipIP_ADDR3 };
|
||||
|
||||
/* The semaphore used by the EMAC ISR to wake the EMAC task. */
|
||||
@@ -219,7 +230,7 @@ xSemaphoreHandle xEMACInit( void )
|
||||
/* PHY configuration. */
|
||||
#if USE_RMII_INTERFACE != 1
|
||||
{
|
||||
unsigned portLONG ulControl;
|
||||
unsigned long ulControl;
|
||||
|
||||
/* PHY has internal pull down : disable MII isolate. */
|
||||
vReadPHY( AT91C_PHY_ADDR, MII_BMCR, &ulControl );
|
||||
@@ -265,12 +276,12 @@ xSemaphoreHandle xEMACInit( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portLONG lEMACSend( void )
|
||||
long lEMACSend( void )
|
||||
{
|
||||
static unsigned portBASE_TYPE uxTxBufferIndex = 0;
|
||||
portBASE_TYPE xWaitCycles = 0;
|
||||
portLONG lReturn = pdPASS;
|
||||
portCHAR *pcBuffer;
|
||||
long lReturn = pdPASS;
|
||||
char *pcBuffer;
|
||||
|
||||
/* Is a buffer available? */
|
||||
while( !( xTxDescriptors[ uxTxBufferIndex ].U_Status.status & AT91C_TRANSMIT_OK ) )
|
||||
@@ -294,7 +305,7 @@ portCHAR *pcBuffer;
|
||||
if( lReturn == pdPASS )
|
||||
{
|
||||
/* Copy the headers into the Tx buffer. These will be in the uIP buffer. */
|
||||
pcBuffer = ( portCHAR * ) xTxDescriptors[ uxTxBufferIndex ].addr;
|
||||
pcBuffer = ( char * ) xTxDescriptors[ uxTxBufferIndex ].addr;
|
||||
memcpy( ( void * ) pcBuffer, ( void * ) uip_buf, emacTOTAL_FRAME_HEADER_SIZE );
|
||||
|
||||
/* If there is room, also copy in the application data if any. */
|
||||
@@ -309,7 +320,7 @@ portCHAR *pcBuffer;
|
||||
if( uxTxBufferIndex >= ( NB_TX_BUFFERS - 1 ) )
|
||||
{
|
||||
/* Fill out the necessary in the descriptor to get the data sent. */
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned long ) AT91C_LENGTH_FRAME )
|
||||
| AT91C_LAST_BUFFER
|
||||
| AT91C_TRANSMIT_WRAP;
|
||||
uxTxBufferIndex = 0;
|
||||
@@ -317,7 +328,7 @@ portCHAR *pcBuffer;
|
||||
else
|
||||
{
|
||||
/* Fill out the necessary in the descriptor to get the data sent. */
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )
|
||||
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned long ) AT91C_LENGTH_FRAME )
|
||||
| AT91C_LAST_BUFFER;
|
||||
uxTxBufferIndex++;
|
||||
}
|
||||
@@ -331,11 +342,11 @@ portCHAR *pcBuffer;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
unsigned portLONG ulEMACPoll( void )
|
||||
unsigned long ulEMACPoll( void )
|
||||
{
|
||||
static unsigned portBASE_TYPE ulNextRxBuffer = 0;
|
||||
unsigned portLONG ulSectionLength = 0, ulLengthSoFar = 0, ulEOF = pdFALSE;
|
||||
portCHAR *pcSource;
|
||||
unsigned long ulSectionLength = 0, ulLengthSoFar = 0, ulEOF = pdFALSE;
|
||||
char *pcSource;
|
||||
|
||||
/* Skip any fragments. */
|
||||
while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !( xRxDescriptors[ ulNextRxBuffer ].U_Status.status & AT91C_SOF ) )
|
||||
@@ -353,7 +364,7 @@ portCHAR *pcSource;
|
||||
|
||||
while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !ulSectionLength )
|
||||
{
|
||||
pcSource = ( portCHAR * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK );
|
||||
pcSource = ( char * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK );
|
||||
ulSectionLength = xRxDescriptors[ ulNextRxBuffer ].U_Status.status & emacRX_LENGTH_FRAME;
|
||||
|
||||
if( ulSectionLength == 0 )
|
||||
@@ -412,13 +423,13 @@ portCHAR *pcSource;
|
||||
static void prvSetupDescriptors(void)
|
||||
{
|
||||
unsigned portBASE_TYPE xIndex;
|
||||
unsigned portLONG ulAddress;
|
||||
unsigned long ulAddress;
|
||||
|
||||
/* Initialise xRxDescriptors descriptor. */
|
||||
for( xIndex = 0; xIndex < NB_RX_BUFFERS; ++xIndex )
|
||||
{
|
||||
/* Calculate the address of the nth buffer within the array. */
|
||||
ulAddress = ( unsigned portLONG )( pcRxBuffer + ( xIndex * ETH_RX_BUFFER_SIZE ) );
|
||||
ulAddress = ( unsigned long )( pcRxBuffer + ( xIndex * ETH_RX_BUFFER_SIZE ) );
|
||||
|
||||
/* Write the buffer address into the descriptor. The DMA will place
|
||||
the data at this address when this descriptor is being used. Mask off
|
||||
@@ -434,7 +445,7 @@ unsigned portLONG ulAddress;
|
||||
for( xIndex = 0; xIndex < NB_TX_BUFFERS; ++xIndex )
|
||||
{
|
||||
/* Calculate the address of the nth buffer within the array. */
|
||||
ulAddress = ( unsigned portLONG )( pcTxBuffer + ( xIndex * ETH_TX_BUFFER_SIZE ) );
|
||||
ulAddress = ( unsigned long )( pcTxBuffer + ( xIndex * ETH_TX_BUFFER_SIZE ) );
|
||||
|
||||
/* Write the buffer address into the descriptor. The DMA will read
|
||||
data from here when the descriptor is being used. */
|
||||
@@ -447,8 +458,8 @@ unsigned portLONG ulAddress;
|
||||
xTxDescriptors[ NB_TX_BUFFERS - 1 ].U_Status.status = AT91C_TRANSMIT_WRAP | AT91C_TRANSMIT_OK;
|
||||
|
||||
/* Tell the EMAC where to find the descriptors. */
|
||||
AT91C_BASE_EMAC->EMAC_RBQP = ( unsigned portLONG ) xRxDescriptors;
|
||||
AT91C_BASE_EMAC->EMAC_TBQP = ( unsigned portLONG ) xTxDescriptors;
|
||||
AT91C_BASE_EMAC->EMAC_RBQP = ( unsigned long ) xRxDescriptors;
|
||||
AT91C_BASE_EMAC->EMAC_TBQP = ( unsigned long ) xTxDescriptors;
|
||||
|
||||
/* Clear all the bits in the receive status register. */
|
||||
AT91C_BASE_EMAC->EMAC_RSR = ( AT91C_EMAC_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA );
|
||||
@@ -465,12 +476,12 @@ unsigned portLONG ulAddress;
|
||||
static void prvSetupMACAddress( void )
|
||||
{
|
||||
/* Must be written SA1L then SA1H. */
|
||||
AT91C_BASE_EMAC->EMAC_SA1L = ( ( unsigned portLONG ) cMACAddress[ 3 ] << 24 ) |
|
||||
( ( unsigned portLONG ) cMACAddress[ 2 ] << 16 ) |
|
||||
( ( unsigned portLONG ) cMACAddress[ 1 ] << 8 ) |
|
||||
AT91C_BASE_EMAC->EMAC_SA1L = ( ( unsigned long ) cMACAddress[ 3 ] << 24 ) |
|
||||
( ( unsigned long ) cMACAddress[ 2 ] << 16 ) |
|
||||
( ( unsigned long ) cMACAddress[ 1 ] << 8 ) |
|
||||
cMACAddress[ 0 ];
|
||||
|
||||
AT91C_BASE_EMAC->EMAC_SA1H = ( ( unsigned portLONG ) cMACAddress[ 5 ] << 8 ) |
|
||||
AT91C_BASE_EMAC->EMAC_SA1H = ( ( unsigned long ) cMACAddress[ 5 ] << 8 ) |
|
||||
cMACAddress[ 4 ];
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -508,7 +519,7 @@ static void prvSetupEMACInterrupt( void )
|
||||
|
||||
static portBASE_TYPE prvProbePHY( void )
|
||||
{
|
||||
unsigned portLONG ulPHYId1, ulPHYId2, ulStatus;
|
||||
unsigned long ulPHYId1, ulPHYId2, ulStatus;
|
||||
portBASE_TYPE xReturn = pdPASS;
|
||||
|
||||
/* Code supplied by Atmel (reformatted) -----------------*/
|
||||
@@ -551,7 +562,7 @@ portBASE_TYPE xReturn = pdPASS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue )
|
||||
static void vReadPHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long *pulValue )
|
||||
{
|
||||
/* Code supplied by Atmel (reformatted) ----------------------*/
|
||||
|
||||
@@ -573,7 +584,7 @@ static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddres
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if USE_RMII_INTERFACE != 1
|
||||
static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue )
|
||||
static void vWritePHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long ulValue )
|
||||
{
|
||||
/* Code supplied by Atmel (reformatted) ----------------------*/
|
||||
|
||||
@@ -596,7 +607,7 @@ static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddre
|
||||
|
||||
static portBASE_TYPE xGetLinkSpeed( void )
|
||||
{
|
||||
unsigned portLONG ulBMSR, ulBMCR, ulLPA, ulMACCfg, ulSpeed, ulDuplex;
|
||||
unsigned long ulBMSR, ulBMCR, ulLPA, ulMACCfg, ulSpeed, ulDuplex;
|
||||
|
||||
/* Code supplied by Atmel (reformatted) -----------------*/
|
||||
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef SAM_7_EMAC_H
|
||||
@@ -55,12 +66,12 @@ xSemaphoreHandle xEMACInit( void );
|
||||
* Send the current uIP buffer. This copies the uIP buffer to one of the
|
||||
* EMAC Tx buffers, then indicates to the EMAC that the buffer is ready.
|
||||
*/
|
||||
portLONG lEMACSend( void );
|
||||
long lEMACSend( void );
|
||||
|
||||
/*
|
||||
* Called in response to an EMAC Rx interrupt. Copies the received frame
|
||||
* into the uIP buffer.
|
||||
*/
|
||||
unsigned portLONG ulEMACPoll( void );
|
||||
unsigned long ulEMACPoll( void );
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef UIP_TASK_H
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -54,20 +65,23 @@
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
|
||||
@@ -1,36 +1,55 @@
|
||||
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#/*
|
||||
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
#
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
# * Complete, revised, and edited pdf reference manuals are also *
|
||||
# * available. *
|
||||
# * *
|
||||
# * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
# * ensuring you get running as quickly as possible and with an *
|
||||
# * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
# * the FreeRTOS project to continue with its mission of providing *
|
||||
# * professional grade, cross platform, de facto standard solutions *
|
||||
# * for microcontrollers - completely free of charge! *
|
||||
# * *
|
||||
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
# * *
|
||||
# * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
#
|
||||
# FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This file is part of the FreeRTOS distribution.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with FreeRTOS.org; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License (version 2) as published by the
|
||||
# Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
# >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
# distribute a combined work that includes FreeRTOS without being obliged to
|
||||
# provide the source code for proprietary components outside of the FreeRTOS
|
||||
# kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details. You should have received a copy of the GNU General Public
|
||||
# License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
# by writing to Richard Barry, contact details for whom are available on the
|
||||
# FreeRTOS WEB site.
|
||||
#
|
||||
# A special exception to the GPL can be applied should you wish to distribute
|
||||
# a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
# the source code for any proprietary components. See the licensing section
|
||||
# of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
# can be applied.
|
||||
# 1 tab == 4 spaces!
|
||||
#
|
||||
# ***************************************************************************
|
||||
# See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
# and contact details. Please ensure to read the configuration and relevant
|
||||
# port sections of the online documentation.
|
||||
# ***************************************************************************
|
||||
|
||||
# Changes from V2.4.2
|
||||
# http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
# contact details.
|
||||
#
|
||||
# + Replaced source/portable/gcc/arm7/portheap.c with source/portable/memmang/heap_2.c.
|
||||
# http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
# critical systems.
|
||||
#
|
||||
# http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
# licensing and training services.
|
||||
#*/
|
||||
|
||||
CC=arm-elf-gcc
|
||||
OBJCOPY=arm-elf-objcopy
|
||||
@@ -44,7 +63,7 @@ WARNINGS=-Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align
|
||||
#
|
||||
CFLAGS=$(WARNINGS) -D $(RUN_MODE) -D GCC_ARM7 -I. -I../../Source/include \
|
||||
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
|
||||
$(OPTIM) -fomit-frame-pointer
|
||||
$(OPTIM) -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm
|
||||
|
||||
ifeq ($(USE_THUMB_MODE),YES)
|
||||
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
|
||||
@@ -103,6 +122,7 @@ $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
clean :
|
||||
rm -rf $(ARM_OBJ) $(THUMB_OBJ)
|
||||
touch Makefile
|
||||
|
||||
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -50,9 +61,9 @@
|
||||
#include "FreeRTOS.h"
|
||||
#include "partest.h"
|
||||
|
||||
#define partstFIRST_IO ( ( unsigned portLONG ) 0x400 )
|
||||
#define partstFIRST_IO ( ( unsigned long ) 0x400 )
|
||||
#define partstNUM_LEDS ( 4 )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xffffffff )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned long ) 0xffffffff )
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
@@ -70,13 +81,13 @@ void vParTestInitialise( void )
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO;
|
||||
unsigned long ulLED = partstFIRST_IO;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* Set of clear the output. */
|
||||
if( xValue )
|
||||
@@ -93,13 +104,13 @@ unsigned portLONG ulLED = partstFIRST_IO;
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
|
||||
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* If this bit is already set, clear it, and visa versa. */
|
||||
ulCurrentState = GPIO0_IOPIN;
|
||||
|
||||
@@ -47,7 +47,7 @@ _mainCRTStartup:
|
||||
for system/user, SWI and IRQ modes. Also each mode is setup with
|
||||
interrupts initially disabled. */
|
||||
ldr r0, .LC6
|
||||
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode
|
||||
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #UND_STACK_SIZE
|
||||
msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */
|
||||
|
||||
@@ -36,6 +36,12 @@ SECTIONS
|
||||
*(.bss)
|
||||
} >ram
|
||||
|
||||
. = ALIGN(4);
|
||||
.eh_frame :
|
||||
{
|
||||
KEEP (*(.eh_frame))
|
||||
} > ram
|
||||
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
|
||||
@@ -36,6 +36,12 @@ SECTIONS
|
||||
*(.bss)
|
||||
} >ram
|
||||
|
||||
. = ALIGN(4);
|
||||
.eh_frame :
|
||||
{
|
||||
KEEP (*(.eh_frame))
|
||||
} > ram
|
||||
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -109,29 +120,29 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup I/O. */
|
||||
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
|
||||
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x0004 )
|
||||
#define mainP0_14 ( ( unsigned portLONG ) 0x4000 )
|
||||
#define mainJTAG_PORT ( ( unsigned portLONG ) 0x3E0000UL )
|
||||
#define mainTX_ENABLE ( ( unsigned long ) 0x0001 )
|
||||
#define mainRX_ENABLE ( ( unsigned long ) 0x0004 )
|
||||
#define mainP0_14 ( ( unsigned long ) 0x4000 )
|
||||
#define mainJTAG_PORT ( ( unsigned long ) 0x3E0000UL )
|
||||
|
||||
/* Constants to setup the PLL. */
|
||||
#define mainPLL_MUL_4 ( ( unsigned portCHAR ) 0x0003 )
|
||||
#define mainPLL_DIV_1 ( ( unsigned portCHAR ) 0x0000 )
|
||||
#define mainPLL_ENABLE ( ( unsigned portCHAR ) 0x0001 )
|
||||
#define mainPLL_CONNECT ( ( unsigned portCHAR ) 0x0003 )
|
||||
#define mainPLL_FEED_BYTE1 ( ( unsigned portCHAR ) 0xaa )
|
||||
#define mainPLL_FEED_BYTE2 ( ( unsigned portCHAR ) 0x55 )
|
||||
#define mainPLL_LOCK ( ( unsigned portLONG ) 0x0400 )
|
||||
#define mainPLL_MUL_4 ( ( unsigned char ) 0x0003 )
|
||||
#define mainPLL_DIV_1 ( ( unsigned char ) 0x0000 )
|
||||
#define mainPLL_ENABLE ( ( unsigned char ) 0x0001 )
|
||||
#define mainPLL_CONNECT ( ( unsigned char ) 0x0003 )
|
||||
#define mainPLL_FEED_BYTE1 ( ( unsigned char ) 0xaa )
|
||||
#define mainPLL_FEED_BYTE2 ( ( unsigned char ) 0x55 )
|
||||
#define mainPLL_LOCK ( ( unsigned long ) 0x0400 )
|
||||
|
||||
/* Constants to setup the MAM. */
|
||||
#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )
|
||||
#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )
|
||||
#define mainMAM_TIM_3 ( ( unsigned char ) 0x03 )
|
||||
#define mainMAM_MODE_FULL ( ( unsigned char ) 0x02 )
|
||||
|
||||
/* Constants to setup the peripheral bus. */
|
||||
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
|
||||
#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 3 )
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
@@ -146,10 +157,10 @@
|
||||
error. */
|
||||
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
#define mainON_BOARD_LED_BIT ( ( unsigned portLONG ) 0x80 )
|
||||
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 0x80 )
|
||||
|
||||
/* Constants used by the vMemCheckTask() task. */
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )
|
||||
#define mainNO_TASK ( 0 )
|
||||
|
||||
/* The size of the memory blocks allocated by the vMemCheckTask() task. */
|
||||
@@ -169,7 +180,7 @@ void prvToggleOnBoardLED( void );
|
||||
* Checks that all the demo application tasks are still executing without error
|
||||
* - as described at the top of the file.
|
||||
*/
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount );
|
||||
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount );
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
@@ -212,7 +223,7 @@ int main( void )
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Now all the tasks have been started - start the scheduler.
|
||||
|
||||
@@ -231,7 +242,7 @@ int main( void )
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
unsigned portLONG ulMemCheckTaskRunningCount;
|
||||
unsigned long ulMemCheckTaskRunningCount;
|
||||
xTaskHandle xCreatedTask;
|
||||
|
||||
/* The parameters are not used in this function. */
|
||||
@@ -255,7 +266,7 @@ xTaskHandle xCreatedTask;
|
||||
ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE;
|
||||
xCreatedTask = mainNO_TASK;
|
||||
|
||||
if( xTaskCreate( vMemCheckTask, ( signed portCHAR * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
|
||||
if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
|
||||
{
|
||||
/* Could not create the task - we have probably run out of heap. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
@@ -334,7 +345,7 @@ static void prvSetupHardware( void )
|
||||
|
||||
void prvToggleOnBoardLED( void )
|
||||
{
|
||||
unsigned portLONG ulState;
|
||||
unsigned long ulState;
|
||||
|
||||
ulState = GPIO0_IOPIN;
|
||||
if( ulState & mainON_BOARD_LED_BIT )
|
||||
@@ -348,9 +359,9 @@ unsigned portLONG ulState;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
||||
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) pdPASS;
|
||||
long lReturn = ( long ) pdPASS;
|
||||
|
||||
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||
that they are all still running, and that none of them have detected
|
||||
@@ -358,44 +369,44 @@ portLONG lReturn = ( portLONG ) pdPASS;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )
|
||||
{
|
||||
/* The vMemCheckTask did not increment the counter - it must
|
||||
have failed. */
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
@@ -404,9 +415,9 @@ portLONG lReturn = ( portLONG ) pdPASS;
|
||||
|
||||
static void vMemCheckTask( void *pvParameters )
|
||||
{
|
||||
unsigned portLONG *pulMemCheckTaskRunningCounter;
|
||||
unsigned long *pulMemCheckTaskRunningCounter;
|
||||
void *pvMem1, *pvMem2, *pvMem3;
|
||||
static portLONG lErrorOccurred = pdFALSE;
|
||||
static long lErrorOccurred = pdFALSE;
|
||||
|
||||
/* This task is dynamically created then deleted during each cycle of the
|
||||
vErrorChecks task to check the operation of the memory allocator. Each time
|
||||
@@ -419,7 +430,7 @@ static portLONG lErrorOccurred = pdFALSE;
|
||||
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
|
||||
vErrorChecks() task that this task is still executing without error. */
|
||||
|
||||
pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;
|
||||
pulMemCheckTaskRunningCounter = ( unsigned long * ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -82,20 +93,20 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup and access the UART. */
|
||||
#define serDLAB ( ( unsigned portCHAR ) 0x80 )
|
||||
#define serENABLE_INTERRUPTS ( ( unsigned portCHAR ) 0x03 )
|
||||
#define serNO_PARITY ( ( unsigned portCHAR ) 0x00 )
|
||||
#define ser1_STOP_BIT ( ( unsigned portCHAR ) 0x00 )
|
||||
#define ser8_BIT_CHARS ( ( unsigned portCHAR ) 0x03 )
|
||||
#define serFIFO_ON ( ( unsigned portCHAR ) 0x01 )
|
||||
#define serCLEAR_FIFO ( ( unsigned portCHAR ) 0x06 )
|
||||
#define serWANTED_CLOCK_SCALING ( ( unsigned portLONG ) 16 )
|
||||
#define serDLAB ( ( unsigned char ) 0x80 )
|
||||
#define serENABLE_INTERRUPTS ( ( unsigned char ) 0x03 )
|
||||
#define serNO_PARITY ( ( unsigned char ) 0x00 )
|
||||
#define ser1_STOP_BIT ( ( unsigned char ) 0x00 )
|
||||
#define ser8_BIT_CHARS ( ( unsigned char ) 0x03 )
|
||||
#define serFIFO_ON ( ( unsigned char ) 0x01 )
|
||||
#define serCLEAR_FIFO ( ( unsigned char ) 0x06 )
|
||||
#define serWANTED_CLOCK_SCALING ( ( unsigned long ) 16 )
|
||||
|
||||
/* Constants to setup and access the VIC. */
|
||||
#define serUART0_VIC_CHANNEL ( ( unsigned portLONG ) 0x0006 )
|
||||
#define serUART0_VIC_CHANNEL_BIT ( ( unsigned portLONG ) 0x0040 )
|
||||
#define serUART0_VIC_ENABLE ( ( unsigned portLONG ) 0x0020 )
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
|
||||
#define serUART0_VIC_CHANNEL ( ( unsigned long ) 0x0006 )
|
||||
#define serUART0_VIC_CHANNEL_BIT ( ( unsigned long ) 0x0040 )
|
||||
#define serUART0_VIC_ENABLE ( ( unsigned long ) 0x0020 )
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
|
||||
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
#define serHANDLE ( ( xComPortHandle ) 1 )
|
||||
@@ -111,19 +122,19 @@ static xQueueHandle xCharsForTx;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Communication flag between the interrupt service routine and serial API. */
|
||||
static volatile portLONG *plTHREEmpty;
|
||||
static volatile long *plTHREEmpty;
|
||||
|
||||
/*
|
||||
* The queues are created in serialISR.c as they are used from the ISR.
|
||||
* Obtain references to the queues and THRE Empty flag.
|
||||
*/
|
||||
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag );
|
||||
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulDivisor, ulWantedClock;
|
||||
unsigned long ulDivisor, ulWantedClock;
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
extern void ( vUART_ISR_Wrapper )( void );
|
||||
|
||||
@@ -134,7 +145,7 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||
if(
|
||||
( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 0 )
|
||||
( ulWantedBaud != ( unsigned long ) 0 )
|
||||
)
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
@@ -147,9 +158,9 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||
UART0_LCR |= serDLAB;
|
||||
|
||||
/* Setup the divisor. */
|
||||
UART0_DLL = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
UART0_DLL = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
|
||||
ulDivisor >>= 8;
|
||||
UART0_DLM = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
UART0_DLM = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
|
||||
|
||||
/* Turn on the FIFO's and clear the buffers. */
|
||||
UART0_FCR = ( serFIFO_ON | serCLEAR_FIFO );
|
||||
@@ -160,7 +171,7 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||
/* Setup the VIC for the UART. */
|
||||
VICIntSelect &= ~( serUART0_VIC_CHANNEL_BIT );
|
||||
VICIntEnable |= serUART0_VIC_CHANNEL_BIT;
|
||||
VICVectAddr1 = ( portLONG ) vUART_ISR_Wrapper;
|
||||
VICVectAddr1 = ( long ) vUART_ISR_Wrapper;
|
||||
VICVectCntl1 = serUART0_VIC_CHANNEL | serUART0_VIC_ENABLE;
|
||||
|
||||
/* Enable UART0 interrupts. */
|
||||
@@ -177,7 +188,7 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
@@ -195,9 +206,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed portCHAR *pxNext;
|
||||
signed char *pxNext;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
@@ -207,7 +218,7 @@ signed portCHAR *pxNext;
|
||||
( void ) usStringLength;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed portCHAR * ) pcString;
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
@@ -216,7 +227,7 @@ signed portCHAR *pxNext;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
@@ -226,7 +237,7 @@ signed portBASE_TYPE xReturn;
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Is there space to write directly to the UART? */
|
||||
if( *plTHREEmpty == ( portLONG ) pdTRUE )
|
||||
if( *plTHREEmpty == ( long ) pdTRUE )
|
||||
{
|
||||
/* We wrote the character directly to the UART, so was
|
||||
successful. */
|
||||
@@ -245,7 +256,7 @@ signed portBASE_TYPE xReturn;
|
||||
were blocked waiting to post interrupts were not disabled. It is
|
||||
possible that the serial ISR has emptied the Tx queue, in which
|
||||
case we need to start the Tx off again. */
|
||||
if( ( *plTHREEmpty == ( portLONG ) pdTRUE ) && ( xReturn == pdPASS ) )
|
||||
if( ( *plTHREEmpty == ( long ) pdTRUE ) && ( xReturn == pdPASS ) )
|
||||
{
|
||||
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
|
||||
*plTHREEmpty = pdFALSE;
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
|
||||
@@ -64,20 +75,20 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constant to access the VIC. */
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
|
||||
|
||||
/* Constants to determine the ISR source. */
|
||||
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portCHAR ) 0x0f )
|
||||
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f )
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
static volatile portLONG lTHREEmpty;
|
||||
static volatile long lTHREEmpty;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -85,21 +96,21 @@ static volatile portLONG lTHREEmpty;
|
||||
* The queues are created in serialISR.c as they are used from the ISR.
|
||||
* Obtain references to the queues and THRE Empty flag.
|
||||
*/
|
||||
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag );
|
||||
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag );
|
||||
|
||||
/* UART0 interrupt service routine entry point. */
|
||||
void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
|
||||
|
||||
/* UART0 interrupt service routine handler. */
|
||||
void vUART_ISR_Handler( void );
|
||||
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars,
|
||||
xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag )
|
||||
xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag )
|
||||
{
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Pass back a reference to the queues so the serial API file can
|
||||
post/receive characters. */
|
||||
@@ -107,7 +118,7 @@ void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle
|
||||
*pxCharsForTx = xCharsForTx;
|
||||
|
||||
/* Initialise the THRE empty flag - and pass back a reference. */
|
||||
lTHREEmpty = ( portLONG ) pdTRUE;
|
||||
lTHREEmpty = ( long ) pdTRUE;
|
||||
*pplTHREEmptyFlag = &lTHREEmpty;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -119,7 +130,7 @@ void vUART_ISR_Wrapper( void )
|
||||
|
||||
/* Call the handler. This must be a separate function from the wrapper
|
||||
to ensure the correct stack frame is set up. */
|
||||
vUART_ISR_Handler();
|
||||
__asm volatile ("bl vUART_ISR_Handler");
|
||||
|
||||
/* Restore the context of whichever task is going to run next. */
|
||||
portRESTORE_CONTEXT();
|
||||
@@ -128,8 +139,8 @@ void vUART_ISR_Wrapper( void )
|
||||
|
||||
void vUART_ISR_Handler( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( UART0_IIR & serINTERRUPT_SOURCE_MASK )
|
||||
@@ -140,7 +151,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
|
||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||
character in the Tx queue, send it now. */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
UART0_THR = cChar;
|
||||
}
|
||||
@@ -157,17 +168,14 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
case serSOURCE_RX : /* A character was received. Place it in
|
||||
the queue of received characters. */
|
||||
cChar = UART0_RBR;
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, ( portBASE_TYPE ) pdFALSE ) )
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
break;
|
||||
|
||||
default : /* There is nothing to do, leave the ISR. */
|
||||
break;
|
||||
}
|
||||
|
||||
if( xTaskWokenByTx || xTaskWokenByRx )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -53,16 +64,18 @@
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 100 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
@@ -52,7 +63,7 @@
|
||||
#include "partest.h"
|
||||
|
||||
/* Board specific defines. */
|
||||
#define partstFIRST_IO ( ( unsigned portLONG ) 0x10000 )
|
||||
#define partstFIRST_IO ( ( unsigned long ) 0x10000 )
|
||||
#define partstNUM_LEDS ( 8 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -65,13 +76,13 @@ void vParTestInitialise( void )
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO;
|
||||
unsigned long ulLED = partstFIRST_IO;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 1. Only P16 to P23 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* Set or clear the output. */
|
||||
if( xValue )
|
||||
@@ -88,13 +99,13 @@ unsigned portLONG ulLED = partstFIRST_IO;
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
|
||||
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 1. Only P10 to P13 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* If this bit is already set, clear it, and visa versa. */
|
||||
ulCurrentState = IO1PIN;
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
|
||||
@@ -99,29 +110,29 @@
|
||||
#define mainCHECK_TASK_LED ( 7 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 4 )
|
||||
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
|
||||
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x0004 )
|
||||
#define mainTX_ENABLE ( ( unsigned long ) 0x0001 )
|
||||
#define mainRX_ENABLE ( ( unsigned long ) 0x0004 )
|
||||
|
||||
/* Constants to setup the PLL. */
|
||||
#define mainPLL_MUL_4 ( ( unsigned portCHAR ) 0x0003 )
|
||||
#define mainPLL_DIV_1 ( ( unsigned portCHAR ) 0x0000 )
|
||||
#define mainPLL_ENABLE ( ( unsigned portCHAR ) 0x0001 )
|
||||
#define mainPLL_CONNECT ( ( unsigned portCHAR ) 0x0003 )
|
||||
#define mainPLL_FEED_BYTE1 ( ( unsigned portCHAR ) 0xaa )
|
||||
#define mainPLL_FEED_BYTE2 ( ( unsigned portCHAR ) 0x55 )
|
||||
#define mainPLL_LOCK ( ( unsigned portLONG ) 0x0400 )
|
||||
#define mainPLL_MUL_5 ( ( unsigned char ) 0x0004 )
|
||||
#define mainPLL_DIV_1 ( ( unsigned char ) 0x0000 )
|
||||
#define mainPLL_ENABLE ( ( unsigned char ) 0x0001 )
|
||||
#define mainPLL_CONNECT ( ( unsigned char ) 0x0003 )
|
||||
#define mainPLL_FEED_BYTE1 ( ( unsigned char ) 0xaa )
|
||||
#define mainPLL_FEED_BYTE2 ( ( unsigned char ) 0x55 )
|
||||
#define mainPLL_LOCK ( ( unsigned long ) 0x0400 )
|
||||
|
||||
/* Constants to setup the MAM. */
|
||||
#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )
|
||||
#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )
|
||||
#define mainMAM_TIM_3 ( ( unsigned char ) 0x03 )
|
||||
#define mainMAM_MODE_FULL ( ( unsigned char ) 0x02 )
|
||||
|
||||
/* Constants to setup the peripheral bus. */
|
||||
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
|
||||
#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )
|
||||
|
||||
/* And finally, constant to setup the port for the LED's. */
|
||||
#define mainLED_TO_OUTPUT ( ( unsigned portLONG ) 0xff0000 )
|
||||
#define mainLED_TO_OUTPUT ( ( unsigned long ) 0xff0000 )
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
@@ -139,7 +150,7 @@ static void prvSetupHardware( void );
|
||||
* Checks that all the demo application tasks are still executing without error
|
||||
* - as described at the top of the file.
|
||||
*/
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void );
|
||||
static long prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -181,8 +192,8 @@ void main( void )
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL to multiply the XTAL input by 4. */
|
||||
PLLCFG = ( mainPLL_MUL_4 | mainPLL_DIV_1 );
|
||||
/* Setup the PLL to multiply the XTAL input by 5. */
|
||||
PLLCFG = ( mainPLL_MUL_5 | mainPLL_DIV_1 );
|
||||
|
||||
/* Activate the PLL by turning it on then feeding the correct sequence of
|
||||
bytes. */
|
||||
@@ -205,7 +216,7 @@ static void prvSetupHardware( void )
|
||||
MAMCR = mainMAM_MODE_FULL;
|
||||
|
||||
/* Setup the peripheral bus to be the same as the PLL output. */
|
||||
VPBDIV = mainBUS_CLK_FULL;
|
||||
APBDIV = mainBUS_CLK_FULL;
|
||||
|
||||
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
|
||||
PINSEL0 |= mainTX_ENABLE;
|
||||
@@ -215,7 +226,7 @@ static void prvSetupHardware( void )
|
||||
IO1DIR = mainLED_TO_OUTPUT;
|
||||
|
||||
/* Setup the peripheral bus to be the same as the PLL output. */
|
||||
VPBDIV = mainBUS_CLK_FULL;
|
||||
APBDIV = mainBUS_CLK_FULL;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -249,9 +260,9 @@ portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void )
|
||||
static long prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) pdPASS;
|
||||
long lReturn = ( long ) pdPASS;
|
||||
|
||||
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||
that they are all still running, and that none of them have detected
|
||||
@@ -259,32 +270,32 @@ portLONG lReturn = ( portLONG ) pdPASS;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<fileVersion>2</fileVersion>
|
||||
<configuration>
|
||||
<name>Flash Debug</name>
|
||||
<toolchain>
|
||||
@@ -12,7 +12,7 @@
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>15</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -89,16 +89,12 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>5.11.0.50615</state>
|
||||
<state>5.40.0.51529</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadAttachToProgram</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoaders</name>
|
||||
<state>,,,,(default),</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UseFlashLoader</name>
|
||||
<state>1</state>
|
||||
@@ -111,6 +107,46 @@
|
||||
<name>OCBE8Slave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CDevice</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoadersV3</name>
|
||||
<state>$TOOLKIT_DIR$\config\flashloader\NXP\FlashNXPLPC256k.board</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck1</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath1</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck3</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath3</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OverrideDefFlashBoard</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -257,7 +293,7 @@
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>9</version>
|
||||
<version>10</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -370,13 +406,17 @@
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>LMIFTDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -395,13 +435,21 @@
|
||||
<name>CCLmiftdiLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<version>3</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -476,6 +524,14 @@
|
||||
<name>CCJTagUpdateBreakpoints</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -539,6 +595,19 @@
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>STLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
@@ -566,11 +635,11 @@
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -586,7 +655,11 @@
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -609,6 +682,10 @@
|
||||
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
<configuration>
|
||||
@@ -621,7 +698,7 @@
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>15</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
@@ -704,10 +781,6 @@
|
||||
<name>OCDownloadAttachToProgram</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoaders</name>
|
||||
<state>,,,,(default),</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UseFlashLoader</name>
|
||||
<state>1</state>
|
||||
@@ -720,6 +793,46 @@
|
||||
<name>OCBE8Slave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CDevice</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>FlashLoadersV3</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck1</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath1</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck2</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath2</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesSuppressCheck3</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCImagesPath3</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OverrideDefFlashBoard</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -866,7 +979,7 @@
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>9</version>
|
||||
<version>10</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
@@ -979,13 +1092,17 @@
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>LMIFTDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
@@ -1004,13 +1121,21 @@
|
||||
<name>CCLmiftdiLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCLmiFtdiInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<version>3</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
@@ -1085,6 +1210,14 @@
|
||||
<name>CCJTagUpdateBreakpoints</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorInterfaceCmdLine</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -1148,6 +1281,19 @@
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>STLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
@@ -1175,11 +1321,11 @@
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -1195,7 +1341,11 @@
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -1218,6 +1368,10 @@
|
||||
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<fileVersion>2</fileVersion>
|
||||
<configuration>
|
||||
<name>Flash Debug</name>
|
||||
<toolchain>
|
||||
@@ -12,7 +12,7 @@
|
||||
<name>General</name>
|
||||
<archiveVersion>3</archiveVersion>
|
||||
<data>
|
||||
<version>14</version>
|
||||
<version>17</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -29,7 +29,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>Variant</name>
|
||||
<version>7</version>
|
||||
<version>11</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -93,11 +93,6 @@
|
||||
<name>OGLastSavedByProductVersion</name>
|
||||
<state>5.11.0.50615</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralEnableMisra</name>
|
||||
<state>0</state>
|
||||
@@ -122,13 +117,31 @@
|
||||
<name>OGBufferedTerminalOutput</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenStdoutInterface</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraVer</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ICCARM</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>19</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -260,11 +273,6 @@
|
||||
<name>PreInclude</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraOverride</name>
|
||||
<state>0</state>
|
||||
@@ -310,6 +318,16 @@
|
||||
<name>CCOptLevelSlave</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -492,7 +510,7 @@
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OOCOutputFormat</name>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -538,7 +556,7 @@
|
||||
<name>ILINK</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data>
|
||||
<version>5</version>
|
||||
<version>8</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
@@ -681,10 +699,6 @@
|
||||
<name>IlinkProgramEntryLabel</name>
|
||||
<state>__iar_program_start</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkNXPLPCChecksum</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoFill</name>
|
||||
<state>0</state>
|
||||
@@ -744,6 +758,18 @@
|
||||
<name>IlinkBufferedTerminalOutput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkStdoutInterfaceSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcFullSize</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIElfToolPostProcess</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -783,7 +809,7 @@
|
||||
<name>General</name>
|
||||
<archiveVersion>3</archiveVersion>
|
||||
<data>
|
||||
<version>14</version>
|
||||
<version>17</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
@@ -800,7 +826,7 @@
|
||||
</option>
|
||||
<option>
|
||||
<name>Variant</name>
|
||||
<version>7</version>
|
||||
<version>11</version>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -864,11 +890,6 @@
|
||||
<name>OGLastSavedByProductVersion</name>
|
||||
<state>5.11.0.50615</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralEnableMisra</name>
|
||||
<state>0</state>
|
||||
@@ -893,13 +914,31 @@
|
||||
<name>OGBufferedTerminalOutput</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GenStdoutInterface</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraVer</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>GeneralMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ICCARM</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>19</version>
|
||||
<version>21</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
@@ -1031,11 +1070,6 @@
|
||||
<name>PreInclude</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraOverride</name>
|
||||
<state>0</state>
|
||||
@@ -1081,6 +1115,16 @@
|
||||
<name>CCOptLevelSlave</name>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules98</name>
|
||||
<version>0</version>
|
||||
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CompilerMisraRules04</name>
|
||||
<version>0</version>
|
||||
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
@@ -1263,7 +1307,7 @@
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>OOCOutputFormat</name>
|
||||
<version>1</version>
|
||||
<version>2</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
@@ -1309,7 +1353,7 @@
|
||||
<name>ILINK</name>
|
||||
<archiveVersion>0</archiveVersion>
|
||||
<data>
|
||||
<version>5</version>
|
||||
<version>8</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
@@ -1452,10 +1496,6 @@
|
||||
<name>IlinkProgramEntryLabel</name>
|
||||
<state>__iar_program_start</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkNXPLPCChecksum</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoFill</name>
|
||||
<state>0</state>
|
||||
@@ -1515,6 +1555,18 @@
|
||||
<name>IlinkBufferedTerminalOutput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkStdoutInterfaceSlave</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CrcFullSize</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>IlinkIElfToolPostProcess</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
|
||||
@@ -59,27 +70,27 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup and access the UART. */
|
||||
#define serDLAB ( ( unsigned portCHAR ) 0x80 )
|
||||
#define serENABLE_INTERRUPTS ( ( unsigned portCHAR ) 0x03 )
|
||||
#define serNO_PARITY ( ( unsigned portCHAR ) 0x00 )
|
||||
#define ser1_STOP_BIT ( ( unsigned portCHAR ) 0x00 )
|
||||
#define ser8_BIT_CHARS ( ( unsigned portCHAR ) 0x03 )
|
||||
#define serFIFO_ON ( ( unsigned portCHAR ) 0x01 )
|
||||
#define serCLEAR_FIFO ( ( unsigned portCHAR ) 0x06 )
|
||||
#define serWANTED_CLOCK_SCALING ( ( unsigned portLONG ) 16 )
|
||||
#define serDLAB ( ( unsigned char ) 0x80 )
|
||||
#define serENABLE_INTERRUPTS ( ( unsigned char ) 0x03 )
|
||||
#define serNO_PARITY ( ( unsigned char ) 0x00 )
|
||||
#define ser1_STOP_BIT ( ( unsigned char ) 0x00 )
|
||||
#define ser8_BIT_CHARS ( ( unsigned char ) 0x03 )
|
||||
#define serFIFO_ON ( ( unsigned char ) 0x01 )
|
||||
#define serCLEAR_FIFO ( ( unsigned char ) 0x06 )
|
||||
#define serWANTED_CLOCK_SCALING ( ( unsigned long ) 16 )
|
||||
|
||||
/* Constants to setup and access the VIC. */
|
||||
#define serU0VIC_CHANNEL ( ( unsigned portLONG ) 0x0006 )
|
||||
#define serU0VIC_CHANNEL_BIT ( ( unsigned portLONG ) 0x0040 )
|
||||
#define serU0VIC_ENABLE ( ( unsigned portLONG ) 0x0020 )
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
|
||||
#define serU0VIC_CHANNEL ( ( unsigned long ) 0x0006 )
|
||||
#define serU0VIC_CHANNEL_BIT ( ( unsigned long ) 0x0040 )
|
||||
#define serU0VIC_ENABLE ( ( unsigned long ) 0x0020 )
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
|
||||
|
||||
/* Constants to determine the ISR source. */
|
||||
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portCHAR ) 0x0f )
|
||||
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f )
|
||||
|
||||
/* Misc. */
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
@@ -92,7 +103,7 @@
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
static volatile portLONG lTHREEmpty = pdFALSE;
|
||||
static volatile long lTHREEmpty = pdFALSE;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -103,15 +114,15 @@ __arm void vSerialISR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulDivisor, ulWantedClock;
|
||||
unsigned long ulDivisor, ulWantedClock;
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
extern void ( vSerialISREntry) ( void );
|
||||
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Initialise the THRE empty flag. */
|
||||
lTHREEmpty = pdTRUE;
|
||||
@@ -119,7 +130,7 @@ extern void ( vSerialISREntry) ( void );
|
||||
if(
|
||||
( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 0 )
|
||||
( ulWantedBaud != ( unsigned long ) 0 )
|
||||
)
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
@@ -132,9 +143,9 @@ extern void ( vSerialISREntry) ( void );
|
||||
U0LCR |= serDLAB;
|
||||
|
||||
/* Setup the divisor. */
|
||||
U0DLL = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
U0DLL = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
|
||||
ulDivisor >>= 8;
|
||||
U0DLM = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
U0DLM = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
|
||||
|
||||
/* Turn on the FIFO's and clear the buffers. */
|
||||
U0FCR = ( serFIFO_ON | serCLEAR_FIFO );
|
||||
@@ -145,7 +156,7 @@ extern void ( vSerialISREntry) ( void );
|
||||
/* Setup the VIC for the UART. */
|
||||
VICIntSelect &= ~( serU0VIC_CHANNEL_BIT );
|
||||
VICIntEnable |= serU0VIC_CHANNEL_BIT;
|
||||
VICVectAddr1 = ( unsigned portLONG ) vSerialISREntry;
|
||||
VICVectAddr1 = ( unsigned long ) vSerialISREntry;
|
||||
VICVectCntl1 = serU0VIC_CHANNEL | serU0VIC_ENABLE;
|
||||
|
||||
/* Enable UART0 interrupts. */
|
||||
@@ -164,7 +175,7 @@ extern void ( vSerialISREntry) ( void );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
@@ -182,9 +193,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed portCHAR *pxNext;
|
||||
signed char *pxNext;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
@@ -194,7 +205,7 @@ signed portCHAR *pxNext;
|
||||
( void ) usStringLength;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed portCHAR * ) pcString;
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
@@ -203,7 +214,7 @@ signed portCHAR *pxNext;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
@@ -213,7 +224,7 @@ signed portBASE_TYPE xReturn;
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Is there space to write directly to the UART? */
|
||||
if( lTHREEmpty == ( portLONG ) pdTRUE )
|
||||
if( lTHREEmpty == ( long ) pdTRUE )
|
||||
{
|
||||
/* We wrote the character directly to the UART, so was
|
||||
successful. */
|
||||
@@ -233,7 +244,7 @@ signed portBASE_TYPE xReturn;
|
||||
were blocked waiting to post interrupts were not disabled. It is
|
||||
possible that the serial ISR has emptied the Tx queue, in which
|
||||
case we need to start the Tx off again. */
|
||||
if( lTHREEmpty == ( portLONG ) pdTRUE )
|
||||
if( lTHREEmpty == ( long ) pdTRUE )
|
||||
{
|
||||
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
|
||||
lTHREEmpty = pdFALSE;
|
||||
@@ -249,8 +260,8 @@ signed portBASE_TYPE xReturn;
|
||||
|
||||
__arm void vSerialISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( U0IIR & serINTERRUPT_SOURCE_MASK )
|
||||
@@ -261,7 +272,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
|
||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||
character in the Tx queue, send it now. */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
U0THR = cChar;
|
||||
}
|
||||
@@ -278,10 +289,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
case serSOURCE_RX : /* A character was received. Place it in
|
||||
the queue of received characters. */
|
||||
cChar = U0RBR;
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
break;
|
||||
|
||||
default : /* There is nothing to do, leave the ISR. */
|
||||
@@ -290,7 +298,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
|
||||
/* Exit the ISR. If a task was woken by either a character being received
|
||||
or transmitted then a context switch will occur. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByTx || xTaskWokenByRx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* Clear the ISR in the VIC. */
|
||||
VICVectAddr = serCLEAR_VIC_INTERRUPT;
|
||||
|
||||
@@ -37,10 +37,10 @@ Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[TraceHelper]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints]
|
||||
Count=0
|
||||
[TraceHelper]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
|
||||
|
||||
<Column0>191</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
<Column0>244</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Build><ColumnWidth0>18</ColumnWidth0><ColumnWidth1>1155</ColumnWidth1><ColumnWidth2>308</ColumnWidth2><ColumnWidth3>77</ColumnWidth3></Build>
|
||||
<Debug-Log/>
|
||||
@@ -28,7 +28,7 @@
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd0>
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-17425-14382</Identity>
|
||||
@@ -40,20 +40,20 @@
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-22109-27077</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-12074-10873</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory><Session/></Tab><Tab><Identity>TabID-18349-15872</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-30013-18825</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-22109-27077</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-12074-10873</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory><Session/></Tab><Tab><Identity>TabID-18349-15872</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-30013-18825</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\Demo\ARM7_LPC2129_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2129_IAR\main.c</Filename><XPos>0</XPos><YPos>57</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-01284348><key>iaridepm.enu1</key></Toolbar-01284348></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>605</Bottom><Right>265</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>190714</sizeVertCX><sizeVertCY>618126</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>333</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>335</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>341141</sizeHorzCY><sizeVertCX>55000</sizeVertCX><sizeVertCY>78411</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-00abae00><key>iaridepm.enu1</key></Toolbar-00abae00></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>605</Bottom><Right>318</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>190476</sizeVertCX><sizeVertCY>618126</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>333</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>335</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>341141</sizeHorzCY><sizeVertCX>54762</sizeVertCX><sizeVertCY>78411</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
|
||||
***************************************************************************
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <lpc21xx.h>
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 100 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14250 )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
|
||||
***************************************************************************
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "portable.h"
|
||||
#include "partest.h"
|
||||
|
||||
#define partstFIRST_IO ( ( unsigned portLONG ) 0x10000 )
|
||||
#define partstNUM_LEDS ( 8 )
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* This is performed from main() as the io bits are shared with other setup
|
||||
functions. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 0. Only P16 to P23 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
|
||||
/* Set or clear the output. */
|
||||
if( xValue )
|
||||
{
|
||||
IOSET1 = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
IOCLR1 = ulLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
|
||||
/* If this bit is already set, clear it, and visa versa. */
|
||||
ulCurrentState = IOPIN1;
|
||||
if( ulCurrentState & ulLED )
|
||||
{
|
||||
IOCLR1 = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
IOSET1 = ulLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,379 +0,0 @@
|
||||
/***********************************************************************/
|
||||
/* This file is part of the uVision/ARM development tools */
|
||||
/* Copyright KEIL ELEKTRONIK GmbH 2002-2004 */
|
||||
/***********************************************************************/
|
||||
/* */
|
||||
/* STARTUP.S: Startup file for Philips LPC2000 device series */
|
||||
/* */
|
||||
/***********************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
//*** <<< Use Configuration Wizard in Context Menu >>> ***
|
||||
*/
|
||||
|
||||
|
||||
// *** Startup Code (executed after Reset) ***
|
||||
|
||||
|
||||
// Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
|
||||
|
||||
Mode_USR EQU 0x10
|
||||
Mode_FIQ EQU 0x11
|
||||
Mode_IRQ EQU 0x12
|
||||
Mode_SVC EQU 0x13
|
||||
Mode_ABT EQU 0x17
|
||||
Mode_UND EQU 0x1B
|
||||
Mode_SYS EQU 0x1F
|
||||
|
||||
I_Bit EQU 0x80 /* when I bit is set, IRQ is disabled */
|
||||
F_Bit EQU 0x40 /* when F bit is set, FIQ is disabled */
|
||||
|
||||
|
||||
/*
|
||||
// <h> Stack Configuration (Stack Sizes in Bytes)
|
||||
// <o0> Undefined Mode <0x0-0xFFFFFFFF>
|
||||
// <o1> Supervisor Mode <0x0-0xFFFFFFFF>
|
||||
// <o2> Abort Mode <0x0-0xFFFFFFFF>
|
||||
// <o3> Fast Interrupt Mode <0x0-0xFFFFFFFF>
|
||||
// <o4> Interrupt Mode <0x0-0xFFFFFFFF>
|
||||
// <o5> User/System Mode <0x0-0xFFFFFFFF>
|
||||
// </h>
|
||||
*/
|
||||
UND_Stack_Size EQU 0x00000004
|
||||
SVC_Stack_Size EQU 0x00000100
|
||||
ABT_Stack_Size EQU 0x00000004
|
||||
FIQ_Stack_Size EQU 0x00000004
|
||||
IRQ_Stack_Size EQU 0x00000300
|
||||
USR_Stack_Size EQU 0x00000200
|
||||
|
||||
AREA STACK, DATA, READWRITE, ALIGN=2
|
||||
DS (USR_Stack_Size+3)&~3 ; Stack for User/System Mode
|
||||
DS (IRQ_Stack_Size+3)&~3 ; Stack for Interrupt Mode
|
||||
DS (FIQ_Stack_Size+3)&~3 ; Stack for Fast Interrupt Mode
|
||||
DS (ABT_Stack_Size+3)&~3 ; Stack for Abort Mode
|
||||
DS (SVC_Stack_Size+3)&~3 ; Stack for Supervisor Mode
|
||||
DS (UND_Stack_Size+3)&~3 ; Stack for Undefined Mode
|
||||
Top_Stack:
|
||||
|
||||
|
||||
// Phase Locked Loop (PLL) definitions
|
||||
PLL_BASE EQU 0xE01FC080 /* PLL Base Address */
|
||||
PLLCON_OFS EQU 0x00 /* PLL Control Offset*/
|
||||
PLLCFG_OFS EQU 0x04 /* PLL Configuration Offset */
|
||||
PLLSTAT_OFS EQU 0x08 /* PLL Status Offset */
|
||||
PLLFEED_OFS EQU 0x0C /* PLL Feed Offset */
|
||||
PLLCON_PLLE EQU (1<<0) /* PLL Enable */
|
||||
PLLCON_PLLC EQU (1<<1) /* PLL Connect */
|
||||
PLLCFG_MSEL EQU (0x1F<<0) /* PLL Multiplier */
|
||||
PLLCFG_PSEL EQU (0x03<<5) /* PLL Divider */
|
||||
PLLSTAT_PLOCK EQU (1<<10) /* PLL Lock Status */
|
||||
|
||||
/*
|
||||
// <e> PLL Setup
|
||||
// <i> Phase Locked Loop
|
||||
// <o1.0..4> MSEL: PLL Multiplier Selection
|
||||
// <1-32><#-1>
|
||||
// <i> M Value
|
||||
// <o1.5..6> PSEL: PLL Divider Selection
|
||||
// <0=> 1 <1=> 2 <2=> 4 <3=> 8
|
||||
// <i> P Value
|
||||
// </e>
|
||||
*/
|
||||
PLL_SETUP EQU 1
|
||||
PLLCFG_Val EQU 0x00000024
|
||||
|
||||
|
||||
// Memory Accelerator Module (MAM) definitions
|
||||
MAM_BASE EQU 0xE01FC000 /* MAM Base Address */
|
||||
MAMCR_OFS EQU 0x00 /* MAM Control Offset*/
|
||||
MAMTIM_OFS EQU 0x04 /* MAM Timing Offset */
|
||||
|
||||
/*
|
||||
// <e> MAM Setup
|
||||
// <i> Memory Accelerator Module
|
||||
// <o1.0..1> MAM Control
|
||||
// <0=> Disabled
|
||||
// <1=> Partially Enabled
|
||||
// <2=> Fully Enabled
|
||||
// <i> Mode
|
||||
// <o2.0..2> MAM Timing
|
||||
// <0=> Reserved <1=> 1 <2=> 2 <3=> 3
|
||||
// <4=> 4 <5=> 5 <6=> 6 <7=> 7
|
||||
// <i> Fetch Cycles
|
||||
// </e>
|
||||
*/
|
||||
MAM_SETUP EQU 1
|
||||
MAMCR_Val EQU 0x00000002
|
||||
MAMTIM_Val EQU 0x00000003
|
||||
|
||||
|
||||
// External Memory Controller (EMC) definitions
|
||||
EMC_BASE EQU 0xFFE00000 /* EMC Base Address */
|
||||
BCFG0_OFS EQU 0x00 /* BCFG0 Offset */
|
||||
BCFG1_OFS EQU 0x04 /* BCFG1 Offset */
|
||||
BCFG2_OFS EQU 0x08 /* BCFG2 Offset */
|
||||
BCFG3_OFS EQU 0x0C /* BCFG3 Offset */
|
||||
|
||||
/*
|
||||
// <e> External Memory Controller (EMC)
|
||||
*/
|
||||
EMC_SETUP EQU 0
|
||||
|
||||
/*
|
||||
// <e> Bank Configuration 0 (BCFG0)
|
||||
// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
// <o1.10> RBLE: Read Byte Lane Enable
|
||||
// <o1.26> WP: Write Protect
|
||||
// <o1.27> BM: Burst ROM
|
||||
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
// <2=> 32-bit <3=> Reserved
|
||||
// </e>
|
||||
*/
|
||||
BCFG0_SETUP EQU 0
|
||||
BCFG0_Val EQU 0x0000FBEF
|
||||
|
||||
/*
|
||||
// <e> Bank Configuration 1 (BCFG1)
|
||||
// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
// <o1.10> RBLE: Read Byte Lane Enable
|
||||
// <o1.26> WP: Write Protect
|
||||
// <o1.27> BM: Burst ROM
|
||||
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
// <2=> 32-bit <3=> Reserved
|
||||
// </e>
|
||||
*/
|
||||
BCFG1_SETUP EQU 0
|
||||
BCFG1_Val EQU 0x0000FBEF
|
||||
|
||||
/*
|
||||
// <e> Bank Configuration 0 (BCFG2)
|
||||
// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
// <o1.10> RBLE: Read Byte Lane Enable
|
||||
// <o1.26> WP: Write Protect
|
||||
// <o1.27> BM: Burst ROM
|
||||
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
// <2=> 32-bit <3=> Reserved
|
||||
// </e>
|
||||
*/
|
||||
BCFG2_SETUP EQU 0
|
||||
BCFG2_Val EQU 0x0000FBEF
|
||||
|
||||
/*
|
||||
// <e> Bank Configuration 3 (BCFG3)
|
||||
// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
// <o1.10> RBLE: Read Byte Lane Enable
|
||||
// <o1.26> WP: Write Protect
|
||||
// <o1.27> BM: Burst ROM
|
||||
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
// <2=> 32-bit <3=> Reserved
|
||||
// </e>
|
||||
*/
|
||||
BCFG3_SETUP EQU 0
|
||||
BCFG3_Val EQU 0x0000FBEF
|
||||
|
||||
/*
|
||||
// </e> End of EMC
|
||||
*/
|
||||
|
||||
|
||||
// External Memory Pins definitions
|
||||
PINSEL2 EQU 0xE002C014 /* PINSEL2 Address */
|
||||
PINSEL2_Val EQU 0x0E6149E4 /* CS0..3, OE, WE, BLS0..3,
|
||||
D0..31, A2..23, JTAG Pins */
|
||||
|
||||
|
||||
// Starupt Code must be linked first at Address at which it expects to run.
|
||||
|
||||
$IF (EXTERNAL_MODE)
|
||||
CODE_BASE EQU 0x80000000
|
||||
$ELSE
|
||||
CODE_BASE EQU 0x00000000
|
||||
$ENDIF
|
||||
|
||||
AREA STARTUPCODE, CODE, AT CODE_BASE // READONLY, ALIGN=4
|
||||
PUBLIC __startup
|
||||
|
||||
EXTERN CODE32 (?C?INIT)
|
||||
|
||||
__startup PROC CODE32
|
||||
|
||||
// Pre-defined interrupt handlers that may be directly
|
||||
// overwritten by C interrupt functions
|
||||
EXTERN CODE32 (Undef_Handler?A)
|
||||
EXTERN CODE32 (vPortYieldProcessor?A)
|
||||
EXTERN CODE32 (PAbt_Handler?A)
|
||||
EXTERN CODE32 (DAbt_Handler?A)
|
||||
EXTERN CODE32 (IRQ_Handler?A)
|
||||
EXTERN CODE32 (FIQ_Handler?A)
|
||||
|
||||
// Exception Vectors
|
||||
// Mapped to Address 0.
|
||||
// Absolute addressing mode must be used.
|
||||
|
||||
Vectors: LDR PC,Reset_Addr
|
||||
LDR PC,Undef_Addr
|
||||
LDR PC,SWI_Addr
|
||||
LDR PC,PAbt_Addr
|
||||
LDR PC,DAbt_Addr
|
||||
NOP /* Reserved Vector */
|
||||
; LDR PC,IRQ_Addr
|
||||
LDR PC,[PC, #-0x0FF0] /* Vector from VicVectAddr */
|
||||
LDR PC,FIQ_Addr
|
||||
|
||||
Reset_Addr: DD Reset_Handler
|
||||
Undef_Addr: DD Undef_Handler?A
|
||||
SWI_Addr: DD vPortYieldProcessor?A
|
||||
PAbt_Addr: DD PAbt_Handler?A
|
||||
DAbt_Addr: DD DAbt_Handler?A
|
||||
DD 0 /* Reserved Address */
|
||||
IRQ_Addr: DD IRQ_Handler?A
|
||||
FIQ_Addr: DD FIQ_Handler?A
|
||||
|
||||
|
||||
// Reset Handler
|
||||
|
||||
Reset_Handler:
|
||||
|
||||
|
||||
$IF (EXTERNAL_MODE)
|
||||
LDR R0, =PINSEL2
|
||||
LDR R1, =PINSEL2_Val
|
||||
STR R1, [R0]
|
||||
$ENDIF
|
||||
|
||||
|
||||
IF (EMC_SETUP != 0)
|
||||
LDR R0, =EMC_BASE
|
||||
|
||||
IF (BCFG0_SETUP != 0)
|
||||
LDR R1, =BCFG0_Val
|
||||
STR R1, [R0, #BCFG0_OFS]
|
||||
ENDIF
|
||||
|
||||
IF (BCFG1_SETUP != 0)
|
||||
LDR R1, =BCFG1_Val
|
||||
STR R1, [R0, #BCFG1_OFS]
|
||||
ENDIF
|
||||
|
||||
IF (BCFG2_SETUP != 0)
|
||||
LDR R1, =BCFG2_Val
|
||||
STR R1, [R0, #BCFG2_OFS]
|
||||
ENDIF
|
||||
|
||||
IF (BCFG3_SETUP != 0)
|
||||
LDR R1, =BCFG3_Val
|
||||
STR R1, [R0, #BCFG3_OFS]
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
|
||||
IF (PLL_SETUP != 0)
|
||||
LDR R0, =PLL_BASE
|
||||
MOV R1, #0xAA
|
||||
MOV R2, #0x55
|
||||
|
||||
// Configure and Enable PLL
|
||||
MOV R3, #PLLCFG_Val
|
||||
STR R3, [R0, #PLLCFG_OFS]
|
||||
MOV R3, #PLLCON_PLLE
|
||||
STR R3, [R0, #PLLCON_OFS]
|
||||
STR R1, [R0, #PLLFEED_OFS]
|
||||
STR R2, [R0, #PLLFEED_OFS]
|
||||
|
||||
// Wait until PLL Locked
|
||||
PLL_Loop: LDR R3, [R0, #PLLSTAT_OFS]
|
||||
ANDS R3, R3, #PLLSTAT_PLOCK
|
||||
BEQ PLL_Loop
|
||||
|
||||
// Switch to PLL Clock
|
||||
MOV R3, #(PLLCON_PLLE | PLLCON_PLLC)
|
||||
STR R3, [R0, #PLLCON_OFS]
|
||||
STR R1, [R0, #PLLFEED_OFS]
|
||||
STR R2, [R0, #PLLFEED_OFS]
|
||||
ENDIF
|
||||
|
||||
|
||||
IF (MAM_SETUP != 0)
|
||||
LDR R0, =MAM_BASE
|
||||
MOV R1, #MAMTIM_Val
|
||||
STR R1, [R0, #MAMTIM_OFS]
|
||||
MOV R1, #MAMCR_Val
|
||||
STR R1, [R0, #MAMCR_OFS]
|
||||
ENDIF
|
||||
|
||||
|
||||
// Memory Mapping (when Interrupt Vectors are in RAM)
|
||||
MEMMAP EQU 0xE01FC040 /* Memory Mapping Control */
|
||||
|
||||
$IF (RAM_INTVEC)
|
||||
LDR R0, =MEMMAP
|
||||
MOV R1, #2
|
||||
STR R1, [R0]
|
||||
$ENDIF
|
||||
|
||||
|
||||
// Setup Stack for each mode
|
||||
LDR R0, =Top_Stack
|
||||
|
||||
// Enter Undefined Instruction Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_UND|I_Bit|F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #UND_Stack_Size
|
||||
|
||||
// Enter Abort Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_ABT|I_Bit|F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #ABT_Stack_Size
|
||||
|
||||
// Enter FIQ Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_FIQ|I_Bit|F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #FIQ_Stack_Size
|
||||
|
||||
// Enter IRQ Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_IRQ|I_Bit|F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #IRQ_Stack_Size
|
||||
|
||||
// Enter Supervisor Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #SVC_Stack_Size
|
||||
|
||||
// Enter S Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_SYS
|
||||
MOV SP, R0
|
||||
|
||||
// Start in supervisor mode
|
||||
MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit
|
||||
|
||||
// Enter the C code
|
||||
LDR R0,=?C?INIT
|
||||
TST R0,#1 ; Bit-0 set: INIT is Thumb
|
||||
LDREQ LR,=exit?A ; ARM Mode
|
||||
LDRNE LR,=exit?T ; Thumb Mode
|
||||
BX R0
|
||||
ENDP
|
||||
|
||||
PUBLIC exit?A
|
||||
exit?A PROC CODE32
|
||||
B exit?A
|
||||
ENDP
|
||||
|
||||
PUBLIC exit?T
|
||||
exit?T PROC CODE16
|
||||
exit: B exit?T
|
||||
ENDP
|
||||
|
||||
|
||||
END
|
||||
@@ -1,58 +0,0 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
cExt (*.c)
|
||||
aExt (*.s*; *.src; *.a*)
|
||||
oExt (*.obj)
|
||||
lExt (*.lib)
|
||||
tExt (*.txt; *.h; *.inc)
|
||||
pExt (*.plm)
|
||||
CppX (*.cpp)
|
||||
DaveTm { 0,0,0,0,0,0,0,0 }
|
||||
|
||||
Target (FreeRTOS), 0x0005 // Tools: ''
|
||||
GRPOPT 1,(ARM_DEMO),1,0,0
|
||||
|
||||
OPTFFF 1,1,1,2,0,127,137,0,<.\main.c><main.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,228,255,255,255,27,0,0,0,27,0,0,0,41,4,0,0,102,2,0,0 }
|
||||
OPTFFF 1,2,2,0,0,0,0,0,<.\Startup.s><Startup.s>
|
||||
OPTFFF 1,3,1,0,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
|
||||
OPTFFF 1,4,1,0,0,0,0,0,<.\serial\serial.c><serial.c>
|
||||
OPTFFF 1,5,1,0,0,0,0,0,<.\serial\serialISR.c><serialISR.c>
|
||||
OPTFFF 1,6,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
|
||||
OPTFFF 1,7,1,0,0,0,0,0,<..\..\Source\queue.c><queue.c>
|
||||
OPTFFF 1,8,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
|
||||
OPTFFF 1,9,1,0,0,0,0,0,<..\..\Source\portable\Keil\ARM7\port.c><port.c>
|
||||
OPTFFF 1,10,1,0,0,0,0,0,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c>
|
||||
OPTFFF 1,11,1,0,0,0,0,0,<..\Common\Minimal\flash.c><flash.c>
|
||||
OPTFFF 1,12,1,16777216,0,0,0,0,<..\Common\Minimal\comtest.c><comtest.c>
|
||||
OPTFFF 1,13,1,0,0,0,0,0,<..\Common\Minimal\integer.c><integer.c>
|
||||
OPTFFF 1,14,1,0,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
|
||||
|
||||
|
||||
TARGOPT 1, (FreeRTOS)
|
||||
KACLK=12000000
|
||||
OPTTT 1,1,1,0
|
||||
OPTHX 0,65535,0,0,0
|
||||
OPTLX 120,65,8,<.\>
|
||||
OPTOX 16
|
||||
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
|
||||
OPTXL 1,1,1,1,1,1,1,0,0
|
||||
OPTFL 1,0,1
|
||||
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
|
||||
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\UM_LPC21XX_LPC22XX.PDF>
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(UL2ARM)(-U174073036 -O7 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
|
||||
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
|
||||
OPTMM 1,0,(0x40001800)
|
||||
OPTDF 0x1000080
|
||||
OPTLE <>
|
||||
OPTLC <>
|
||||
OPTLA 0,((Port1 & 0x10000) >> 16)(FF00FF000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
|
||||
OPTLA 1,((Port1 & 0x20000) >> 17)(FF0000000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
|
||||
OPTLA 2,((Port1 & 0x40000) >> 18)(008000000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
|
||||
OPTLA 3,((Port1 & 0x80000) >> 19)(0000FF000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
|
||||
EndOpt
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
Target (FreeRTOS), 0x0005 // Tools: ''
|
||||
|
||||
Group (ARM_DEMO)
|
||||
|
||||
File 1,1,<.\main.c><main.c> 0x4162D96A
|
||||
File 1,2,<.\Startup.s><Startup.s> 0x415AF382
|
||||
File 1,1,<.\ParTest\ParTest.c><ParTest.c> 0x415AF50E
|
||||
File 1,1,<.\serial\serial.c><serial.c> 0x4162D488
|
||||
File 1,1,<.\serial\serialISR.c><serialISR.c> 0x4162D404
|
||||
File 1,1,<..\..\Source\tasks.c><tasks.c> 0x4162D9E6
|
||||
File 1,1,<..\..\Source\queue.c><queue.c> 0x411B5F14
|
||||
File 1,1,<..\..\Source\list.c><list.c> 0x411B5F24
|
||||
File 1,1,<..\..\Source\portable\Keil\ARM7\port.c><port.c> 0x4162D434
|
||||
File 1,1,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c> 0x415A85E0
|
||||
File 1,1,<..\Common\Minimal\flash.c><flash.c> 0x411B5F8E
|
||||
File 1,1,<..\Common\Minimal\comtest.c><comtest.c> 0x413335E6
|
||||
File 1,1,<..\Common\Minimal\integer.c><integer.c> 0x415FB7EE
|
||||
File 1,1,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c> 0x0
|
||||
|
||||
|
||||
Options 1,0,0 // Target 'FreeRTOS'
|
||||
Device (LPC2129)
|
||||
Vendor (Philips)
|
||||
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
|
||||
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
|
||||
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
|
||||
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
|
||||
Rgf (LPC21xx.H)
|
||||
Mem ()
|
||||
C ()
|
||||
A ()
|
||||
RL ()
|
||||
OH ()
|
||||
DBC_IFX ()
|
||||
DBC_CMS ()
|
||||
DBC_AMS ()
|
||||
DBC_LMS ()
|
||||
UseEnv=0
|
||||
EnvBin (D:\DevTools\Keil\arm\ARM\BIN\)
|
||||
EnvInc ()
|
||||
EnvLib ()
|
||||
EnvReg (<28>Philips\)
|
||||
OrgReg (<28>Philips\)
|
||||
TgStat=16
|
||||
OutDir (.\)
|
||||
OutName (rtosdemo_ARM)
|
||||
GenApp=1
|
||||
GenLib=0
|
||||
GenHex=0
|
||||
Debug=1
|
||||
Browse=0
|
||||
LstDir (.\)
|
||||
HexSel=0
|
||||
MG32K=0
|
||||
TGMORE=0
|
||||
RunUsr 0 0 <>
|
||||
RunUsr 1 0 <>
|
||||
BrunUsr 0 0 <>
|
||||
BrunUsr 1 0 <>
|
||||
SVCSID <>
|
||||
KACPU (ARM7TDMI)
|
||||
TKAFL { 0,27,183,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KIROM { 1,0,0,0,0,0,0,4,0 }
|
||||
KIRAM { 0,0,0,0,64,0,64,0,0 }
|
||||
KXRAM { 0,0,0,0,0,0,0,0,0 }
|
||||
KAOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KCAFLG { 197,132,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KCAMSC (INTERWORK)
|
||||
KCADEF (KEIL_ARM7)
|
||||
KCAUDF ()
|
||||
KCAINC (..\Common\include\;..\..\Source\include\;..\..\Source\portable\Keil\ARM7\)
|
||||
KAAFLG { 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KAAMSC ()
|
||||
KAASET ()
|
||||
KAARST ()
|
||||
KAAINC ()
|
||||
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
IncBld=1
|
||||
AlwaysBuild=0
|
||||
GenAsm=0
|
||||
AsmAsm=0
|
||||
PublicsOnly=0
|
||||
StopCode=3
|
||||
CustArgs ()
|
||||
LibMods ()
|
||||
KLAFLG { 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KLAMSC ()
|
||||
KLADWN (25)
|
||||
KLACFI ()
|
||||
KLAASN ()
|
||||
KLARES ()
|
||||
KLACCL ()
|
||||
KLAUCL ()
|
||||
KLACSC ()
|
||||
KLAUCS ()
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
FLASH1 { 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
FLASH2 (BIN\UL2ARM.DLL)
|
||||
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
|
||||
FLASH4 ()
|
||||
EndOpt
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
cExt (*.c)
|
||||
aExt (*.s*; *.src; *.a*)
|
||||
oExt (*.obj)
|
||||
lExt (*.lib)
|
||||
tExt (*.txt; *.h; *.inc)
|
||||
pExt (*.plm)
|
||||
CppX (*.cpp)
|
||||
DaveTm { 0,0,0,0,0,0,0,0 }
|
||||
|
||||
Target (FreeRTOS), 0x0005 // Tools: ''
|
||||
GRPOPT 1,(THUMB_DEMO),1,0,0
|
||||
|
||||
OPTFFF 1,1,1,1,0,121,137,0,<.\main.c><main.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,228,255,255,255,0,0,0,0,0,0,0,0,14,4,0,0,75,2,0,0 }
|
||||
OPTFFF 1,2,2,0,0,0,0,0,<.\Startup.s><Startup.s>
|
||||
OPTFFF 1,3,1,1040187392,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
|
||||
OPTFFF 1,4,1,0,0,0,0,0,<.\serial\serial.c><serial.c>
|
||||
OPTFFF 1,5,1,0,0,0,0,0,<.\serial\serialISR.c><serialISR.c>
|
||||
OPTFFF 1,6,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
|
||||
OPTFFF 1,7,1,0,0,0,0,0,<..\..\Source\queue.c><queue.c>
|
||||
OPTFFF 1,8,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
|
||||
OPTFFF 1,9,1,553648128,0,0,0,0,<..\..\Source\portable\Keil\ARM7\port.c><port.c>
|
||||
OPTFFF 1,10,1,0,0,0,0,0,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c>
|
||||
OPTFFF 1,11,1,0,0,0,0,0,<..\Common\Minimal\BlockQ.c><BlockQ.c>
|
||||
OPTFFF 1,12,1,402653184,0,0,0,0,<..\Common\Minimal\semtest.c><semtest.c>
|
||||
OPTFFF 1,13,1,0,0,0,0,0,<..\Common\Minimal\PollQ.c><PollQ.c>
|
||||
OPTFFF 1,14,1,0,0,0,0,0,<..\Common\Minimal\flash.c><flash.c>
|
||||
OPTFFF 1,15,1,0,0,0,0,0,<..\Common\Minimal\comtest.c><comtest.c>
|
||||
OPTFFF 1,16,1,0,0,0,0,0,<..\Common\Minimal\integer.c><integer.c>
|
||||
OPTFFF 1,17,1,0,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
|
||||
OPTFFF 1,18,1,0,0,0,0,0,<..\Common\Minimal\dynamic.c><dynamic.c>
|
||||
|
||||
ExtF <..\..\SOURCE\PORTABLE\KEIL\ARM7\PORTMACRO.H> 127,127,0,{ 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,228,255,255,255,27,0,0,0,27,0,0,0,72,4,0,0,33,2,0,0 }
|
||||
|
||||
TARGOPT 1, (FreeRTOS)
|
||||
KACLK=12000000
|
||||
OPTTT 1,1,1,0
|
||||
OPTHX 0,65535,0,0,0
|
||||
OPTLX 120,65,8,<.\>
|
||||
OPTOX 16
|
||||
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
|
||||
OPTXL 1,1,1,1,1,1,1,0,0
|
||||
OPTFL 1,0,1
|
||||
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
|
||||
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\UM_LPC21XX_LPC22XX.PDF>
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(UL2ARM)(-U170927308 -O7 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
|
||||
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
|
||||
OPTMM 1,0,(0x40000840)
|
||||
OPTDF 0x1000086
|
||||
OPTLE <>
|
||||
OPTLC <>
|
||||
OPTLA 0,((Port1 & 0x10000) >> 16)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
|
||||
OPTLA 1,((Port1 & 0x20000) >> 17)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
|
||||
OPTLA 2,((Port1 & 0x40000) >> 18)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
|
||||
OPTLA 3,((Port1 & 0x80000) >> 19)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
|
||||
EndOpt
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
Target (FreeRTOS), 0x0005 // Tools: ''
|
||||
|
||||
Group (THUMB_DEMO)
|
||||
|
||||
File 1,1,<.\main.c><main.c> 0x4162D96A
|
||||
File 1,2,<.\Startup.s><Startup.s> 0x415AF382
|
||||
File 1,1,<.\ParTest\ParTest.c><ParTest.c> 0x415AF50E
|
||||
File 1,1,<.\serial\serial.c><serial.c> 0x4162D488
|
||||
File 1,1,<.\serial\serialISR.c><serialISR.c> 0x4162D404
|
||||
File 1,1,<..\..\Source\tasks.c><tasks.c> 0x4162D9E6
|
||||
File 1,1,<..\..\Source\queue.c><queue.c> 0x411B5F14
|
||||
File 1,1,<..\..\Source\list.c><list.c> 0x411B5F24
|
||||
File 1,1,<..\..\Source\portable\Keil\ARM7\port.c><port.c> 0x4162D434
|
||||
File 1,1,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c> 0x415A85E0
|
||||
File 1,1,<..\Common\Minimal\BlockQ.c><BlockQ.c> 0x411B5F8C
|
||||
File 1,1,<..\Common\Minimal\semtest.c><semtest.c> 0x411B5F8C
|
||||
File 1,1,<..\Common\Minimal\PollQ.c><PollQ.c> 0x411B5F8E
|
||||
File 1,1,<..\Common\Minimal\flash.c><flash.c> 0x411B5F8E
|
||||
File 1,1,<..\Common\Minimal\comtest.c><comtest.c> 0x413335E6
|
||||
File 1,1,<..\Common\Minimal\integer.c><integer.c> 0x415FB7EE
|
||||
File 1,1,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c> 0x0
|
||||
File 1,1,<..\Common\Minimal\dynamic.c><dynamic.c> 0x0
|
||||
|
||||
|
||||
Options 1,0,0 // Target 'FreeRTOS'
|
||||
Device (LPC2129)
|
||||
Vendor (Philips)
|
||||
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
|
||||
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
|
||||
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
|
||||
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
|
||||
Rgf (LPC21xx.H)
|
||||
Mem ()
|
||||
C ()
|
||||
A ()
|
||||
RL ()
|
||||
OH ()
|
||||
DBC_IFX ()
|
||||
DBC_CMS ()
|
||||
DBC_AMS ()
|
||||
DBC_LMS ()
|
||||
UseEnv=0
|
||||
EnvBin (D:\DevTools\Keil\arm\ARM\BIN\)
|
||||
EnvInc ()
|
||||
EnvLib ()
|
||||
EnvReg (<28>Philips\)
|
||||
OrgReg (<28>Philips\)
|
||||
TgStat=16
|
||||
OutDir (.\)
|
||||
OutName (rtosdemo_THUMB)
|
||||
GenApp=1
|
||||
GenLib=0
|
||||
GenHex=0
|
||||
Debug=1
|
||||
Browse=0
|
||||
LstDir (.\)
|
||||
HexSel=0
|
||||
MG32K=0
|
||||
TGMORE=0
|
||||
RunUsr 0 0 <>
|
||||
RunUsr 1 0 <>
|
||||
BrunUsr 0 0 <>
|
||||
BrunUsr 1 0 <>
|
||||
SVCSID <>
|
||||
KACPU (ARM7TDMI)
|
||||
TKAFL { 0,27,183,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KIROM { 1,0,0,0,0,0,0,4,0 }
|
||||
KIRAM { 0,0,0,0,64,0,64,0,0 }
|
||||
KXRAM { 0,0,0,0,0,0,0,0,0 }
|
||||
KAOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KCAFLG { 197,156,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KCAMSC (INTERWORK)
|
||||
KCADEF (KEIL_ARM7 KEIL_THUMB_INTERWORK)
|
||||
KCAUDF ()
|
||||
KCAINC (..\Common\include\;..\..\Source\include\;..\..\Source\portable\Keil\ARM7\)
|
||||
KAAFLG { 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KAAMSC ()
|
||||
KAASET ()
|
||||
KAARST ()
|
||||
KAAINC ()
|
||||
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
IncBld=1
|
||||
AlwaysBuild=0
|
||||
GenAsm=0
|
||||
AsmAsm=0
|
||||
PublicsOnly=0
|
||||
StopCode=3
|
||||
CustArgs ()
|
||||
LibMods ()
|
||||
KLAFLG { 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
KLAMSC ()
|
||||
KLADWN (25)
|
||||
KLACFI ()
|
||||
KLAASN ()
|
||||
KLARES ()
|
||||
KLACCL ()
|
||||
KLAUCL ()
|
||||
KLACSC ()
|
||||
KLAUCS ()
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
FLASH1 { 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
FLASH2 (BIN\UL2ARM.DLL)
|
||||
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
|
||||
FLASH4 ()
|
||||
EndOpt
|
||||
|
||||
@@ -1,257 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
|
||||
***************************************************************************
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||
|
||||
This file contains all the serial port components that can be compiled to
|
||||
either ARM or THUMB mode. Components that must be compiled to ARM mode are
|
||||
contained in serialISR.c.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "serial.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup and access the UART. */
|
||||
#define serDLAB ( ( unsigned portCHAR ) 0x80 )
|
||||
#define serENABLE_INTERRUPTS ( ( unsigned portCHAR ) 0x03 )
|
||||
#define serNO_PARITY ( ( unsigned portCHAR ) 0x00 )
|
||||
#define ser1_STOP_BIT ( ( unsigned portCHAR ) 0x00 )
|
||||
#define ser8_BIT_CHARS ( ( unsigned portCHAR ) 0x03 )
|
||||
#define serFIFO_ON ( ( unsigned portCHAR ) 0x01 )
|
||||
#define serCLEAR_FIFO ( ( unsigned portCHAR ) 0x06 )
|
||||
#define serWANTED_CLOCK_SCALING ( ( unsigned portLONG ) 16 )
|
||||
|
||||
/* Constants to setup and access the VIC. */
|
||||
#define serU0VIC_CHANNEL ( ( unsigned portLONG ) 0x0006 )
|
||||
#define serU0VIC_CHANNEL_BIT ( ( unsigned portLONG ) 0x0040 )
|
||||
#define serU0VIC_ENABLE ( ( unsigned portLONG ) 0x0020 )
|
||||
|
||||
/* Misc. */
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
#define serHANDLE ( ( xComPortHandle ) 1 )
|
||||
#define serNO_BLOCK ( ( portTickType ) 0 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Communication flag between the interrupt service routine and serial API. */
|
||||
static volatile portLONG *plTHREEmpty;
|
||||
|
||||
/*
|
||||
* The queues are created in serialISR.c as they are used from the ISR.
|
||||
* Obtain references to the queues and THRE Empty flag.
|
||||
*/
|
||||
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulDivisor, ulWantedClock;
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
|
||||
/* The queues are used in the serial ISR routine, so are created from
|
||||
serialISR.c (which is always compiled to ARM mode). */
|
||||
vSerialISRCreateQueues( uxQueueLength, &xRxedChars, &xCharsForTx, &plTHREEmpty );
|
||||
|
||||
if(
|
||||
( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 0 )
|
||||
)
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* The reference to the ISR function is required to load into the
|
||||
interrupt controller. The prototype is slightly different
|
||||
depending on whether in ARM or THUMB mode. */
|
||||
#ifdef KEIL_THUMB_INTERWORK
|
||||
extern void ( vUART_ISR )( void ) __arm __task;
|
||||
#else
|
||||
extern void ( vUART_ISR )( void ) __task;
|
||||
#endif
|
||||
|
||||
/* Setup the baud rate: Calculate the divisor value. */
|
||||
ulWantedClock = ulWantedBaud * serWANTED_CLOCK_SCALING;
|
||||
ulDivisor = configCPU_CLOCK_HZ / ulWantedClock;
|
||||
|
||||
/* Set the DLAB bit so we can access the divisor. */
|
||||
U0LCR |= serDLAB;
|
||||
|
||||
/* Setup the divisor. */
|
||||
U0DLL = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
ulDivisor >>= 8;
|
||||
U0DLM = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
|
||||
/* Turn on the FIFO's and clear the buffers. */
|
||||
U0FCR = ( serFIFO_ON | serCLEAR_FIFO );
|
||||
|
||||
/* Setup transmission format. */
|
||||
U0LCR = serNO_PARITY | ser1_STOP_BIT | ser8_BIT_CHARS;
|
||||
|
||||
/* Setup the VIC for the UART. */
|
||||
VICIntSelect &= ~( serU0VIC_CHANNEL_BIT );
|
||||
VICIntEnable |= serU0VIC_CHANNEL_BIT;
|
||||
VICVectAddr1 = ( unsigned portLONG ) vUART_ISR;
|
||||
VICVectCntl1 = serU0VIC_CHANNEL | serU0VIC_ENABLE;
|
||||
|
||||
/* Enable UART0 interrupts. */
|
||||
U0IER |= serENABLE_INTERRUPTS;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = ( xComPortHandle ) 0;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Get the next character from the buffer. Return false if no characters
|
||||
are available, or arrive before xBlockTime expires. */
|
||||
if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
|
||||
{
|
||||
return pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return pdFALSE;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
|
||||
{
|
||||
signed portCHAR *pxNext;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
( void ) usStringLength;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed portCHAR * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
pxNext++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Is there space to write directly to the UART? */
|
||||
if( *plTHREEmpty == ( portLONG ) pdTRUE )
|
||||
{
|
||||
/* We wrote the character directly to the UART, so was
|
||||
successful. */
|
||||
*plTHREEmpty = pdFALSE;
|
||||
U0THR = cOutChar;
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We cannot write directly to the UART, so queue the character.
|
||||
Block for a maximum of xBlockTime if there is no space in the
|
||||
queue. It is ok to block within a critical section as each
|
||||
task has it's own critical section management. */
|
||||
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
|
||||
|
||||
/* Depending on queue sizing and task prioritisation: While we
|
||||
were blocked waiting to post interrupts were not disabled. It is
|
||||
possible that the serial ISR has emptied the Tx queue, in which
|
||||
case we need to start the Tx off again. */
|
||||
if( *plTHREEmpty == ( portLONG ) pdTRUE )
|
||||
{
|
||||
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
|
||||
*plTHREEmpty = pdFALSE;
|
||||
U0THR = cOutChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
|
||||
***************************************************************************
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||
|
||||
This file contains all the serial port components that must be compiled
|
||||
to ARM mode. The components that can be compiled to either ARM or THUMB
|
||||
mode are contained in serial.c.
|
||||
*/
|
||||
|
||||
/* This file must always be compiled to ARM mode as it contains ISR
|
||||
definitions. */
|
||||
#pragma ARM
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "serial.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constant to access the VIC. */
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
|
||||
|
||||
/* Constants to determine the ISR source. */
|
||||
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portCHAR ) 0x0f )
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
static volatile portLONG lTHREEmpty;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* UART0 interrupt service routine. This can cause a context switch so MUST
|
||||
be declared "naked". */
|
||||
void vUART_ISR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars,
|
||||
xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag )
|
||||
{
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
|
||||
/* Pass back a reference to the queues so the serial API file can
|
||||
post/receive characters. */
|
||||
*pxRxedChars = xRxedChars;
|
||||
*pxCharsForTx = xCharsForTx;
|
||||
|
||||
/* Initialise the THRE empty flag - and pass back a reference. */
|
||||
lTHREEmpty = pdTRUE;
|
||||
*pplTHREEmptyFlag = &lTHREEmpty;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR( void ) __task
|
||||
{
|
||||
portENTER_SWITCHING_ISR()
|
||||
|
||||
/* Now we can declare the local variables. */
|
||||
static signed portCHAR cChar;
|
||||
static portBASE_TYPE xTaskWokenByRx, xTaskWokenByTx;
|
||||
|
||||
xTaskWokenByTx = pdFALSE;
|
||||
xTaskWokenByRx = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( U0IIR & serINTERRUPT_SOURCE_MASK )
|
||||
{
|
||||
case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */
|
||||
cChar = U0LSR;
|
||||
break;
|
||||
|
||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||
character in the Tx queue, send it now. */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
{
|
||||
U0THR = cChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There are no further characters
|
||||
queued to send so we can indicate
|
||||
that the THRE is available. */
|
||||
lTHREEmpty = pdTRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case serSOURCE_RX_TIMEOUT :
|
||||
case serSOURCE_RX : /* A character was received. Place it in
|
||||
the queue of received characters. */
|
||||
cChar = U0RBR;
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
default : /* There is nothing to do, leave the ISR. */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Clear the ISR in the VIC. */
|
||||
VICVectAddr = serCLEAR_VIC_INTERRUPT;
|
||||
|
||||
/* Exit the ISR. If a task was woken by either a character being received
|
||||
or transmitted then a context switch will occur. */
|
||||
portEXIT_SWITCHING_ISR( ( xTaskWokenByTx || xTaskWokenByRx ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
103
Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h
Normal file
103
Demo/ARM7_LPC2129_Keil_RVDS/FreeRTOSConfig.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <lpc21xx.h>
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 13 * 1024 )
|
||||
#define configMAX_TASK_NAME_LEN ( 8 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
118
Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c
Normal file
118
Demo/ARM7_LPC2129_Keil_RVDS/ParTest/ParTest.c
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "portable.h"
|
||||
#include "partest.h"
|
||||
|
||||
#define partstFIRST_IO ( ( unsigned long ) 0x10000 )
|
||||
#define partstNUM_LEDS ( 8 )
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* This is performed from main() as the io bits are shared with other setup
|
||||
functions. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned long ulLED = partstFIRST_IO;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 0. Only P16 to P23 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* Set or clear the output. */
|
||||
if( xValue )
|
||||
{
|
||||
IOSET1 = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
IOCLR1 = ulLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* If this bit is already set, clear it, and visa versa. */
|
||||
ulCurrentState = IOPIN1;
|
||||
if( ulCurrentState & ulLED )
|
||||
{
|
||||
IOCLR1 = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
IOSET1 = ulLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
83
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.Opt
Normal file
83
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.Opt
Normal file
@@ -0,0 +1,83 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
cExt (*.c)
|
||||
aExt (*.s*; *.src; *.a*)
|
||||
oExt (*.obj)
|
||||
lExt (*.lib)
|
||||
tExt (*.txt; *.h; *.inc)
|
||||
pExt (*.plm)
|
||||
CppX (*.cpp)
|
||||
DaveTm { 0,0,0,0,0,0,0,0 }
|
||||
|
||||
Target (RTOSDemo_ARM), 0x0004 // Tools: 'ARM-ADS'
|
||||
Target (RTOSDemo_THUMB), 0x0004 // Tools: 'ARM-ADS'
|
||||
GRPOPT 1,(Other),1,0,0
|
||||
GRPOPT 2,(FreeRTOS),0,0,0
|
||||
GRPOPT 3,(Stadard Demo),0,0,0
|
||||
|
||||
OPTFFF 1,1,2,0,0,0,0,0,<.\Startup.s><Startup.s>
|
||||
OPTFFF 1,2,1,503316480,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
|
||||
OPTFFF 1,3,1,167772162,0,143,163,0,<.\main.c><main.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,66,0,0,0,66,0,0,0,135,4,0,0,33,2,0,0 }
|
||||
OPTFFF 1,4,1,0,0,0,0,0,<.\serial\serial.c><serial.c>
|
||||
OPTFFF 1,5,2,0,0,0,0,0,<.\serial\serialISR.s><serialISR.s>
|
||||
OPTFFF 2,6,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
|
||||
OPTFFF 2,7,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
|
||||
OPTFFF 2,8,1,754974720,0,0,0,0,<..\..\Source\queue.c><queue.c>
|
||||
OPTFFF 2,9,1,0,0,0,0,0,<..\..\Source\portable\RVDS\ARM7_LPC21xx\port.c><port.c>
|
||||
OPTFFF 2,10,1,520093696,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
|
||||
OPTFFF 2,11,2,301989888,0,0,0,0,<..\..\Source\portable\RVDS\ARM7_LPC21xx\portASM.s><portASM.s>
|
||||
OPTFFF 3,12,1,0,0,0,0,0,<..\Common\Minimal\flash.c><flash.c>
|
||||
OPTFFF 3,13,1,0,0,0,0,0,<..\Common\Minimal\comtest.c><comtest.c>
|
||||
OPTFFF 3,14,1,0,0,0,0,0,<..\Common\Minimal\BlockQ.c><BlockQ.c>
|
||||
OPTFFF 3,15,1,0,0,0,0,0,<..\Common\Minimal\dynamic.c><dynamic.c>
|
||||
OPTFFF 3,16,1,0,0,0,0,0,<..\Common\Minimal\PollQ.c><PollQ.c>
|
||||
OPTFFF 3,17,1,0,0,0,0,0,<..\Common\Minimal\semtest.c><semtest.c>
|
||||
|
||||
|
||||
TARGOPT 1, (RTOSDemo_ARM)
|
||||
ADSCLK=12000000
|
||||
OPTTT 1,1,1,0
|
||||
OPTHX 1,65535,0,0,0
|
||||
OPTLX 79,66,8,<.\>
|
||||
OPTOX 16
|
||||
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
|
||||
OPTXL 1,1,1,1,1,1,1,0,0
|
||||
OPTFL 1,0,0
|
||||
OPTAX 8
|
||||
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
|
||||
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\user_manual_LPC2119_2129_2194_2292_2294.PDF>
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=932,102,1307,529,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(UL2ARM)(-UU0605F6E -O47 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
|
||||
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
|
||||
OPTDF 0x86
|
||||
OPTLE <>
|
||||
OPTLC <>
|
||||
EndOpt
|
||||
|
||||
TARGOPT 2, (RTOSDemo_THUMB)
|
||||
ADSCLK=12000000
|
||||
OPTTT 1,1,1,0
|
||||
OPTHX 1,65535,0,0,0
|
||||
OPTLX 79,66,8,<.\>
|
||||
OPTOX 16
|
||||
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
|
||||
OPTXL 1,1,1,1,1,1,1,0,0
|
||||
OPTFL 1,0,1
|
||||
OPTAX 8
|
||||
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
|
||||
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\user_manual_LPC2119_2129_2194_2292_2294.PDF>
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(UL2ARM)(-UU0605F6E -O39 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO19 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
|
||||
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
|
||||
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
|
||||
OPTDF 0x82
|
||||
OPTLE <>
|
||||
OPTLC <>
|
||||
EndOpt
|
||||
|
||||
209
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.Uv2
Normal file
209
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.Uv2
Normal file
@@ -0,0 +1,209 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
Target (RTOSDemo_ARM), 0x0004 // Tools: 'ARM-ADS'
|
||||
Target (RTOSDemo_THUMB), 0x0004 // Tools: 'ARM-ADS'
|
||||
|
||||
Group (Other)
|
||||
Group (FreeRTOS)
|
||||
Group (Stadard Demo)
|
||||
|
||||
File 1,2,<.\Startup.s><Startup.s>
|
||||
File 1,1,<.\ParTest\ParTest.c><ParTest.c>
|
||||
File 1,1,<.\main.c><main.c>
|
||||
File 1,1,<.\serial\serial.c><serial.c>
|
||||
File 1,2,<.\serial\serialISR.s><serialISR.s>
|
||||
File 2,1,<..\..\Source\tasks.c><tasks.c>
|
||||
File 2,1,<..\..\Source\list.c><list.c>
|
||||
File 2,1,<..\..\Source\queue.c><queue.c>
|
||||
File 2,1,<..\..\Source\portable\RVDS\ARM7_LPC21xx\port.c><port.c>
|
||||
File 2,1,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
|
||||
File 2,2,<..\..\Source\portable\RVDS\ARM7_LPC21xx\portASM.s><portASM.s>
|
||||
File 3,1,<..\Common\Minimal\flash.c><flash.c>
|
||||
File 3,1,<..\Common\Minimal\comtest.c><comtest.c>
|
||||
File 3,1,<..\Common\Minimal\BlockQ.c><BlockQ.c>
|
||||
File 3,1,<..\Common\Minimal\dynamic.c><dynamic.c>
|
||||
File 3,1,<..\Common\Minimal\PollQ.c><PollQ.c>
|
||||
File 3,1,<..\Common\Minimal\semtest.c><semtest.c>
|
||||
|
||||
|
||||
Options 1,0,0 // Target 'RTOSDemo_ARM'
|
||||
Device (LPC2129)
|
||||
Vendor (NXP (founded by Philips))
|
||||
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
|
||||
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
|
||||
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
|
||||
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
|
||||
DevID (3648)
|
||||
Rgf (LPC21xx.H)
|
||||
Mem ()
|
||||
C ()
|
||||
A ()
|
||||
RL ()
|
||||
OH ()
|
||||
DBC_IFX ()
|
||||
DBC_CMS ()
|
||||
DBC_AMS ()
|
||||
DBC_LMS ()
|
||||
UseEnv=0
|
||||
EnvBin ()
|
||||
EnvInc ()
|
||||
EnvLib ()
|
||||
EnvReg (<28>Philips\)
|
||||
OrgReg (<28>Philips\)
|
||||
TgStat=16
|
||||
OutDir (.\)
|
||||
OutName (RTOSDemo)
|
||||
GenApp=1
|
||||
GenLib=0
|
||||
GenHex=0
|
||||
Debug=1
|
||||
Browse=1
|
||||
LstDir (.\)
|
||||
HexSel=1
|
||||
MG32K=0
|
||||
TGMORE=0
|
||||
RunUsr 0 0 <>
|
||||
RunUsr 1 0 <>
|
||||
BrunUsr 0 0 <>
|
||||
BrunUsr 1 0 <>
|
||||
CrunUsr 0 0 <>
|
||||
CrunUsr 1 0 <>
|
||||
SVCSID <>
|
||||
GLFLAGS=1790
|
||||
ADSFLGA { 243,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ACPUTYP (ARM7TDMI)
|
||||
RVDEV ()
|
||||
ADSTFLGA { 0,12,0,2,99,0,0,66,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
OCMADSOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
OCMADSIRAM { 0,0,0,0,64,0,64,0,0 }
|
||||
OCMADSIROM { 1,0,0,0,0,0,0,4,0 }
|
||||
OCMADSXRAM { 0,0,0,0,0,0,0,0,0 }
|
||||
OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,64,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
RV_STAVEC ()
|
||||
ADSCCFLG { 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSCMISC ()
|
||||
ADSCDEFN (ARM7_LPC21xx_KEIL_RVDS)
|
||||
ADSCUDEF ()
|
||||
ADSCINCD (.;..\..\Source\portable\RVDS\ARM7_LPC21xx;..\Common\include;..\..\Source\include)
|
||||
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSAMISC ()
|
||||
ADSADEFN ()
|
||||
ADSAUDEF ()
|
||||
ADSAINCD (..\..\Source\portable\RVDS\ARM7_LPC21xx)
|
||||
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
IncBld=1
|
||||
AlwaysBuild=0
|
||||
GenAsm=0
|
||||
AsmAsm=0
|
||||
PublicsOnly=0
|
||||
StopCode=3
|
||||
CustArgs ()
|
||||
LibMods ()
|
||||
ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSLDTA (0x00000000)
|
||||
ADSLDDA (0x40000000)
|
||||
ADSLDSC ()
|
||||
ADSLDIB ()
|
||||
ADSLDIC ()
|
||||
ADSLDMC ()
|
||||
ADSLDIF ()
|
||||
ADSLDDW ()
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
FLASH1 { 1,0,0,0,1,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0 }
|
||||
FLASH2 (BIN\UL2ARM.DLL)
|
||||
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
|
||||
FLASH4 ()
|
||||
EndOpt
|
||||
|
||||
Options 2,0,0 // Target 'RTOSDemo_THUMB'
|
||||
Device (LPC2129)
|
||||
Vendor (NXP (founded by Philips))
|
||||
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
|
||||
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
|
||||
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
|
||||
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
|
||||
DevID (3648)
|
||||
Rgf (LPC21xx.H)
|
||||
Mem ()
|
||||
C ()
|
||||
A ()
|
||||
RL ()
|
||||
OH ()
|
||||
DBC_IFX ()
|
||||
DBC_CMS ()
|
||||
DBC_AMS ()
|
||||
DBC_LMS ()
|
||||
UseEnv=0
|
||||
EnvBin ()
|
||||
EnvInc ()
|
||||
EnvLib ()
|
||||
EnvReg (<28>Philips\)
|
||||
OrgReg (<28>Philips\)
|
||||
TgStat=16
|
||||
OutDir (.\bin\)
|
||||
OutName (RTOSDemo)
|
||||
GenApp=1
|
||||
GenLib=0
|
||||
GenHex=1
|
||||
Debug=1
|
||||
Browse=1
|
||||
LstDir (.\)
|
||||
HexSel=1
|
||||
MG32K=0
|
||||
TGMORE=0
|
||||
RunUsr 0 0 <>
|
||||
RunUsr 1 0 <>
|
||||
BrunUsr 0 0 <>
|
||||
BrunUsr 1 0 <>
|
||||
CrunUsr 0 0 <>
|
||||
CrunUsr 1 0 <>
|
||||
SVCSID <>
|
||||
GLFLAGS=1790
|
||||
ADSFLGA { 243,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ACPUTYP (ARM7TDMI)
|
||||
RVDEV ()
|
||||
ADSTFLGA { 0,12,0,2,99,4,0,66,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
OCMADSOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
OCMADSIRAM { 0,0,0,0,64,0,64,0,0 }
|
||||
OCMADSIROM { 1,0,0,0,0,0,0,4,0 }
|
||||
OCMADSXRAM { 0,0,0,0,0,0,0,0,0 }
|
||||
OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,64,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
RV_STAVEC ()
|
||||
ADSCCFLG { 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSCMISC ()
|
||||
ADSCDEFN (ARM7_LPC21xx_KEIL_RVDS KEIL_THUMB_INTERWORK)
|
||||
ADSCUDEF ()
|
||||
ADSCINCD (.;..\..\Source\portable\RVDS\ARM7_LPC21xx;..\Common\include;..\..\Source\include)
|
||||
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSAMISC ()
|
||||
ADSADEFN ()
|
||||
ADSAUDEF ()
|
||||
ADSAINCD (..\..\Source\portable\RVDS\ARM7_LPC21xx)
|
||||
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
IncBld=1
|
||||
AlwaysBuild=0
|
||||
GenAsm=0
|
||||
AsmAsm=0
|
||||
PublicsOnly=0
|
||||
StopCode=3
|
||||
CustArgs ()
|
||||
LibMods ()
|
||||
ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSLDTA (0x00000000)
|
||||
ADSLDDA (0x40000000)
|
||||
ADSLDSC ()
|
||||
ADSLDIB ()
|
||||
ADSLDIC ()
|
||||
ADSLDMC ()
|
||||
ADSLDIF ()
|
||||
ADSLDDW ()
|
||||
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
|
||||
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
|
||||
FLASH1 { 1,0,0,0,1,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0 }
|
||||
FLASH2 (BIN\UL2ARM.DLL)
|
||||
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
|
||||
FLASH4 ()
|
||||
EndOpt
|
||||
|
||||
15
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.sct
Normal file
15
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.sct
Normal file
@@ -0,0 +1,15 @@
|
||||
; *************************************************************
|
||||
; *** Scatter-Loading Description File generated by uVision ***
|
||||
; *************************************************************
|
||||
|
||||
LR_IROM1 0x00000000 0x00040000 { ; load region size_region
|
||||
ER_IROM1 0x00000000 0x00040000 { ; load address = execution address
|
||||
*.o (RESET, +First)
|
||||
*(InRoot$$Sections)
|
||||
.ANY (+RO)
|
||||
}
|
||||
RW_IRAM1 0x40000000 0x00004000 { ; RW data
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
}
|
||||
|
||||
35
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.tra
Normal file
35
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo.tra
Normal file
@@ -0,0 +1,35 @@
|
||||
*** Creating Trace Output File 'RTOSDemo.tra' Ok.
|
||||
### Preparing for ADS-LD.
|
||||
### Creating ADS-LD Command Line
|
||||
### List of Objects: adding '"startup.o"'
|
||||
### List of Objects: adding '"partest.o"'
|
||||
### List of Objects: adding '"main.o"'
|
||||
### List of Objects: adding '"serial.o"'
|
||||
### List of Objects: adding '"serialisr.o"'
|
||||
### List of Objects: adding '"tasks.o"'
|
||||
### List of Objects: adding '"list.o"'
|
||||
### List of Objects: adding '"queue.o"'
|
||||
### List of Objects: adding '"port.o"'
|
||||
### List of Objects: adding '"heap_2.o"'
|
||||
### List of Objects: adding '".\portasm.o"'
|
||||
### List of Objects: adding '"flash.o"'
|
||||
### List of Objects: adding '"comtest.o"'
|
||||
### List of Objects: adding '"blockq.o"'
|
||||
### List of Objects: adding '"dynamic.o"'
|
||||
### List of Objects: adding '"pollq.o"'
|
||||
### List of Objects: adding '"semtest.o"'
|
||||
### ADS-LD Command completed:
|
||||
--device DARMP "startup.o" "partest.o" "main.o" "serial.o" "serialisr.o" "tasks.o" "list.o" "queue.o" "port.o" "heap_2.o" ".\portasm.o" "flash.o" "comtest.o" "blockq.o" "dynamic.o" "pollq.o" "semtest.o" --strict --scatter "RTOSDemo.sct"
|
||||
|
||||
--autoat --summary_stderr --info summarysizes --map --xref --callgraph --symbols
|
||||
|
||||
--info sizes --info totals --info unused --info veneers
|
||||
|
||||
--list ".\RTOSDemo.map" -o "RTOSDemo.axf"### Preparing Environment (PrepEnvAds)
|
||||
### ADS-LD Output File: 'RTOSDemo.axf'
|
||||
### ADS-LD Command File: 'RTOSDemo.lnp'
|
||||
### Checking for dirty Components...
|
||||
### Creating CmdFile 'RTOSDemo.lnp', Handle=0x000002E0
|
||||
### Writing '.lnp' file
|
||||
### ADS-LD Command file 'RTOSDemo.lnp' is ready.
|
||||
### ADS-LD: About to start ADS-LD Thread.
|
||||
2
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo_Target 1.dep
Normal file
2
Demo/ARM7_LPC2129_Keil_RVDS/RTOSDemo_Target 1.dep
Normal file
@@ -0,0 +1,2 @@
|
||||
Dependencies for Project 'RTOSDemo', Target 'Target 1': (DO NOT MODIFY !)
|
||||
F (.\Startup.s)(0x47F4A5D0)(--device DARMP -g --apcs=interwork -I "C:\Devtools\Keil305_2\ARM\INC\Philips" --list "Startup.lst" --xref -o "Startup.o")
|
||||
429
Demo/ARM7_LPC2129_Keil_RVDS/Startup.s
Normal file
429
Demo/ARM7_LPC2129_Keil_RVDS/Startup.s
Normal file
@@ -0,0 +1,429 @@
|
||||
;/*****************************************************************************/
|
||||
;/* STARTUP.S: Startup file for Philips LPC2000 */
|
||||
;/*****************************************************************************/
|
||||
;/* <<< Use Configuration Wizard in Context Menu >>> */
|
||||
;/*****************************************************************************/
|
||||
;/* This file is part of the uVision/ARM development tools. */
|
||||
;/* Copyright (c) 2005-2007 Keil Software. All rights reserved. */
|
||||
;/* This software may only be used under the terms of a valid, current, */
|
||||
;/* end user licence from KEIL for a compatible version of KEIL software */
|
||||
;/* development tools. Nothing else gives you the right to use this software. */
|
||||
;/*****************************************************************************/
|
||||
|
||||
|
||||
;/*
|
||||
; * The STARTUP.S code is executed after CPU Reset. This file may be
|
||||
; * translated with the following SET symbols. In uVision these SET
|
||||
; * symbols are entered under Options - ASM - Define.
|
||||
; *
|
||||
; * REMAP: when set the startup code initializes the register MEMMAP
|
||||
; * which overwrites the settings of the CPU configuration pins. The
|
||||
; * startup and interrupt vectors are remapped from:
|
||||
; * 0x00000000 default setting (not remapped)
|
||||
; * 0x80000000 when EXTMEM_MODE is used
|
||||
; * 0x40000000 when RAM_MODE is used
|
||||
; *
|
||||
; * EXTMEM_MODE: when set the device is configured for code execution
|
||||
; * from external memory starting at address 0x80000000.
|
||||
; *
|
||||
; * RAM_MODE: when set the device is configured for code execution
|
||||
; * from on-chip RAM starting at address 0x40000000.
|
||||
; *
|
||||
; * EXTERNAL_MODE: when set the PIN2SEL values are written that enable
|
||||
; * the external BUS at startup.
|
||||
; */
|
||||
|
||||
|
||||
; Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
|
||||
|
||||
Mode_USR EQU 0x10
|
||||
Mode_FIQ EQU 0x11
|
||||
Mode_IRQ EQU 0x12
|
||||
Mode_SVC EQU 0x13
|
||||
Mode_ABT EQU 0x17
|
||||
Mode_UND EQU 0x1B
|
||||
Mode_SYS EQU 0x1F
|
||||
|
||||
I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
|
||||
F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled
|
||||
|
||||
|
||||
;// <h> Stack Configuration (Stack Sizes in Bytes)
|
||||
;// <o0> Undefined Mode <0x0-0xFFFFFFFF:8>
|
||||
;// <o1> Supervisor Mode <0x0-0xFFFFFFFF:8>
|
||||
;// <o2> Abort Mode <0x0-0xFFFFFFFF:8>
|
||||
;// <o3> Fast Interrupt Mode <0x0-0xFFFFFFFF:8>
|
||||
;// <o4> Interrupt Mode <0x0-0xFFFFFFFF:8>
|
||||
;// <o5> User/System Mode <0x0-0xFFFFFFFF:8>
|
||||
;// </h>
|
||||
|
||||
UND_Stack_Size EQU 0x00000008
|
||||
SVC_Stack_Size EQU 0x00000300
|
||||
ABT_Stack_Size EQU 0x00000008
|
||||
FIQ_Stack_Size EQU 0x00000008
|
||||
IRQ_Stack_Size EQU 0x00000300
|
||||
USR_Stack_Size EQU 0x00000008
|
||||
|
||||
Stack_Size EQU (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + \
|
||||
FIQ_Stack_Size + IRQ_Stack_Size + USR_Stack_Size )
|
||||
|
||||
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||
Stack_Mem SPACE Stack_Size
|
||||
|
||||
;__initial_sp SPACE ISR_Stack_Size
|
||||
|
||||
Stack_Top EQU Stack_Mem + Stack_Size
|
||||
|
||||
|
||||
;// <h> Heap Configuration
|
||||
;// <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF>
|
||||
;// </h>
|
||||
|
||||
Heap_Size EQU 0x00000000
|
||||
|
||||
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||
__heap_base
|
||||
Heap_Mem SPACE Heap_Size
|
||||
__heap_limit
|
||||
|
||||
|
||||
; VPBDIV definitions
|
||||
VPBDIV EQU 0xE01FC100 ; VPBDIV Address
|
||||
|
||||
;// <e> VPBDIV Setup
|
||||
;// <i> Peripheral Bus Clock Rate
|
||||
;// <o1.0..1> VPBDIV: VPB Clock
|
||||
;// <0=> VPB Clock = CPU Clock / 4
|
||||
;// <1=> VPB Clock = CPU Clock
|
||||
;// <2=> VPB Clock = CPU Clock / 2
|
||||
;// <o1.4..5> XCLKDIV: XCLK Pin
|
||||
;// <0=> XCLK Pin = CPU Clock / 4
|
||||
;// <1=> XCLK Pin = CPU Clock
|
||||
;// <2=> XCLK Pin = CPU Clock / 2
|
||||
;// </e>
|
||||
VPBDIV_SETUP EQU 0
|
||||
VPBDIV_Val EQU 0x00000000
|
||||
|
||||
|
||||
; Phase Locked Loop (PLL) definitions
|
||||
PLL_BASE EQU 0xE01FC080 ; PLL Base Address
|
||||
PLLCON_OFS EQU 0x00 ; PLL Control Offset
|
||||
PLLCFG_OFS EQU 0x04 ; PLL Configuration Offset
|
||||
PLLSTAT_OFS EQU 0x08 ; PLL Status Offset
|
||||
PLLFEED_OFS EQU 0x0C ; PLL Feed Offset
|
||||
PLLCON_PLLE EQU (1<<0) ; PLL Enable
|
||||
PLLCON_PLLC EQU (1<<1) ; PLL Connect
|
||||
PLLCFG_MSEL EQU (0x1F<<0) ; PLL Multiplier
|
||||
PLLCFG_PSEL EQU (0x03<<5) ; PLL Divider
|
||||
PLLSTAT_PLOCK EQU (1<<10) ; PLL Lock Status
|
||||
|
||||
;// <e> PLL Setup
|
||||
;// <o1.0..4> MSEL: PLL Multiplier Selection
|
||||
;// <1-32><#-1>
|
||||
;// <i> M Value
|
||||
;// <o1.5..6> PSEL: PLL Divider Selection
|
||||
;// <0=> 1 <1=> 2 <2=> 4 <3=> 8
|
||||
;// <i> P Value
|
||||
;// </e>
|
||||
PLL_SETUP EQU 1
|
||||
PLLCFG_Val EQU 0x00000024
|
||||
|
||||
|
||||
; Memory Accelerator Module (MAM) definitions
|
||||
MAM_BASE EQU 0xE01FC000 ; MAM Base Address
|
||||
MAMCR_OFS EQU 0x00 ; MAM Control Offset
|
||||
MAMTIM_OFS EQU 0x04 ; MAM Timing Offset
|
||||
|
||||
;// <e> MAM Setup
|
||||
;// <o1.0..1> MAM Control
|
||||
;// <0=> Disabled
|
||||
;// <1=> Partially Enabled
|
||||
;// <2=> Fully Enabled
|
||||
;// <i> Mode
|
||||
;// <o2.0..2> MAM Timing
|
||||
;// <0=> Reserved <1=> 1 <2=> 2 <3=> 3
|
||||
;// <4=> 4 <5=> 5 <6=> 6 <7=> 7
|
||||
;// <i> Fetch Cycles
|
||||
;// </e>
|
||||
MAM_SETUP EQU 1
|
||||
MAMCR_Val EQU 0x00000002
|
||||
MAMTIM_Val EQU 0x00000004
|
||||
|
||||
|
||||
; External Memory Controller (EMC) definitions
|
||||
EMC_BASE EQU 0xFFE00000 ; EMC Base Address
|
||||
BCFG0_OFS EQU 0x00 ; BCFG0 Offset
|
||||
BCFG1_OFS EQU 0x04 ; BCFG1 Offset
|
||||
BCFG2_OFS EQU 0x08 ; BCFG2 Offset
|
||||
BCFG3_OFS EQU 0x0C ; BCFG3 Offset
|
||||
|
||||
;// <e> External Memory Controller (EMC)
|
||||
EMC_SETUP EQU 0
|
||||
|
||||
;// <e> Bank Configuration 0 (BCFG0)
|
||||
;// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
;// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
;// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
;// <o1.10> RBLE: Read Byte Lane Enable
|
||||
;// <o1.26> WP: Write Protect
|
||||
;// <o1.27> BM: Burst ROM
|
||||
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
;// <2=> 32-bit <3=> Reserved
|
||||
;// </e>
|
||||
BCFG0_SETUP EQU 0
|
||||
BCFG0_Val EQU 0x0000FBEF
|
||||
|
||||
;// <e> Bank Configuration 1 (BCFG1)
|
||||
;// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
;// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
;// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
;// <o1.10> RBLE: Read Byte Lane Enable
|
||||
;// <o1.26> WP: Write Protect
|
||||
;// <o1.27> BM: Burst ROM
|
||||
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
;// <2=> 32-bit <3=> Reserved
|
||||
;// </e>
|
||||
BCFG1_SETUP EQU 0
|
||||
BCFG1_Val EQU 0x0000FBEF
|
||||
|
||||
;// <e> Bank Configuration 2 (BCFG2)
|
||||
;// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
;// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
;// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
;// <o1.10> RBLE: Read Byte Lane Enable
|
||||
;// <o1.26> WP: Write Protect
|
||||
;// <o1.27> BM: Burst ROM
|
||||
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
;// <2=> 32-bit <3=> Reserved
|
||||
;// </e>
|
||||
BCFG2_SETUP EQU 0
|
||||
BCFG2_Val EQU 0x0000FBEF
|
||||
|
||||
;// <e> Bank Configuration 3 (BCFG3)
|
||||
;// <o1.0..3> IDCY: Idle Cycles <0-15>
|
||||
;// <o1.5..9> WST1: Wait States 1 <0-31>
|
||||
;// <o1.11..15> WST2: Wait States 2 <0-31>
|
||||
;// <o1.10> RBLE: Read Byte Lane Enable
|
||||
;// <o1.26> WP: Write Protect
|
||||
;// <o1.27> BM: Burst ROM
|
||||
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
|
||||
;// <2=> 32-bit <3=> Reserved
|
||||
;// </e>
|
||||
BCFG3_SETUP EQU 0
|
||||
BCFG3_Val EQU 0x0000FBEF
|
||||
|
||||
;// </e> End of EMC
|
||||
|
||||
|
||||
; External Memory Pins definitions
|
||||
PINSEL2 EQU 0xE002C014 ; PINSEL2 Address
|
||||
PINSEL2_Val EQU 0x0E6149E4 ; CS0..3, OE, WE, BLS0..3,
|
||||
; D0..31, A2..23, JTAG Pins
|
||||
|
||||
|
||||
PRESERVE8
|
||||
|
||||
|
||||
; Area Definition and Entry Point
|
||||
; Startup Code must be linked first at Address at which it expects to run.
|
||||
|
||||
AREA RESET, CODE, READONLY
|
||||
ARM
|
||||
|
||||
|
||||
; Exception Vectors
|
||||
; Mapped to Address 0.
|
||||
; Absolute addressing mode must be used.
|
||||
; Dummy Handlers are implemented as infinite loops which can be modified.
|
||||
IMPORT vPortYieldProcessor
|
||||
|
||||
Vectors LDR PC, Reset_Addr
|
||||
LDR PC, Undef_Addr
|
||||
LDR PC, SWI_Addr
|
||||
LDR PC, PAbt_Addr
|
||||
LDR PC, DAbt_Addr
|
||||
NOP ; Reserved Vector
|
||||
; LDR PC, IRQ_Addr
|
||||
LDR PC, [PC, #-0x0FF0] ; Vector from VicVectAddr
|
||||
LDR PC, FIQ_Addr
|
||||
|
||||
Reset_Addr DCD Reset_Handler
|
||||
Undef_Addr DCD Undef_Handler
|
||||
SWI_Addr DCD vPortYieldProcessor
|
||||
PAbt_Addr DCD PAbt_Handler
|
||||
DAbt_Addr DCD DAbt_Handler
|
||||
DCD 0 ; Reserved Address
|
||||
IRQ_Addr DCD IRQ_Handler
|
||||
FIQ_Addr DCD FIQ_Handler
|
||||
|
||||
Undef_Handler B Undef_Handler
|
||||
SWI_Handler B SWI_Handler
|
||||
PAbt_Handler B PAbt_Handler
|
||||
DAbt_Handler B DAbt_Handler
|
||||
IRQ_Handler B IRQ_Handler
|
||||
FIQ_Handler B FIQ_Handler
|
||||
|
||||
|
||||
; Reset Handler
|
||||
|
||||
EXPORT Reset_Handler
|
||||
Reset_Handler
|
||||
|
||||
|
||||
; Setup External Memory Pins
|
||||
IF :DEF:EXTERNAL_MODE
|
||||
LDR R0, =PINSEL2
|
||||
LDR R1, =PINSEL2_Val
|
||||
STR R1, [R0]
|
||||
ENDIF
|
||||
|
||||
|
||||
; Setup External Memory Controller
|
||||
IF EMC_SETUP <> 0
|
||||
LDR R0, =EMC_BASE
|
||||
|
||||
IF BCFG0_SETUP <> 0
|
||||
LDR R1, =BCFG0_Val
|
||||
STR R1, [R0, #BCFG0_OFS]
|
||||
ENDIF
|
||||
|
||||
IF BCFG1_SETUP <> 0
|
||||
LDR R1, =BCFG1_Val
|
||||
STR R1, [R0, #BCFG1_OFS]
|
||||
ENDIF
|
||||
|
||||
IF BCFG2_SETUP <> 0
|
||||
LDR R1, =BCFG2_Val
|
||||
STR R1, [R0, #BCFG2_OFS]
|
||||
ENDIF
|
||||
|
||||
IF BCFG3_SETUP <> 0
|
||||
LDR R1, =BCFG3_Val
|
||||
STR R1, [R0, #BCFG3_OFS]
|
||||
ENDIF
|
||||
|
||||
ENDIF ; EMC_SETUP
|
||||
|
||||
|
||||
; Setup VPBDIV
|
||||
IF VPBDIV_SETUP <> 0
|
||||
LDR R0, =VPBDIV
|
||||
LDR R1, =VPBDIV_Val
|
||||
STR R1, [R0]
|
||||
ENDIF
|
||||
|
||||
|
||||
; Setup PLL
|
||||
IF PLL_SETUP <> 0
|
||||
LDR R0, =PLL_BASE
|
||||
MOV R1, #0xAA
|
||||
MOV R2, #0x55
|
||||
|
||||
; Configure and Enable PLL
|
||||
MOV R3, #PLLCFG_Val
|
||||
STR R3, [R0, #PLLCFG_OFS]
|
||||
MOV R3, #PLLCON_PLLE
|
||||
STR R3, [R0, #PLLCON_OFS]
|
||||
STR R1, [R0, #PLLFEED_OFS]
|
||||
STR R2, [R0, #PLLFEED_OFS]
|
||||
|
||||
; Wait until PLL Locked
|
||||
PLL_Loop LDR R3, [R0, #PLLSTAT_OFS]
|
||||
ANDS R3, R3, #PLLSTAT_PLOCK
|
||||
BEQ PLL_Loop
|
||||
|
||||
; Switch to PLL Clock
|
||||
MOV R3, #(PLLCON_PLLE:OR:PLLCON_PLLC)
|
||||
STR R3, [R0, #PLLCON_OFS]
|
||||
STR R1, [R0, #PLLFEED_OFS]
|
||||
STR R2, [R0, #PLLFEED_OFS]
|
||||
ENDIF ; PLL_SETUP
|
||||
|
||||
|
||||
; Setup MAM
|
||||
IF MAM_SETUP <> 0
|
||||
LDR R0, =MAM_BASE
|
||||
MOV R1, #MAMTIM_Val
|
||||
STR R1, [R0, #MAMTIM_OFS]
|
||||
MOV R1, #MAMCR_Val
|
||||
STR R1, [R0, #MAMCR_OFS]
|
||||
ENDIF ; MAM_SETUP
|
||||
|
||||
|
||||
; Memory Mapping (when Interrupt Vectors are in RAM)
|
||||
MEMMAP EQU 0xE01FC040 ; Memory Mapping Control
|
||||
IF :DEF:REMAP
|
||||
LDR R0, =MEMMAP
|
||||
IF :DEF:EXTMEM_MODE
|
||||
MOV R1, #3
|
||||
ELIF :DEF:RAM_MODE
|
||||
MOV R1, #2
|
||||
ELSE
|
||||
MOV R1, #1
|
||||
ENDIF
|
||||
STR R1, [R0]
|
||||
ENDIF
|
||||
|
||||
|
||||
; Initialise Interrupt System
|
||||
; ...
|
||||
|
||||
|
||||
; Setup Stack for each mode
|
||||
|
||||
LDR R0, =Stack_Top
|
||||
|
||||
; Enter Undefined Instruction Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_UND:OR:I_Bit:OR:F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #UND_Stack_Size
|
||||
|
||||
; Enter Abort Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_ABT:OR:I_Bit:OR:F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #ABT_Stack_Size
|
||||
|
||||
; Enter FIQ Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_FIQ:OR:I_Bit:OR:F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #FIQ_Stack_Size
|
||||
|
||||
; Enter IRQ Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_IRQ:OR:I_Bit:OR:F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #IRQ_Stack_Size
|
||||
|
||||
; Enter Supervisor Mode and set its Stack Pointer
|
||||
MSR CPSR_c, #Mode_SVC:OR:I_Bit:OR:F_Bit
|
||||
MOV SP, R0
|
||||
SUB R0, R0, #SVC_Stack_Size
|
||||
|
||||
; Enter the C code
|
||||
|
||||
IMPORT __main
|
||||
LDR R0, =__main
|
||||
BX R0
|
||||
|
||||
|
||||
IF :DEF:__MICROLIB
|
||||
|
||||
EXPORT __heap_base
|
||||
EXPORT __heap_limit
|
||||
|
||||
ELSE
|
||||
; User Initial Stack & Heap
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
IMPORT __use_two_region_memory
|
||||
EXPORT __user_initial_stackheap
|
||||
__user_initial_stackheap
|
||||
|
||||
LDR R0, = Heap_Mem
|
||||
LDR R1, = (Stack_Mem + IRQ_Stack_Size + USR_Stack_Size)
|
||||
LDR R2, = (Heap_Mem + Heap_Size)
|
||||
LDR R3, = Stack_Mem
|
||||
BX LR
|
||||
ENDIF
|
||||
|
||||
|
||||
END
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -77,28 +88,18 @@
|
||||
/* Demo application includes. */
|
||||
#include "partest.h"
|
||||
#include "flash.h"
|
||||
#include "integer.h"
|
||||
#include "comtest2.h"
|
||||
#include "serial.h"
|
||||
|
||||
#ifdef KEIL_THUMB_INTERWORK
|
||||
/*
|
||||
THUMB mode allows more tasks to be created without the executable
|
||||
binary exceeding the limits allowed by the evaluation version of
|
||||
uVision3.
|
||||
*/
|
||||
#include "PollQ.h"
|
||||
#include "BlockQ.h"
|
||||
#include "semtest.h"
|
||||
#include "dynamic.h"
|
||||
|
||||
#endif
|
||||
#include "PollQ.h"
|
||||
#include "BlockQ.h"
|
||||
#include "semtest.h"
|
||||
#include "dynamic.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup I/O and processor. */
|
||||
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
|
||||
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x0004 )
|
||||
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x00010000 ) /* UART1. */
|
||||
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x00040000 ) /* UART1. */
|
||||
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
|
||||
#define mainLED_TO_OUTPUT ( ( unsigned portLONG ) 0xff0000 )
|
||||
|
||||
@@ -107,12 +108,12 @@
|
||||
#define mainCOM_TEST_LED ( 3 )
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
|
||||
/* Constants used by the "check" task. As described at the head of this file
|
||||
the check task toggles an LED. The rate at which the LED flashes is used to
|
||||
@@ -159,18 +160,12 @@ int main( void )
|
||||
prvSetupHardware();
|
||||
|
||||
/* Start the demo/test application tasks. */
|
||||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
|
||||
|
||||
#ifdef KEIL_THUMB_INTERWORK
|
||||
/* When using THUMB mode we can start more tasks without the executable
|
||||
exceeding the size limit imposed by the evaluation version of uVision3. */
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
#endif
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
|
||||
/* Start the check task - which is defined in this file. This is the task
|
||||
that periodically checks to see that all the other tasks are executing
|
||||
@@ -186,8 +181,9 @@ int main( void )
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should never reach here! */
|
||||
return 0;
|
||||
/* Should never reach here! If you do then there was not enough heap
|
||||
available for the idle task to be created. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -229,7 +225,7 @@ static void prvSetupHardware( void )
|
||||
/* Perform the hardware setup required. This is minimal as most of the
|
||||
setup is managed by the settings in the project file. */
|
||||
|
||||
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
|
||||
/* Configure the UART1 pins. All other pins remain at their default of 0. */
|
||||
PINSEL0 |= mainTX_ENABLE;
|
||||
PINSEL0 |= mainRX_ENABLE;
|
||||
|
||||
@@ -248,42 +244,30 @@ portLONG lReturn = pdPASS;
|
||||
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||
that they are all still running, and that none of them have detected
|
||||
an error. */
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdPASS )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdPASS )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
#ifdef KEIL_THUMB_INTERWORK
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
/* When using THUMB mode we can start more tasks without the executable
|
||||
exceeding the size limit imposed by the evaluation version of uVision3. */
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
#endif
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
332
Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c
Normal file
332
Demo/ARM7_LPC2129_Keil_RVDS/serial/serial.c
Normal file
@@ -0,0 +1,332 @@
|
||||
/*
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||
|
||||
Note this driver is used to test the FreeRTOS port. It is NOT intended to
|
||||
be an example of an efficient implementation!
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "serial.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup and access the UART. */
|
||||
#define serDLAB ( ( unsigned char ) 0x80 )
|
||||
#define serENABLE_INTERRUPTS ( ( unsigned char ) 0x03 )
|
||||
#define serNO_PARITY ( ( unsigned char ) 0x00 )
|
||||
#define ser1_STOP_BIT ( ( unsigned char ) 0x00 )
|
||||
#define ser8_BIT_CHARS ( ( unsigned char ) 0x03 )
|
||||
#define serFIFO_ON ( ( unsigned char ) 0x01 )
|
||||
#define serCLEAR_FIFO ( ( unsigned char ) 0x06 )
|
||||
#define serWANTED_CLOCK_SCALING ( ( unsigned long ) 16 )
|
||||
|
||||
/* Constants to setup and access the VIC. */
|
||||
#define serU1VIC_CHANNEL ( ( unsigned long ) 0x0007 )
|
||||
#define serU1VIC_CHANNEL_BIT ( ( unsigned long ) 0x0080 )
|
||||
#define serU1VIC_ENABLE ( ( unsigned long ) 0x0020 )
|
||||
|
||||
/* Misc. */
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
#define serHANDLE ( ( xComPortHandle ) 1 )
|
||||
#define serNO_BLOCK ( ( portTickType ) 0 )
|
||||
|
||||
/* Constant to access the VIC. */
|
||||
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
|
||||
|
||||
/* Constants to determine the ISR source. */
|
||||
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
|
||||
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
|
||||
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
|
||||
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
|
||||
#define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f )
|
||||
#define serINTERRUPT_IS_PENDING ( ( unsigned char ) 0x01 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The asm wrapper for the interrupt service routine.
|
||||
*/
|
||||
extern void vUART_ISREntry( void );
|
||||
|
||||
/*
|
||||
* The C function called from the asm wrapper.
|
||||
*/
|
||||
void vUART_ISRHandler( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
/* Communication flag between the interrupt service routine and serial API. */
|
||||
static volatile long lTHREEmpty;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned long ulDivisor, ulWantedClock;
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Initialise the THRE empty flag. */
|
||||
lTHREEmpty = pdTRUE;
|
||||
|
||||
if(
|
||||
( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned long ) 0 )
|
||||
)
|
||||
{
|
||||
portENTER_CRITICAL()
|
||||
{
|
||||
/* Setup the baud rate: Calculate the divisor value. */
|
||||
ulWantedClock = ulWantedBaud * serWANTED_CLOCK_SCALING;
|
||||
ulDivisor = configCPU_CLOCK_HZ / ulWantedClock;
|
||||
|
||||
/* Set the DLAB bit so we can access the divisor. */
|
||||
U1LCR |= serDLAB;
|
||||
|
||||
/* Setup the divisor. */
|
||||
U1DLL = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
|
||||
ulDivisor >>= 8;
|
||||
U1DLM = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
|
||||
|
||||
/* Turn on the FIFO's and clear the buffers. */
|
||||
U1FCR = ( serFIFO_ON | serCLEAR_FIFO );
|
||||
|
||||
/* Setup transmission format. */
|
||||
U1LCR = serNO_PARITY | ser1_STOP_BIT | ser8_BIT_CHARS;
|
||||
|
||||
/* Setup the VIC for the UART. */
|
||||
VICIntSelect &= ~( serU1VIC_CHANNEL_BIT );
|
||||
VICIntEnable |= serU1VIC_CHANNEL_BIT;
|
||||
VICVectAddr1 = ( unsigned long ) vUART_ISREntry;
|
||||
VICVectCntl1 = serU1VIC_CHANNEL | serU1VIC_ENABLE;
|
||||
|
||||
/* Enable UART0 interrupts. */
|
||||
U1IER |= serENABLE_INTERRUPTS;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = ( xComPortHandle ) 0;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Get the next character from the buffer. Return false if no characters
|
||||
are available, or arrive before xBlockTime expires. */
|
||||
if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
|
||||
{
|
||||
return pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return pdFALSE;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed char *pxNext;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
( void ) usStringLength;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
pxNext++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Is there space to write directly to the UART? */
|
||||
if( lTHREEmpty == ( long ) pdTRUE )
|
||||
{
|
||||
/* We wrote the character directly to the UART, so was
|
||||
successful. */
|
||||
lTHREEmpty = pdFALSE;
|
||||
U1THR = cOutChar;
|
||||
xReturn = pdPASS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We cannot write directly to the UART, so queue the character.
|
||||
Block for a maximum of xBlockTime if there is no space in the
|
||||
queue. It is ok to block within a critical section as each
|
||||
task has it's own critical section management. */
|
||||
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
|
||||
|
||||
/* Depending on queue sizing and task prioritisation: While we
|
||||
were blocked waiting to post interrupts were not disabled. It is
|
||||
possible that the serial ISR has emptied the Tx queue, in which
|
||||
case we need to start the Tx off again. */
|
||||
if( lTHREEmpty == ( long ) pdTRUE )
|
||||
{
|
||||
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
|
||||
lTHREEmpty = pdFALSE;
|
||||
U1THR = cOutChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISRHandler( void )
|
||||
{
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned char ucInterrupt;
|
||||
|
||||
ucInterrupt = U1IIR;
|
||||
|
||||
/* The interrupt pending bit is active low. */
|
||||
while( ( ucInterrupt & serINTERRUPT_IS_PENDING ) == 0 )
|
||||
{
|
||||
/* What caused the interrupt? */
|
||||
switch( ucInterrupt & serINTERRUPT_SOURCE_MASK )
|
||||
{
|
||||
case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */
|
||||
cChar = U1LSR;
|
||||
break;
|
||||
|
||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||
character in the Tx queue, send it now. */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
U1THR = cChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There are no further characters
|
||||
queued to send so we can indicate
|
||||
that the THRE is available. */
|
||||
lTHREEmpty = pdTRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case serSOURCE_RX_TIMEOUT :
|
||||
case serSOURCE_RX : /* A character was received. Place it in
|
||||
the queue of received characters. */
|
||||
cChar = U1RBR;
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
break;
|
||||
|
||||
default : /* There is nothing to do, leave the ISR. */
|
||||
break;
|
||||
}
|
||||
|
||||
ucInterrupt = U1IIR;
|
||||
}
|
||||
|
||||
/* Clear the ISR in the VIC. */
|
||||
VICVectAddr = serCLEAR_VIC_INTERRUPT;
|
||||
|
||||
/* Exit the ISR. If a task was woken by either a character being received
|
||||
or transmitted then a context switch will occur. */
|
||||
portEXIT_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
89
Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s
Normal file
89
Demo/ARM7_LPC2129_Keil_RVDS/serial/serialISR.s
Normal file
@@ -0,0 +1,89 @@
|
||||
;/*
|
||||
; FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
;
|
||||
;
|
||||
; ***************************************************************************
|
||||
; * *
|
||||
; * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
; * Complete, revised, and edited pdf reference manuals are also *
|
||||
; * available. *
|
||||
; * *
|
||||
; * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
; * ensuring you get running as quickly as possible and with an *
|
||||
; * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
; * the FreeRTOS project to continue with its mission of providing *
|
||||
; * professional grade, cross platform, de facto standard solutions *
|
||||
; * for microcontrollers - completely free of charge! *
|
||||
; * *
|
||||
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
; * *
|
||||
; * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
; * *
|
||||
; ***************************************************************************
|
||||
;
|
||||
;
|
||||
; This file is part of the FreeRTOS distribution.
|
||||
;
|
||||
; FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU General Public License (version 2) as published by the
|
||||
; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
; >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
; distribute a combined work that includes FreeRTOS without being obliged to
|
||||
; provide the source code for proprietary components outside of the FreeRTOS
|
||||
; kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
; more details. You should have received a copy of the GNU General Public
|
||||
; License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
; by writing to Richard Barry, contact details for whom are available on the
|
||||
; FreeRTOS WEB site.
|
||||
;
|
||||
; 1 tab == 4 spaces!
|
||||
;
|
||||
; http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
; contact details.
|
||||
;
|
||||
; http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
; critical systems.
|
||||
;
|
||||
; http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
; licensing and training services.
|
||||
;*/
|
||||
|
||||
INCLUDE portmacro.inc
|
||||
|
||||
;The UART interrupt entry point is defined within an assembly wrapper
|
||||
;within this file. This takes care of the task context saving before it
|
||||
;calls the main handler (vUART_ISRHandler()) which is written in C within
|
||||
;serial.c. The execution of the handler can unblock tasks that were blocked
|
||||
;waiting for UART events. Once the handler completes the asm wrapper
|
||||
;finishes off by restoring the context of whichever task is now selected to
|
||||
;enter the RUNNING state (which might now be a different task to that which
|
||||
;was originally interrupted.
|
||||
IMPORT vUART_ISRHandler
|
||||
EXPORT vUART_ISREntry
|
||||
|
||||
;/* Interrupt entry must always be in ARM mode. */
|
||||
ARM
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
|
||||
vUART_ISREntry
|
||||
|
||||
PRESERVE8
|
||||
|
||||
; Save the context of the interrupted task.
|
||||
portSAVE_CONTEXT
|
||||
|
||||
; Call the C handler function - defined within serial.c.
|
||||
LDR R0, =vUART_ISRHandler
|
||||
MOV LR, PC
|
||||
BX R0
|
||||
|
||||
; Finish off by restoring the context of the task that has been chosen to
|
||||
; run next - which might be a different task to that which was originally
|
||||
; interrupted.
|
||||
portRESTORE_CONTEXT
|
||||
|
||||
END
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -62,27 +73,31 @@
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
/* In this case configCPU_CLOCK_HZ is actually set to the pclk frequency, not
|
||||
the CPU frequency. */
|
||||
#define configCPU_CLOCK_HZ ( 58982400UL ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 15 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configCPU_CLOCK_HZ ( 58982400UL ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 15 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
|
||||
5599
Demo/ARM7_LPC2138_Rowley/LPC21xx.h
Normal file
5599
Demo/ARM7_LPC2138_Rowley/LPC21xx.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE CrossStudio_Project_File>
|
||||
<solution Name="RTOSDemo" version="1">
|
||||
<solution Name="RTOSDemo" version="2">
|
||||
<project Name="RTOSDemo">
|
||||
<configuration Name="Common" Target="LPC2138" arm_architecture="v4T" arm_core_type="ARM7TDMI-S" arm_simulator_memory_simulation_filename="$(StudioDir)/targets/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_simulator_memory_simulation_parameter="LPC21;0x80000;0x10000" arm_target_debug_interface_type="ARM7TDI" arm_target_loader_parameter="14745600" gcc_entry_point="reset_handler" link_include_startup_code="No" linker_additional_files="$(StudioDir)/lib/liblpc2000$(LibExt)$(LIB)" linker_memory_map_file="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC2138_MemoryMap.xml" oscillator_frequency="14.7456MHz" project_directory="" project_type="Executable" property_groups_file_path="$(StudioDir)/targets/Philips_LPC210X/propertyGroups.xml"/>
|
||||
<configuration Name="Common" Target="LPC2138" arm_architecture="v4T" arm_core_type="ARM7TDMI-S" arm_simulator_memory_simulation_filename="$(TargetsDir)/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_simulator_memory_simulation_parameter="LPC21;0x80000;0x10000" arm_target_debug_interface_type="ARM7TDI" arm_target_loader_parameter="14745600" c_only_additional_options="-Wall;-Wextra" gcc_entry_point="reset_handler" link_include_startup_code="No" linker_additional_files="$(PackagesDir)/lib/liblpc2000$(LibExt)$(LIB)" linker_memory_map_file="$(TargetsDir)/Philips_LPC210X/Philips_LPC2138_MemoryMap.xml" oscillator_frequency="14.7456MHz" project_directory="" project_type="Executable" property_groups_file_path="$(TargetsDir)/Philips_LPC210X/propertyGroups.xml"/>
|
||||
<configuration Name="RAM" Placement="RAM" linker_section_placement_file="$(StudioDir)/targets/sram_placement.xml" target_reset_script="SRAMReset()"/>
|
||||
<configuration Name="Flash" Placement="Flash" arm_target_flash_loader_file_path="$(StudioDir)/targets/Philips_LPC210X/Release/Loader.elf" arm_target_flash_loader_type="Comms Channel Loader" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()"/>
|
||||
<configuration Name="Flash" Placement="Flash" arm_target_flash_loader_file_path="$(TargetsDir)/Philips_LPC210X/Release/Loader.elf" arm_target_flash_loader_type="Comms Channel Loader" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()"/>
|
||||
<folder Name="Source Files">
|
||||
<configuration Name="Common" filter="c;cpp;cxx;cc;h;s;asm;inc"/>
|
||||
<folder Name="RTOS Source">
|
||||
@@ -35,13 +35,14 @@
|
||||
</folder>
|
||||
<folder Name="System Files">
|
||||
<file Name="crt0.s" file_name="$(StudioDir)/source/crt0.s"/>
|
||||
<file Name="Philips_LPC210X_Startup.s" file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Startup.s"/>
|
||||
<file Name="Philips_LPC210X_Target.js" file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Target.js">
|
||||
<file Name="Philips_LPC210X_Startup.s" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Startup.s"/>
|
||||
<file Name="Philips_LPC210X_Target.js" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Target.js">
|
||||
<configuration Name="Common" file_type="Reset Script"/>
|
||||
</file>
|
||||
</folder>
|
||||
<file Name="threads.js" file_name="threads.js"/>
|
||||
<configuration Name="THUMB Flash Debug" build_quietly="No"/>
|
||||
<configuration Name="THUMB Flash Debug" build_quietly="No" c_only_additional_options=""/>
|
||||
<configuration Name="Release" gcc_optimization_level="Level 3"/>
|
||||
</project>
|
||||
<configuration Name="ARM Flash Debug" inherited_configurations="ARM;Flash;Debug"/>
|
||||
<configuration Name="ARM" arm_instruction_set="ARM" arm_library_instruction_set="ARM" c_preprocessor_definitions="__ARM" hidden="Yes"/>
|
||||
|
||||
@@ -1,26 +1,7 @@
|
||||
<!DOCTYPE CrossStudio_for_ARM_Session_File>
|
||||
<session>
|
||||
<Autos>
|
||||
<Watches active="0" />
|
||||
</Autos>
|
||||
<Bookmarks/>
|
||||
<Breakpoints>
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="D_Abort" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="FIQ" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="IRQ" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="P_Abort" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="SWI" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="Undef" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="BusFault" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="ExceptionEntryReturnFault" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="HardFault" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="MemManage" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_CheckingError" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_Coprocessor" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_StateError" filename="" />
|
||||
</Breakpoints>
|
||||
<Breakpoints/>
|
||||
<ExecutionCountWindow/>
|
||||
<Memory1>
|
||||
<MemoryWindow autoEvaluate="0" addressText="0x102248" numColumns="8" sizeText="128" dataSize="1" radix="16" addressSpace="" />
|
||||
@@ -34,22 +15,14 @@
|
||||
<Memory4>
|
||||
<MemoryWindow autoEvaluate="0" addressText="" numColumns="8" sizeText="" dataSize="1" radix="16" addressSpace="" />
|
||||
</Memory4>
|
||||
<MemoryUsageWindow>
|
||||
<ProjectSessionItem path="RTOSDemo" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;Demo Source" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;RTOS Source" name="unnamed" />
|
||||
</MemoryUsageWindow>
|
||||
<Project>
|
||||
<ProjectSessionItem path="RTOSDemo" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;Demo Source" name="unnamed" />
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;RTOS Source" name="unnamed" />
|
||||
</Project>
|
||||
<Register1>
|
||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
<RegisterWindow openNodes="CPU - Current Mode;CPU - Current Mode/cpsr" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
</Register1>
|
||||
<Register2>
|
||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
@@ -60,42 +33,30 @@
|
||||
<Register4>
|
||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
</Register4>
|
||||
<SourceNavigatorWindow/>
|
||||
<TargetWindow programAction="" uploadFileType="" programLoadAddress="" programSize="" uploadFileName="" uploadMemoryInterface="" programFileName="" uploadStartAddress="" programFileType="" uploadSize="" programMemoryInterface="" />
|
||||
<TraceWindow>
|
||||
<Trace wrap="Yes" type="1" enabled="Yes" />
|
||||
<Trace enabled="Yes" />
|
||||
</TraceWindow>
|
||||
<Watch1>
|
||||
<Watches active="0" >
|
||||
<Watches active="1" update="Never" >
|
||||
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="pxCurrentTCB" expression="pxCurrentTCB" filename="" />
|
||||
</Watches>
|
||||
</Watch1>
|
||||
<Watch2>
|
||||
<Watches active="0" />
|
||||
<Watches active="0" update="Never" />
|
||||
</Watch2>
|
||||
<Watch3>
|
||||
<Watches active="0" />
|
||||
<Watches active="0" update="Never" />
|
||||
</Watch3>
|
||||
<Watch4>
|
||||
<Watches active="1" >
|
||||
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="16" name="pxMutex" expression="pxMutex" filename="" />
|
||||
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="pxCurrentTCB" expression="pxCurrentTCB" filename="" />
|
||||
<Watches active="0" update="Never" >
|
||||
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="(xQUEUE *)xMutex" expression="(xQUEUE *)xMutex" filename="" />
|
||||
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="pxCurrentTCB" expression="pxCurrentTCB" filename="" />
|
||||
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="16" name="pxMutex" expression="pxMutex" filename="" />
|
||||
</Watches>
|
||||
</Watch4>
|
||||
<Files>
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\main.c" y="156" path="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\main.c" left="0" selected="0" name="unnamed" top="151" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\recmutex.c" y="223" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\recmutex.c" left="0" selected="1" name="unnamed" top="219" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="31" debugPath="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\FreeRTOSConfig.h" y="60" path="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\FreeRTOSConfig.h" left="0" selected="0" name="unnamed" top="55" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\queue.c" y="336" path="C:\E\Dev\FreeRTOS\Source\queue.c" left="0" selected="0" name="unnamed" top="303" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="128" debugPath="C:\E\Dev\FreeRTOS\\Source\\include\semphr.h" y="156" path="C:\E\Dev\FreeRTOS\\Source\\include\semphr.h" left="0" selected="0" name="unnamed" top="137" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\tasks.c" y="1226" path="C:\E\Dev\FreeRTOS\Source\tasks.c" left="0" selected="0" name="unnamed" top="1199" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\blocktim.c" y="123" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\blocktim.c" left="0" selected="0" name="unnamed" top="94" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\port.c" y="237" path="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\port.c" left="0" selected="0" name="unnamed" top="218" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\portISR.c" y="223" path="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\portISR.c" left="0" selected="0" name="unnamed" top="190" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\integer.c" y="141" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\integer.c" left="0" selected="0" name="unnamed" top="118" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="20" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\dynamic.c" y="351" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\dynamic.c" left="0" selected="0" name="unnamed" top="342" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\semtest.c" y="193" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\semtest.c" left="0" selected="0" name="unnamed" top="173" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\list.c" y="163" path="C:\E\Dev\FreeRTOS\Source\list.c" left="0" selected="0" name="unnamed" top="130" />
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2138_Rowley\main.c" y="391" path="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2138_Rowley\main.c" left="0" selected="1" name="unnamed" top="42" />
|
||||
</Files>
|
||||
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="/USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\Common\Minimal" fileDialogDefaultFilter="*.cpp;*.cxx;*.cc;*.c;*.h;*.hpp;*.hxx" autoConnectCapabilities="1407" debugSearchPath="" buildConfiguration="THUMB Flash Debug" />
|
||||
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\Common\Minimal" fileDialogDefaultFilter="*.*" autoConnectCapabilities="388479" debugSearchPath="" buildConfiguration="ARM Flash Debug" />
|
||||
</session>
|
||||
|
||||
@@ -1,73 +1,84 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains a demo created to execute on the Rowley Associates
|
||||
* LPC2138 CrossFire development board.
|
||||
*
|
||||
* main() creates all the demo application tasks, then starts the scheduler.
|
||||
* The WEB documentation provides more details of the standard demo application
|
||||
* main() creates all the demo application tasks, then starts the scheduler.
|
||||
* The WEB documentation provides more details of the standard demo application
|
||||
* tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every few
|
||||
* seconds but has a high priority so is guaranteed to get processor time.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every few
|
||||
* seconds but has a high priority so is guaranteed to get processor time.
|
||||
* Its function is to check that all the other tasks are still operational.
|
||||
* Each standard demo task maintains a unique count that is incremented each
|
||||
* time the task successfully completes its function. Should any error occur
|
||||
* within such a task the count is permanently halted. The check task inspects
|
||||
* the count of each task to ensure it has changed since the last time the
|
||||
* check task executed. If all the count variables have changed all the tasks
|
||||
* Each standard demo task maintains a unique count that is incremented each
|
||||
* time the task successfully completes its function. Should any error occur
|
||||
* within such a task the count is permanently halted. The check task inspects
|
||||
* the count of each task to ensure it has changed since the last time the
|
||||
* check task executed. If all the count variables have changed all the tasks
|
||||
* are still executing error free, and the check task writes "PASS" to the
|
||||
* CrossStudio terminal IO window. Should any task contain an error at any time
|
||||
* CrossStudio terminal IO window. Should any task contain an error at any time
|
||||
* the error is latched and "FAIL" written to the terminal IO window.
|
||||
*
|
||||
* Finally, main() sets up an interrupt service routine and task to handle
|
||||
* pushes of the button that is built into the CrossFire board. When the button
|
||||
* is pushed the ISR wakes the button task - which generates a table of task
|
||||
* status information which is also displayed on the terminal IO window.
|
||||
* status information which is also displayed on the terminal IO window.
|
||||
*
|
||||
* A print task is defined to ensure exclusive and consistent access to the
|
||||
* A print task is defined to ensure exclusive and consistent access to the
|
||||
* terminal IO. This is the only task that is allowed to access the terminal.
|
||||
* The check and button task therefore do not access the terminal directly but
|
||||
* The check and button task therefore do not access the terminal directly but
|
||||
* instead pass a pointer to the message they wish to display to the print task.
|
||||
*/
|
||||
|
||||
@@ -76,7 +87,7 @@
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "Task.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "semphr.h"
|
||||
|
||||
@@ -88,9 +99,10 @@
|
||||
#include "PollQ.h"
|
||||
#include "blocktim.h"
|
||||
#include "recmutex.h"
|
||||
#include "semtest.h"
|
||||
|
||||
/* Hardware configuration definitions. */
|
||||
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
|
||||
#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )
|
||||
#define mainLED_BIT 0x80000000
|
||||
#define mainP0_14__EINT_1 ( 2 << 28 )
|
||||
#define mainEINT_1_EDGE_SENSITIVE 2
|
||||
@@ -122,7 +134,7 @@
|
||||
handler. */
|
||||
xSemaphoreHandle xButtonSemaphore;
|
||||
|
||||
/* The queue that is used to send message to vPrintTask for display in the
|
||||
/* The queue that is used to send message to vPrintTask for display in the
|
||||
terminal output window. */
|
||||
xQueueHandle xPrintQueue;
|
||||
|
||||
@@ -169,7 +181,7 @@ int main( void )
|
||||
VPBDIV = mainBUS_CLK_FULL;
|
||||
|
||||
/* Create the queue used to pass message to vPrintTask. */
|
||||
xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( portCHAR * ) );
|
||||
xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( char * ) );
|
||||
|
||||
/* Create the semaphore used to wake vButtonHandlerTask(). */
|
||||
vSemaphoreCreateBinary( xButtonSemaphore );
|
||||
@@ -184,7 +196,7 @@ int main( void )
|
||||
|
||||
#if configUSE_PREEMPTION == 1
|
||||
{
|
||||
/* The timing of console output when not using the preemptive
|
||||
/* The timing of console output when not using the preemptive
|
||||
scheduler causes the block time tests to detect a timing problem. */
|
||||
vCreateBlockTimeTasks();
|
||||
}
|
||||
@@ -193,10 +205,10 @@ int main( void )
|
||||
vStartRecursiveMutexTasks();
|
||||
|
||||
/* Start the tasks defined within this file. */
|
||||
xTaskCreate( vLEDTask, "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vPrintTask, "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vButtonHandlerTask, "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vLEDTask, ( signed char * ) "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vPrintTask, ( signed char * ) "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vButtonHandlerTask, ( signed char * ) "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
@@ -210,6 +222,9 @@ int main( void )
|
||||
|
||||
static void vLEDTask( void *pvParameters )
|
||||
{
|
||||
/* Just to remove compiler warnings. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Configure IO. */
|
||||
IO0DIR |= mainLED_BIT;
|
||||
IO0SET = mainLED_BIT;
|
||||
@@ -235,8 +250,11 @@ static void vCheckTask( void *pvParameters )
|
||||
{
|
||||
portBASE_TYPE xErrorOccurred = pdFALSE;
|
||||
portTickType xLastExecutionTime;
|
||||
const portCHAR * const pcPassMessage = "PASS\n";
|
||||
const portCHAR * const pcFailMessage = "FAIL\n";
|
||||
const char * const pcPassMessage = "PASS\n";
|
||||
const char * const pcFailMessage = "FAIL\n";
|
||||
|
||||
/* Just to remove compiler warnings. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
|
||||
works correctly. */
|
||||
@@ -253,22 +271,22 @@ const portCHAR * const pcFailMessage = "FAIL\n";
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorOccurred = pdTRUE;
|
||||
@@ -276,7 +294,7 @@ const portCHAR * const pcFailMessage = "FAIL\n";
|
||||
|
||||
#if configUSE_PREEMPTION == 1
|
||||
{
|
||||
/* The timing of console output when not using the preemptive
|
||||
/* The timing of console output when not using the preemptive
|
||||
scheduler causes the block time tests to detect a timing problem. */
|
||||
if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
@@ -307,7 +325,10 @@ const portCHAR * const pcFailMessage = "FAIL\n";
|
||||
|
||||
static void vPrintTask( void *pvParameters )
|
||||
{
|
||||
portCHAR *pcMessage;
|
||||
char *pcMessage;
|
||||
|
||||
/* Just to stop compiler warnings. */
|
||||
( void ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
@@ -324,23 +345,26 @@ portCHAR *pcMessage;
|
||||
|
||||
static void vButtonHandlerTask( void *pvParameters )
|
||||
{
|
||||
static portCHAR cListBuffer[ mainLIST_BUFFER_SIZE ];
|
||||
const portCHAR *pcList = &( cListBuffer[ 0 ] );
|
||||
const portCHAR * const pcHeader = "\nTask State Priority Stack #\n************************************************";
|
||||
static signed char cListBuffer[ mainLIST_BUFFER_SIZE ];
|
||||
const signed char *pcList = &( cListBuffer[ 0 ] );
|
||||
const char * const pcHeader = "\nTask State Priority Stack #\n************************************************";
|
||||
extern void (vButtonISRWrapper) ( void );
|
||||
|
||||
/* Just to stop compiler warnings. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Configure the interrupt. */
|
||||
portENTER_CRITICAL();
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Configure P0.14 to generate interrupts. */
|
||||
PINSEL0 |= mainP0_14__EINT_1;
|
||||
PINSEL0 |= mainP0_14__EINT_1;
|
||||
EXTMODE = mainEINT_1_EDGE_SENSITIVE;
|
||||
EXTPOLAR = mainEINT_1_FALLING_EDGE_SENSITIVE;
|
||||
|
||||
/* Setup the VIC for EINT 1. */
|
||||
VICIntSelect &= ~mainEINT_1_VIC_CHANNEL_BIT;
|
||||
VICIntEnable |= mainEINT_1_VIC_CHANNEL_BIT;
|
||||
VICVectAddr1 = ( portLONG ) vButtonISRWrapper;
|
||||
VICVectAddr1 = ( long ) vButtonISRWrapper;
|
||||
VICVectCntl1 = mainEINT_1_ENABLE_BIT | mainEINT_1_CHANNEL;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
@@ -366,6 +390,14 @@ extern void (vButtonISRWrapper) ( void );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
|
||||
{
|
||||
/* Check pcTaskName for the name of the offending task, or pxCurrentTCB
|
||||
if pcTaskName has itself been corrupted. */
|
||||
( void ) pxTask;
|
||||
( void ) pcTaskName;
|
||||
for( ;; );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
@@ -52,13 +63,16 @@
|
||||
* you are absolutely sure that no stack space is used.
|
||||
*/
|
||||
void vButtonISRWrapper( void ) __attribute__ ((naked));
|
||||
void vButtonHandler( void );
|
||||
void vButtonHandler( void ) __attribute__ ((noinline));
|
||||
|
||||
void vButtonHandler( void )
|
||||
{
|
||||
extern xSemaphoreHandle xButtonSemaphore;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
if( xSemaphoreGiveFromISR( xButtonSemaphore, pdFALSE ) )
|
||||
xSemaphoreGiveFromISR( xButtonSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* We have woken a task. Calling "yield from ISR" here will ensure
|
||||
the interrupt returns to the woken task if it has a priority higher
|
||||
@@ -78,7 +92,7 @@ void vButtonISRWrapper( void )
|
||||
|
||||
/* Call the handler to do the work. This must be a separate function to
|
||||
the wrapper to ensure the correct stack frame is set up. */
|
||||
vButtonHandler();
|
||||
__asm volatile( "bl vButtonHandler" );
|
||||
|
||||
/* Restore the context of whichever task is going to run once the interrupt
|
||||
completes. */
|
||||
|
||||
@@ -3,14 +3,8 @@ function decode_stack(sp)
|
||||
var i;
|
||||
var a = new Array();
|
||||
|
||||
var current_task;
|
||||
|
||||
current_task = Debug.evaluate("pxCurrentTCB");
|
||||
|
||||
if( current_task == 0 )
|
||||
return;
|
||||
|
||||
sp += 4; /* skip stored ulCriticalNesting */
|
||||
|
||||
a[16] = Debug.evaluate("*(unsigned long*)" + sp);
|
||||
|
||||
for (i = 0; i <= 15; i++)
|
||||
@@ -24,42 +18,44 @@ function decode_stack(sp)
|
||||
|
||||
function add_task(task, state)
|
||||
{
|
||||
var tcb, task_name;
|
||||
|
||||
var current_task;
|
||||
var tcb, task_name, current_task, regs;
|
||||
|
||||
current_task = Debug.evaluate("pxCurrentTCB");
|
||||
|
||||
if( current_task == 0 )
|
||||
return;
|
||||
|
||||
tcb = Debug.evaluate("*(tskTCB *)" + task);
|
||||
|
||||
task_name = Debug.evaluate("(char*)&(*(tskTCB *)" + task + ").pcTaskName[0]");
|
||||
Threads.add("#" + tcb.uxTCBNumber + " \"" + task_name + "\"", tcb.uxPriority, state, decode_stack(tcb.pxTopOfStack));
|
||||
task_name = "#" + tcb.uxTCBNumber + " \"" + task_name + "\"";
|
||||
|
||||
if (task == current_task)
|
||||
{
|
||||
state = "executing";
|
||||
regs = [];
|
||||
}
|
||||
else
|
||||
{
|
||||
regs = decode_stack(tcb.pxTopOfStack);
|
||||
}
|
||||
|
||||
Threads.add(task_name, tcb.uxPriority, state, regs);
|
||||
}
|
||||
|
||||
function add_list(list, state, current_task)
|
||||
function add_list(list, state)
|
||||
{
|
||||
var i, index, item, end;
|
||||
var current_task;
|
||||
var i, index, item, task;
|
||||
|
||||
current_task = Debug.evaluate("pxCurrentTCB");
|
||||
|
||||
if( current_task == 0 )
|
||||
return;
|
||||
|
||||
if (list.uxNumberOfItems)
|
||||
if (list && list.uxNumberOfItems>0)
|
||||
{
|
||||
index = list.pxIndex;
|
||||
end = list.xListEnd;
|
||||
index = list.xListEnd.pxNext;
|
||||
|
||||
for (i = 0; i < list.uxNumberOfItems; i++)
|
||||
{
|
||||
item = Debug.evaluate("*(xListItem *)" + index);
|
||||
if (index != end)
|
||||
{
|
||||
task = item.pvOwner;
|
||||
if (task) add_task(task, (task == current_task) ? "executing" : state);
|
||||
}
|
||||
|
||||
task = item ? item.pvOwner : 0;
|
||||
|
||||
if (task)
|
||||
add_task(task, state);
|
||||
|
||||
index = item.pxNext;
|
||||
}
|
||||
}
|
||||
@@ -67,52 +63,43 @@ function add_list(list, state, current_task)
|
||||
|
||||
function update()
|
||||
{
|
||||
var i, current_task, list, lists, max_priority;
|
||||
var i, list, lists, max_priority;
|
||||
|
||||
Threads.clear();
|
||||
|
||||
current_task = Debug.evaluate("pxCurrentTCB");
|
||||
|
||||
if( current_task == 0 )
|
||||
if( Debug.evaluate("pxCurrentTCB") == 0 )
|
||||
return;
|
||||
|
||||
Threads.newqueue("Ready");
|
||||
lists = Debug.evaluate("pxReadyTasksLists");
|
||||
if (lists)
|
||||
{
|
||||
max_priority = Debug.evaluate("uxTopUsedPriority");
|
||||
max_priority = Debug.evaluate("*(long *)" + max_priority);
|
||||
max_priority = Debug.evaluate("uxTopUsedPriority");
|
||||
|
||||
for (i = 0; i <= max_priority; i++)
|
||||
{
|
||||
list = Debug.evaluate("((xList*)" + lists + ")[" + (max_priority - i) + "]");
|
||||
add_list(list, "ready", current_task);
|
||||
}
|
||||
Threads.newqueue("Ready");
|
||||
for (i = max_priority; i >= 0; i--)
|
||||
{
|
||||
list = Debug.evaluate("pxReadyTasksLists[" + i + "]");
|
||||
add_list(list, "ready");
|
||||
}
|
||||
|
||||
Threads.newqueue("Blocked");
|
||||
|
||||
list = Debug.evaluate("pxDelayedTaskList");
|
||||
if (list)
|
||||
{
|
||||
list = Debug.evaluate("**(xList **)" + list);
|
||||
list = Debug.evaluate("*(xList *)" + list);
|
||||
add_list(list, "blocked");
|
||||
}
|
||||
|
||||
list = Debug.evaluate("pxOverflowDelayedTaskList");
|
||||
if (list)
|
||||
{
|
||||
list = Debug.evaluate("**(xList **)" + list);
|
||||
list = Debug.evaluate("*(xList *)" + list);
|
||||
add_list(list, "blocked");
|
||||
}
|
||||
|
||||
Threads.newqueue("Suspended");
|
||||
|
||||
list = Debug.evaluate("xSuspendedTaskList");
|
||||
if (list)
|
||||
{
|
||||
list = Debug.evaluate("*(xList *)" + list);
|
||||
add_list(list, "suspended");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,54 @@
|
||||
/*
|
||||
FreeRTOS V4.6.1 - Copyright (C) 2003-2005 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
and contact details. Please ensure to read the configuration and relevant
|
||||
port sections of the online documentation.
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -35,6 +56,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "lpc23xx.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
@@ -43,6 +65,8 @@
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/* Value to use on old rev '-' devices. */
|
||||
@@ -58,10 +82,10 @@
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 1
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 48000000 ) /* =12Mhz xtal multiplied by 5 using the PLL. */
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 ) /* =12Mhz xtal multiplied by 5 using the PLL. */
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 104 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 104 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 10 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "portlcd.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "Task.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Please note, on old MCB2300 board, the LCD_E bit is p1.30, on the new board
|
||||
it's p1.31, please check the schematic carefully, and change LCD_CTRL and LCD_E
|
||||
|
||||
@@ -1,32 +1,55 @@
|
||||
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#/*
|
||||
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
#
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
# * Complete, revised, and edited pdf reference manuals are also *
|
||||
# * available. *
|
||||
# * *
|
||||
# * Purchasing FreeRTOS documentation will not only help you, by *
|
||||
# * ensuring you get running as quickly as possible and with an *
|
||||
# * in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
# * the FreeRTOS project to continue with its mission of providing *
|
||||
# * professional grade, cross platform, de facto standard solutions *
|
||||
# * for microcontrollers - completely free of charge! *
|
||||
# * *
|
||||
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
# * *
|
||||
# * Thank you for using FreeRTOS, and thank you for your support! *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
#
|
||||
# FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This file is part of the FreeRTOS distribution.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with FreeRTOS.org; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License (version 2) as published by the
|
||||
# Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
# >>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
# distribute a combined work that includes FreeRTOS without being obliged to
|
||||
# provide the source code for proprietary components outside of the FreeRTOS
|
||||
# kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details. You should have received a copy of the GNU General Public
|
||||
# License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
# by writing to Richard Barry, contact details for whom are available on the
|
||||
# FreeRTOS WEB site.
|
||||
#
|
||||
# A special exception to the GPL can be applied should you wish to distribute
|
||||
# a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
# the source code for any proprietary components. See the licensing section
|
||||
# of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
# can be applied.
|
||||
# 1 tab == 4 spaces!
|
||||
#
|
||||
# ***************************************************************************
|
||||
# See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
# and contact details. Please ensure to read the configuration and relevant
|
||||
# port sections of the online documentation.
|
||||
# ***************************************************************************
|
||||
# http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
# contact details.
|
||||
#
|
||||
# http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
# critical systems.
|
||||
#
|
||||
# http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
# licensing and training services.
|
||||
#*/
|
||||
|
||||
|
||||
RTOS_SOURCE_DIR=../../../Source
|
||||
@@ -41,7 +64,7 @@ LDSCRIPT=lpc2368.ld
|
||||
LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
|
||||
|
||||
DEBUG=-g
|
||||
OPTIM=-O1
|
||||
OPTIM=-O0
|
||||
|
||||
|
||||
CFLAGS= $(DEBUG) \
|
||||
@@ -59,8 +82,10 @@ CFLAGS= $(DEBUG) \
|
||||
-D PACK_STRUCT_END=__attribute\(\(packed\)\) \
|
||||
-D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
|
||||
-fomit-frame-pointer \
|
||||
-mthumb-interwork
|
||||
|
||||
-mthumb-interwork \
|
||||
-fno-dwarf2-cfi-asm \
|
||||
-fno-strict-aliasing
|
||||
|
||||
THUMB_SOURCE= \
|
||||
main.c \
|
||||
./ParTest/ParTest.c \
|
||||
@@ -86,7 +111,8 @@ THUMB_SOURCE= \
|
||||
$(RTOS_SOURCE_DIR)/queue.c \
|
||||
$(RTOS_SOURCE_DIR)/tasks.c \
|
||||
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/port.c \
|
||||
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c
|
||||
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \
|
||||
syscalls.c
|
||||
|
||||
ARM_SOURCE= \
|
||||
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c \
|
||||
|
||||
@@ -1,33 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
and contact details. Please ensure to read the configuration and relevant
|
||||
port sections of the online documentation.
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/* FreeRTOS.org includes. */
|
||||
|
||||
@@ -47,7 +47,7 @@ _mainCRTStartup:
|
||||
for system/user, SWI and IRQ modes. Also each mode is setup with
|
||||
interrupts initially disabled. */
|
||||
ldr r0, .LC6
|
||||
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode
|
||||
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #UND_STACK_SIZE
|
||||
msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */
|
||||
|
||||
@@ -8,8 +8,10 @@ MEMORY
|
||||
|
||||
__stack_end__ = 0x40000000 + 32K - 4;
|
||||
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
||||
. = 0;
|
||||
startup : { *(.startup)} >flash
|
||||
|
||||
@@ -20,6 +22,7 @@ SECTIONS
|
||||
*(.rodata*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
KEEP(*(.eh_frame))
|
||||
} >flash
|
||||
|
||||
__end_of_text__ = .;
|
||||
@@ -42,6 +45,7 @@ SECTIONS
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections. */
|
||||
. = ALIGN(32 / 8);
|
||||
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
|
||||
|
||||
.usbram (NOLOAD):
|
||||
{
|
||||
@@ -61,7 +65,7 @@ SECTIONS
|
||||
}
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .;
|
||||
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
|
||||
|
||||
PROVIDE (end = .);
|
||||
|
||||
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -65,7 +76,7 @@
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "Task.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "semphr.h"
|
||||
|
||||
@@ -169,6 +180,7 @@ void vApplicationTickHook( void )
|
||||
unsigned portBASE_TYPE uxColumn = 0;
|
||||
static xLCDMessage xMessage = { 0, "PASS" };
|
||||
static unsigned portLONG ulTicksSinceLastDisplay = 0;
|
||||
static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Called from every tick interrupt. Have enough ticks passed to make it
|
||||
time to perform our health status check again? */
|
||||
@@ -207,7 +219,8 @@ static unsigned portLONG ulTicksSinceLastDisplay = 0;
|
||||
xMessage.xColumn++;
|
||||
|
||||
/* Send the message to the LCD gatekeeper for display. */
|
||||
xQueueSendToBackFromISR( xLCDQueue, &xMessage, pdFALSE );
|
||||
xHigherPriorityTaskWoken = pdFALSE;
|
||||
xQueueSendToBackFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
162
Demo/ARM7_LPC2368_Eclipse/RTOSDemo/syscalls.c
Normal file
162
Demo/ARM7_LPC2368_Eclipse/RTOSDemo/syscalls.c
Normal file
@@ -0,0 +1,162 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2009 by Michael Fischer. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the author 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.
|
||||
*
|
||||
****************************************************************************
|
||||
* History:
|
||||
*
|
||||
* 28.03.09 mifi First Version, based on the original syscall.c from
|
||||
* newlib version 1.17.0
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _read_r (struct _reent *r, int file, char * ptr, int len)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
ptr = ptr;
|
||||
len = len;
|
||||
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _lseek_r (struct _reent *r, int file, int ptr, int dir)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
ptr = ptr;
|
||||
dir = dir;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _write_r (struct _reent *r, int file, char * ptr, int len)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
ptr = ptr;
|
||||
|
||||
#if 0
|
||||
int index;
|
||||
|
||||
/* For example, output string by UART */
|
||||
for(index=0; index<len; index++)
|
||||
{
|
||||
if (ptr[index] == '\n')
|
||||
{
|
||||
uart_putc('\r');
|
||||
}
|
||||
|
||||
uart_putc(ptr[index]);
|
||||
}
|
||||
#endif
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _close_r (struct _reent *r, int file)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/* Register name faking - works in collusion with the linker. */
|
||||
register char * stack_ptr __asm ("sp");
|
||||
|
||||
caddr_t _sbrk_r (struct _reent *r, int incr)
|
||||
{
|
||||
extern char end __asm ("end"); /* Defined by the linker. */
|
||||
static char * heap_end;
|
||||
char * prev_heap_end;
|
||||
|
||||
if (heap_end == NULL)
|
||||
heap_end = & end;
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
|
||||
if (heap_end + incr > stack_ptr)
|
||||
{
|
||||
/* Some of the libstdc++-v3 tests rely upon detecting
|
||||
out of memory errors, so do not abort here. */
|
||||
#if 0
|
||||
extern void abort (void);
|
||||
|
||||
_write (1, "_sbrk: Heap and stack collision\n", 32);
|
||||
|
||||
abort ();
|
||||
#else
|
||||
errno = ENOMEM;
|
||||
return (caddr_t) -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
heap_end += incr;
|
||||
|
||||
return (caddr_t) prev_heap_end;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _fstat_r (struct _reent *r, int file, struct stat * st)
|
||||
{
|
||||
r = r;
|
||||
file = file;
|
||||
|
||||
memset (st, 0, sizeof (* st));
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
int _isatty_r(struct _reent *r, int fd)
|
||||
{
|
||||
r = r;
|
||||
fd = fd;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*** EOF ***/
|
||||
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
#include "FreeRTOS.h"
|
||||
#include "Semphr.h"
|
||||
#include "Task.h"
|
||||
#include "semphr.h"
|
||||
#include "task.h"
|
||||
|
||||
/* The interrupt entry point. */
|
||||
void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
|
||||
|
||||
/* The handler that does the actual work. */
|
||||
void vEMAC_ISR_Handler( void );
|
||||
void vEMAC_ISR_Handler( void ) __attribute__((noinline));
|
||||
|
||||
extern xSemaphoreHandle xEMACSemaphore;
|
||||
|
||||
|
||||
void vEMAC_ISR_Handler( void )
|
||||
{
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
MAC_INTCLEAR = 0xffff;
|
||||
VICVectAddr = 0;
|
||||
|
||||
/* Ensure the uIP task is not blocked as data has arrived. */
|
||||
if( xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE ) )
|
||||
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* Giving the semaphore woke a task. */
|
||||
portYIELD_FROM_ISR();
|
||||
@@ -35,7 +37,7 @@ void vEMAC_ISR_Wrapper( void )
|
||||
|
||||
/* Call the handler. This must be a separate function unless you can
|
||||
guarantee that no stack will be used. */
|
||||
vEMAC_ISR_Handler();
|
||||
__asm volatile ( "bl vEMAC_ISR_Handler" );
|
||||
|
||||
/* Restore the context of whichever task is going to run next. */
|
||||
portRESTORE_CONTEXT();
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
/* Adapted from file originally written by Andreas Dannenberg. Supplied with permission. */
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "Semphr.h"
|
||||
#include "semphr.h"
|
||||
#include "task.h"
|
||||
#include "EMAC.h"
|
||||
#include "emac.h"
|
||||
|
||||
/* The semaphore used to wake the uIP task when data arives. */
|
||||
xSemaphoreHandle xEMACSemaphore = NULL;
|
||||
|
||||
@@ -235,7 +235,7 @@ extern unsigned long uxParTextGetLED( unsigned long uxLED );
|
||||
|
||||
static unsigned short generate_io_state( void *arg )
|
||||
{
|
||||
for( ulString = 0; ulString < 4; ulString++ )
|
||||
for( ulString = 0; ulString < 3; ulString++ )
|
||||
{
|
||||
if( uxParTextGetLED( ulString + 5 ) )
|
||||
{
|
||||
|
||||
@@ -1,33 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
and contact details. Please ensure to read the configuration and relevant
|
||||
port sections of the online documentation.
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
/* Standard includes. */
|
||||
#include <string.h>
|
||||
|
||||
@@ -1,33 +1,54 @@
|
||||
/*
|
||||
FreeRTOS V4.6.1 - Copyright (C) 2003-2005 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
and contact details. Please ensure to read the configuration and relevant
|
||||
port sections of the online documentation.
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
@@ -36,6 +57,7 @@
|
||||
#include <stdio.h>
|
||||
#include <targets/LPC2368.h>
|
||||
#define vPortYieldProcessor swi_handler
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
@@ -44,8 +66,11 @@
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
|
||||
/* Value to use on old rev '-' devices. */
|
||||
//#define configPINSEL2_VALUE 0x50151105
|
||||
|
||||
@@ -59,10 +84,10 @@
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 57600000 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 57600000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 120 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <targets/LPC2368.h>
|
||||
#include "portlcd.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "Task.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Please note, on old MCB2300 board, the LCD_E bit is p1.30, on the new board
|
||||
it's p1.31, please check the schematic carefully, and change LCD_CTRL and LCD_E
|
||||
|
||||
@@ -1,33 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
See http://www.FreeRTOS.org for documentation, latest information, license
|
||||
and contact details. Please ensure to read the configuration and relevant
|
||||
port sections of the online documentation.
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/* FreeRTOS.org includes. */
|
||||
@@ -36,9 +57,9 @@
|
||||
/* Demo application includes. */
|
||||
#include "partest.h"
|
||||
|
||||
#define partstFIRST_IO ( ( unsigned portLONG ) 0x01 )
|
||||
#define partstFIRST_IO ( ( unsigned long ) 0x01 )
|
||||
#define partstNUM_LEDS ( 8 )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xff )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned long ) 0xff )
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
@@ -58,12 +79,12 @@ void vParTestInitialise( void )
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO;
|
||||
unsigned long ulLED = partstFIRST_IO;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* Set of clear the output. */
|
||||
if( xValue )
|
||||
@@ -80,13 +101,13 @@ unsigned portLONG ulLED = partstFIRST_IO;
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
|
||||
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
|
||||
|
||||
if( uxLED < partstNUM_LEDS )
|
||||
{
|
||||
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
/* If this bit is already set, clear it, and visa versa. */
|
||||
ulCurrentState = FIO2PIN;
|
||||
@@ -104,9 +125,9 @@ unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
|
||||
/*-----------------------------------------------------------*/
|
||||
unsigned portBASE_TYPE uxParTextGetLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portLONG ulLED = partstFIRST_IO;
|
||||
unsigned long ulLED = partstFIRST_IO;
|
||||
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
ulLED <<= ( unsigned long ) uxLED;
|
||||
|
||||
return ( FIO2PIN & ulLED );
|
||||
}
|
||||
|
||||
@@ -1,103 +1,103 @@
|
||||
<!DOCTYPE CrossStudio_Project_File>
|
||||
<solution version="1" Name="RTOSDemo" >
|
||||
<project Name="RTOSDemo" >
|
||||
<configuration arm_target_loader_parameter="12000000" Target="LPC2368" arm_target_flash_loader_file_path="$(StudioDir)/targets/Philips_LPC210X/Release/Loader_lpc2300.elf" arm_simulator_memory_simulation_parameter="LPC23;0x80000;0x8000;0x10000;0x10000" property_groups_file_path="$(StudioDir)/targets/Philips_LPC210X/propertyGroups23xx.xml" oscillator_frequency="12MHz" linker_memory_map_file="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC2368_MemoryMap.xml" gcc_entry_point="reset_handler" build_remove_unused_symbols="No" c_preprocessor_definitions="GCC_ARM7;SUPERVISOR_START;VECTORED_IRQ_INTERRUPTS;PACK_STRUCT_END=__attribute__((packed));ALIGN_STRUCT_END=__attribute__((aligned(4)))" arm_architecture="v4T" linker_additional_files="$(StudioDir)/lib/liblpc2000$(LibExt)$(LIB)" c_user_include_directories=".;$(ProjectDir)\\..\\..\\Source\\include;$(ProjectDir)\\..\\..\\Source\\GCC\\ARM7_LPC2000;$(ProjectDir)\\..\\Common\\Include;$(ProjectDir)\\LCD;$(ProjectDir)\\webserver;$(ProjectDir)\\..\\Common\\ethernet\\uIP\\uip-1.0\\uip" project_directory="" link_include_startup_code="No" gcc_optimization_level="Level 1" arm_target_flash_loader_type="LIBMEM RPC Loader" project_type="Executable" c_additional_options="" linker_printf_fmt_level="long" arm_linker_stack_size="10" Name="Common" c_system_include_directories="$(StudioDir)\include" arm_target_debug_interface_type="ARM7TDI" arm_core_type="ARM7TDMI-S" arm_simulator_memory_simulation_filename="$(StudioDir)/targets/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_linker_svc_stack_size="1024" />
|
||||
<configuration linker_section_placement_file="$(StudioDir)/targets/sram_placement.xml" target_reset_script="SRAMReset()" Name="RAM" Placement="RAM" />
|
||||
<configuration arm_target_flash_loader_file_path="$(StudioDir)/targets/Philips_LPC210X/Release/Loader_lpc2300.elf" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()" arm_target_flash_loader_type="LIBMEM RPC Loader" Name="Flash" Placement="Flash" />
|
||||
<folder Name="Demo Source" >
|
||||
<configuration filter="c;cpp;cxx;cc;h;s;asm;inc" Name="Common" />
|
||||
<file file_name="main.c" Name="main.c" />
|
||||
<file file_name="LCD/portlcd.c" Name="portlcd.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<solution Name="RTOSDemo" version="2">
|
||||
<project Name="RTOSDemo">
|
||||
<configuration Name="Common" Target="LPC2368" arm_architecture="v4T" arm_core_type="ARM7TDMI-S" arm_linker_stack_size="10" arm_linker_svc_stack_size="1024" arm_simulator_memory_simulation_filename="$(TargetsDir)/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_simulator_memory_simulation_parameter="LPC23;0x80000;0x8000;0x10000;0x10000" arm_target_debug_interface_type="ARM7TDI" arm_target_flash_loader_file_path="$(TargetsDir)/Philips_LPC210X/Release/Loader_lpc2300.elf" arm_target_flash_loader_type="LIBMEM RPC Loader" arm_target_loader_parameter="12000000" build_remove_unused_symbols="No" c_additional_options="" c_preprocessor_definitions="GCC_ARM7;SUPERVISOR_START;VECTORED_IRQ_INTERRUPTS;PACK_STRUCT_END=__attribute__((packed));ALIGN_STRUCT_END=__attribute__((aligned(4)))" c_system_include_directories="$(StudioDir)\include;$(PackagesDir)\include" c_user_include_directories=".;$(ProjectDir)\\..\\..\\Source\\include;$(ProjectDir)\\..\\..\\Source\\GCC\\ARM7_LPC2000;$(ProjectDir)\\..\\Common\\Include;$(ProjectDir)\\LCD;$(ProjectDir)\\webserver;$(ProjectDir)\\..\\Common\\ethernet\\uIP\\uip-1.0\\uip" gcc_entry_point="reset_handler" gcc_optimization_level="Level 1" link_include_startup_code="No" linker_additional_files="$(PackagesDir)/lib/liblpc2000$(LibExt)$(LIB)" linker_memory_map_file="$(TargetsDir)/Philips_LPC210X/Philips_LPC2368_MemoryMap.xml" linker_printf_fmt_level="long" oscillator_frequency="12MHz" project_directory="" project_type="Executable" property_groups_file_path="$(TargetsDir)/Philips_LPC210X/propertyGroups23xx.xml" c_enforce_ansi_checking="No" />
|
||||
<configuration Name="RAM" Placement="RAM" linker_section_placement_file="$(StudioDir)/targets/sram_placement.xml" target_reset_script="SRAMReset()"/>
|
||||
<configuration Name="Flash" Placement="Flash" arm_target_flash_loader_file_path="$(TargetsDir)/Philips_LPC210X/Release/Loader_lpc2300.elf" arm_target_flash_loader_type="LIBMEM RPC Loader" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()"/>
|
||||
<folder Name="Demo Source">
|
||||
<configuration Name="Common" filter="c;cpp;cxx;cc;h;s;asm;inc"/>
|
||||
<file Name="main.c" file_name="main.c"/>
|
||||
<file Name="portlcd.c" file_name="LCD/portlcd.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/Minimal/blocktim.c" Name="blocktim.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="blocktim.c" file_name="../Common/Minimal/blocktim.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/Minimal/integer.c" Name="integer.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="integer.c" file_name="../Common/Minimal/integer.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/Minimal/BlockQ.c" Name="BlockQ.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="BlockQ.c" file_name="../Common/Minimal/BlockQ.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="ParTest/ParTest.c" Name="ParTest.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="ParTest.c" file_name="ParTest/ParTest.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/Minimal/flash.c" Name="flash.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="flash.c" file_name="../Common/Minimal/flash.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="webserver/EMAC_ISR.c" Name="EMAC_ISR.c" >
|
||||
<configuration arm_instruction_set="ARM" Name="THUMB" />
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="EMAC_ISR.c" file_name="webserver/EMAC_ISR.c">
|
||||
<configuration Name="THUMB" arm_instruction_set="ARM"/>
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="webserver/emac.c" Name="emac.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<configuration asm_additional_options="" Name="Common" />
|
||||
<file Name="emac.c" file_name="webserver/emac.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
<configuration Name="Common" asm_additional_options=""/>
|
||||
</file>
|
||||
<file file_name="../Common/Minimal/death.c" Name="death.c" />
|
||||
<file file_name="../Common/Minimal/PollQ.c" Name="PollQ.c" />
|
||||
<file file_name="../Common/Minimal/semtest.c" Name="semtest.c" />
|
||||
<file Name="death.c" file_name="../Common/Minimal/death.c"/>
|
||||
<file Name="PollQ.c" file_name="../Common/Minimal/PollQ.c"/>
|
||||
<file Name="semtest.c" file_name="../Common/Minimal/semtest.c"/>
|
||||
</folder>
|
||||
<folder Name="System Files" >
|
||||
<file file_name="$(StudioDir)/source/crt0.s" Name="crt0.s" />
|
||||
<file file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC230X_Startup.s" Name="Philips_LPC230X_Startup.s" />
|
||||
<file file_name="$(StudioDir)/targets/Philips_LPC210X/LPC230x.c" Name="LPC230x.c" />
|
||||
<file file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Target.js" Name="Philips_LPC210X_Target.js" >
|
||||
<configuration Name="Common" file_type="Reset Script" />
|
||||
<folder Name="System Files">
|
||||
<file Name="crt0.s" file_name="$(StudioDir)/source/crt0.s"/>
|
||||
<file Name="Philips_LPC230X_Startup.s" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC230X_Startup.s"/>
|
||||
<file Name="LPC230x.c" file_name="$(TargetsDir)/Philips_LPC210X/LPC230x.c"/>
|
||||
<file Name="Philips_LPC210X_Target.js" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Target.js">
|
||||
<configuration Name="Common" file_type="Reset Script"/>
|
||||
</file>
|
||||
<file file_name="$(StudioDir)/targets/Philips_LPC210X/VIC_PL192.c" Name="VIC_PL192.c" />
|
||||
<file file_name="$(StudioDir)/targets/Philips_LPC210X/VIC_PL192_irq_handler.s" Name="VIC_PL192_irq_handler.s" />
|
||||
<file Name="VIC_PL192.c" file_name="$(TargetsDir)/Philips_LPC210X/VIC_PL192.c"/>
|
||||
<file Name="VIC_PL192_irq_handler.s" file_name="$(TargetsDir)/Philips_LPC210X/VIC_PL192_irq_handler.s"/>
|
||||
</folder>
|
||||
<folder Name="FreeRTOS.org Source" >
|
||||
<file file_name="../../Source/tasks.c" Name="tasks.c" />
|
||||
<file file_name="../../Source/list.c" Name="list.c" />
|
||||
<file file_name="../../Source/queue.c" Name="queue.c" />
|
||||
<file file_name="../../Source/portable/GCC/ARM7_LPC23xx/port.c" Name="port.c" />
|
||||
<file file_name="../../Source/portable/GCC/ARM7_LPC23xx/portISR.c" Name="portISR.c" >
|
||||
<configuration arm_instruction_set="ARM" Name="Common" />
|
||||
<folder Name="FreeRTOS.org Source">
|
||||
<file Name="tasks.c" file_name="../../Source/tasks.c"/>
|
||||
<file Name="list.c" file_name="../../Source/list.c"/>
|
||||
<file Name="queue.c" file_name="../../Source/queue.c"/>
|
||||
<file Name="port.c" file_name="../../Source/portable/GCC/ARM7_LPC23xx/port.c"/>
|
||||
<file Name="portISR.c" file_name="../../Source/portable/GCC/ARM7_LPC23xx/portISR.c">
|
||||
<configuration Name="Common" arm_instruction_set="ARM"/>
|
||||
</file>
|
||||
<file file_name="../../Source/portable/MemMang/heap_2.c" Name="heap_2.c" />
|
||||
<file Name="heap_2.c" file_name="../../Source/portable/MemMang/heap_2.c"/>
|
||||
</folder>
|
||||
<configuration linker_scanf_fmt_level="int" linker_keep_symbols="_vectors" c_preprocessor_definitions="" gcc_optimization_level="Level 1" arm_target_flash_loader_type="LIBMEM RPC Loader" linker_scanf_character_group_matching_enabled="No" linker_printf_fmt_level="int" Name="ARM Flash Debug" />
|
||||
<folder Name="uIP Source" >
|
||||
<file file_name="webserver/uIP_Task.c" Name="uIP_Task.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<configuration Name="ARM Flash Debug" arm_target_flash_loader_type="LIBMEM RPC Loader" c_preprocessor_definitions="" gcc_optimization_level="Level 1" linker_keep_symbols="_vectors" linker_printf_fmt_level="int" linker_scanf_character_group_matching_enabled="No" linker_scanf_fmt_level="int"/>
|
||||
<folder Name="uIP Source">
|
||||
<file Name="uIP_Task.c" file_name="webserver/uIP_Task.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="webserver/httpd.c" Name="httpd.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="httpd.c" file_name="webserver/httpd.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="webserver/httpd-cgi.c" Name="httpd-cgi.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="httpd-cgi.c" file_name="webserver/httpd-cgi.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="webserver/httpd-fs.c" Name="httpd-fs.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="httpd-fs.c" file_name="webserver/httpd-fs.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="webserver/http-strings.c" Name="http-strings.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="http-strings.c" file_name="webserver/http-strings.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/uip_arp.c" Name="uip_arp.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="uip_arp.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/uip_arp.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/psock.c" Name="psock.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="psock.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/psock.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/timer.c" Name="timer.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="timer.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/timer.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/uip.c" Name="uip.c" >
|
||||
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
|
||||
<file Name="uip.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/uip.c">
|
||||
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
|
||||
</file>
|
||||
</folder>
|
||||
<configuration c_preprocessor_definitions="THUMB_INTERWORK" Name="THUMB" />
|
||||
<configuration c_preprocessor_definitions="STARTUP_FROM_RESET" gcc_optimization_level="Optimize For Size" Name="ARM Flash Release" />
|
||||
<configuration arm_linker_fiq_stack_size="0" arm_linker_stack_size="0" Name="THUMB Flash Debug" arm_linker_svc_stack_size="512" arm_linker_heap_size="0" />
|
||||
<configuration Name="THUMB" c_preprocessor_definitions="THUMB_INTERWORK"/>
|
||||
<configuration Name="ARM Flash Release" c_preprocessor_definitions="STARTUP_FROM_RESET" gcc_optimization_level="Optimize For Size"/>
|
||||
<configuration Name="THUMB Flash Debug" arm_linker_fiq_stack_size="0" arm_linker_heap_size="0" arm_linker_stack_size="0" arm_linker_svc_stack_size="512"/>
|
||||
</project>
|
||||
<configuration inherited_configurations="ARM;Flash;Debug" Name="ARM Flash Debug" />
|
||||
<configuration arm_library_instruction_set="ARM" c_preprocessor_definitions="__ARM" arm_instruction_set="ARM" hidden="Yes" Name="ARM" />
|
||||
<configuration c_preprocessor_definitions="__FLASH_BUILD" hidden="Yes" Name="Flash" />
|
||||
<configuration c_preprocessor_definitions="DEBUG" link_include_startup_code="No" gcc_optimization_level="None" build_debug_information="Yes" hidden="Yes" Name="Debug" />
|
||||
<configuration inherited_configurations="ARM;Flash;Release" Name="ARM Flash Release" />
|
||||
<configuration c_preprocessor_definitions="NDEBUG" link_include_startup_code="No" gcc_optimization_level="Level 1" build_debug_information="No" hidden="Yes" Name="Release" />
|
||||
<configuration inherited_configurations="THUMB;Flash;Debug" Name="THUMB Flash Debug" />
|
||||
<configuration arm_library_instruction_set="THUMB" c_preprocessor_definitions="__THUMB" arm_instruction_set="THUMB" hidden="Yes" Name="THUMB" />
|
||||
<configuration arm_linker_stack_size="256" Name="Common" />
|
||||
<configuration Name="ARM Flash Debug" inherited_configurations="ARM;Flash;Debug"/>
|
||||
<configuration Name="ARM" arm_instruction_set="ARM" arm_library_instruction_set="ARM" c_preprocessor_definitions="__ARM" hidden="Yes"/>
|
||||
<configuration Name="Flash" c_preprocessor_definitions="__FLASH_BUILD" hidden="Yes"/>
|
||||
<configuration Name="Debug" build_debug_information="Yes" c_preprocessor_definitions="DEBUG" gcc_optimization_level="None" hidden="Yes" link_include_startup_code="No"/>
|
||||
<configuration Name="ARM Flash Release" inherited_configurations="ARM;Flash;Release"/>
|
||||
<configuration Name="Release" build_debug_information="No" c_preprocessor_definitions="NDEBUG" gcc_optimization_level="Level 1" hidden="Yes" link_include_startup_code="No"/>
|
||||
<configuration Name="THUMB Flash Debug" inherited_configurations="THUMB;Flash;Debug"/>
|
||||
<configuration Name="THUMB" arm_instruction_set="THUMB" arm_library_instruction_set="THUMB" c_preprocessor_definitions="__THUMB" hidden="Yes"/>
|
||||
<configuration Name="Common" arm_linker_stack_size="256"/>
|
||||
</solution>
|
||||
|
||||
@@ -1,26 +1,7 @@
|
||||
<!DOCTYPE CrossStudio_for_ARM_Session_File>
|
||||
<session>
|
||||
<Autos>
|
||||
<Watches active="0" />
|
||||
</Autos>
|
||||
<Bookmarks/>
|
||||
<Breakpoints>
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="D_Abort" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="FIQ" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="IRQ" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="P_Abort" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="SWI" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="Undef" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="BusFault" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="ExceptionEntryReturnFault" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="HardFault" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="MemManage" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_CheckingError" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_Coprocessor" filename="" />
|
||||
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_StateError" filename="" />
|
||||
</Breakpoints>
|
||||
<Breakpoints/>
|
||||
<ExecutionCountWindow/>
|
||||
<Memory1>
|
||||
<MemoryWindow autoEvaluate="0" addressText="0x4000592c" numColumns="8" sizeText="2000" dataSize="1" radix="16" addressSpace="" />
|
||||
@@ -40,35 +21,37 @@
|
||||
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Demo Source" name="unnamed" />
|
||||
</Project>
|
||||
<Register1>
|
||||
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="CPU - Current Mode" visibleGroups="CPU - Current Mode" decimalDisplays="" binaryDisplays="" />
|
||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
</Register1>
|
||||
<Register2>
|
||||
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="CPU - Current Mode" visibleGroups="CPU - Current Mode" decimalDisplays="" binaryDisplays="" />
|
||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
</Register2>
|
||||
<Register3>
|
||||
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="" visibleGroups="" decimalDisplays="" binaryDisplays="" />
|
||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
</Register3>
|
||||
<Register4>
|
||||
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="" visibleGroups="" decimalDisplays="" binaryDisplays="" />
|
||||
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
|
||||
</Register4>
|
||||
<SourceNavigatorWindow/>
|
||||
<TargetWindow programAction="" uploadFileType="" programLoadAddress="" programSize="" uploadFileName="" uploadMemoryInterface="" programFileName="" uploadStartAddress="" programFileType="" uploadSize="" programMemoryInterface="" />
|
||||
<TraceWindow>
|
||||
<Trace wrap="Yes" type="1" enabled="Yes" />
|
||||
<Trace enabled="Yes" />
|
||||
</TraceWindow>
|
||||
<Watch1>
|
||||
<Watches active="0" />
|
||||
<Watches active="0" update="Never" />
|
||||
</Watch1>
|
||||
<Watch2>
|
||||
<Watches active="0" />
|
||||
<Watches active="0" update="Never" />
|
||||
</Watch2>
|
||||
<Watch3>
|
||||
<Watches active="0" />
|
||||
<Watches active="0" update="Never" />
|
||||
</Watch3>
|
||||
<Watch4>
|
||||
<Watches active="1" >
|
||||
<Watches active="1" update="Never" >
|
||||
<Watchpoint linenumber="0" radix="-1" name="xStart" expression="xStart" filename="" />
|
||||
</Watches>
|
||||
</Watch4>
|
||||
<Files/>
|
||||
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="/USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2368_Rowley\webserver" fileDialogDefaultFilter="*.cpp;*.cxx;*.cc;*.c;*.h" autoConnectCapabilities="1407" debugSearchPath="" buildConfiguration="ARM Flash Debug" />
|
||||
<Files>
|
||||
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2368_Rowley\main.c" y="125" path="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2368_Rowley\main.c" left="0" selected="1" name="unnamed" top="108" />
|
||||
</Files>
|
||||
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="/USB CrossConnect for ARM-RTCK" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2368_Rowley\webserver" fileDialogDefaultFilter="*.c" autoConnectCapabilities="1407" debugSearchPath="" buildConfiguration="ARM Flash Debug" />
|
||||
</session>
|
||||
|
||||
@@ -1,43 +1,54 @@
|
||||
/*
|
||||
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS.org is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FreeRTOS.org is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with FreeRTOS.org; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details. You should have received a copy of the GNU General Public
|
||||
License and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
+++ http://www.FreeRTOS.org +++
|
||||
Documentation, latest information, license and contact details.
|
||||
|
||||
+++ http://www.SafeRTOS.com +++
|
||||
A version that is certified for use in safety critical systems.
|
||||
|
||||
+++ http://www.OpenRTOS.com +++
|
||||
Commercial support, development, porting, licensing and training services.
|
||||
|
||||
***************************************************************************
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/* Environment includes. */
|
||||
@@ -45,7 +56,7 @@
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "Task.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "semphr.h"
|
||||
|
||||
@@ -58,7 +69,7 @@
|
||||
#include "flash.h"
|
||||
#include "partest.h"
|
||||
#include "semtest.h"
|
||||
#include "pollq.h"
|
||||
#include "PollQ.h"
|
||||
|
||||
/* Demo application definitions. */
|
||||
#define mainQUEUE_SIZE ( 3 )
|
||||
@@ -115,9 +126,10 @@ int main (void)
|
||||
xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );
|
||||
|
||||
/* Create the lwIP task. This uses the lwIP RTOS abstraction layer.*/
|
||||
xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
|
||||
xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
|
||||
|
||||
/* Start the standard demo tasks. */
|
||||
/* Start the standard demo tasks - these serve no useful purpose other than
|
||||
to demonstrate the FreeRTOS API being used and to test the port. */
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vCreateBlockTimeTasks();
|
||||
vStartLEDFlashTasks( mainFLASH_PRIORITY );
|
||||
@@ -126,8 +138,8 @@ int main (void)
|
||||
vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );
|
||||
|
||||
/* Start the tasks defined within this file/specific to this demo. */
|
||||
xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
|
||||
xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
|
||||
|
||||
/* The suicide tasks must be created last as they need to know how many
|
||||
tasks were running prior to their creation in order to ascertain whether
|
||||
@@ -216,7 +228,7 @@ xLCDMessage xMessage;
|
||||
LCD_cur_off();
|
||||
LCD_cls();
|
||||
LCD_gotoxy( 1, 1 );
|
||||
LCD_puts( ( signed portCHAR * ) "www.FreeRTOS.org" );
|
||||
LCD_puts( ( signed char * ) "www.FreeRTOS.org" );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
#include "FreeRTOS.h"
|
||||
#include "Semphr.h"
|
||||
#include "Task.h"
|
||||
#include "semphr.h"
|
||||
#include "task.h"
|
||||
|
||||
/* The interrupt entry point. */
|
||||
void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
|
||||
|
||||
/* The function that actually performs the interrupt processing. This must be
|
||||
separate to the wrapper to ensure the correct stack frame is set up. */
|
||||
void vEMAC_ISR_Handler( void );
|
||||
void vEMAC_ISR_Handler( void ) __attribute__((noinline));
|
||||
|
||||
extern xSemaphoreHandle xEMACSemaphore;
|
||||
|
||||
void vEMAC_ISR_Handler( void )
|
||||
{
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
IntClear = 0xffff;
|
||||
VICVectAddr = 0;
|
||||
|
||||
/* Ensure the uIP task is not blocked as data has arrived. */
|
||||
if( xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE ) )
|
||||
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* If the uIP task was unblocked then calling "Yield from ISR" here
|
||||
will ensure the interrupt returns directly to the uIP task, if it
|
||||
@@ -35,7 +39,7 @@ void vEMAC_ISR_Wrapper( void )
|
||||
|
||||
/* Call the handler function. This must be separate from the wrapper
|
||||
function to ensure the correct stack frame is set up. */
|
||||
vEMAC_ISR_Handler();
|
||||
__asm volatile( "bl vEMAC_ISR_Handler" );
|
||||
|
||||
/* Restore the context of whichever task is going to run next. */
|
||||
portRESTORE_CONTEXT();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user