mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-16 12:34:29 +00:00
Compare commits
2281 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
601fb0934c | ||
|
|
1b010fbaa7 | ||
|
|
3291f5a08d | ||
|
|
99d4f2c454 | ||
|
|
b4c3d91aff | ||
|
|
4c847711bd | ||
|
|
95eed0c8f3 | ||
|
|
4c3722bd76 | ||
|
|
25b911e0bd | ||
|
|
cff5cfdd4f | ||
|
|
8b5c27b679 | ||
|
|
672ae6cbb6 | ||
|
|
d3e053568d | ||
|
|
95b73d40d9 | ||
|
|
4ee2a96861 | ||
|
|
8a1450effc | ||
|
|
cfb8223232 | ||
|
|
7456c232ce | ||
|
|
267dc24bb3 | ||
|
|
067c1573c3 | ||
|
|
9bb5b40c81 | ||
|
|
a9d1ff4f5e | ||
|
|
976a9b44af | ||
|
|
34a7b0431b | ||
|
|
91b249d24b | ||
|
|
d39c0d5926 | ||
|
|
03213b9e4a | ||
|
|
8dadb6b87c | ||
|
|
693d0520bc | ||
|
|
63b3c773d5 | ||
|
|
2bf93bf925 | ||
|
|
a61db8f155 | ||
|
|
18ff880e75 | ||
|
|
3012d9b94d | ||
|
|
96e72413f7 | ||
|
|
7d169cef52 | ||
|
|
86b09bfeb9 | ||
|
|
dfdc319518 | ||
|
|
51aa373c4c | ||
|
|
acfbb7dd14 | ||
|
|
501a531d46 | ||
|
|
c37b2ca39b | ||
|
|
e4e6328300 | ||
|
|
271393b7d9 | ||
|
|
5dd77c7aeb | ||
|
|
6741592026 | ||
|
|
fd02010886 | ||
|
|
2de32c0141 | ||
|
|
f407b70dcc | ||
|
|
85fb1cc024 | ||
|
|
ca22607d14 | ||
|
|
e3263bb9b3 | ||
|
|
9e66637bec | ||
|
|
ee541a347d | ||
|
|
e0d9a274e2 | ||
|
|
d269f2027a | ||
|
|
e2f2cfa816 | ||
|
|
3b0854bf96 | ||
|
|
b3c040fc27 | ||
|
|
4f03f7d1bb | ||
|
|
b6e4854f26 | ||
|
|
d55e7e77a2 | ||
|
|
33cc3a292b | ||
|
|
99229b597b | ||
|
|
a60ce58731 | ||
|
|
ff5d3512b3 | ||
|
|
6507701fdf | ||
|
|
7d49c2190c | ||
|
|
d33a14b5fb | ||
|
|
e491610725 | ||
|
|
52e687086c | ||
|
|
162448f06b | ||
|
|
60538c7480 | ||
|
|
47f895cb34 | ||
|
|
b2e739495a | ||
|
|
3a3d061cc5 | ||
|
|
e9b5deb34a | ||
|
|
146b46df87 | ||
|
|
3d007d0b4b | ||
|
|
5fcd270398 | ||
|
|
bd9d37924d | ||
|
|
96ceb9f537 | ||
|
|
5b96cf6eea | ||
|
|
8ad9b75810 | ||
|
|
29336e35b5 | ||
|
|
f4a1a7d577 | ||
|
|
5b96c12e92 | ||
|
|
8aa5fa3459 | ||
|
|
4fe2abc792 | ||
|
|
d96dc2adb0 | ||
|
|
b0ba273489 | ||
|
|
4b26dc0614 | ||
|
|
5e47df8c01 | ||
|
|
4ce4de750a | ||
|
|
42b1688a30 | ||
|
|
583b144bc3 | ||
|
|
b4659d8872 | ||
|
|
113220628f | ||
|
|
4723209074 | ||
|
|
d45f18cc8d | ||
|
|
8426eba8e7 | ||
|
|
de7df3cfda | ||
|
|
f1a0534a56 | ||
|
|
7fa64efeeb | ||
|
|
2f6cb8a86c | ||
|
|
e92795bcc8 | ||
|
|
be8b0ed21d | ||
|
|
16ff69e873 | ||
|
|
9efb5c8b2f | ||
|
|
5cbab67186 | ||
|
|
1130a53ec8 | ||
|
|
5cd0b1e5ef | ||
|
|
f46070dc79 | ||
|
|
ef254df85f | ||
|
|
74ffdb0b89 | ||
|
|
09a89763ee | ||
|
|
b215310e63 | ||
|
|
0bb794301a | ||
|
|
911e82a909 | ||
|
|
f25503977e | ||
|
|
fa7222ab4a | ||
|
|
03c95b5950 | ||
|
|
a46f251d11 | ||
|
|
6af9b013eb | ||
|
|
82207ebffa | ||
|
|
ef7f3c5320 | ||
|
|
887fcd04f4 | ||
|
|
42cbd6a778 | ||
|
|
29a08b5e24 | ||
|
|
d59bf60ff9 | ||
|
|
6fe7e7ef67 | ||
|
|
7f7ad3d081 | ||
|
|
2283bfb0ae | ||
|
|
a5f00caf16 | ||
|
|
05a0e4379e | ||
|
|
3788026636 | ||
|
|
b17ab311af | ||
|
|
9bd5e5cf03 | ||
|
|
c8953a68cd | ||
|
|
ba6d285ea8 | ||
|
|
e101e7e437 | ||
|
|
38ae9b76bc | ||
|
|
c3dd6f6593 | ||
|
|
0f6b699eef | ||
|
|
a2089bbcf6 | ||
|
|
2346014918 | ||
|
|
33e11c72c3 | ||
|
|
d6da7b1231 | ||
|
|
0ccfdd1021 | ||
|
|
04ae37ef12 | ||
|
|
853696a991 | ||
|
|
b7eb76904a | ||
|
|
e4dbc6b770 | ||
|
|
b96016e234 | ||
|
|
5a2a8fc319 | ||
|
|
c6d8892b0d | ||
|
|
4f01401c00 | ||
|
|
0cc51d99a7 | ||
|
|
3eb212f454 | ||
|
|
84f4ae9aa0 | ||
|
|
eea669240b | ||
|
|
d4ca65f22f | ||
|
|
660162a5b8 | ||
|
|
d12ec14160 | ||
|
|
9a8da3ff38 | ||
|
|
03f9bbda52 | ||
|
|
481db56078 | ||
|
|
f843888e60 | ||
|
|
c83414ccc4 | ||
|
|
2fc4e89b98 | ||
|
|
d898d16c44 | ||
|
|
6c72f470ac | ||
|
|
d310ac4552 | ||
|
|
51ea2639a9 | ||
|
|
0bf2e615b2 | ||
|
|
6130fec60e | ||
|
|
e4f495012f | ||
|
|
888733ef79 | ||
|
|
b352be2e23 | ||
|
|
14f895478d | ||
|
|
4c9b5d88ae | ||
|
|
1e26b1875f | ||
|
|
d0323e67ae | ||
|
|
8cb6a4f032 | ||
|
|
371f6f359a | ||
|
|
3e430b3801 | ||
|
|
33351b02c9 | ||
|
|
86023aa5a6 | ||
|
|
d8c135e2dc | ||
|
|
a1b8079df1 | ||
|
|
f01bf9fdc3 | ||
|
|
a20e75082e | ||
|
|
1aaa80fba6 | ||
|
|
a56d4b998c | ||
|
|
723682f1dd | ||
|
|
a8836b5c43 | ||
|
|
a44a6fbaeb | ||
|
|
3705435417 | ||
|
|
8ae3d489fe | ||
|
|
2aa19f1a14 | ||
|
|
38e7554138 | ||
|
|
31609c7c3e | ||
|
|
42a2338f1c | ||
|
|
e95b482f56 | ||
|
|
f9072e7bac | ||
|
|
e4965ca03c | ||
|
|
2b6eb1c5ab | ||
|
|
b54158d1dc | ||
|
|
3e20aa7d60 | ||
|
|
f292243dcf | ||
|
|
3517bbdcce | ||
|
|
653fdb81d5 | ||
|
|
da93f1fc4b | ||
|
|
b4116a7c7d | ||
|
|
b3aa1e90ad | ||
|
|
6179690dc9 | ||
|
|
a3c2f45116 | ||
|
|
c861e3883d | ||
|
|
64ad1c00b5 | ||
|
|
0147415c40 | ||
|
|
39b2d049a6 | ||
|
|
4b2f9dad42 | ||
|
|
040a7c02df | ||
|
|
a320d6dffd | ||
|
|
c17c65fc09 | ||
|
|
acad916453 | ||
|
|
0d1e12522b | ||
|
|
6b3393b4b6 | ||
|
|
0416289066 | ||
|
|
ed54bc497d | ||
|
|
4b655ac3bb | ||
|
|
0028cc48c1 | ||
|
|
751103d848 | ||
|
|
5638fe28a2 | ||
|
|
3d00d47239 | ||
|
|
9001b7b77a | ||
|
|
e682aec507 | ||
|
|
00ad1a0200 | ||
|
|
2e42d7690a | ||
|
|
d2c2e3ca68 | ||
|
|
5037ecdc5c | ||
|
|
9dc39ee2a7 | ||
|
|
a22d5ff5a5 | ||
|
|
f54f21b8f6 | ||
|
|
faed443e82 | ||
|
|
b89fd7c1e3 | ||
|
|
417c3d1054 | ||
|
|
ad67be1577 | ||
|
|
c6020ae8b4 | ||
|
|
fa002f7fdd | ||
|
|
8cd71348be | ||
|
|
c2bfac68b3 | ||
|
|
0cbd5182a3 | ||
|
|
6be1ffccfb | ||
|
|
cbb14d30c5 | ||
|
|
0865907f3f | ||
|
|
9e9f9f30b1 | ||
|
|
b690b26861 | ||
|
|
dc2e20bb0a | ||
|
|
a37b947615 | ||
|
|
a2cfaa7cd9 | ||
|
|
8320dfb885 | ||
|
|
0cd79ad81d | ||
|
|
c44d12dadb | ||
|
|
b1b4b15353 | ||
|
|
b181a3af99 | ||
|
|
20eb03ed7d | ||
|
|
30bc6c01a9 | ||
|
|
40d2e74417 | ||
|
|
5aabe4f8fb | ||
|
|
dcf261a3e6 | ||
|
|
ca2191c6ee | ||
|
|
9a0f2bda55 | ||
|
|
1b7a2e40a3 | ||
|
|
2ee43fbc64 | ||
|
|
73df0ffdff | ||
|
|
6642926d43 | ||
|
|
15d10ce094 | ||
|
|
aa9ec31ba9 | ||
|
|
e46fe7c049 | ||
|
|
818abc468d | ||
|
|
63bd3ebbef | ||
|
|
dcd261bb8b | ||
|
|
7bcbef721b | ||
|
|
41fe693968 | ||
|
|
f64acd6a48 | ||
|
|
25bab250b6 | ||
|
|
bafda11518 | ||
|
|
a12ea2d212 | ||
|
|
6280324778 | ||
|
|
94607d83f9 | ||
|
|
c1353bb12d | ||
|
|
b887737c34 | ||
|
|
c09f6e6a9b | ||
|
|
dcea05a81c | ||
|
|
41a1dc62b7 | ||
|
|
0c56f5018d | ||
|
|
aedf7824cb | ||
|
|
81e141ad86 | ||
|
|
e2afb24747 | ||
|
|
0c849fa597 | ||
|
|
10fa546e60 | ||
|
|
eaacbb099a | ||
|
|
be44f8aaa7 | ||
|
|
7ec4773131 | ||
|
|
23fa077241 | ||
|
|
8ffa1b1736 | ||
|
|
013a3ef944 | ||
|
|
111283a9b2 | ||
|
|
0185643b39 | ||
|
|
1e248417bc | ||
|
|
db1a5f1553 | ||
|
|
988b0c1678 | ||
|
|
e3b5f36c3a | ||
|
|
1902d2b64a | ||
|
|
dd3fdfa9ff | ||
|
|
c63a81af99 | ||
|
|
49c602f3df | ||
|
|
ae402434f8 | ||
|
|
0e28ee90b6 | ||
|
|
42c0ae6bc8 | ||
|
|
a3095b89af | ||
|
|
8282cc0491 | ||
|
|
577ff0741d | ||
|
|
a0a96e52f2 | ||
|
|
41f92ced65 | ||
|
|
77d817ffaa | ||
|
|
7d92a29d2d | ||
|
|
117235c08a | ||
|
|
d8963209c2 | ||
|
|
aaf2d32011 | ||
|
|
6acac72ff1 | ||
|
|
d1d925ab36 | ||
|
|
18c4f8e622 | ||
|
|
a8c2c6b3b6 | ||
|
|
05e0c59da8 | ||
|
|
316b731fe9 | ||
|
|
b79d3de952 | ||
|
|
73606369c4 | ||
|
|
ed399e801e | ||
|
|
33bd63e287 | ||
|
|
245ff12be8 | ||
|
|
f9e024d7ea | ||
|
|
9ad0c17281 | ||
|
|
710a652daf | ||
|
|
f0a2688200 | ||
|
|
3fe6974bf9 | ||
|
|
574f5044a6 | ||
|
|
747a0e15fa | ||
|
|
c40370e96a | ||
|
|
63e8044d33 | ||
|
|
dac40d1677 | ||
|
|
2f754d9b0c | ||
|
|
3cbe0a724d | ||
|
|
8ceb665994 | ||
|
|
bb2093cf5d | ||
|
|
679a3c670c | ||
|
|
f522d6a2da | ||
|
|
9054485f1a | ||
|
|
08057fa77f | ||
|
|
203ae64600 | ||
|
|
92fae7d262 | ||
|
|
7d6758ee1a | ||
|
|
d04c2fa753 | ||
|
|
4578154959 | ||
|
|
0fd81d6d8e | ||
|
|
7d1292ced2 | ||
|
|
e83b93f5fc | ||
|
|
ce9c3b7413 | ||
|
|
14a190e79e | ||
|
|
1e17924fa8 | ||
|
|
a6db135add | ||
|
|
da0fff63c9 | ||
|
|
e5d9640863 | ||
|
|
4b964814de | ||
|
|
25310a6796 | ||
|
|
ad8fa53043 | ||
|
|
c9d9bddc3c | ||
|
|
5d902f2b9c | ||
|
|
18caebf1d1 | ||
|
|
65704174c9 | ||
|
|
0f6b0d3a59 | ||
|
|
4894955a08 | ||
|
|
c4eef61d39 | ||
|
|
b521d70e7e | ||
|
|
019c6417d7 | ||
|
|
5ad3b59783 | ||
|
|
2c242cdf78 | ||
|
|
c1b4fc58d2 | ||
|
|
877ce218a4 | ||
|
|
625b1a7159 | ||
|
|
0c0b54c175 | ||
|
|
08ca5dead5 | ||
|
|
b8a219b30c | ||
|
|
3b02b4c8f8 | ||
|
|
671949ad78 | ||
|
|
59f75a12f6 | ||
|
|
4444b4ee68 | ||
|
|
f11635ed91 | ||
|
|
a7c47131fa | ||
|
|
6cbbfd2eb5 | ||
|
|
fb47260e80 | ||
|
|
87049ac37c | ||
|
|
cdae14a8cb | ||
|
|
00136d4b51 | ||
|
|
d8248c49fc | ||
|
|
0ca2110982 | ||
|
|
a1145a1b78 | ||
|
|
34e7cfc2a2 | ||
|
|
e6903dac61 | ||
|
|
1cfb7b77e5 | ||
|
|
3a507bdc0c | ||
|
|
c3f9e3c5ff | ||
|
|
018f0f602a | ||
|
|
5013baa2cd | ||
|
|
04dafed839 | ||
|
|
2fd431e971 | ||
|
|
3aad6381e1 | ||
|
|
f038fd6a86 | ||
|
|
3b004f9900 | ||
|
|
62c0ae0926 | ||
|
|
c75c01ffdf | ||
|
|
c9b30b9fe7 | ||
|
|
2089f31f18 | ||
|
|
a1ef5d6fa9 | ||
|
|
59a834eb86 | ||
|
|
c04b074707 | ||
|
|
2fc9d033c6 | ||
|
|
51d9ee0c1c | ||
|
|
29ca4f1b36 | ||
|
|
0f3ae55e5d | ||
|
|
f904d26957 | ||
|
|
15ec6c87f7 | ||
|
|
686d190798 | ||
|
|
4e9374ad90 | ||
|
|
06953169ba | ||
|
|
0673f63e8d | ||
|
|
66734268f5 | ||
|
|
2e5d812022 | ||
|
|
3fbee4f0a8 | ||
|
|
64bd0689c7 | ||
|
|
6330e06975 | ||
|
|
6438027bb9 | ||
|
|
f928b0e296 | ||
|
|
f9d0a153b4 | ||
|
|
54c62d429f | ||
|
|
0158039f99 | ||
|
|
fda145278e | ||
|
|
2c562bd3d7 | ||
|
|
bb7b711ca9 | ||
|
|
a03b171992 | ||
|
|
9b153b3e06 | ||
|
|
94f178c8d1 | ||
|
|
5c5c1c406d | ||
|
|
961928b0f9 | ||
|
|
82995fd4fd | ||
|
|
4d966adc8b | ||
|
|
063c05ccad | ||
|
|
5ff880fee8 | ||
|
|
8732e8efc5 | ||
|
|
fb9662009a | ||
|
|
e08966c7e8 | ||
|
|
b4efc0439f | ||
|
|
410f5d45eb | ||
|
|
e3a868ca58 | ||
|
|
b8d265f57f | ||
|
|
39147e83a0 | ||
|
|
96ceae8edd | ||
|
|
a4a830c44d | ||
|
|
bbe48d31a4 | ||
|
|
fbadf8bee7 | ||
|
|
f9918345e1 | ||
|
|
c60973c34a | ||
|
|
64a3ab321a | ||
|
|
80f7e8cdd4 | ||
|
|
2bd7d0c1f5 | ||
|
|
2b41be4cb9 | ||
|
|
352949af42 | ||
|
|
0013028c7a | ||
|
|
4f5f527c73 | ||
|
|
b7487b8dc2 | ||
|
|
a69933782d | ||
|
|
74290b4425 | ||
|
|
a0056e8fd3 | ||
|
|
9a15f50b00 | ||
|
|
7132e88685 | ||
|
|
895ee2bb3e | ||
|
|
be7cae575d | ||
|
|
d135e45676 | ||
|
|
0527099b51 | ||
|
|
67cc013ac3 | ||
|
|
af023e8bf1 | ||
|
|
01202246da | ||
|
|
6d20e2b5cd | ||
|
|
a7fb62cb9c | ||
|
|
af623460a6 | ||
|
|
2cf9f1ac8c | ||
|
|
3762630f27 | ||
|
|
a9b8f0ca69 | ||
|
|
236683d74d | ||
|
|
3a1a500950 | ||
|
|
c08a0558c8 | ||
|
|
caf1fbc899 | ||
|
|
8c66fdbb8c | ||
|
|
b78fa80fbe | ||
|
|
7fb22e27da | ||
|
|
c79a5fe50c | ||
|
|
3b1ff85222 | ||
|
|
3b9d0819c9 | ||
|
|
08b959f143 | ||
|
|
fba04057ec | ||
|
|
37d302b8ee | ||
|
|
83fa827935 | ||
|
|
17bba16fa6 | ||
|
|
a5d0e3f0c1 | ||
|
|
902f9e1a58 | ||
|
|
c519ba094d | ||
|
|
dcc90bb6d9 | ||
|
|
2b835ccb48 | ||
|
|
b85c071a79 | ||
|
|
a7eae6bed3 | ||
|
|
9b26071eb8 | ||
|
|
0262f4a6cd | ||
|
|
b671bf368a | ||
|
|
26152204a4 | ||
|
|
96218c34a1 | ||
|
|
d328ae3bfc | ||
|
|
232a5b3433 | ||
|
|
4e5090e061 | ||
|
|
b5b518571e | ||
|
|
ac78adae4b | ||
|
|
4e7b460eaf | ||
|
|
b5cf299df1 | ||
|
|
2e24f1b789 | ||
|
|
0d421482d8 | ||
|
|
c4d078c29a | ||
|
|
96f93690ce | ||
|
|
5512102f92 | ||
|
|
0023cb1f8e | ||
|
|
01bca41038 | ||
|
|
2a47ddd1f5 | ||
|
|
ba686260ca | ||
|
|
5e7c99d2aa | ||
|
|
9fe5156b53 | ||
|
|
7fa0d887e8 | ||
|
|
f5c52bdb1d | ||
|
|
f06a945444 | ||
|
|
f446f77fd4 | ||
|
|
dbe0ae2bff | ||
|
|
e03ab659f3 | ||
|
|
6ec4c7cecb | ||
|
|
4410dd363e | ||
|
|
9ff79da901 | ||
|
|
fe2163ede4 | ||
|
|
1112439c58 | ||
|
|
05c17e7e6d | ||
|
|
ecdca1311b | ||
|
|
57fab18305 | ||
|
|
c403e974ee | ||
|
|
87f663a461 | ||
|
|
42a11edef8 | ||
|
|
18a4b00a18 | ||
|
|
92f1699055 | ||
|
|
670d172cfc | ||
|
|
8ef7f03536 | ||
|
|
eb1f7bc166 | ||
|
|
48a307ff5f | ||
|
|
c0de8c984c | ||
|
|
bf12aba59d | ||
|
|
340b2d7872 | ||
|
|
6396f6fe9f | ||
|
|
0c7af1c2d3 | ||
|
|
e0bab5981a | ||
|
|
73ad4387e2 | ||
|
|
02acfd2723 | ||
|
|
7d937f04d7 | ||
|
|
99a4783b55 | ||
|
|
4dbef6afe9 | ||
|
|
f508a5f653 | ||
|
|
7bd5f21ad5 | ||
|
|
95db6bdce7 | ||
|
|
054b018d0e | ||
|
|
59c9044de1 | ||
|
|
2967657a85 | ||
|
|
e1a83402d6 | ||
|
|
271b22eccc | ||
|
|
02c347d45d | ||
|
|
c8c7c80116 | ||
|
|
d67b0311cb | ||
|
|
932d8b318e | ||
|
|
db44ca0c56 | ||
|
|
c8c4ab298c | ||
|
|
26dbc85c7c | ||
|
|
38d09c99eb | ||
|
|
ac66c45eb4 | ||
|
|
9f0069690c | ||
|
|
c5c064b74e | ||
|
|
bbbdd9c393 | ||
|
|
8baa0ac171 | ||
|
|
84ddb2abd6 | ||
|
|
1bd702777d | ||
|
|
88bff5d198 | ||
|
|
2f199771d5 | ||
|
|
aa85a68636 | ||
|
|
3bc093f562 | ||
|
|
0cf8643863 | ||
|
|
d8d68e917c | ||
|
|
63369b2a97 | ||
|
|
68289d136f | ||
|
|
7a0996f246 | ||
|
|
6360632cca | ||
|
|
eff1636a94 | ||
|
|
4793063ee0 | ||
|
|
dfa0c20530 | ||
|
|
248abca109 | ||
|
|
a3b4008eae | ||
|
|
6aa07ed919 | ||
|
|
f9a9535ee9 | ||
|
|
1ccb58d56d | ||
|
|
1312fada7c | ||
|
|
c0339c2c86 | ||
|
|
83d5097ed2 | ||
|
|
892d28f2c4 | ||
|
|
06d47d4012 | ||
|
|
82fb90c416 | ||
|
|
020ddcbd90 | ||
|
|
73287e108b | ||
|
|
7b340a1f9c | ||
|
|
ea5027da67 | ||
|
|
4d1e3042dd | ||
|
|
2a9b42cbc3 | ||
|
|
bb708957a9 | ||
|
|
ab1aa67b08 | ||
|
|
3b4771e1a9 | ||
|
|
f16af5d27e | ||
|
|
c80818c7d8 | ||
|
|
3fa8beb176 | ||
|
|
e69bce06de | ||
|
|
eb38217496 | ||
|
|
785621ff22 | ||
|
|
05bc21e115 | ||
|
|
a3c45eb1da | ||
|
|
9e926a4459 | ||
|
|
5267ac07a4 | ||
|
|
14f2b70797 | ||
|
|
b86d821bc1 | ||
|
|
7fa9bf25dc | ||
|
|
b8be5d1db2 | ||
|
|
2c7ec3957d | ||
|
|
4c8e9edc8d | ||
|
|
1478402899 | ||
|
|
2658a3b6ef | ||
|
|
6dc8b56cb6 | ||
|
|
9718fbdcd4 | ||
|
|
b22ee3c997 | ||
|
|
c86abdb67c | ||
|
|
2e07d3d665 | ||
|
|
c77dab2c35 | ||
|
|
45feba47c9 | ||
|
|
a5b65b0066 | ||
|
|
0f7f97f3a3 | ||
|
|
b3a894ca72 | ||
|
|
ec18d06ab1 | ||
|
|
c820c390c4 | ||
|
|
f10b6ffdc5 | ||
|
|
ebc8ddd7da | ||
|
|
b4b4f306c2 | ||
|
|
7427c0eff2 | ||
|
|
de570548f0 | ||
|
|
7298ffd3f2 | ||
|
|
71f36b8545 | ||
|
|
f8d15bfaf5 | ||
|
|
b0a6d939f4 | ||
|
|
8be818e771 | ||
|
|
e8c5f36b00 | ||
|
|
29c9a63c41 | ||
|
|
3d48d67c14 | ||
|
|
637045468b | ||
|
|
e3276fc282 | ||
|
|
8f3b797d29 | ||
|
|
1ec172e0e0 | ||
|
|
07c326fad3 | ||
|
|
cc06119b86 | ||
|
|
a0eb27a69e | ||
|
|
e0a4cbab6f | ||
|
|
000b4ba783 | ||
|
|
7db04b1820 | ||
|
|
08ddd1d00d | ||
|
|
e7a1222c5f | ||
|
|
255dd683d2 | ||
|
|
93e72e5036 | ||
|
|
c92a2fe47e | ||
|
|
94818b58e4 | ||
|
|
4d8e364c62 | ||
|
|
9b11b0c601 | ||
|
|
7daebd9275 | ||
|
|
022bc78961 | ||
|
|
7b23ebf63c | ||
|
|
abb476db24 | ||
|
|
63cab86cc7 | ||
|
|
3780e672a8 | ||
|
|
eb8f02358e | ||
|
|
562eedc434 | ||
|
|
5832e409d1 | ||
|
|
de4a548c07 | ||
|
|
9d4616eb55 | ||
|
|
b89f1a729a | ||
|
|
93c4c48f78 | ||
|
|
b8c1195c40 | ||
|
|
188128f788 | ||
|
|
f354d6599e | ||
|
|
8d748af95c | ||
|
|
41ef155824 | ||
|
|
7f8a5ae148 | ||
|
|
0997b286bc | ||
|
|
70cfbda2e8 | ||
|
|
dd10b91fc4 | ||
|
|
45fe448d73 | ||
|
|
75dc89826f | ||
|
|
0025e1ed9d | ||
|
|
3f3e6ba246 | ||
|
|
56eb9ebec3 | ||
|
|
317dc7ffd4 | ||
|
|
3eb4966af3 | ||
|
|
9c25614cf4 | ||
|
|
0e7c46fbd3 | ||
|
|
42fa20daec | ||
|
|
cc61126025 | ||
|
|
6031a62f72 | ||
|
|
d4476b0746 | ||
|
|
35f7dba909 | ||
|
|
2cd1a46001 | ||
|
|
9f72fe22d5 | ||
|
|
d150ed9baf | ||
|
|
d28bd0ff46 | ||
|
|
83f0af8764 | ||
|
|
025abf6f6a | ||
|
|
47455d6d1b | ||
|
|
93940b4717 | ||
|
|
5441cb959b | ||
|
|
4883a72844 | ||
|
|
2ae99f32f6 | ||
|
|
0d3d91fc51 | ||
|
|
03e2338deb | ||
|
|
d500594b8a | ||
|
|
1fe7f40fad | ||
|
|
573497fbe0 | ||
|
|
476a87dfdc | ||
|
|
e38ff18256 | ||
|
|
80341af3f5 | ||
|
|
6ac7b7a9da | ||
|
|
5e583219d6 | ||
|
|
9290e3e71f | ||
|
|
272cd59c26 | ||
|
|
de3807389a | ||
|
|
4ec258f31c | ||
|
|
5182e65d0d | ||
|
|
11cd605be7 | ||
|
|
1abff5d5cd | ||
|
|
e256bca3f9 | ||
|
|
99c1322650 | ||
|
|
9bfeb26579 | ||
|
|
bcbd6c8a7d | ||
|
|
9c92745440 | ||
|
|
d14eb96aeb | ||
|
|
1baa62e424 | ||
|
|
3a4d907c64 | ||
|
|
98860dee6a | ||
|
|
a7f8a586f4 | ||
|
|
3104a7cf38 | ||
|
|
d6aba020b0 | ||
|
|
731a01f8f4 | ||
|
|
678396f61b | ||
|
|
df4feccb98 | ||
|
|
c87a82bb7b | ||
|
|
a16be7fb4e | ||
|
|
dbb0c1d13a | ||
|
|
f4ae3c75bb | ||
|
|
ea4f399a88 | ||
|
|
856b801d33 | ||
|
|
940b9ce27e | ||
|
|
471ddd3c39 | ||
|
|
ae4a38f5d8 | ||
|
|
e1c944ec65 | ||
|
|
d681d02acf | ||
|
|
6a561bb2e7 | ||
|
|
542a01f8bc | ||
|
|
39f8526265 | ||
|
|
08d7c89175 | ||
|
|
c056029422 | ||
|
|
0dc4153997 | ||
|
|
667b722bde | ||
|
|
40ce7c8b52 | ||
|
|
a6ce07a130 | ||
|
|
3a25b5f33b | ||
|
|
28629a7ea6 | ||
|
|
405a2ca22c | ||
|
|
1b762ec32d | ||
|
|
0d691b2095 | ||
|
|
153a9f8ddb | ||
|
|
8c6dba2726 | ||
|
|
ff8a7626d0 | ||
|
|
49f726cf25 | ||
|
|
59fbe1da22 | ||
|
|
815bde09b9 | ||
|
|
5ca1d4194d | ||
|
|
723bed71bf | ||
|
|
d53ed61cab | ||
|
|
1aa52c2a7a | ||
|
|
a548ef34f8 | ||
|
|
31dc786620 | ||
|
|
254b61871e | ||
|
|
5063200c86 | ||
|
|
6cc59de148 | ||
|
|
be7f88c78f | ||
|
|
0d56e9a4a5 | ||
|
|
e9e8365c8f | ||
|
|
74eedea5db | ||
|
|
f69b2efa66 | ||
|
|
2981d9f5c1 | ||
|
|
eb69ddce43 | ||
|
|
6e81135a0d | ||
|
|
6e2aeed966 | ||
|
|
42aed81857 | ||
|
|
6fa8cd4302 | ||
|
|
fc99c14905 | ||
|
|
a2a309c263 | ||
|
|
4154b31454 | ||
|
|
fab6050ab8 | ||
|
|
1019db5850 | ||
|
|
a12c133956 | ||
|
|
ff77d82ceb | ||
|
|
5d3a35a1f3 | ||
|
|
87b97f5510 | ||
|
|
fe6284e807 | ||
|
|
6c0fe51bf2 | ||
|
|
9d1c23f6da | ||
|
|
a176b54de5 | ||
|
|
12a722bf36 | ||
|
|
1052e6585f | ||
|
|
c39170ef64 | ||
|
|
98309c3f4d | ||
|
|
c023af9c39 | ||
|
|
9beca8b1b1 | ||
|
|
ad57e919b5 | ||
|
|
adabfbe8b7 | ||
|
|
a089537b02 | ||
|
|
dcb8df1fce | ||
|
|
326b6a2c95 | ||
|
|
9d181af847 | ||
|
|
862f99832d | ||
|
|
d0e8c36aa2 | ||
|
|
248123342b | ||
|
|
6e30a6cb75 | ||
|
|
b59d10c893 | ||
|
|
1f5e2a944c | ||
|
|
3d5656e37e | ||
|
|
f90794f05a | ||
|
|
0e12cd0768 | ||
|
|
9d6eabdcfb | ||
|
|
77df4daee7 | ||
|
|
07e3174ad7 | ||
|
|
e46b2a304f | ||
|
|
0e02cc56b1 | ||
|
|
5fdee187d4 | ||
|
|
832bbd38e1 | ||
|
|
71b359154b | ||
|
|
8b0ccf1444 | ||
|
|
4108061316 | ||
|
|
a4de9fa8f6 | ||
|
|
7b24b4c30c | ||
|
|
2874006c7b | ||
|
|
56875b34d6 | ||
|
|
0512d10a02 | ||
|
|
be9b7e82c8 | ||
|
|
53d52c0cd3 | ||
|
|
5ddcf3d36a | ||
|
|
d873c2705d | ||
|
|
c9b5f43d11 | ||
|
|
4d287dd1bf | ||
|
|
00bfe2f025 | ||
|
|
587e7f0682 | ||
|
|
1cb4a1494f | ||
|
|
8d23799758 | ||
|
|
cdac2c4f82 | ||
|
|
57653ee0ea | ||
|
|
78953066af | ||
|
|
7a6dacf296 | ||
|
|
d487077d6e | ||
|
|
4c80a9948e | ||
|
|
3e07dd4a03 | ||
|
|
4cda2df265 | ||
|
|
9f0bf057e6 | ||
|
|
ea5ec656f4 | ||
|
|
1e5830a157 | ||
|
|
67039f6065 | ||
|
|
328a8b586f | ||
|
|
f5b2c790a0 | ||
|
|
ee4659b678 | ||
|
|
d4670870fb | ||
|
|
3c5b78631b | ||
|
|
dbe65c9aaf | ||
|
|
1438e844d9 | ||
|
|
659be53a3e | ||
|
|
52a9e4ecd8 | ||
|
|
04f17c5cee | ||
|
|
f4009da657 | ||
|
|
61f15c5c17 | ||
|
|
3d5b5ce834 | ||
|
|
29f7b76be0 | ||
|
|
2aa3a13d32 | ||
|
|
dedc9d8c46 | ||
|
|
f5a6b610e1 | ||
|
|
4e39c05bb6 | ||
|
|
9ad9969536 | ||
|
|
4f08018fa8 | ||
|
|
ef41907cab | ||
|
|
dbd0c5ff80 | ||
|
|
1f452ffdc3 | ||
|
|
f95c8efb63 | ||
|
|
6cb1ea3ae4 | ||
|
|
a67536618a | ||
|
|
b1727357b5 | ||
|
|
f6bf081cdb | ||
|
|
fdceeeb190 | ||
|
|
8c4c025c30 | ||
|
|
5d31ac594b | ||
|
|
6be0a39eea | ||
|
|
e8fe7aa08e | ||
|
|
80db62e711 | ||
|
|
4de76dbc82 | ||
|
|
6d9cd6ff47 | ||
|
|
a204921cc5 | ||
|
|
fca97d4834 | ||
|
|
3463753afc | ||
|
|
eadd0048c4 | ||
|
|
2aef3e3cfe | ||
|
|
96b1dc773f | ||
|
|
44fc593dfe | ||
|
|
f155921461 | ||
|
|
f6879be327 | ||
|
|
d23df3d0af | ||
|
|
65ceb00a1f | ||
|
|
5831485bdf | ||
|
|
9b6bd9e419 | ||
|
|
72400ce72a | ||
|
|
2e2ab0b4dd | ||
|
|
11254c9da4 | ||
|
|
b84c870b54 | ||
|
|
1f2a287b7f | ||
|
|
51f445fc67 | ||
|
|
f11836f206 | ||
|
|
c1d000b654 | ||
|
|
5fbf3ab27e | ||
|
|
4a1716ac67 | ||
|
|
4950af89fb | ||
|
|
d390ea696a | ||
|
|
f109e90e15 | ||
|
|
753ba20386 | ||
|
|
968aa1b199 | ||
|
|
290e7bd222 | ||
|
|
218c59e058 | ||
|
|
d6290b8e48 | ||
|
|
983e91b440 | ||
|
|
2d7a71d379 | ||
|
|
f53955df4a | ||
|
|
139708e063 | ||
|
|
779e2bf80f | ||
|
|
fb0d9d3c93 | ||
|
|
75e2399319 | ||
|
|
9a76675d1d | ||
|
|
fd20ed4d17 | ||
|
|
9ebdc099d1 | ||
|
|
9c6a0e4e69 | ||
|
|
e659759671 | ||
|
|
c0bf3cd7f9 | ||
|
|
521d995b9d | ||
|
|
0feaad7183 | ||
|
|
8e3e51e3a2 | ||
|
|
7915c348c3 | ||
|
|
b42d4da7db | ||
|
|
505bee983c | ||
|
|
3144ef3cc6 | ||
|
|
5725c4b305 | ||
|
|
9481ea480b | ||
|
|
ed24f0fdc1 | ||
|
|
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 | ||
|
|
c86dcf7826 | ||
|
|
e018422743 | ||
|
|
2ee98beba2 | ||
|
|
354a57ed5e | ||
|
|
3ddf9a4210 | ||
|
|
c4dbab94f3 | ||
|
|
008f4cb517 | ||
|
|
d7e0337587 | ||
|
|
625a65e970 | ||
|
|
e6d0609a54 | ||
|
|
8ac8b20960 | ||
|
|
0b5d1fb68a | ||
|
|
701b090cd1 | ||
|
|
1bf8332ada | ||
|
|
ef46e9bc60 | ||
|
|
79b506472d | ||
|
|
c4edb21f63 | ||
|
|
474cb76864 | ||
|
|
dfb8e7003b | ||
|
|
3c02bc385b | ||
|
|
2ac722926e | ||
|
|
fb799b7647 | ||
|
|
6e27b6ec86 | ||
|
|
44911a1c48 | ||
|
|
8603259d40 | ||
|
|
b6d2b739f3 | ||
|
|
2931f43895 | ||
|
|
d69d2df8d6 | ||
|
|
a8eabeabbb | ||
|
|
48b4870c7e | ||
|
|
e8ddef1d93 | ||
|
|
620d3999ef | ||
|
|
0a9c978f18 | ||
|
|
ada7fa862d | ||
|
|
c54ec1c639 | ||
|
|
a3921adfe1 | ||
|
|
98a9959a44 | ||
|
|
1362bebfdc | ||
|
|
bd5a0a1ce8 | ||
|
|
c77358491a | ||
|
|
5f16b0abca | ||
|
|
86f4e8b4a0 | ||
|
|
60338bd872 | ||
|
|
ac14fdb0b7 | ||
|
|
15268bfbeb | ||
|
|
a06a2e492f | ||
|
|
de1094e980 | ||
|
|
7a8eb507a7 | ||
|
|
94c94d3c0e | ||
|
|
45e7e5ac55 | ||
|
|
543ec864c4 | ||
|
|
fc1d6ea442 | ||
|
|
42b2cbf237 | ||
|
|
8235f7a15f | ||
|
|
68a1ab1d04 | ||
|
|
623aa3675f | ||
|
|
017740b75a | ||
|
|
67d0d1ec3b | ||
|
|
45410fcd3a | ||
|
|
9af97b86f8 | ||
|
|
22e434dfaf | ||
|
|
014d7f5b8f | ||
|
|
5a3272cdca | ||
|
|
b36ba44e0d | ||
|
|
0a6d59a611 | ||
|
|
6118595a07 | ||
|
|
504382bcb8 | ||
|
|
45d8ca15b5 | ||
|
|
06bbaed27a | ||
|
|
b578c75c4e | ||
|
|
bf2b676eaa | ||
|
|
b727359f1b | ||
|
|
4c3a1e29e0 | ||
|
|
5d413a0078 | ||
|
|
17228aca47 | ||
|
|
8b8a0eeff3 | ||
|
|
712bfdf9d2 | ||
|
|
3306222630 | ||
|
|
41f3c50a16 | ||
|
|
f20d072c4a | ||
|
|
684b802b27 | ||
|
|
edc1e01eab | ||
|
|
761aa4aa7c | ||
|
|
3e92d8aca0 | ||
|
|
0958466903 | ||
|
|
09969dc53e | ||
|
|
6ac900dc95 | ||
|
|
b2a52ede55 | ||
|
|
6083a3a3ad | ||
|
|
19a24602b8 | ||
|
|
96d4684fa7 | ||
|
|
f7f28ed01a | ||
|
|
f0c4accb88 | ||
|
|
c1d020f689 | ||
|
|
d69aa52fe8 | ||
|
|
6456c000bd | ||
|
|
3021b1acc8 | ||
|
|
3878b82c9b | ||
|
|
5561c55286 | ||
|
|
51204ddced | ||
|
|
7508aa6219 | ||
|
|
4508e6fe73 | ||
|
|
155d8d1828 | ||
|
|
7c183b2f1c | ||
|
|
9269733ed0 | ||
|
|
e649f47e88 | ||
|
|
97a570fa10 | ||
|
|
41b142bae4 | ||
|
|
b18929ef7d | ||
|
|
b7199e5967 | ||
|
|
6cc711d33e | ||
|
|
ab964f3c9d | ||
|
|
d303ef9384 | ||
|
|
58a357e6e6 | ||
|
|
430893f5f8 | ||
|
|
df9b2abe91 | ||
|
|
17617c5451 | ||
|
|
d481cff89b | ||
|
|
bc141db940 | ||
|
|
3dcbed5763 | ||
|
|
05023971cb |
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <AT91R40008.h>
|
||||
|
||||
#define configFLASH_SPEED_NSEC 100 /* External flash access speed (for ROM builds) */
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* 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 ) 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 configTOTAL_HEAP_SIZE ( ( size_t ) ( 25 * 1024 ) )
|
||||
#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,99 +0,0 @@
|
||||
# FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
#
|
||||
# ***************************************************************************
|
||||
# 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.
|
||||
# ***************************************************************************
|
||||
|
||||
CC=arm-elf-gcc
|
||||
OBJCOPY=arm-elf-objcopy
|
||||
ARCH=arm-elf-ar
|
||||
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 \
|
||||
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
|
||||
-Wcast-align $(OPTIM)
|
||||
|
||||
ifeq ($(USE_THUMB_MODE),YES)
|
||||
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
|
||||
THUMB_FLAGS=-mthumb
|
||||
endif
|
||||
|
||||
|
||||
LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
|
||||
|
||||
#
|
||||
# Source files that can be built to THUMB mode.
|
||||
#
|
||||
THUMB_SRC = \
|
||||
main.c \
|
||||
serial/serial.c \
|
||||
ParTest/ParTest.c \
|
||||
../Common/Minimal/integer.c \
|
||||
../Common/Minimal/flash.c \
|
||||
../Common/Minimal/PollQ.c \
|
||||
../Common/Minimal/comtest.c \
|
||||
../Common/Minimal/flop.c \
|
||||
../Common/Minimal/semtest.c \
|
||||
../Common/Minimal/dynamic.c \
|
||||
../Common/Minimal/BlockQ.c \
|
||||
../../Source/tasks.c \
|
||||
../../Source/queue.c \
|
||||
../../Source/list.c \
|
||||
../../Source/portable/MemMang/heap_2.c \
|
||||
../../Source/portable/GCC/ARM7_AT91FR40008/port.c
|
||||
|
||||
#
|
||||
# Source files that must be built to ARM mode.
|
||||
#
|
||||
ARM_SRC = \
|
||||
../../Source/portable/GCC/ARM7_AT91FR40008/portISR.c \
|
||||
serial/serialISR.c
|
||||
|
||||
#
|
||||
# Define all object files.
|
||||
#
|
||||
ARM_OBJ = $(ARM_SRC:.c=.o)
|
||||
THUMB_OBJ = $(THUMB_SRC:.c=.o)
|
||||
|
||||
rtosdemo.hex : rtosdemo.elf
|
||||
$(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex
|
||||
|
||||
rtosdemo.elf : $(ARM_OBJ) $(THUMB_OBJ) $(CRT0) Makefile
|
||||
$(CC) $(CFLAGS) $(ARM_OBJ) $(THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
|
||||
|
||||
$(THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
|
||||
$(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
|
||||
|
||||
$(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
clean :
|
||||
touch Makefile
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "portable.h"
|
||||
|
||||
/* Demo app includes. */
|
||||
#include "partest.h"
|
||||
|
||||
/* Hardware specific definitions. */
|
||||
#include "AT91R40008.h"
|
||||
#include "pio.h"
|
||||
#include "aic.h"
|
||||
|
||||
#define partstNUM_LEDS ( 8 )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) ~(0xFFFFFFFF << partstNUM_LEDS) )
|
||||
|
||||
static unsigned portLONG ulLEDReg;
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
static void SetLeds (unsigned int leds)
|
||||
{
|
||||
unsigned portLONG 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. */
|
||||
|
||||
ulPIOSetReg = ( (leds & 0xF) << 16 ) | ( (leds & 0xF0) >> 1 );
|
||||
ulPIOClearReg = (~ulPIOSetReg) & 0x000F0078;
|
||||
|
||||
AT91C_BASE_PIO->PIO_SODR = ulPIOSetReg;
|
||||
AT91C_BASE_PIO->PIO_CODR = ulPIOClearReg;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* This is performed from main() as the io bits are shared with other setup
|
||||
functions. Ensure the outputs are off to start. */
|
||||
ulLEDReg = partstALL_OUTPUTS_OFF;
|
||||
|
||||
/* Enable clock to PIO... */
|
||||
AT91C_BASE_PS->PS_PCER = AT91C_PS_PIO;
|
||||
|
||||
/* Enable all 8 LEDs and the four switches to be controlled by PIO... */
|
||||
AT91C_BASE_PIO->PIO_PER = P3 | P4 | P5 | P6 | P16 | P17 | P18 | P19 | P1 | P2 | P9 | P12;
|
||||
|
||||
/* Configure all LED PIO lines for output... */
|
||||
AT91C_BASE_PIO->PIO_OER = P3 | P4 | P5 | P6 | P16 | P17 | P18 | P19;
|
||||
|
||||
/* Configure all switch PIO lines for input... */
|
||||
AT91C_BASE_PIO->PIO_ODR = P1 | P2 | P9 | P12;
|
||||
|
||||
/* Set initial state of LEDs. */
|
||||
SetLeds( ulLEDReg );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
/* Switch an LED on or off as requested. */
|
||||
if (uxLED < partstNUM_LEDS)
|
||||
{
|
||||
if( xValue )
|
||||
{
|
||||
ulLEDReg &= ~(1 << uxLED);
|
||||
}
|
||||
else
|
||||
{
|
||||
ulLEDReg |= (1 << uxLED);
|
||||
}
|
||||
|
||||
SetLeds( ulLEDReg );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
/* Toggle the state of the requested LED. */
|
||||
if (uxLED < partstNUM_LEDS)
|
||||
{
|
||||
ulLEDReg ^= ( 1 << uxLED );
|
||||
SetLeds( ulLEDReg );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
MEMORY
|
||||
{
|
||||
flash : ORIGIN = 0x00000000, LENGTH = 2048K
|
||||
ram : ORIGIN = 0x00300000, LENGTH = 256K
|
||||
}
|
||||
|
||||
__stack_end__ = 0x00300000 + 256K - 4;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = 0;
|
||||
startup : { *(.startup)} >flash
|
||||
|
||||
prog :
|
||||
{
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
} >flash
|
||||
|
||||
__end_of_text__ = .;
|
||||
|
||||
.data :
|
||||
{
|
||||
__data_beg__ = .;
|
||||
__data_beg_src__ = __end_of_text__;
|
||||
*(.data)
|
||||
__data_end__ = .;
|
||||
} >ram AT>flash
|
||||
|
||||
.bss :
|
||||
{
|
||||
__bss_beg__ = .;
|
||||
*(.bss)
|
||||
} >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. */
|
||||
. = ALIGN(32 / 8);
|
||||
}
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .;
|
||||
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
|
||||
PROVIDE (end = .);
|
||||
|
||||
|
||||
@@ -1,469 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) 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
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
* To check the operation of the memory allocator the check task also
|
||||
* dynamically creates a task before delaying, and deletes it again when it
|
||||
* wakes. If memory cannot be allocated for the new task the call to xTaskCreate
|
||||
* will fail and an error is signalled. The dynamically created task itself
|
||||
* allocates and frees memory just to give the allocator a bit more exercise.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "partest.h"
|
||||
#include "flash.h"
|
||||
#include "integer.h"
|
||||
#include "PollQ.h"
|
||||
#include "comtest2.h"
|
||||
#include "semtest.h"
|
||||
#include "flop.h"
|
||||
#include "dynamic.h"
|
||||
#include "BlockQ.h"
|
||||
#include "serial.h"
|
||||
|
||||
/* Hardware specific definitions. */
|
||||
#include "aic.h"
|
||||
#include "ebi.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 5 )
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
|
||||
/* The rate at which the on board LED will toggle when there is/is not an
|
||||
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 )
|
||||
|
||||
/* Constants used by the vMemCheckTask() task. */
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
|
||||
#define mainNO_TASK ( 0 )
|
||||
|
||||
/* The size of the memory blocks allocated by the vMemCheckTask() task. */
|
||||
#define mainMEM_CHECK_SIZE_1 ( ( size_t ) 51 )
|
||||
#define mainMEM_CHECK_SIZE_2 ( ( size_t ) 52 )
|
||||
#define mainMEM_CHECK_SIZE_3 ( ( size_t ) 151 )
|
||||
|
||||
#define MAX_WAIT_STATES 8
|
||||
static const unsigned portLONG ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] =
|
||||
{
|
||||
WaitState1,/* There is no "zero wait state" value, so use one wait state */
|
||||
WaitState1,
|
||||
WaitState2,
|
||||
WaitState3,
|
||||
WaitState4,
|
||||
WaitState5,
|
||||
WaitState6,
|
||||
WaitState7,
|
||||
WaitState8
|
||||
};
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* 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 );
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||
* of the file.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Dynamically created and deleted during each cycle of the vErrorChecks()
|
||||
* task. This is done to check the operation of the memory allocator.
|
||||
* See the top of vErrorChecks for more details.
|
||||
*/
|
||||
static void vMemCheckTask( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Configure the processor for use with the Olimex demo board. This includes
|
||||
* setup for the I/O, system clock, and access timings.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Starts all the other tasks, then starts the scheduler.
|
||||
*/
|
||||
int main( void )
|
||||
{
|
||||
/* Setup the hardware for use with the Olimex demo board. */
|
||||
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 );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartMathTasks( tskIDLE_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
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 );
|
||||
|
||||
/* Now all the tasks have been started - start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should never reach here! */
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
unsigned portLONG ulMemCheckTaskRunningCount;
|
||||
xTaskHandle xCreatedTask;
|
||||
|
||||
/* 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
|
||||
the on board LED flash rate will increase.
|
||||
|
||||
In addition to the standard tests the memory allocator is tested through
|
||||
the dynamic creation and deletion of a task each cycle. Each time the
|
||||
task is created memory must be allocated for its stack. When the task is
|
||||
deleted this memory is returned to the heap. If the task cannot be created
|
||||
then it is likely that the memory allocation failed. */
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Reset xCreatedTask. This is modified by the task about to be
|
||||
created so we can tell if it is executing correctly or not. */
|
||||
xCreatedTask = mainNO_TASK;
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
/* Could not create the task - we have probably run out of heap. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
/* Delay until it is time to execute again. */
|
||||
vTaskDelay( xDelayPeriod );
|
||||
|
||||
/* Delete the dynamically created task. */
|
||||
if( xCreatedTask != mainNO_TASK )
|
||||
{
|
||||
vTaskDelete( xCreatedTask );
|
||||
}
|
||||
|
||||
/* Check all the standard demo application tasks are executing without
|
||||
error. ulMemCheckTaskRunningCount is checked to ensure it was
|
||||
modified by the task just deleted. */
|
||||
if( prvCheckOtherTasksAreStillRunning( ulMemCheckTaskRunningCount ) != pdPASS )
|
||||
{
|
||||
/* An error has been detected in one of the tasks - flash faster. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
/* The toggle rate of the LED depends on how long this task delays for.
|
||||
An error reduces the delay period and so increases the toggle rate. */
|
||||
vParTestToggleLED( mainON_BOARD_LED_BIT );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
portLONG lCount;
|
||||
|
||||
#ifdef RUN_FROM_ROM
|
||||
{
|
||||
portFLOAT nsecsPerClockTick;
|
||||
portLONG lNumWaitStates;
|
||||
unsigned portLONG 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
|
||||
(flash @ 0x00000000, RAM @ 0x00300000), and set up the
|
||||
proper flash wait states (starts out at the maximum number
|
||||
of wait states on reset, so we should be able to reduce it).
|
||||
Most of this code will probably get removed by the compiler
|
||||
if optimization is enabled, since these calculations are
|
||||
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;
|
||||
|
||||
if( lNumWaitStates < 0 )
|
||||
{
|
||||
lNumWaitStates = 0;
|
||||
}
|
||||
|
||||
if( lNumWaitStates > MAX_WAIT_STATES )
|
||||
{
|
||||
lNumWaitStates = MAX_WAIT_STATES;
|
||||
}
|
||||
|
||||
ulCSRWaitValue = ululCSRWaitValues[ lNumWaitStates ];
|
||||
ulCSRWaitValue = WaitState5;
|
||||
|
||||
AT91C_BASE_EBI->EBI_CSR[ 0 ] = ulCSRWaitValue | DataBus16 | WaitStateEnable
|
||||
| PageSize1M | tDF_0cycle
|
||||
| ByteWriteAccessType | CSEnable
|
||||
| 0x00000000 /* Base Address */;
|
||||
}
|
||||
#else /* else we are compiling to run from on-chip RAM */
|
||||
{
|
||||
/* If compiling to run from RAM, we expect the on-chip RAM to already
|
||||
be mapped at 0x00000000. This is typically done with an initialization
|
||||
script for the JTAG emulator you are using to download and run the
|
||||
demo application. So there is nothing to do here in this case. */
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Disable all interrupts at the AIC level initially... */
|
||||
AT91C_BASE_AIC->AIC_IDCR = 0xFFFFFFFF;
|
||||
|
||||
/* Set all SVR and SMR entries to default values (start with a clean slate)... */
|
||||
for( lCount = 0; lCount < 32; lCount++ )
|
||||
{
|
||||
AT91C_BASE_AIC->AIC_SVR[ lCount ] = (unsigned long) 0;
|
||||
AT91C_BASE_AIC->AIC_SMR[ lCount ] = AIC_SRCTYPE_INT_EDGE_TRIGGERED;
|
||||
}
|
||||
|
||||
/* Disable clocks to all peripherals initially... */
|
||||
AT91C_BASE_PS->PS_PCDR = 0xFFFFFFFF;
|
||||
|
||||
/* Clear all interrupts at the AIC level initially... */
|
||||
AT91C_BASE_AIC->AIC_ICCR = 0xFFFFFFFF;
|
||||
|
||||
/* Perform 8 "End Of Interrupt" cmds to make sure AIC will not Lock out
|
||||
nIRQ */
|
||||
for( lCount = 0; lCount < 8; lCount++ )
|
||||
{
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
}
|
||||
|
||||
/* Initialise LED outputs. */
|
||||
vParTestInitialise();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) 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() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )
|
||||
{
|
||||
/* The vMemCheckTask did not increment the counter - it must
|
||||
have failed. */
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vMemCheckTask( void *pvParameters )
|
||||
{
|
||||
unsigned portLONG *pulMemCheckTaskRunningCounter;
|
||||
void *pvMem1, *pvMem2, *pvMem3;
|
||||
static portLONG 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
|
||||
the task is created memory is allocated for the stack and TCB. Each time
|
||||
the task is deleted this memory is returned to the heap. This task itself
|
||||
exercises the allocator by allocating and freeing blocks.
|
||||
|
||||
The task executes at the idle priority so does not require a delay.
|
||||
|
||||
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
|
||||
vErrorChecks() task that this task is still executing without error. */
|
||||
|
||||
pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
if( lErrorOccurred == pdFALSE )
|
||||
{
|
||||
/* We have never seen an error so increment the counter. */
|
||||
( *pulMemCheckTaskRunningCounter )++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There has been an error so reset the counter so the check task
|
||||
can tell that an error occurred. */
|
||||
*pulMemCheckTaskRunningCounter = mainCOUNT_INITIAL_VALUE;
|
||||
}
|
||||
|
||||
/* Allocate some memory - just to give the allocator some extra
|
||||
exercise. This has to be in a critical section to ensure the
|
||||
task does not get deleted while it has memory allocated. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
pvMem1 = pvPortMalloc( mainMEM_CHECK_SIZE_1 );
|
||||
if( pvMem1 == NULL )
|
||||
{
|
||||
lErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset( pvMem1, 0xaa, mainMEM_CHECK_SIZE_1 );
|
||||
vPortFree( pvMem1 );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
|
||||
/* Again - with a different size block. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
pvMem2 = pvPortMalloc( mainMEM_CHECK_SIZE_2 );
|
||||
if( pvMem2 == NULL )
|
||||
{
|
||||
lErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset( pvMem2, 0xaa, mainMEM_CHECK_SIZE_2 );
|
||||
vPortFree( pvMem2 );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
|
||||
/* Again - with a different size block. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
pvMem3 = pvPortMalloc( mainMEM_CHECK_SIZE_3 );
|
||||
if( pvMem3 == NULL )
|
||||
{
|
||||
lErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset( pvMem3, 0xaa, mainMEM_CHECK_SIZE_3 );
|
||||
vPortFree( pvMem3 );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
//*---------------------------------------------------------------------------
|
||||
//* ATMEL Microcontroller Software Support - ROUSSET -
|
||||
//*---------------------------------------------------------------------------
|
||||
//* The software is delivered "AS IS" without warranty or condition of any
|
||||
//* kind, either express, implied or statutory. This includes without
|
||||
//* limitation any warranty or condition with respect to merchantability or
|
||||
//* fitness for any particular purpose, or against the infringements of
|
||||
//* intellectual property rights of others.
|
||||
//*-----------------------------------------------------------------------------
|
||||
//* File Name : pio.h
|
||||
//* Object : Parallel I/O Definition File
|
||||
//* Translator : ARM Software Development Toolkit V2.11a
|
||||
//*
|
||||
//* 1.0 20/10/97 JCZ : Creation
|
||||
//* 2.0 21/10/98 JCZ : Clean up
|
||||
//*---------------------------------------------------------------------------
|
||||
|
||||
#ifndef pio_h
|
||||
#define pio_h
|
||||
|
||||
/*---------------------------------------------*/
|
||||
/* Parallel I/O Interface Structure Definition */
|
||||
/*---------------------------------------------*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
at91_reg PIO_PER ; /* PIO Enable Register */
|
||||
at91_reg PIO_PDR ; /* PIO Disable Register */
|
||||
at91_reg PIO_PSR ; /* PIO Status Register */
|
||||
at91_reg Reserved0 ;
|
||||
at91_reg PIO_OER ; /* Output Enable Register */
|
||||
at91_reg PIO_ODR ; /* Output Disable Register */
|
||||
at91_reg PIO_OSR ; /* Output Status Register */
|
||||
at91_reg Reserved1 ;
|
||||
at91_reg PIO_IFER ; /* Input Filter Enable Register */
|
||||
at91_reg PIO_IFDR ; /* Input Filter Disable Register */
|
||||
at91_reg PIO_IFSR ; /* Input Filter Status Register */
|
||||
at91_reg Reserved2 ;
|
||||
at91_reg PIO_SODR ; /* Set Output Data Register */
|
||||
at91_reg PIO_CODR ; /* Clear Output Data Register */
|
||||
at91_reg PIO_ODSR ; /* Output Data Status Register */
|
||||
at91_reg PIO_PDSR ; /* Pin Data Status Register */
|
||||
at91_reg PIO_IER ; /* Interrupt Enable Register */
|
||||
at91_reg PIO_IDR ; /* Interrupt Disable Register */
|
||||
at91_reg PIO_IMR ; /* Interrupt Mask Register */
|
||||
at91_reg PIO_ISR ; /* Interrupt Status Register */
|
||||
} StructPIO ;
|
||||
|
||||
/*-----------------------------*/
|
||||
/* PIO Handler type definition */
|
||||
/*-----------------------------*/
|
||||
|
||||
//typedef void (*TypePIOHandler) ( StructPIO *pio_pt, u_int pio_mask ) ;
|
||||
|
||||
/*--------------------------------*/
|
||||
/* Device Dependancies Definition */
|
||||
/*--------------------------------*/
|
||||
|
||||
/* Number of PIO Controller */
|
||||
#define NB_PIO_CTRL 1
|
||||
/* Base Address */
|
||||
#define PIO_BASE ((StructPIO *) 0xFFFF0000 )
|
||||
/* Number of PIO Lines */
|
||||
#define NB_PIO 32
|
||||
|
||||
/* Parallel I/O Bits Definition */
|
||||
#define P0 (1<<0)
|
||||
#define P1 (1<<1)
|
||||
#define P2 (1<<2)
|
||||
#define P3 (1<<3)
|
||||
#define P4 (1<<4)
|
||||
#define P5 (1<<5)
|
||||
#define P6 (1<<6)
|
||||
#define P7 (1<<7)
|
||||
#define P8 (1<<8)
|
||||
#define P9 (1<<9)
|
||||
#define P10 (1<<10)
|
||||
#define P11 (1<<11)
|
||||
#define P12 (1<<12)
|
||||
#define P13 (1<<13)
|
||||
#define P14 (1<<14)
|
||||
#define P15 (1<<15)
|
||||
#define P16 (1<<16)
|
||||
#define P17 (1<<17)
|
||||
#define P18 (1<<18)
|
||||
#define P19 (1<<19)
|
||||
#define P20 (1<<20)
|
||||
#define P21 (1<<21)
|
||||
#define P22 (1<<22)
|
||||
#define P23 (1<<23)
|
||||
#define P24 (1<<24)
|
||||
#define P25 (1<<25)
|
||||
#define P26 (1<<26)
|
||||
#define P27 (1<<27)
|
||||
#define P28 (1<<28)
|
||||
#define P29 (1<<29)
|
||||
#define P30 (1<<30)
|
||||
#define P31 (1<<31)
|
||||
|
||||
/* PIO Multiplexing Definition */
|
||||
|
||||
/* There is only one PIO Controller */
|
||||
#define PIO_CTRL 0
|
||||
|
||||
#define PIO_TC0 PIO_CTRL
|
||||
#define TCLK0 P0
|
||||
#define TIOA0 P1
|
||||
#define TIOB0 P2
|
||||
#define PIN_TC0 (TIOA0|TIOB0|TCLK0)
|
||||
|
||||
#define PIO_TC1 PIO_CTRL
|
||||
#define TCLK1 P3
|
||||
#define TIOA1 P4
|
||||
#define TIOB1 P5
|
||||
#define PIN_TC1 (TIOA1|TIOB1|TCLK1)
|
||||
|
||||
#define PIO_TC2 PIO_CTRL
|
||||
#define TCLK2 P6
|
||||
#define TIOA2 P7
|
||||
#define TIOB2 P8
|
||||
#define PIN_TC2 (TIOA2|TIOB2|TCLK2)
|
||||
|
||||
#define PIO_EXT_IRQ PIO_CTRL
|
||||
#define PIN_IRQ0 P9
|
||||
#define PIN_IRQ1 P10
|
||||
#define PIN_IRQ2 P11
|
||||
#define PIN_FIQ P12
|
||||
|
||||
#define PIO_USART0 PIO_CTRL
|
||||
#define SCK0 P13
|
||||
#define TXD0 P14
|
||||
#define RXD0 P15
|
||||
#define PIN_USART0 (SCK0|TXD0|RXD0)
|
||||
|
||||
#define PIO_USART1 PIO_CTRL
|
||||
#define SCK1 P20
|
||||
#define TXD1 P21
|
||||
#define RXD1 P22
|
||||
#define PIN_USART1 (SCK1|TXD1|RXD1)
|
||||
|
||||
#define MCKO P25
|
||||
#define CS2 P26
|
||||
#define CS3 P27
|
||||
#define CS4 P31
|
||||
#define CS5 P30
|
||||
#define CS6 P29
|
||||
#define CS7 P28
|
||||
|
||||
#endif /* pio_h */
|
||||
@@ -1,228 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
|
||||
|
||||
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"
|
||||
#include "AT91R40008.h"
|
||||
#include "usart.h"
|
||||
#include "pio.h"
|
||||
#include "aic.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup and access the UART. */
|
||||
#define portUSART0_AIC_CHANNEL ( ( unsigned portLONG ) 2 )
|
||||
|
||||
#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;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* 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 );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulSpeed;
|
||||
unsigned portLONG ulCD;
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
extern void ( vUART_ISR )( void );
|
||||
|
||||
/* 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 );
|
||||
|
||||
if(
|
||||
( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 0 )
|
||||
)
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Enable clock to USART0... */
|
||||
AT91C_BASE_PS->PS_PCER = AT91C_PS_US0;
|
||||
|
||||
/* Disable all USART0 interrupt sources to begin... */
|
||||
AT91C_BASE_US0->US_IDR = 0xFFFFFFFF;
|
||||
|
||||
/* Reset various status bits (just in case)... */
|
||||
AT91C_BASE_US0->US_CR = US_RSTSTA;
|
||||
|
||||
AT91C_BASE_PIO->PIO_PDR = TXD0 | RXD0; /* Enable RXD and TXD pins */
|
||||
AT91C_BASE_US0->US_CR = US_RSTRX | US_RSTTX | US_RXDIS | US_TXDIS;
|
||||
|
||||
/* Clear Transmit and Receive Counters */
|
||||
AT91C_BASE_US0->US_RCR = 0;
|
||||
AT91C_BASE_US0->US_TCR = 0;
|
||||
|
||||
/* Input clock to baud rate generator is MCK */
|
||||
ulSpeed = configCPU_CLOCK_HZ * 10;
|
||||
ulSpeed = ulSpeed / 16;
|
||||
ulSpeed = ulSpeed / ulWantedBaud;
|
||||
|
||||
/* compute the error */
|
||||
ulCD = ulSpeed / 10;
|
||||
if ((ulSpeed - (ulCD * 10)) >= 5)
|
||||
ulCD++;
|
||||
|
||||
/* Define the baud rate divisor register */
|
||||
AT91C_BASE_US0->US_BRGR = ulCD;
|
||||
|
||||
/* Define the USART mode */
|
||||
AT91C_BASE_US0->US_MR = US_CLKS_MCK | US_CHRL_8 | US_PAR_NO | US_NBSTOP_1 | US_CHMODE_NORMAL;
|
||||
|
||||
/* Write the Timeguard Register */
|
||||
AT91C_BASE_US0->US_TTGR = 0;
|
||||
|
||||
/* Setup the interrupt for USART0.
|
||||
|
||||
Store interrupt handler function address in USART0 vector register... */
|
||||
AT91C_BASE_AIC->AIC_SVR[ portUSART0_AIC_CHANNEL ] = (unsigned long)vUART_ISR;
|
||||
|
||||
/* USART0 interrupt level-sensitive, priority 1... */
|
||||
AT91C_BASE_AIC->AIC_SMR[ portUSART0_AIC_CHANNEL ] = AIC_SRCTYPE_INT_LEVEL_SENSITIVE | 1;
|
||||
|
||||
/* Clear some pending USART0 interrupts (just in case)... */
|
||||
AT91C_BASE_US0->US_CR = US_RSTSTA;
|
||||
|
||||
/* Enable USART0 interrupt sources (but not Tx for now)... */
|
||||
AT91C_BASE_US0->US_IER = US_RXRDY;
|
||||
|
||||
/* Enable USART0 interrupts in the AIC... */
|
||||
AT91C_BASE_AIC->AIC_IECR = ( 1 << portUSART0_AIC_CHANNEL );
|
||||
|
||||
/* Enable receiver and transmitter... */
|
||||
AT91C_BASE_US0->US_CR = US_RXEN | US_TXEN;
|
||||
}
|
||||
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;
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
/* Place the character in the queue of characters to be transmitted. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
{
|
||||
return pdFAIL;
|
||||
}
|
||||
|
||||
/* Turn on the Tx interrupt so the ISR will remove the character from the
|
||||
queue and send it. This does not need to be in a critical section as
|
||||
if the interrupt has already removed the character the next interrupt
|
||||
will simply turn off the Tx interrupt again. */
|
||||
AT91C_BASE_US0->US_IER = US_TXRDY;
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
/* Not supported as not required by the demo application. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "serial.h"
|
||||
#include "AT91R40008.h"
|
||||
#include "usart.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constant to access the AIC. */
|
||||
#define serCLEAR_AIC_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 portLONG ) (US_RXRDY | US_TXRDY | US_RXBRK | US_OVRE | US_FRAME | US_PARE) )
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* UART0 interrupt service routine. This can cause a context switch so MUST
|
||||
be declared "naked". */
|
||||
void vUART_ISR( void ) __attribute__ ((naked));
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
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 ) );
|
||||
|
||||
/* Pass back a reference to the queues so the serial API file can
|
||||
post/receive characters. */
|
||||
*pxRxedChars = xRxedChars;
|
||||
*pxCharsForTx = xCharsForTx;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR( void )
|
||||
{
|
||||
/* This ISR can cause a context switch, so the first statement must be a
|
||||
call to the portENTER_SWITCHING_ISR() macro. This must be BEFORE any
|
||||
variable declarations. */
|
||||
portENTER_SWITCHING_ISR();
|
||||
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
ulStatus = AT91C_BASE_US0->US_CSR & AT91C_BASE_US0->US_IMR;
|
||||
|
||||
if (ulStatus & US_TXRDY)
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
AT91C_BASE_US0->US_THR = cChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||
AT91C_BASE_US0->US_IDR = US_TXRDY;
|
||||
}
|
||||
}
|
||||
|
||||
if (ulStatus & US_RXRDY)
|
||||
{
|
||||
/* The interrupt was caused by the receiver getting data. */
|
||||
cChar = AT91C_BASE_US0->US_RHR;
|
||||
|
||||
if (xQueueSendFromISR(xRxedChars, &cChar, pdFALSE))
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Acknowledge the interrupt at AIC level...
|
||||
AT91C_BASE_AIC->AIC_EOICR = serCLEAR_AIC_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 ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <intrinsic.h>
|
||||
#include "Board.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 ) 47923200 )
|
||||
#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 ) 14200 )
|
||||
#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 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "partest.h"
|
||||
#include "board.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines for the LED's.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
const unsigned portLONG led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* Start with all LED's off. */
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, LED_MASK );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
if( uxLED < ( portBASE_TYPE ) NB_LED )
|
||||
{
|
||||
if( xValue )
|
||||
{
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
AT91F_PIO_ClearOutput( AT91C_BASE_PIOA, led_mask[ uxLED ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
if( uxLED < ( portBASE_TYPE ) NB_LED )
|
||||
{
|
||||
if( AT91F_PIO_GetInput( AT91C_BASE_PIOA ) & led_mask[ uxLED ] )
|
||||
{
|
||||
AT91F_PIO_ClearOutput( AT91C_BASE_PIOA, led_mask[ uxLED ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/*----------------------------------------------------------------------------
|
||||
* ATMEL Microcontroller Software Support - ROUSSET -
|
||||
*----------------------------------------------------------------------------
|
||||
* The software is delivered "AS IS" without warranty or condition of any
|
||||
* kind, either express, implied or statutory. This includes without
|
||||
* limitation any warranty or condition with respect to merchantability or
|
||||
* fitness for any particular purpose, or against the infringements of
|
||||
* intellectual property rights of others.
|
||||
*----------------------------------------------------------------------------
|
||||
* File Name : Board.h
|
||||
* Object : AT91SAM7S Evaluation Board Features Definition File.
|
||||
*
|
||||
* Creation : JPP 16/Jun/2004
|
||||
*----------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef Board_h
|
||||
#define Board_h
|
||||
|
||||
#include "AT91SAM7S64.h"
|
||||
#define __inline inline
|
||||
#include "lib_AT91SAM7S64.h"
|
||||
|
||||
#define true -1
|
||||
#define false 0
|
||||
|
||||
/*-------------------------------*/
|
||||
/* SAM7Board Memories Definition */
|
||||
/*-------------------------------*/
|
||||
// The AT91SAM7S64 embeds a 16-Kbyte SRAM bank, and 64 K-Byte Flash
|
||||
|
||||
#define INT_SARM 0x00200000
|
||||
#define INT_SARM_REMAP 0x00000000
|
||||
|
||||
#define INT_FLASH 0x00000000
|
||||
#define INT_FLASH_REMAP 0x01000000
|
||||
|
||||
#define FLASH_PAGE_NB 512
|
||||
#define FLASH_PAGE_SIZE 128
|
||||
|
||||
/*-----------------*/
|
||||
/* Leds Definition */
|
||||
/*-----------------*/
|
||||
/* PIO Flash PA PB PIN */
|
||||
#define LED1 (1<<0) /* PA0 / PGMEN0 & PWM0 TIOA0 48 */
|
||||
#define LED2 (1<<1) /* PA1 / PGMEN1 & PWM1 TIOB0 47 */
|
||||
#define LED3 (1<<2) /* PA2 & PWM2 SCK0 44 */
|
||||
#define LED4 (1<<3) /* PA3 & TWD NPCS3 43 */
|
||||
#define NB_LED 4
|
||||
|
||||
#define LED_MASK (LED1|LED2|LED3|LED4)
|
||||
|
||||
/*-------------------------*/
|
||||
/* Push Buttons Definition */
|
||||
/*-------------------------*/
|
||||
/* PIO Flash PA PB PIN */
|
||||
#define SW1_MASK (1<<19) /* PA19 / PGMD7 & RK FIQ 13 */
|
||||
#define SW2_MASK (1<<20) /* PA20 / PGMD8 & RF IRQ0 16 */
|
||||
#define SW3_MASK (1<<15) /* PA15 / PGM3 & TF TIOA1 20 */
|
||||
#define SW4_MASK (1<<14) /* PA14 / PGMD2 & SPCK PWM3 21 */
|
||||
#define SW_MASK (SW1_MASK|SW2_MASK|SW3_MASK|SW4_MASK)
|
||||
|
||||
|
||||
#define SW1 (1<<19) // PA19
|
||||
#define SW2 (1<<20) // PA20
|
||||
#define SW3 (1<<15) // PA15
|
||||
#define SW4 (1<<14) // PA14
|
||||
|
||||
/*------------------*/
|
||||
/* USART Definition */
|
||||
/*------------------*/
|
||||
/* SUB-D 9 points J3 DBGU*/
|
||||
#define DBGU_RXD AT91C_PA9_DRXD /* JP11 must be close */
|
||||
#define DBGU_TXD AT91C_PA10_DTXD /* JP12 must be close */
|
||||
#define AT91C_DBGU_BAUD 115200 // Baud rate
|
||||
|
||||
#define US_RXD_PIN AT91C_PA5_RXD0 /* JP9 must be close */
|
||||
#define US_TXD_PIN AT91C_PA6_TXD0 /* JP7 must be close */
|
||||
#define US_RTS_PIN AT91C_PA7_RTS0 /* JP8 must be close */
|
||||
#define US_CTS_PIN AT91C_PA8_CTS0 /* JP6 must be close */
|
||||
|
||||
/*--------------*/
|
||||
/* Master Clock */
|
||||
/*--------------*/
|
||||
|
||||
#define EXT_OC 18432000 // Exetrnal ocilator MAINCK
|
||||
#define MCK 47923200 // MCK (PLLRC div by 2)
|
||||
#define MCKKHz (MCK/1000) //
|
||||
|
||||
#endif /* Board_h */
|
||||
@@ -1,223 +0,0 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;- ATMEL Microcontroller Software Support - ROUSSET -
|
||||
;------------------------------------------------------------------------------
|
||||
; The software is delivered "AS IS" without warranty or condition of any
|
||||
; kind, either express, implied or statutory. This includes without
|
||||
; limitation any warranty or condition with respect to merchantability or
|
||||
; fitness for any particular purpose, or against the infringements of
|
||||
; intellectual property rights of others.
|
||||
;-----------------------------------------------------------------------------
|
||||
;- File source : Cstartup.s79
|
||||
;- Object : Generic CStartup for IAR No Use REMAP
|
||||
;- Compilation flag : None
|
||||
;-
|
||||
;- 1.0 15/Jun/04 JPP : Creation
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
#include "AT91SAM7S64_inc.h"
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Area Definition
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?RESET
|
||||
; Reset Vector.
|
||||
; Normally, segment INTVEC is linked at address 0.
|
||||
; For debugging purposes, INTVEC may be placed at other
|
||||
; addresses.
|
||||
; A debugger that honors the entry point will start the
|
||||
; program in a normal way even if INTVEC is not at address 0.
|
||||
;-------------------------------------------------------------
|
||||
|
||||
PROGRAM ?RESET
|
||||
RSEG INTRAMSTART_REMAP
|
||||
RSEG INTRAMEND_REMAP
|
||||
|
||||
EXTERN vPortYieldProcessor
|
||||
|
||||
RSEG ICODE:CODE:ROOT(2)
|
||||
CODE32 ; Always ARM mode after reset
|
||||
org 0
|
||||
reset
|
||||
;------------------------------------------------------------------------------
|
||||
;- Exception vectors
|
||||
;--------------------
|
||||
;- These vectors can be read at address 0 or at RAM address
|
||||
;- They ABSOLUTELY requires to be in relative addresssing mode in order to
|
||||
;- guarantee a valid jump. For the moment, all are just looping.
|
||||
;- If an exception occurs before remap, this would result in an infinite loop.
|
||||
;- To ensure if a exeption occurs before start application to infinite loop.
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
B InitReset ; 0x00 Reset handler
|
||||
undefvec:
|
||||
B undefvec ; 0x04 Undefined Instruction
|
||||
swivec:
|
||||
B vPortYieldProcessor ; 0x08 Software Interrupt
|
||||
pabtvec:
|
||||
B pabtvec ; 0x0C Prefetch Abort
|
||||
dabtvec:
|
||||
B dabtvec ; 0x10 Data Abort
|
||||
rsvdvec:
|
||||
B rsvdvec ; 0x14 reserved
|
||||
irqvec:
|
||||
LDR PC, [PC, #-0xF20] ; Jump directly to the address given by the AIC
|
||||
|
||||
fiqvec: ; 0x1c FIQ
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Function : FIQ_Handler_Entry
|
||||
;- Treatments : FIQ Controller Interrupt Handler.
|
||||
;- Called Functions : AIC_FVR[interrupt]
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
FIQ_Handler_Entry:
|
||||
|
||||
;- Switch in SVC/User Mode to allow User Stack access for C code
|
||||
; because the FIQ is not yet acknowledged
|
||||
|
||||
;- Save and r0 in FIQ_Register
|
||||
mov r9,r0
|
||||
ldr r0 , [r8, #AIC_FVR]
|
||||
msr CPSR_c,#I_BIT | F_BIT | ARM_MODE_SVC
|
||||
|
||||
;- Save scratch/used registers and LR in User Stack
|
||||
stmfd sp!, { r1-r3, r12, lr}
|
||||
|
||||
;- Branch to the routine pointed by the AIC_FVR
|
||||
mov r14, pc
|
||||
bx r0
|
||||
|
||||
;- Restore scratch/used registers and LR from User Stack
|
||||
ldmia sp!, { r1-r3, r12, lr}
|
||||
|
||||
;- Leave Interrupts disabled and switch back in FIQ mode
|
||||
msr CPSR_c, #I_BIT | F_BIT | ARM_MODE_FIQ
|
||||
|
||||
;- Restore the R0 ARM_MODE_SVC register
|
||||
mov r0,r9
|
||||
|
||||
;- Restore the Program Counter using the LR_fiq directly in the PC
|
||||
subs pc,lr,#4
|
||||
|
||||
InitReset:
|
||||
;------------------------------------------------------------------------------
|
||||
;- Low level Init (PMC, AIC, ? ....) by C function AT91F_LowLevelInit
|
||||
;------------------------------------------------------------------------------
|
||||
EXTERN AT91F_LowLevelInit
|
||||
|
||||
#define __iramend SFB(INTRAMEND_REMAP)
|
||||
|
||||
;- minumum C initialization
|
||||
;- call AT91F_LowLevelInit( void)
|
||||
|
||||
ldr r13,=__iramend ; temporary stack in internal RAM
|
||||
;--Call Low level init function in ABSOLUTE through the Interworking
|
||||
ldr r0,=AT91F_LowLevelInit
|
||||
mov lr, pc
|
||||
bx r0
|
||||
;------------------------------------------------------------------------------
|
||||
;- Stack Sizes Definition
|
||||
;------------------------
|
||||
;- Interrupt Stack requires 2 words x 8 priority level x 4 bytes when using
|
||||
;- the vectoring. This assume that the IRQ management.
|
||||
;- The Interrupt Stack must be adjusted depending on the interrupt handlers.
|
||||
;- Fast Interrupt not requires stack If in your application it required you must
|
||||
;- be definehere.
|
||||
;- The System stack size is not defined and is limited by the free internal
|
||||
;- SRAM.
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Top of Stack Definition
|
||||
;-------------------------
|
||||
;- Interrupt and Supervisor Stack are located at the top of internal memory in
|
||||
;- order to speed the exception handling context saving and restoring.
|
||||
;- ARM_MODE_SVC (Application, C) Stack is located at the top of the external memory.
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
IRQ_STACK_SIZE EQU 300
|
||||
|
||||
ARM_MODE_FIQ EQU 0x11
|
||||
ARM_MODE_IRQ EQU 0x12
|
||||
ARM_MODE_SVC EQU 0x13
|
||||
|
||||
I_BIT EQU 0x80
|
||||
F_BIT EQU 0x40
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Setup the stack for each mode
|
||||
;-------------------------------
|
||||
ldr r0, =__iramend
|
||||
|
||||
;- Set up Fast Interrupt Mode and set FIQ Mode Stack
|
||||
msr CPSR_c, #ARM_MODE_FIQ | I_BIT | F_BIT
|
||||
;- Init the FIQ register
|
||||
ldr r8, =AT91C_BASE_AIC
|
||||
|
||||
;- Set up Interrupt Mode and set IRQ Mode Stack
|
||||
msr CPSR_c, #ARM_MODE_IRQ | I_BIT | F_BIT
|
||||
mov r13, r0 ; Init stack IRQ
|
||||
sub r0, r0, #IRQ_STACK_SIZE
|
||||
|
||||
;- Enable interrupt & Set up Supervisor Mode and set Supervisor Mode Stack
|
||||
msr CPSR_c, #ARM_MODE_SVC
|
||||
mov r13, r0
|
||||
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?CSTARTUP
|
||||
;---------------------------------------------------------------
|
||||
EXTERN __segment_init
|
||||
EXTERN main
|
||||
; Initialize segments.
|
||||
; __segment_init is assumed to use
|
||||
; instruction set and to be reachable by BL from the ICODE segment
|
||||
; (it is safest to link them in segment ICODE).
|
||||
ldr r0,=__segment_init
|
||||
mov lr, pc
|
||||
bx r0
|
||||
|
||||
PUBLIC __main
|
||||
?jump_to_main:
|
||||
ldr lr,=?call_exit
|
||||
ldr r0,=main
|
||||
__main:
|
||||
bx r0
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Loop for ever
|
||||
;---------------
|
||||
;- End of application. Normally, never occur.
|
||||
;- Could jump on Software Reset ( B 0x0 ).
|
||||
;------------------------------------------------------------------------------
|
||||
?call_exit:
|
||||
End
|
||||
b End
|
||||
|
||||
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?EXEPTION_VECTOR
|
||||
; This module is only linked if needed for closing files.
|
||||
;---------------------------------------------------------------
|
||||
PUBLIC AT91F_Default_FIQ_handler
|
||||
PUBLIC AT91F_Default_IRQ_handler
|
||||
PUBLIC AT91F_Spurious_handler
|
||||
|
||||
CODE32 ; Always ARM mode after exeption
|
||||
|
||||
AT91F_Default_FIQ_handler
|
||||
b AT91F_Default_FIQ_handler
|
||||
|
||||
AT91F_Default_IRQ_handler
|
||||
b AT91F_Default_IRQ_handler
|
||||
|
||||
AT91F_Spurious_handler
|
||||
b AT91F_Spurious_handler
|
||||
|
||||
ENDMOD
|
||||
|
||||
END
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,252 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks. The SAM7
|
||||
* includes a sample USB that emulates a Joystick input to a USB host.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) 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
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "flash.h"
|
||||
#include "integer.h"
|
||||
#include "PollQ.h"
|
||||
#include "BlockQ.h"
|
||||
#include "semtest.h"
|
||||
#include "dynamic.h"
|
||||
#include "partest.h"
|
||||
#include "comtest2.h"
|
||||
#include "USB/USBSample.h"
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainUSB_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
|
||||
/* Constants required by the 'Check' task. */
|
||||
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( 3 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 4 ) /* Off the board. */
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||
* of the file.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Configure the processor for use with the Atmel demo board. Setup is minimal
|
||||
* as the low level init function (called from the startup asm file) takes care
|
||||
* of most things.
|
||||
*/
|
||||
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 );
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Starts all the other tasks, then starts the scheduler.
|
||||
*/
|
||||
void main( void )
|
||||
{
|
||||
/* Setup any hardware that has not already been configured by the low
|
||||
level init routines. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Initialise the LED outputs for use by the demo application tasks. */
|
||||
vParTestInitialise();
|
||||
|
||||
/* Start all the standard demo application tasks. */
|
||||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
|
||||
/* Also start the USB demo which is just for the SAM7. */
|
||||
xTaskCreate( vUSBDemoTask, "USB", configMINIMAL_STACK_SIZE, NULL, mainUSB_PRIORITY, NULL );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* We should never get here as control is now taken by the scheduler. */
|
||||
return;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* When using the JTAG debugger the hardware is not always initialised to
|
||||
the correct default state. This line just ensures that this does not
|
||||
cause all interrupts to be masked at the start. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
/* Most setup is performed by the low level init function called from the
|
||||
startup asm file. */
|
||||
|
||||
/* Configure the PIO Lines corresponding to LED1 to LED4 to be outputs as
|
||||
well as the UART Tx line. */
|
||||
AT91F_PIO_CfgOutput( AT91C_BASE_PIOA, LED_MASK );
|
||||
|
||||
/* Enable the peripheral clock. */
|
||||
AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_PIOA );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
|
||||
/* The parameters are not used in this task. */
|
||||
( 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
|
||||
the on board LED flash rate will increase. */
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Delay until it is time to execute again. */
|
||||
vTaskDelay( xDelayPeriod );
|
||||
|
||||
/* Check all the standard demo application tasks are executing without
|
||||
error. */
|
||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||
{
|
||||
/* An error has been detected in one of the tasks - flash faster. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) 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() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
// ---------------------------------------------------------
|
||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
||||
// ---------------------------------------------------------
|
||||
// The software is delivered "AS IS" without warranty or
|
||||
// condition of any kind, either express, implied or
|
||||
// statutory. This includes without limitation any warranty
|
||||
// or condition with respect to merchantability or fitness
|
||||
// for any particular purpose, or against the infringements of
|
||||
// intellectual property rights of others.
|
||||
// ---------------------------------------------------------
|
||||
// File: at91SAM7S64_16KRAM.xlc
|
||||
//
|
||||
// 1.1 16/Jun/04 JPP : Creation for 4.11A
|
||||
//
|
||||
// $Revision: 1.1.1.1 $
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//*************************************************************************
|
||||
// XLINK command file template for EWARM/ICCARM
|
||||
//
|
||||
// Usage: xlink -f lnkarm <your_object_file(s)>
|
||||
// -s <program start label> <C/C++ runtime library>
|
||||
//
|
||||
// $Revision: 1.1.1.1 $
|
||||
//*************************************************************************
|
||||
|
||||
//************************************************
|
||||
// Inform the linker about the CPU family used.
|
||||
// AT91SAM7S64 Memory mapping
|
||||
// No remap
|
||||
// ROMSTART
|
||||
// Start address 0x0000 0000
|
||||
// Size 64 Kbo 0x0001 0000
|
||||
// RAMSTART
|
||||
// Start address 0x0020 0000
|
||||
// Size 16 Kbo 0x0000 4000
|
||||
// Remap done
|
||||
// RAMSTART
|
||||
// Start address 0x0000 0000
|
||||
// Size 16 Kbo 0x0000 4000
|
||||
// ROMSTART
|
||||
// Start address 0x0010 0000
|
||||
// Size 64 Kbo 0x0001 0000
|
||||
|
||||
//************************************************
|
||||
-carm
|
||||
|
||||
//*************************************************************************
|
||||
// Internal Ram segments mapped AFTER REMAP 16 K.
|
||||
//*************************************************************************
|
||||
// Use these addresses for the .
|
||||
-Z(CONST)INTRAMSTART_REMAP=00000000
|
||||
-Z(CONST)INTRAMEND_REMAP=00003FFF
|
||||
|
||||
//*************************************************************************
|
||||
// Read-only segments mapped to Flash 64 K.
|
||||
//*************************************************************************
|
||||
-DROMSTART=00000000
|
||||
-DROMEND=0000FFFF
|
||||
//*************************************************************************
|
||||
// Read/write segments mapped to RAM.
|
||||
//*************************************************************************
|
||||
-DRAMSTART=00000000
|
||||
-DRAMEND=00003FFF
|
||||
|
||||
//************************************************
|
||||
// Address range for reset and exception
|
||||
// vectors (INTVEC).
|
||||
// The vector area is 32 bytes,
|
||||
// an additional 32 bytes is allocated for the
|
||||
// constant table used by ldr PC in cstartup.s79.
|
||||
//************************************************
|
||||
-Z(CODE)INTVEC=00-3F
|
||||
|
||||
//************************************************
|
||||
// Startup code and exception routines (ICODE).
|
||||
//************************************************
|
||||
-Z(CODE)ICODE,DIFUNCT=ROMSTART-ROMEND
|
||||
-Z(CODE)SWITAB=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Code segments may be placed anywhere.
|
||||
//************************************************
|
||||
-Z(CODE)CODE=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Various constants and initializers.
|
||||
//************************************************
|
||||
-Z(CONST)INITTAB,DATA_ID,DATA_C=ROMSTART-ROMEND
|
||||
-Z(CONST)CHECKSUM=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Data segments.
|
||||
//************************************************
|
||||
-Z(DATA)DATA_I,DATA_Z,DATA_N=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// __ramfunc code copied to and executed from RAM.
|
||||
//************************************************
|
||||
-Z(DATA)CODE_I=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// ICCARM produces code for __ramfunc functions in
|
||||
// CODE_I segments. The -Q XLINK command line
|
||||
// option redirects XLINK to emit the code in the
|
||||
// debug information associated with the CODE_I
|
||||
// segment, where the code will execute.
|
||||
//************************************************
|
||||
|
||||
//*************************************************************************
|
||||
// Stack and heap segments.
|
||||
//*************************************************************************
|
||||
-D_CSTACK_SIZE=(100*4)
|
||||
-D_IRQ_STACK_SIZE=(2*8*4)
|
||||
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE=RAMSTART-RAMEND
|
||||
-Z(DATA)IRQ_STACK+_IRQ_STACK_SIZE=RAMSTART-RAMEND
|
||||
|
||||
//*************************************************************************
|
||||
// ELF/DWARF support.
|
||||
//
|
||||
// Uncomment the line "-Felf" below to generate ELF/DWARF output.
|
||||
// Available format specifiers are:
|
||||
//
|
||||
// "-yn": Suppress DWARF debug output
|
||||
// "-yp": Multiple ELF program sections
|
||||
// "-yas": Format suitable for debuggers from ARM Ltd (also sets -p flag)
|
||||
//
|
||||
// "-Felf" and the format specifiers can also be supplied directly as
|
||||
// command line options, or selected from the Xlink Output tab in the
|
||||
// IAR Embedded Workbench.
|
||||
//*************************************************************************
|
||||
|
||||
// -Felf
|
||||
@@ -1,136 +0,0 @@
|
||||
// ---------------------------------------------------------
|
||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
||||
// ---------------------------------------------------------
|
||||
// The software is delivered "AS IS" without warranty or
|
||||
// condition of any kind, either express, implied or
|
||||
// statutory. This includes without limitation any warranty
|
||||
// or condition with respect to merchantability or fitness
|
||||
// for any particular purpose, or against the infringements of
|
||||
// intellectual property rights of others.
|
||||
// ---------------------------------------------------------
|
||||
// File: at91SAM7S64_NoRemap.xlc
|
||||
//
|
||||
// 1.1 16/Jun/04 JPP : Creation for 4.11A
|
||||
//
|
||||
// $Revision: 1.1.1.1 $
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
|
||||
//*************************************************************************
|
||||
// XLINK command file template for EWARM/ICCARM
|
||||
//
|
||||
// Usage: xlink -f lnkarm <your_object_file(s)>
|
||||
// -s <program start label> <C/C++ runtime library>
|
||||
//
|
||||
// $Revision: 1.1.1.1 $
|
||||
//*************************************************************************
|
||||
|
||||
//************************************************
|
||||
// Inform the linker about the CPU family used.
|
||||
// AT91SAM7S64 Memory mapping
|
||||
// No remap
|
||||
// ROMSTART
|
||||
// Start address 0x0000 0000
|
||||
// Size 64 Kbo 0x0001 0000
|
||||
// RAMSTART
|
||||
// Start address 0x0020 0000
|
||||
// Size 16 Kbo 0x0000 4000
|
||||
// Remap done
|
||||
// RAMSTART
|
||||
// Start address 0x0000 0000
|
||||
// Size 16 Kbo 0x0000 4000
|
||||
// ROMSTART
|
||||
// Start address 0x0010 0000
|
||||
// Size 64 Kbo 0x0001 0000
|
||||
|
||||
//************************************************
|
||||
-carm
|
||||
|
||||
//*************************************************************************
|
||||
// Internal Ram segments mapped AFTER REMAP 16 K.
|
||||
//*************************************************************************
|
||||
// Use these addresses for the .
|
||||
-Z(CONST)INTRAMSTART_REMAP=00200000
|
||||
-Z(CONST)INTRAMEND_REMAP=00203FFF
|
||||
|
||||
//*************************************************************************
|
||||
// Read-only segments mapped to Flash 64 K.
|
||||
//*************************************************************************
|
||||
-DROMSTART=00000000
|
||||
-DROMEND=0000FFFF
|
||||
//*************************************************************************
|
||||
// Read/write segments mapped to RAM.
|
||||
//*************************************************************************
|
||||
-DRAMSTART=00200000
|
||||
-DRAMEND=002003FFF
|
||||
|
||||
//************************************************
|
||||
// Address range for reset and exception
|
||||
// vectors (INTVEC).
|
||||
// The vector area is 32 bytes,
|
||||
// an additional 32 bytes is allocated for the
|
||||
// constant table used by ldr PC in cstartup.s79.
|
||||
//************************************************
|
||||
-Z(CODE)INTVEC=00-3F
|
||||
|
||||
//************************************************
|
||||
// Startup code and exception routines (ICODE).
|
||||
//************************************************
|
||||
-Z(CODE)ICODE,DIFUNCT=ROMSTART-ROMEND
|
||||
-Z(CODE)SWITAB=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Code segments may be placed anywhere.
|
||||
//************************************************
|
||||
-Z(CODE)CODE=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Various constants and initializers.
|
||||
//************************************************
|
||||
-Z(CONST)INITTAB,DATA_ID,DATA_C=ROMSTART-ROMEND
|
||||
-Z(CONST)CHECKSUM=ROMSTART-ROMEND
|
||||
|
||||
|
||||
//************************************************
|
||||
// Data segments.
|
||||
//************************************************
|
||||
-Z(DATA)DATA_I,DATA_Z,DATA_N=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// __ramfunc code copied to and executed from RAM.
|
||||
//************************************************
|
||||
-Z(DATA)CODE_I=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// ICCARM produces code for __ramfunc functions in
|
||||
// CODE_I segments. The -Q XLINK command line
|
||||
// option redirects XLINK to emit the code in the
|
||||
// debug information associated with the CODE_I
|
||||
// segment, where the code will execute.
|
||||
//************************************************
|
||||
|
||||
//*************************************************************************
|
||||
// Stack and heap segments.
|
||||
//*************************************************************************
|
||||
//-D_CSTACK_SIZE=(100*4)
|
||||
//-D_IRQ_STACK_SIZE=(2*8*4)
|
||||
|
||||
//-Z(DATA)CSTACK+_CSTACK_SIZE=RAMSTART-RAMEND
|
||||
//-Z(DATA)IRQ_STACK+_IRQ_STACK_SIZE=RAMSTART-RAMEND
|
||||
|
||||
//*************************************************************************
|
||||
// ELF/DWARF support.
|
||||
//
|
||||
// Uncomment the line "-Felf" below to generate ELF/DWARF output.
|
||||
// Available format specifiers are:
|
||||
//
|
||||
// "-yn": Suppress DWARF debug output
|
||||
// "-yp": Multiple ELF program sections
|
||||
// "-yas": Format suitable for debuggers from ARM Ltd (also sets -p flag)
|
||||
//
|
||||
// "-Felf" and the format specifiers can also be supplied directly as
|
||||
// command line options, or selected from the Xlink Output tab in the
|
||||
// IAR Embedded Workbench.
|
||||
//*************************************************************************
|
||||
|
||||
// -Felf
|
||||
@@ -1,905 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<configuration>
|
||||
<name>Flash Debug</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>1</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>13</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCVariant</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state>$PROJ_DIR$\resource\SAM7.mac</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\ioat91sam7s64.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDDFArgumentProducer</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadSuppressDownload</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadVerifyAll</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCProductVersion</name>
|
||||
<state>4.10B</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>4.30A</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>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ARMSIM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCSimDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ANGEL_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCAngelHeartbeat</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ANGELTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoAngelLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AngelLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARROM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRomLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommunication</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>JLinkSpeed</name>
|
||||
<state>30</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTRSTReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>JLinkInitialSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDoJlinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCScanChainNonARMDevices</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkIRLength</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkCommRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>jtag</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoEmuMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuMultiTarget</name>
|
||||
<state>0@ARM7TDMI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>jtago</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UnusedAddr</name>
|
||||
<state>0x00800000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>RDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRDIDriverDll</name>
|
||||
<state>Browse to your RDI driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileEdit</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIUseETM</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CThirdPartyDriverDll</name>
|
||||
<state>Browse to your third-party driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXTinyArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OSE\OseEpsilonPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
<configuration>
|
||||
<name>Flash Bin</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>1</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>13</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCVariant</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state>$PROJ_DIR$\resource\SAM7.mac</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\ioat91sam7s64.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDDFArgumentProducer</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadSuppressDownload</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadVerifyAll</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCProductVersion</name>
|
||||
<state>4.10B</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>4.30A</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>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ARMSIM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCSimDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ANGEL_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCAngelHeartbeat</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ANGELTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoAngelLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AngelLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARROM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRomLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommunication</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>JLinkSpeed</name>
|
||||
<state>30</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTRSTReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>JLinkInitialSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDoJlinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCScanChainNonARMDevices</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkIRLength</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkCommRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>jtag</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoEmuMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuMultiTarget</name>
|
||||
<state>0@ARM7TDMI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>jtago</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UnusedAddr</name>
|
||||
<state>0x00800000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>RDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRDIDriverDll</name>
|
||||
<state>Browse to your RDI driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileEdit</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIUseETM</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CThirdPartyDriverDll</name>
|
||||
<state>Browse to your third-party driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXTinyArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OSE\OseEpsilonPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,246 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "serial.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Location of the COM0 registers. */
|
||||
#define serCOM0 ( ( AT91PS_USART ) AT91C_BASE_US0 )
|
||||
|
||||
/* Interrupt control macros. */
|
||||
#define serINTERRUPT_LEVEL ( 5 )
|
||||
#define vInterruptOn() AT91F_US_EnableIt( serCOM0, AT91C_US_TXRDY | AT91C_US_RXRDY )
|
||||
#define vInterruptOff() AT91F_US_DisableIt( serCOM0, AT91C_US_TXRDY )
|
||||
|
||||
/* Misc constants. */
|
||||
#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 )
|
||||
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Interrupt entry point written in the assembler file serialISR.s79. */
|
||||
extern void vSerialISREntry( void );
|
||||
|
||||
/* The interrupt service routine - called from the assembly entry point. */
|
||||
__arm void vSerialISR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See the serial2.h header file.
|
||||
*/
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG 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 ) );
|
||||
|
||||
/* If the queues were created correctly then setup the serial port
|
||||
hardware. */
|
||||
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* 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 );
|
||||
|
||||
/* Set the required protocol. */
|
||||
AT91F_US_Configure( serCOM0, configCPU_CLOCK_HZ, AT91C_US_ASYNC_MODE, ulWantedBaud, serNO_TIMEGUARD );
|
||||
|
||||
/* Enable Rx and Tx. */
|
||||
serCOM0->US_CR = AT91C_US_RXEN | AT91C_US_TXEN;
|
||||
|
||||
/* Enable the Rx interrupts. The Tx interrupts are not enabled
|
||||
until there are characters to be transmitted. */
|
||||
AT91F_US_EnableIt( serCOM0, AT91C_US_RXRDY );
|
||||
|
||||
/* Enable the interrupts in the AIC. */
|
||||
AT91F_AIC_ConfigureIt( AT91C_BASE_AIC, AT91C_ID_US0, serINTERRUPT_LEVEL, AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE, ( void (*)( void ) ) vSerialISREntry );
|
||||
AT91F_AIC_EnableIt( AT91C_BASE_AIC, AT91C_ID_US0 );
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = ( xComPortHandle ) 0;
|
||||
}
|
||||
|
||||
/* This demo file only supports a single port but we have to return
|
||||
something to comply with the standard demo header file. */
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports one port. */
|
||||
( 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;
|
||||
|
||||
/* A couple of parameters that this port does not use. */
|
||||
( void ) usStringLength;
|
||||
( void ) pxPort;
|
||||
|
||||
/* 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;
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
/* Place the character in the queue of characters to be transmitted. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
{
|
||||
return pdFAIL;
|
||||
}
|
||||
|
||||
/* Turn on the Tx interrupt so the ISR will remove the character from the
|
||||
queue and send it. This does not need to be in a critical section as
|
||||
if the interrupt has already removed the character the next interrupt
|
||||
will simply turn off the Tx interrupt again. */
|
||||
vInterruptOn();
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
/* Not supported as not required by the demo application. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Serial port ISR. This can cause a context switch so is not defined as a
|
||||
standard ISR using the __irq keyword. Instead a wrapper function is defined
|
||||
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;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
ulStatus = serCOM0->US_CSR &= serCOM0->US_IMR;
|
||||
|
||||
if( ulStatus & AT91C_US_TXRDY )
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
serCOM0->US_THR = cChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||
vInterruptOff();
|
||||
}
|
||||
}
|
||||
|
||||
if( ulStatus & AT91C_US_RXRDY )
|
||||
{
|
||||
/* The interrupt was caused by a character being received. Grab the
|
||||
character from the RHR and place it in the queue or received
|
||||
characters. */
|
||||
cChar = serCOM0->US_RHR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
}
|
||||
|
||||
/* 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 ) );
|
||||
|
||||
/* End the interrupt in the AIC. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Project>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>191</Column0><Column1>27</Column1><Column2>27</Column2></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
<Build><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Build>
|
||||
<Register>
|
||||
<PreferedWindows>
|
||||
|
||||
|
||||
|
||||
|
||||
<Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows>
|
||||
</Register>
|
||||
<QWatch><Column0>161</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></QWatch><Memory><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-22256-14845</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/USBSample.c</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\source\portable\iar\AtmelSAM7S64\lib_AT91SAM7S64.h</Filename><XPos>0</XPos><YPos>615</YPos><SelStart>24806</SelStart><SelEnd>24806</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\USB\USBSample.c</Filename><XPos>0</XPos><YPos>289</YPos><SelStart>10498</SelStart><SelEnd>10498</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>141</YPos><SelStart>6420</SelStart><SelEnd>6420</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\port.c</Filename><XPos>0</XPos><YPos>117</YPos><SelStart>5493</SelStart><SelEnd>5493</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\serial\serial.c</Filename><XPos>0</XPos><YPos>132</YPos><SelStart>5547</SelStart><SelEnd>5547</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\MemMang\heap_1.c</Filename><XPos>0</XPos><YPos>82</YPos><SelStart>3650</SelStart><SelEnd>3650</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s79</Filename><XPos>0</XPos><YPos>27</YPos><SelStart>2226</SelStart><SelEnd>2226</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\Common\Minimal\integer.c</Filename><XPos>0</XPos><YPos>77</YPos><SelStart>4024</SelStart><SelEnd>4024</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\tasks.c</Filename><XPos>0</XPos><YPos>823</YPos><SelStart>29289</SelStart><SelEnd>29289</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\portasm.s79</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>519</SelStart><SelEnd>519</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\portmacro.h</Filename><XPos>0</XPos><YPos>57</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>24</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\Common\Minimal\semtest.c</Filename><XPos>0</XPos><YPos>166</YPos><SelStart>7856</SelStart><SelEnd>7856</SelEnd></Tab><ActiveTab>12</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084f8b0><key>IarIdePM1</key></Toolbar-0084f8b0><Toolbar-0272db18><key>DebuggerGui1</key></Toolbar-0272db18></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>1072</Bottom><Right>265</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>166875</sizeVertCX><sizeVertCY>959785</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
[JLinkDriver]
|
||||
WatchVectorCatch=_ 0
|
||||
WatchCond=_ 0
|
||||
Watch0=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
Watch1=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
[Low Level]
|
||||
Pipeline mode=1
|
||||
Initialized=0
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints]
|
||||
Count=0
|
||||
@@ -1,76 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>rtosdemo/Flash Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>221</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/>
|
||||
<TerminalIO/>
|
||||
<CodeCoveragePlugin/>
|
||||
<Profiling/>
|
||||
<Watch>
|
||||
<Format>
|
||||
<struct_types/>
|
||||
<watch_formats/>
|
||||
</Format>
|
||||
</Watch>
|
||||
<Disassembly><MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly><Memory><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd0>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-17425-14382</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/Demo Source</ExpandedNode><ExpandedNode>rtosdemo/Scheduler Source</ExpandedNode><ExpandedNode>rtosdemo/System Files</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-4084-16269</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-25581-16276</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd1></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>18</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Board.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>952</SelStart><SelEnd>969</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s79</Filename><XPos>0</XPos><YPos>142</YPos><SelStart>6503</SelStart><SelEnd>6517</SelEnd></Tab><ActiveTab>2</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084c368><key>iaridepm1</key></Toolbar-0084c368></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>659</Bottom><Right>295</Right><x>-2</x><y>-2</y><xscreen>30</xscreen><yscreen>30</yscreen><sizeHorzCX>18750</sizeHorzCX><sizeHorzCY>26809</sizeHorzCY><sizeVertCX>185625</sizeVertCX><sizeVertCY>590705</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>413</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>415</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>370866</sizeHorzCY><sizeVertCX>18750</sizeVertCX><sizeVertCY>26809</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <lpc210x.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 ) 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 configTOTAL_HEAP_SIZE ( ( size_t ) ( 23 * 1024 ) )
|
||||
#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,118 +0,0 @@
|
||||
# FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
#
|
||||
# ***************************************************************************
|
||||
# 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
|
||||
#
|
||||
# + Replaced source/portable/gcc/arm7/portheap.c with source/portable/memmang/heap_2.c.
|
||||
|
||||
CC=arm-elf-gcc
|
||||
OBJCOPY=arm-elf-objcopy
|
||||
ARCH=arm-elf-ar
|
||||
CRT0=boot.s
|
||||
WARNINGS=-Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare \
|
||||
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused
|
||||
|
||||
#
|
||||
# CFLAGS common to both the THUMB and ARM mode builds
|
||||
#
|
||||
CFLAGS=$(WARNINGS) -D $(RUN_MODE) -D GCC_ARM7 -I. -I../../Source/include \
|
||||
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
|
||||
$(OPTIM)
|
||||
|
||||
ifeq ($(USE_THUMB_MODE),YES)
|
||||
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
|
||||
THUMB_FLAGS=-mthumb
|
||||
endif
|
||||
|
||||
|
||||
LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
|
||||
|
||||
RTOS_SOURCE_DIR=../../Source
|
||||
DEMO_SOURCE_DIR=../Common/Minimal
|
||||
#
|
||||
# Source files that can be built to THUMB mode.
|
||||
#
|
||||
THUMB_SRC = \
|
||||
main.c \
|
||||
serial/serial.c \
|
||||
ParTest/ParTest.c \
|
||||
$(DEMO_SOURCE_DIR)/integer.c \
|
||||
$(DEMO_SOURCE_DIR)/flash.c \
|
||||
$(DEMO_SOURCE_DIR)/PollQ.c \
|
||||
$(DEMO_SOURCE_DIR)/comtest.c \
|
||||
$(DEMO_SOURCE_DIR)/flop.c \
|
||||
$(DEMO_SOURCE_DIR)/semtest.c \
|
||||
$(DEMO_SOURCE_DIR)/dynamic.c \
|
||||
$(DEMO_SOURCE_DIR)/BlockQ.c \
|
||||
$(RTOS_SOURCE_DIR)/tasks.c \
|
||||
$(RTOS_SOURCE_DIR)/queue.c \
|
||||
$(RTOS_SOURCE_DIR)/list.c \
|
||||
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \
|
||||
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC2000/port.c
|
||||
|
||||
#
|
||||
# Source files that must be built to ARM mode.
|
||||
#
|
||||
ARM_SRC = \
|
||||
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC2000/portISR.c \
|
||||
serial/serialISR.c
|
||||
|
||||
#
|
||||
# Define all object files.
|
||||
#
|
||||
ARM_OBJ = $(ARM_SRC:.c=.o)
|
||||
THUMB_OBJ = $(THUMB_SRC:.c=.o)
|
||||
|
||||
rtosdemo.hex : rtosdemo.elf
|
||||
$(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex
|
||||
|
||||
rtosdemo.elf : $(ARM_OBJ) $(THUMB_OBJ) $(CRT0) Makefile
|
||||
$(CC) $(CFLAGS) $(ARM_OBJ) $(THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
|
||||
|
||||
$(THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
|
||||
$(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
|
||||
|
||||
$(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
clean :
|
||||
touch Makefile
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.5.2
|
||||
|
||||
+ All LED's are turned off to start.
|
||||
*/
|
||||
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "partest.h"
|
||||
|
||||
#define partstFIRST_IO ( ( unsigned portLONG ) 0x400 )
|
||||
#define partstNUM_LEDS ( 4 )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xffffffff )
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* This is performed from main() as the io bits are shared with other setup
|
||||
functions. */
|
||||
|
||||
/* Turn all outputs off. */
|
||||
GPIO_IOSET = partstALL_OUTPUTS_OFF;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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 P10 to P13 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
|
||||
/* Set of clear the output. */
|
||||
if( xValue )
|
||||
{
|
||||
GPIO_IOCLR = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
GPIO_IOSET = 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 = GPIO0_IOPIN;
|
||||
if( ulCurrentState & ulLED )
|
||||
{
|
||||
GPIO_IOCLR = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
GPIO_IOSET = ulLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
/* Sample initialization file */
|
||||
|
||||
.extern main
|
||||
.extern exit
|
||||
|
||||
.text
|
||||
.code 32
|
||||
|
||||
|
||||
.align 0
|
||||
|
||||
.extern __bss_beg__
|
||||
.extern __bss_end__
|
||||
.extern __stack_end__
|
||||
.extern __data_beg__
|
||||
.extern __data_end__
|
||||
.extern __data+beg_src__
|
||||
|
||||
.global start
|
||||
.global endless_loop
|
||||
|
||||
/* Stack Sizes */
|
||||
.set UND_STACK_SIZE, 0x00000004
|
||||
.set ABT_STACK_SIZE, 0x00000004
|
||||
.set FIQ_STACK_SIZE, 0x00000004
|
||||
.set IRQ_STACK_SIZE, 0X00000400
|
||||
.set SVC_STACK_SIZE, 0x00000400
|
||||
|
||||
/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */
|
||||
.set MODE_USR, 0x10 /* User Mode */
|
||||
.set MODE_FIQ, 0x11 /* FIQ Mode */
|
||||
.set MODE_IRQ, 0x12 /* IRQ Mode */
|
||||
.set MODE_SVC, 0x13 /* Supervisor Mode */
|
||||
.set MODE_ABT, 0x17 /* Abort Mode */
|
||||
.set MODE_UND, 0x1B /* Undefined Mode */
|
||||
.set MODE_SYS, 0x1F /* System Mode */
|
||||
|
||||
.equ I_BIT, 0x80 /* when I bit is set, IRQ is disabled */
|
||||
.equ F_BIT, 0x40 /* when F bit is set, FIQ is disabled */
|
||||
|
||||
|
||||
start:
|
||||
_start:
|
||||
_mainCRTStartup:
|
||||
|
||||
/* Setup a stack for each mode - note that this only sets up a usable stack
|
||||
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
|
||||
mov sp, r0
|
||||
sub r0, r0, #UND_STACK_SIZE
|
||||
msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #ABT_STACK_SIZE
|
||||
msr CPSR_c, #MODE_FIQ|I_BIT|F_BIT /* FIQ Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #FIQ_STACK_SIZE
|
||||
msr CPSR_c, #MODE_IRQ|I_BIT|F_BIT /* IRQ Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #IRQ_STACK_SIZE
|
||||
msr CPSR_c, #MODE_SVC|I_BIT|F_BIT /* Supervisor Mode */
|
||||
mov sp, r0
|
||||
sub r0, r0, #SVC_STACK_SIZE
|
||||
msr CPSR_c, #MODE_SYS|I_BIT|F_BIT /* System Mode */
|
||||
mov sp, r0
|
||||
|
||||
/* We want to start in supervisor mode. Operation will switch to system
|
||||
mode when the first task starts. */
|
||||
msr CPSR_c, #MODE_SVC|I_BIT|F_BIT
|
||||
|
||||
/* Clear BSS. */
|
||||
|
||||
mov a2, #0 /* Fill value */
|
||||
mov fp, a2 /* Null frame pointer */
|
||||
mov r7, a2 /* Null frame pointer for Thumb */
|
||||
|
||||
ldr r1, .LC1 /* Start of memory block */
|
||||
ldr r3, .LC2 /* End of memory block */
|
||||
subs r3, r3, r1 /* Length of block */
|
||||
beq .end_clear_loop
|
||||
mov r2, #0
|
||||
|
||||
.clear_loop:
|
||||
strb r2, [r1], #1
|
||||
subs r3, r3, #1
|
||||
bgt .clear_loop
|
||||
|
||||
.end_clear_loop:
|
||||
|
||||
/* Initialise data. */
|
||||
|
||||
ldr r1, .LC3 /* Start of memory block */
|
||||
ldr r2, .LC4 /* End of memory block */
|
||||
ldr r3, .LC5
|
||||
subs r3, r3, r1 /* Length of block */
|
||||
beq .end_set_loop
|
||||
|
||||
.set_loop:
|
||||
ldrb r4, [r2], #1
|
||||
strb r4, [r1], #1
|
||||
subs r3, r3, #1
|
||||
bgt .set_loop
|
||||
|
||||
.end_set_loop:
|
||||
|
||||
mov r0, #0 /* no arguments */
|
||||
mov r1, #0 /* no argv either */
|
||||
|
||||
bl main
|
||||
|
||||
endless_loop:
|
||||
b endless_loop
|
||||
|
||||
|
||||
.align 0
|
||||
|
||||
.LC1:
|
||||
.word __bss_beg__
|
||||
.LC2:
|
||||
.word __bss_end__
|
||||
.LC3:
|
||||
.word __data_beg__
|
||||
.LC4:
|
||||
.word __data_beg_src__
|
||||
.LC5:
|
||||
.word __data_end__
|
||||
.LC6:
|
||||
.word __stack_end__
|
||||
|
||||
|
||||
/* Setup vector table. Note that undf, pabt, dabt, fiq just execute
|
||||
a null loop. */
|
||||
|
||||
.section .startup,"ax"
|
||||
.code 32
|
||||
.align 0
|
||||
|
||||
b _start /* reset - _start */
|
||||
ldr pc, _undf /* undefined - _undf */
|
||||
ldr pc, _swi /* SWI - _swi */
|
||||
ldr pc, _pabt /* program abort - _pabt */
|
||||
ldr pc, _dabt /* data abort - _dabt */
|
||||
nop /* reserved */
|
||||
ldr pc, [pc,#-0xFF0] /* IRQ - read the VIC */
|
||||
ldr pc, _fiq /* FIQ - _fiq */
|
||||
|
||||
_undf: .word __undf /* undefined */
|
||||
_swi: .word vPortYieldProcessor /* SWI */
|
||||
_pabt: .word __pabt /* program abort */
|
||||
_dabt: .word __dabt /* data abort */
|
||||
_fiq: .word __fiq /* FIQ */
|
||||
|
||||
__undf: b . /* undefined */
|
||||
__pabt: b . /* program abort */
|
||||
__dabt: b . /* data abort */
|
||||
__fiq: b . /* FIQ */
|
||||
@@ -1,474 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) 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
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
* To check the operation of the memory allocator the check task also
|
||||
* dynamically creates a task before delaying, and deletes it again when it
|
||||
* wakes. If memory cannot be allocated for the new task the call to xTaskCreate
|
||||
* will fail and an error is signalled. The dynamically created task itself
|
||||
* allocates and frees memory just to give the allocator a bit more exercise.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V2.4.2
|
||||
|
||||
+ The vErrorChecks() task now dynamically creates then deletes a task each
|
||||
cycle. This tests the operation of the memory allocator.
|
||||
|
||||
Changes from V2.5.2
|
||||
|
||||
+ vParTestInitialise() is called during initialisation to ensure all the
|
||||
LED's start off.
|
||||
*/
|
||||
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "partest.h"
|
||||
#include "flash.h"
|
||||
#include "integer.h"
|
||||
#include "PollQ.h"
|
||||
#include "comtest2.h"
|
||||
#include "semtest.h"
|
||||
#include "flop.h"
|
||||
#include "dynamic.h"
|
||||
#include "BlockQ.h"
|
||||
#include "serial.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* 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 )
|
||||
|
||||
/* 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 )
|
||||
|
||||
/* Constants to setup the MAM. */
|
||||
#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )
|
||||
#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )
|
||||
|
||||
/* Constants to setup the peripheral bus. */
|
||||
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 3 )
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
|
||||
/* The rate at which the on board LED will toggle when there is/is not an
|
||||
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 )
|
||||
|
||||
/* Constants used by the vMemCheckTask() task. */
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
|
||||
#define mainNO_TASK ( 0 )
|
||||
|
||||
/* The size of the memory blocks allocated by the vMemCheckTask() task. */
|
||||
#define mainMEM_CHECK_SIZE_1 ( ( size_t ) 51 )
|
||||
#define mainMEM_CHECK_SIZE_2 ( ( size_t ) 52 )
|
||||
#define mainMEM_CHECK_SIZE_3 ( ( size_t ) 151 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The Olimex demo board has a single built in LED. This function simply
|
||||
* toggles its state.
|
||||
*/
|
||||
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 );
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||
* of the file.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Dynamically created and deleted during each cycle of the vErrorChecks()
|
||||
* task. This is done to check the operation of the memory allocator.
|
||||
* See the top of vErrorChecks for more details.
|
||||
*/
|
||||
static void vMemCheckTask( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Configure the processor for use with the Olimex demo board. This includes
|
||||
* setup for the I/O, system clock, and access timings.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Starts all the other tasks, then starts the scheduler.
|
||||
*/
|
||||
int main( void )
|
||||
{
|
||||
/* Setup the hardware for use with the Olimex demo board. */
|
||||
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 );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartMathTasks( tskIDLE_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
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 );
|
||||
|
||||
/* Now all the tasks have been started - start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should never reach here! */
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
unsigned portLONG ulMemCheckTaskRunningCount;
|
||||
xTaskHandle xCreatedTask;
|
||||
|
||||
/* The parameters are not used in this function. */
|
||||
( 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
|
||||
the on board LED flash rate will increase.
|
||||
|
||||
In addition to the standard tests the memory allocator is tested through
|
||||
the dynamic creation and deletion of a task each cycle. Each time the
|
||||
task is created memory must be allocated for its stack. When the task is
|
||||
deleted this memory is returned to the heap. If the task cannot be created
|
||||
then it is likely that the memory allocation failed. */
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Dynamically create a task - passing ulMemCheckTaskRunningCount as a
|
||||
parameter. */
|
||||
ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE;
|
||||
xCreatedTask = mainNO_TASK;
|
||||
if( xTaskCreate( vMemCheckTask, ( signed portCHAR * ) "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;
|
||||
}
|
||||
|
||||
/* Delay until it is time to execute again. */
|
||||
vTaskDelay( xDelayPeriod );
|
||||
|
||||
/* Delete the dynamically created task. */
|
||||
if( xCreatedTask != mainNO_TASK )
|
||||
{
|
||||
vTaskDelete( xCreatedTask );
|
||||
}
|
||||
|
||||
/* Check all the standard demo application tasks are executing without
|
||||
error. ulMemCheckTaskRunningCount is checked to ensure it was
|
||||
modified by the task just deleted. */
|
||||
if( prvCheckOtherTasksAreStillRunning( ulMemCheckTaskRunningCount ) != pdPASS )
|
||||
{
|
||||
/* An error has been detected in one of the tasks - flash faster. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
prvToggleOnBoardLED();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
#ifdef RUN_FROM_RAM
|
||||
/* Remap the interrupt vectors to RAM if we are are running from RAM. */
|
||||
SCB_MEMMAP = 2;
|
||||
#endif
|
||||
|
||||
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
|
||||
PCB_PINSEL0 |= mainTX_ENABLE;
|
||||
PCB_PINSEL0 |= mainRX_ENABLE;
|
||||
|
||||
/* Set all GPIO to output other than the P0.14 (BSL), and the JTAG pins.
|
||||
The JTAG pins are left as input as I'm not sure what will happen if the
|
||||
Wiggler is connected after powerup - not that it would be a good idea to
|
||||
do that anyway. */
|
||||
GPIO_IODIR = ~( mainP0_14 + mainJTAG_PORT );
|
||||
|
||||
/* Setup the PLL to multiply the XTAL input by 4. */
|
||||
SCB_PLLCFG = ( mainPLL_MUL_4 | mainPLL_DIV_1 );
|
||||
|
||||
/* Activate the PLL by turning it on then feeding the correct sequence of
|
||||
bytes. */
|
||||
SCB_PLLCON = mainPLL_ENABLE;
|
||||
SCB_PLLFEED = mainPLL_FEED_BYTE1;
|
||||
SCB_PLLFEED = mainPLL_FEED_BYTE2;
|
||||
|
||||
/* Wait for the PLL to lock... */
|
||||
while( !( SCB_PLLSTAT & mainPLL_LOCK ) );
|
||||
|
||||
/* ...before connecting it using the feed sequence again. */
|
||||
SCB_PLLCON = mainPLL_CONNECT;
|
||||
SCB_PLLFEED = mainPLL_FEED_BYTE1;
|
||||
SCB_PLLFEED = mainPLL_FEED_BYTE2;
|
||||
|
||||
/* Setup and turn on the MAM. Three cycle access is used due to the fast
|
||||
PLL used. It is possible faster overall performance could be obtained by
|
||||
tuning the MAM and PLL settings. */
|
||||
MAM_TIM = mainMAM_TIM_3;
|
||||
MAM_CR = mainMAM_MODE_FULL;
|
||||
|
||||
/* Setup the peripheral bus to be the same as the PLL output. */
|
||||
SCB_VPBDIV = mainBUS_CLK_FULL;
|
||||
|
||||
/* Initialise LED outputs. */
|
||||
vParTestInitialise();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void prvToggleOnBoardLED( void )
|
||||
{
|
||||
unsigned portLONG ulState;
|
||||
|
||||
ulState = GPIO0_IOPIN;
|
||||
if( ulState & mainON_BOARD_LED_BIT )
|
||||
{
|
||||
GPIO_IOCLR = mainON_BOARD_LED_BIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
GPIO_IOSET = mainON_BOARD_LED_BIT;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) 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() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )
|
||||
{
|
||||
/* The vMemCheckTask did not increment the counter - it must
|
||||
have failed. */
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vMemCheckTask( void *pvParameters )
|
||||
{
|
||||
unsigned portLONG *pulMemCheckTaskRunningCounter;
|
||||
void *pvMem1, *pvMem2, *pvMem3;
|
||||
static portLONG 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
|
||||
the task is created memory is allocated for the stack and TCB. Each time
|
||||
the task is deleted this memory is returned to the heap. This task itself
|
||||
exercises the allocator by allocating and freeing blocks.
|
||||
|
||||
The task executes at the idle priority so does not require a delay.
|
||||
|
||||
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
|
||||
vErrorChecks() task that this task is still executing without error. */
|
||||
|
||||
pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
if( lErrorOccurred == pdFALSE )
|
||||
{
|
||||
/* We have never seen an error so increment the counter. */
|
||||
( *pulMemCheckTaskRunningCounter )++;
|
||||
}
|
||||
|
||||
/* Allocate some memory - just to give the allocator some extra
|
||||
exercise. This has to be in a critical section to ensure the
|
||||
task does not get deleted while it has memory allocated. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
pvMem1 = pvPortMalloc( mainMEM_CHECK_SIZE_1 );
|
||||
if( pvMem1 == NULL )
|
||||
{
|
||||
lErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset( pvMem1, 0xaa, mainMEM_CHECK_SIZE_1 );
|
||||
vPortFree( pvMem1 );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
|
||||
/* Again - with a different size block. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
pvMem2 = pvPortMalloc( mainMEM_CHECK_SIZE_2 );
|
||||
if( pvMem2 == NULL )
|
||||
{
|
||||
lErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset( pvMem2, 0xaa, mainMEM_CHECK_SIZE_2 );
|
||||
vPortFree( pvMem2 );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
|
||||
/* Again - with a different size block. */
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
pvMem3 = pvPortMalloc( mainMEM_CHECK_SIZE_3 );
|
||||
if( pvMem3 == NULL )
|
||||
{
|
||||
lErrorOccurred = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset( pvMem3, 0xaa, mainMEM_CHECK_SIZE_3 );
|
||||
vPortFree( pvMem3 );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,263 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.0
|
||||
|
||||
+ Made serial ISR handling more complete and robust.
|
||||
|
||||
Changes from V2.4.1
|
||||
|
||||
+ Split serial.c into serial.c and serialISR.c. serial.c can be
|
||||
compiled using ARM or THUMB modes. serialISR.c must always be
|
||||
compiled in ARM mode.
|
||||
+ Another small change to cSerialPutChar().
|
||||
|
||||
Changed from V2.5.1
|
||||
|
||||
+ In cSerialPutChar() an extra check is made to ensure the post to
|
||||
the queue was successful if then attempting to retrieve the posted
|
||||
character.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
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 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 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;
|
||||
extern void ( vUART_ISR )( void );
|
||||
|
||||
/* 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();
|
||||
{
|
||||
/* 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. */
|
||||
UART0_LCR |= serDLAB;
|
||||
|
||||
/* Setup the divisor. */
|
||||
UART0_DLL = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
ulDivisor >>= 8;
|
||||
UART0_DLM = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
|
||||
|
||||
/* Turn on the FIFO's and clear the buffers. */
|
||||
UART0_FCR = ( serFIFO_ON | serCLEAR_FIFO );
|
||||
|
||||
/* Setup transmission format. */
|
||||
UART0_LCR = serNO_PARITY | ser1_STOP_BIT | ser8_BIT_CHARS;
|
||||
|
||||
/* Setup the VIC for the UART. */
|
||||
VICIntSelect &= ~( serUART0_VIC_CHANNEL_BIT );
|
||||
VICIntEnable |= serUART0_VIC_CHANNEL_BIT;
|
||||
VICVectAddr1 = ( portLONG ) vUART_ISR;
|
||||
VICVectCntl1 = serUART0_VIC_CHANNEL | serUART0_VIC_ENABLE;
|
||||
|
||||
/* Enable UART0 interrupts. */
|
||||
UART0_IER |= 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;
|
||||
|
||||
/* This demo driver only supports one port so the parameter is not used. */
|
||||
( 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;
|
||||
UART0_THR = 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. */
|
||||
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 ) && ( xReturn == pdPASS ) )
|
||||
{
|
||||
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
|
||||
*plTHREEmpty = pdFALSE;
|
||||
UART0_THR = cOutChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
/* Not supported as not required by the demo application. */
|
||||
( void ) xPort;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
/* 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;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* 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 );
|
||||
|
||||
/* UART0 interrupt service routine. This can cause a context switch so MUST
|
||||
be declared "naked". */
|
||||
void vUART_ISR( void ) __attribute__ ((naked));
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
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 = ( portLONG ) pdTRUE;
|
||||
*pplTHREEmptyFlag = &lTHREEmpty;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR( void )
|
||||
{
|
||||
/* This ISR can cause a context switch, so the first statement must be a
|
||||
call to the portENTER_SWITCHING_ISR() macro. This must be BEFORE any
|
||||
variable declarations. */
|
||||
portENTER_SWITCHING_ISR();
|
||||
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( UART0_IIR & serINTERRUPT_SOURCE_MASK )
|
||||
{
|
||||
case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */
|
||||
cChar = UART0_LSR;
|
||||
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 )
|
||||
{
|
||||
UART0_THR = 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 = UART0_RBR;
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, ( portBASE_TYPE ) 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 ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
/* Hardware specifics. */
|
||||
#include <iolpc2129.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 ) 14200 )
|
||||
#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 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines for the LED's.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "partest.h"
|
||||
|
||||
/* Board specific defines. */
|
||||
#define partstFIRST_IO ( ( unsigned portLONG ) 0x10000 )
|
||||
#define partstNUM_LEDS ( 8 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* The ports are setup within prvInitialiseHardware(), called by main(). */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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 1. Only P16 to P23 have an LED
|
||||
attached. */
|
||||
ulLED <<= ( unsigned portLONG ) uxLED;
|
||||
|
||||
/* Set or clear the output. */
|
||||
if( xValue )
|
||||
{
|
||||
IO1SET = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
IO1CLR = ulLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portLONG 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;
|
||||
|
||||
/* If this bit is already set, clear it, and visa versa. */
|
||||
ulCurrentState = IO1PIN;
|
||||
if( ulCurrentState & ulLED )
|
||||
{
|
||||
IO1CLR = ulLED;
|
||||
}
|
||||
else
|
||||
{
|
||||
IO1SET = ulLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
; This file contains the startup code used by the ICCARM C compiler.
|
||||
;
|
||||
; The modules in this file are included in the libraries, and may be replaced
|
||||
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||
; a user defined start symbol.
|
||||
; To override the cstartup defined in the library, simply add your modified
|
||||
; version to the workbench project.
|
||||
;
|
||||
; All code in the modules (except ?RESET) will be placed in the ICODE segment.
|
||||
;
|
||||
; $Revision: 1.56 $
|
||||
;
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
;
|
||||
; Naming covention of labels in this file:
|
||||
;
|
||||
; ?xxx - External labels only accessed from assembler.
|
||||
; __xxx - External labels accessed from or defined in C.
|
||||
; xxx - Labels local to one module (note: this file contains
|
||||
; several modules).
|
||||
; main - The starting point of the user program.
|
||||
;
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; Macros and definitions for the whole file
|
||||
;---------------------------------------------------------------
|
||||
|
||||
; Mode, correspords to bits 0-5 in CPSR
|
||||
MODE_BITS DEFINE 0x1F ; Bit mask for mode bits in CPSR
|
||||
USR_MODE DEFINE 0x10 ; User mode
|
||||
FIQ_MODE DEFINE 0x11 ; Fast Interrupt Request mode
|
||||
IRQ_MODE DEFINE 0x12 ; Interrupt Request mode
|
||||
SVC_MODE DEFINE 0x13 ; Supervisor mode
|
||||
ABT_MODE DEFINE 0x17 ; Abort mode
|
||||
UND_MODE DEFINE 0x1B ; Undefined Instruction mode
|
||||
SYS_MODE DEFINE 0x1F ; System mode
|
||||
|
||||
I_Bit DEFINE 0x80 ; IRQ Disable Bit
|
||||
F_Bit DEFINE 0x40 ; FIQ Disable Bit
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?RESET
|
||||
; Reset Vector.
|
||||
; Normally, segment INTVEC is linked at address 0.
|
||||
; For debugging purposes, INTVEC may be placed at other
|
||||
; addresses.
|
||||
; A debugger that honors the entry point will start the
|
||||
; program in a normal way even if INTVEC is not at address 0.
|
||||
;---------------------------------------------------------------
|
||||
|
||||
MODULE ?RESET
|
||||
COMMON INTVEC:CODE:NOROOT(2)
|
||||
PUBLIC __program_start
|
||||
EXTERN ?cstartup
|
||||
EXTERN undef_handler, swi_handler, prefetch_handler
|
||||
EXTERN data_handler, irq_handler, fiq_handler
|
||||
EXTERN vPortYieldProcessor
|
||||
|
||||
CODE32 ; Always ARM mode after reset
|
||||
|
||||
__program_start
|
||||
|
||||
org 0x00
|
||||
|
||||
B InitReset ; 0x00 Reset handler
|
||||
undefvec:
|
||||
B undefvec ; 0x04 Undefined Instruction
|
||||
swivec:
|
||||
B vPortYieldProcessor ; 0x08 Software Interrupt
|
||||
pabtvec:
|
||||
B pabtvec ; 0x0C Prefetch Abort
|
||||
dabtvec:
|
||||
B dabtvec ; 0x10 Data Abort
|
||||
rsvdvec:
|
||||
B rsvdvec ; 0x14 reserved
|
||||
irqvec:
|
||||
LDR PC, [PC, #-0xFF0] ; Jump directly to the address given by the AIC
|
||||
|
||||
fiqvec: ; 0x1c FIQ
|
||||
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?CSTARTUP
|
||||
;---------------------------------------------------------------
|
||||
|
||||
RSEG IRQ_STACK:DATA(2)
|
||||
RSEG SVC_STACK:DATA:NOROOT(2)
|
||||
RSEG CSTACK:DATA(2)
|
||||
RSEG ICODE:CODE:NOROOT(2)
|
||||
EXTERN ?main
|
||||
|
||||
; Execution starts here.
|
||||
; After a reset, the mode is ARM, Supervisor, interrupts disabled.
|
||||
|
||||
|
||||
CODE32
|
||||
|
||||
InitReset
|
||||
|
||||
; Add initialization needed before setup of stackpointers here
|
||||
|
||||
|
||||
; Initialize the stack pointers.
|
||||
; The pattern below can be used for any of the exception stacks:
|
||||
; FIQ, IRQ, SVC, ABT, UND, SYS.
|
||||
; The USR mode uses the same stack as SYS.
|
||||
; The stack segments must be defined in the linker command file,
|
||||
; and be declared above.
|
||||
mrs r0,cpsr ; Original PSR value
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#IRQ_MODE ; Set IRQ mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(IRQ_STACK) & 0xFFFFFFF8 ; End of IRQ_STACK
|
||||
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#SYS_MODE ; Set System mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(CSTACK) & 0xFFFFFFF8 ; End of CSTACK
|
||||
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#SVC_MODE ; Set System mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(SVC_STACK) & 0xFFFFFFF8 ; End of CSTACK
|
||||
|
||||
; Must start in supervisor mode.
|
||||
MSR CPSR_c, #SVC_MODE|I_Bit|F_Bit
|
||||
|
||||
|
||||
; Add more initialization here
|
||||
|
||||
|
||||
; Continue to ?main for more IAR specific system startup
|
||||
|
||||
ldr r0,=?main
|
||||
bx r0
|
||||
|
||||
|
||||
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?EXEPTION_VECTOR
|
||||
; This module is only linked if needed for closing files.
|
||||
;---------------------------------------------------------------
|
||||
PUBLIC AT91F_Default_FIQ_handler
|
||||
PUBLIC AT91F_Default_IRQ_handler
|
||||
PUBLIC AT91F_Spurious_handler
|
||||
|
||||
CODE32 ; Always ARM mode after exeption
|
||||
|
||||
AT91F_Default_FIQ_handler
|
||||
b AT91F_Default_FIQ_handler
|
||||
|
||||
AT91F_Default_IRQ_handler
|
||||
b AT91F_Default_IRQ_handler
|
||||
|
||||
AT91F_Spurious_handler
|
||||
b AT91F_Spurious_handler
|
||||
|
||||
ENDMOD
|
||||
|
||||
END
|
||||
|
||||
|
||||
|
||||
|
||||
ENDMOD
|
||||
END
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) 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
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "flash.h"
|
||||
#include "integer.h"
|
||||
#include "PollQ.h"
|
||||
#include "BlockQ.h"
|
||||
#include "semtest.h"
|
||||
#include "dynamic.h"
|
||||
#include "partest.h"
|
||||
#include "comtest2.h"
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
|
||||
/* Constants required by the 'Check' task. */
|
||||
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( 7 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 4 )
|
||||
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
|
||||
#define mainRX_ENABLE ( ( unsigned portLONG ) 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 )
|
||||
|
||||
/* Constants to setup the MAM. */
|
||||
#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )
|
||||
#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )
|
||||
|
||||
/* Constants to setup the peripheral bus. */
|
||||
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
|
||||
|
||||
/* And finally, constant to setup the port for the LED's. */
|
||||
#define mainLED_TO_OUTPUT ( ( unsigned portLONG ) 0xff0000 )
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||
* of the file.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Configures the processor for use with this demo.
|
||||
*/
|
||||
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 );
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Starts all the other tasks, then starts the scheduler.
|
||||
*/
|
||||
void main( void )
|
||||
{
|
||||
/* Setup the processor. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Start all the standard demo application tasks. */
|
||||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here.
|
||||
*/
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* We should never get here as control is now taken by the scheduler. */
|
||||
return;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL to multiply the XTAL input by 4. */
|
||||
PLLCFG = ( mainPLL_MUL_4 | mainPLL_DIV_1 );
|
||||
|
||||
/* Activate the PLL by turning it on then feeding the correct sequence of
|
||||
bytes. */
|
||||
PLLCON = mainPLL_ENABLE;
|
||||
PLLFEED = mainPLL_FEED_BYTE1;
|
||||
PLLFEED = mainPLL_FEED_BYTE2;
|
||||
|
||||
/* Wait for the PLL to lock... */
|
||||
while( !( PLLSTAT & mainPLL_LOCK ) );
|
||||
|
||||
/* ...before connecting it using the feed sequence again. */
|
||||
PLLCON = mainPLL_CONNECT;
|
||||
PLLFEED = mainPLL_FEED_BYTE1;
|
||||
PLLFEED = mainPLL_FEED_BYTE2;
|
||||
|
||||
/* Setup and turn on the MAM. Three cycle access is used due to the fast
|
||||
PLL used. It is possible faster overall performance could be obtained by
|
||||
tuning the MAM and PLL settings. */
|
||||
MAMTIM = mainMAM_TIM_3;
|
||||
MAMCR = mainMAM_MODE_FULL;
|
||||
|
||||
/* Setup the peripheral bus to be the same as the PLL output. */
|
||||
VPBDIV = mainBUS_CLK_FULL;
|
||||
|
||||
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
|
||||
PINSEL0 |= mainTX_ENABLE;
|
||||
PINSEL0 |= mainRX_ENABLE;
|
||||
|
||||
/* LED pins need to be output. */
|
||||
IO1DIR = mainLED_TO_OUTPUT;
|
||||
|
||||
/* Setup the peripheral bus to be the same as the PLL output. */
|
||||
VPBDIV = mainBUS_CLK_FULL;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
|
||||
/* The parameters are not used in this task. */
|
||||
( 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
|
||||
the on board LED flash rate will increase. */
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Delay until it is time to execute again. */
|
||||
vTaskDelay( xDelayPeriod );
|
||||
|
||||
/* Check all the standard demo application tasks are executing without
|
||||
error. */
|
||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||
{
|
||||
/* An error has been detected in one of the tasks - flash faster. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) 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() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
//*************************************************************************
|
||||
// XLINK command file template for EWARM/ICCARM
|
||||
//
|
||||
// Usage: xlink -f lnkarm <your_object_file(s)>
|
||||
// -s <program start label> <C/C++ runtime library>
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
//*************************************************************************
|
||||
|
||||
//*************************************************************************
|
||||
//
|
||||
// -------------
|
||||
// Code segments - may be placed anywhere in memory.
|
||||
// -------------
|
||||
//
|
||||
// INTVEC -- Exception vector table.
|
||||
// SWITAB -- Software interrupt vector table.
|
||||
// ICODE -- Startup (cstartup) and exception code.
|
||||
// DIFUNCT -- Dynamic initialization vectors used by C++.
|
||||
// CODE -- Compiler generated code.
|
||||
// CODE_I -- Compiler generated code declared __ramfunc (executes in RAM)
|
||||
// CODE_ID -- Initializer for CODE_I (ROM).
|
||||
//
|
||||
// -------------
|
||||
// Data segments - may be placed anywhere in memory.
|
||||
// -------------
|
||||
//
|
||||
// CSTACK -- The stack used by C/C++ programs (system and user mode).
|
||||
// IRQ_STACK -- The stack used by IRQ service routines.
|
||||
// SVC_STACK -- The stack used in supervisor mode
|
||||
// (Define other exception stacks as needed for
|
||||
// FIQ, ABT, UND).
|
||||
// HEAP -- The heap used by malloc and free in C and new and
|
||||
// delete in C++.
|
||||
// INITTAB -- Table containing addresses and sizes of segments that
|
||||
// need to be initialized at startup (by cstartup).
|
||||
// CHECKSUM -- The linker places checksum byte(s) in this segment,
|
||||
// when the -J linker command line option is used.
|
||||
// DATA_y -- Data objects.
|
||||
//
|
||||
// Where _y can be one of:
|
||||
//
|
||||
// _AN -- Holds uninitialized located objects, i.e. objects with
|
||||
// an absolute location given by the @ operator or the
|
||||
// #pragma location directive. Since these segments
|
||||
// contain objects which already have a fixed address,
|
||||
// they should not be mentioned in this linker command
|
||||
// file.
|
||||
// _C -- Constants (ROM).
|
||||
// _I -- Initialized data (RAM).
|
||||
// _ID -- The original content of _I (copied to _I by cstartup) (ROM).
|
||||
// _N -- Uninitialized data (RAM).
|
||||
// _Z -- Zero initialized data (RAM).
|
||||
//
|
||||
// Note: Be sure to use end values for the defined address ranges.
|
||||
// Otherwise, the linker may allocate space outside the
|
||||
// intended memory range.
|
||||
//*************************************************************************
|
||||
|
||||
|
||||
//************************************************
|
||||
// Inform the linker about the CPU family used.
|
||||
//************************************************
|
||||
|
||||
-carm
|
||||
|
||||
//*************************************************************************
|
||||
// Segment placement - General information
|
||||
//
|
||||
// All numbers in the segment placement command lines below are interpreted
|
||||
// as hexadecimal unless they are immediately preceded by a '.', which
|
||||
// denotes decimal notation.
|
||||
//
|
||||
// When specifying the segment placement using the -P instead of the -Z
|
||||
// option, the linker is free to split each segment into its segment parts
|
||||
// and randomly place these parts within the given ranges in order to
|
||||
// achieve a more efficient memory usage. One disadvantage, however, is
|
||||
// that it is not possible to find the start or end address (using
|
||||
// the assembler operators .sfb./.sfe.) of a segment which has been split
|
||||
// and reformed.
|
||||
//
|
||||
// When generating an output file which is to be used for programming
|
||||
// external ROM/Flash devices, the -M linker option is very useful
|
||||
// (see xlink.pdf for details).
|
||||
//*************************************************************************
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
// Read-only segments mapped to ROM.
|
||||
//*************************************************************************
|
||||
|
||||
-DROMSTART=00000000
|
||||
-DROMEND=00001ffff
|
||||
|
||||
//************************************************
|
||||
// Address range for reset and exception
|
||||
// vectors (INTVEC).
|
||||
// The vector area is 32 bytes,
|
||||
// an additional 32 bytes is allocated for the
|
||||
// constant table used by ldr PC in cstartup.s79.
|
||||
//************************************************
|
||||
|
||||
-Z(CODE)INTVEC=00000000-0000003f
|
||||
|
||||
//************************************************
|
||||
// Startup code and exception routines (ICODE).
|
||||
//************************************************
|
||||
|
||||
-Z(CODE)ICODE,DIFUNCT=ROMSTART-ROMEND
|
||||
-Z(CODE)SWITAB=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Code segments may be placed anywhere.
|
||||
//************************************************
|
||||
|
||||
-Z(CODE)CODE=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Original ROM location for __ramfunc code copied
|
||||
// to and executed from RAM.
|
||||
//************************************************
|
||||
|
||||
-Z(CONST)CODE_ID=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Various constants and initializers.
|
||||
//************************************************
|
||||
|
||||
-Z(CONST)INITTAB,DATA_ID,DATA_C=ROMSTART-ROMEND
|
||||
-Z(CONST)CHECKSUM=ROMSTART-ROMEND
|
||||
|
||||
//*************************************************************************
|
||||
// Read/write segments mapped to RAM.
|
||||
//*************************************************************************
|
||||
|
||||
-DRAMSTART=40000000
|
||||
-DRAMEND=40003fff
|
||||
|
||||
//************************************************
|
||||
// Data segments.
|
||||
//************************************************
|
||||
|
||||
-Z(DATA)DATA_I,DATA_Z,DATA_N=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// __ramfunc code copied to and executed from RAM.
|
||||
//************************************************
|
||||
|
||||
-Z(DATA)CODE_I=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// ICCARM produces code for __ramfunc functions in
|
||||
// CODE_I segments. The -Q XLINK command line
|
||||
// option redirects XLINK to emit the code in the
|
||||
// CODE_ID segment instead, but to keep symbol and
|
||||
// debug information associated with the CODE_I
|
||||
// segment, where the code will execute.
|
||||
//************************************************
|
||||
|
||||
-QCODE_I=CODE_ID
|
||||
|
||||
//*************************************************************************
|
||||
// Stack and heap segments.
|
||||
//*************************************************************************
|
||||
|
||||
-D_CSTACK_SIZE=200
|
||||
-D_SVC_STACK_SIZE=190
|
||||
-D_IRQ_STACK_SIZE=190
|
||||
-D_HEAP_SIZE=4
|
||||
|
||||
-Z(DATA)CSTACK+_CSTACK_SIZE=RAMSTART-RAMEND
|
||||
-Z(DATA)SVC_STACK+_SVC_STACK_SIZE=RAMSTART-RAMEND
|
||||
-Z(DATA)IRQ_STACK+_IRQ_STACK_SIZE,HEAP+_HEAP_SIZE=RAMSTART-RAMEND
|
||||
|
||||
//*************************************************************************
|
||||
// ELF/DWARF support.
|
||||
//
|
||||
// Uncomment the line "-Felf" below to generate ELF/DWARF output.
|
||||
// Available format specifiers are:
|
||||
//
|
||||
// "-yn": Suppress DWARF debug output
|
||||
// "-yp": Multiple ELF program sections
|
||||
// "-yas": Format suitable for debuggers from ARM Ltd (also sets -p flag)
|
||||
//
|
||||
// "-Felf" and the format specifiers can also be supplied directly as
|
||||
// command line options, or selected from the Xlink Output tab in the
|
||||
// IAR Embedded Workbench.
|
||||
//*************************************************************************
|
||||
|
||||
// -Felf
|
||||
@@ -1,913 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<configuration>
|
||||
<name>Flash Debug</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>1</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>13</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCVariant</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\iolpc2129.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDDFArgumentProducer</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadSuppressDownload</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadVerifyAll</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCProductVersion</name>
|
||||
<state>4.10B</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>4.30A</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>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ARMSIM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCSimDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ANGEL_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCAngelHeartbeat</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ANGELTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoAngelLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AngelLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARROM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRomLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommunication</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>JLinkSpeed</name>
|
||||
<state>30</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWReset</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTRSTReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>JLinkInitialSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDoJlinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCScanChainNonARMDevices</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkIRLength</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkCommRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>jtag</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoEmuMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuMultiTarget</name>
|
||||
<state>0@ARM7TDMI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>jtago</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UnusedAddr</name>
|
||||
<state>0x00800000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>RDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRDIDriverDll</name>
|
||||
<state>Browse to your RDI driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileEdit</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIUseETM</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CThirdPartyDriverDll</name>
|
||||
<state>Browse to your third-party driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Trace\Trace.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXTinyArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OSE\OseEpsilonPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
<configuration>
|
||||
<name>Flash Bin</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>0</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>13</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCVariant</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\iolpc2129.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDDFArgumentProducer</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadSuppressDownload</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadVerifyAll</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCProductVersion</name>
|
||||
<state>4.10B</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>4.30A</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>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ARMSIM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>OCSimDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ANGEL_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CCAngelHeartbeat</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ANGELTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoAngelLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AngelLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARROM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CRomLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommunication</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>2</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>JLinkSpeed</name>
|
||||
<state>30</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWReset</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTRSTReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>JLinkInitialSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDoJlinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCScanChainNonARMDevices</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkIRLength</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkCommRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>jtag</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoEmuMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuMultiTarget</name>
|
||||
<state>0@ARM7TDMI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>jtago</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UnusedAddr</name>
|
||||
<state>0x00800000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>RDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CRDIDriverDll</name>
|
||||
<state>Browse to your RDI driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileEdit</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIUseETM</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CThirdPartyDriverDll</name>
|
||||
<state>Browse to your third-party driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Trace\Trace.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXTinyArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OSE\OseEpsilonPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,288 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||
*/
|
||||
|
||||
/* 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 )
|
||||
#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 )
|
||||
|
||||
/* 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;
|
||||
static volatile portLONG lTHREEmpty = pdFALSE;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The ISR. Note that this is called by a wrapper written in the file
|
||||
SerialISR.s79. See the WEB documentation for this port for further
|
||||
information. */
|
||||
__arm void vSerialISR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG 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 ) );
|
||||
|
||||
/* Initialise the THRE empty flag. */
|
||||
lTHREEmpty = pdTRUE;
|
||||
|
||||
if(
|
||||
( xRxedChars != serINVALID_QUEUE ) &&
|
||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||
( ulWantedBaud != ( unsigned portLONG ) 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. */
|
||||
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 ) vSerialISREntry;
|
||||
VICVectCntl1 = serU0VIC_CHANNEL | serU0VIC_ENABLE;
|
||||
|
||||
/* Enable UART0 interrupts. */
|
||||
U0IER |= serENABLE_INTERRUPTS;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
xReturn = ( xComPortHandle ) 1;
|
||||
}
|
||||
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( lTHREEmpty == ( portLONG ) pdTRUE )
|
||||
{
|
||||
/* We wrote the character directly to the UART, so was
|
||||
successful. */
|
||||
lTHREEmpty = 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( lTHREEmpty == ( portLONG ) pdTRUE )
|
||||
{
|
||||
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
|
||||
lTHREEmpty = pdFALSE;
|
||||
U0THR = cOutChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
__arm void vSerialISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = 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;
|
||||
}
|
||||
|
||||
/* 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 ) );
|
||||
|
||||
/* Clear the ISR in the VIC. */
|
||||
VICVectAddr = serCLEAR_VIC_INTERRUPT;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Project>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>138</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
<Build><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Build>
|
||||
<Register>
|
||||
<PreferedWindows>
|
||||
|
||||
|
||||
|
||||
|
||||
<Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows>
|
||||
</Register>
|
||||
<QWatch><Column0>161</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></QWatch><Memory><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory><Driver-Trace><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>300</Column0></Driver-Trace><Breakpoints/><Watch><Format><struct_types/><watch_formats/></Format><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>100</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></Watch><QuickWatch><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>100</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></QuickWatch></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-22256-14845</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/Demo Source</ExpandedNode><ExpandedNode>rtosdemo/Scheduler Source</ExpandedNode><ExpandedNode>rtosdemo/System Files</ExpandedNode><ExpandedNode>rtosdemo/USBSample.c</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-32269-5949</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-30271-4373</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\list.c</Filename><XPos>0</XPos><YPos>159</YPos><SelStart>6486</SelStart><SelEnd>6613</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\include\list.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\tasks.c</Filename><XPos>0</XPos><YPos>172</YPos><SelStart>6942</SelStart><SelEnd>6959</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\include\task.h</Filename><XPos>0</XPos><YPos>50</YPos><SelStart>2282</SelStart><SelEnd>2291</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_LPC2129_IAR\serial\serialISR.s79</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\LPC2000\ISR_Support.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\LPC2000\portmacro.h</Filename><XPos>0</XPos><YPos>52</YPos><SelStart>2522</SelStart><SelEnd>2531</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\queue.c</Filename><XPos>0</XPos><YPos>148</YPos><SelStart>7593</SelStart><SelEnd>7593</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_LPC2129_IAR\main.c</Filename><XPos>0</XPos><YPos>166</YPos><SelStart>7172</SelStart><SelEnd>7172</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\MemMang\heap_1.c</Filename><XPos>0</XPos><YPos>75</YPos><SelStart>2927</SelStart><SelEnd>2938</SelEnd></Tab><ActiveTab>9</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084fb00><key>iaridepm1</key></Toolbar-0084fb00><Toolbar-021f0ee0><key>debuggergui1</key></Toolbar-021f0ee0></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>739</Bottom><Right>212</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>133750</sizeVertCX><sizeVertCY>662198</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>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>335</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>299374</sizeHorzCY><sizeVertCX>92500</sizeVertCX><sizeVertCY>132260</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
[JLinkDriver]
|
||||
WatchVectorCatch=_ 0
|
||||
WatchCond=_ 0
|
||||
Watch0=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
Watch1=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
[Low Level]
|
||||
Pipeline mode=1
|
||||
Initialized=0
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints]
|
||||
Bp0=_ "Code" "{E:\Dev\FreeRTOS\Source\queue.c}.179.3@1" 1 0 0 0 "" 0 ""
|
||||
Count=1
|
||||
[Interrupts]
|
||||
Enabled=1
|
||||
[MemoryMap]
|
||||
Enabled=0
|
||||
TypeVolition=1
|
||||
UnspecRange=1
|
||||
ActionState=1
|
||||
[TraceHelper]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>rtosdemo/Flash Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>229</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/>
|
||||
<TerminalIO/>
|
||||
<CodeCoveragePlugin/>
|
||||
<Profiling/>
|
||||
<Watch>
|
||||
<Format>
|
||||
<struct_types/>
|
||||
<watch_formats/>
|
||||
</Format>
|
||||
</Watch>
|
||||
<Disassembly><MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly><Memory><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory><Find-in-Files><ColumnWidth0>552</ColumnWidth0><ColumnWidth1>78</ColumnWidth1><ColumnWidth2>946</ColumnWidth2></Find-in-Files><Breakpoints/></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-17425-14382</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/Scheduler Source</ExpandedNode><ExpandedNode>rtosdemo/System Files</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<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>E:\Dev\FreeRTOS\Source\list.c</Filename><XPos>0</XPos><YPos>159</YPos><SelStart>6486</SelStart><SelEnd>6613</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\include\list.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\tasks.c</Filename><XPos>0</XPos><YPos>172</YPos><SelStart>6942</SelStart><SelEnd>6959</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\include\task.h</Filename><XPos>0</XPos><YPos>50</YPos><SelStart>2282</SelStart><SelEnd>2291</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_LPC2129_IAR\serial\serialISR.s79</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\LPC2000\ISR_Support.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\LPC2000\portmacro.h</Filename><XPos>0</XPos><YPos>52</YPos><SelStart>2522</SelStart><SelEnd>2531</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\queue.c</Filename><XPos>0</XPos><YPos>148</YPos><SelStart>7593</SelStart><SelEnd>7593</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_LPC2129_IAR\main.c</Filename><XPos>0</XPos><YPos>166</YPos><SelStart>7172</SelStart><SelEnd>7172</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\MemMang\heap_1.c</Filename><XPos>0</XPos><YPos>75</YPos><SelStart>2927</SelStart><SelEnd>2938</SelEnd></Tab><ActiveTab>9</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084fb00><key>iaridepm1</key></Toolbar-0084fb00></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>944</Bottom><Right>303</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>190625</sizeVertCX><sizeVertCY>845397</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>128</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>130</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>116175</sizeHorzCY><sizeVertCX>55000</sizeVertCX><sizeVertCY>78641</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#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,97 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#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,282 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) 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
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* 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
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Constants to setup I/O and processor. */
|
||||
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
|
||||
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x0004 )
|
||||
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
|
||||
#define mainLED_TO_OUTPUT ( ( unsigned portLONG ) 0xff0000 )
|
||||
|
||||
/* Constants for the ComTest demo application tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 3 )
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#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 )
|
||||
|
||||
/* 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
|
||||
indicate whether an error has been detected or not. If the LED toggles every
|
||||
3 seconds then no errors have been detected. If the rate increases to 500ms
|
||||
then an error has been detected in at least one of the demo application tasks. */
|
||||
#define mainCHECK_LED ( 7 )
|
||||
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Checks that all the demo application tasks are still executing without error
|
||||
* - as described at the top of the file.
|
||||
*/
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||
* of the file.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Configure the processor for use with the Keil demo board. This is very
|
||||
* minimal as most of the setup is managed by the settings in the project
|
||||
* file.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Application entry point:
|
||||
* Starts all the other tasks, then starts the scheduler.
|
||||
*/
|
||||
int main( void )
|
||||
{
|
||||
/* Setup the hardware for use with the Keil demo board. */
|
||||
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
|
||||
|
||||
/* 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
|
||||
without error. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Now all the tasks have been started - start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should never reach here! */
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
|
||||
/* Parameters are not used. */
|
||||
( 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
|
||||
the on board LED flash rate will increase.
|
||||
|
||||
This task runs at the highest priority. */
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* The period of the delay depends on whether an error has been
|
||||
detected or not. If an error has been detected then the period
|
||||
is reduced to increase the LED flash rate. */
|
||||
vTaskDelay( xDelayPeriod );
|
||||
|
||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||
{
|
||||
/* An error has been detected in one of the tasks - flash faster. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
/* Toggle the LED before going back to wait for the next cycle. */
|
||||
vParTestToggleLED( mainCHECK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
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. */
|
||||
PINSEL0 |= mainTX_ENABLE;
|
||||
PINSEL0 |= mainRX_ENABLE;
|
||||
|
||||
/* LED pins need to be output. */
|
||||
IODIR1 = mainLED_TO_OUTPUT;
|
||||
|
||||
/* Setup the peripheral bus to be the same as the PLL output. */
|
||||
VPBDIV = mainBUS_CLK_FULL;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
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
|
||||
|
||||
/* 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( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = pdFAIL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -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,247 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
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,160 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
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 ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_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 ) 48000000 )
|
||||
#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 ) 20480 )
|
||||
#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 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,365 +0,0 @@
|
||||
/******************** (C) COPYRIGHT 2003 STMicroelectronics ********************
|
||||
* File Name : uart.c
|
||||
* Author : MCD Application Team
|
||||
* Date First Issued : 06/08/2003
|
||||
* Description : This file provides all the UART software functions
|
||||
********************************************************************************
|
||||
* History:
|
||||
* 30/11/2004 : V2.0
|
||||
* 14/07/2004 : V1.3
|
||||
* 01/01/2004 : V1.2
|
||||
*******************************************************************************
|
||||
THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
|
||||
CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
||||
AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
|
||||
OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
|
||||
OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
|
||||
CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
||||
*******************************************************************************/
|
||||
|
||||
#include "uart.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_Init
|
||||
* Description : This function initializes the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_Init(UART_TypeDef *UARTx)
|
||||
{
|
||||
UARTx->IER = 0x00;
|
||||
UARTx->CR = 0x00;
|
||||
(void)UARTx->RxBUFR;
|
||||
UARTx->RxRSTR = 0xFFFF;
|
||||
UARTx->TxRSTR = 0xFFFF;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_BaudRateConfig
|
||||
* Description : This function configures the baud rate of the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : The baudrate value
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_BaudRateConfig(UART_TypeDef *UARTx, u32 BaudRate)
|
||||
{
|
||||
UARTx->BR = (u16)(RCCU_FrequencyValue(RCCU_FCLK)/(16*BaudRate));
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_Config
|
||||
* Description : This function configures the baudrate, the mode, the data
|
||||
* parity and the number of stop bits of the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : The baudrate value
|
||||
* Input 3 : The parity type
|
||||
* Input 4 : The number of stop bits
|
||||
* Input 5 : The UART mode
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_Config(UART_TypeDef *UARTx, u32 BaudRate, UARTParity_TypeDef Parity,
|
||||
UARTStopBits_TypeDef StopBits, UARTMode_TypeDef Mode)
|
||||
{
|
||||
UART_ModeConfig(UARTx, Mode);
|
||||
UART_BaudRateConfig(UARTx, BaudRate);
|
||||
UART_ParityConfig(UARTx, Parity);
|
||||
UART_StopBitsConfig(UARTx, StopBits);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_ItConfig
|
||||
* Description : This function enables or disables the interrupts of the
|
||||
* selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : The new interrupt flag
|
||||
* Input 3 : ENABLE or DISABLE
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_ItConfig(UART_TypeDef *UARTx, u16 UART_Flag, FunctionalState NewState)
|
||||
{
|
||||
if (NewState==ENABLE) UARTx->IER|=UART_Flag; else UARTx->IER&=~UART_Flag;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_FifoConfig
|
||||
* Description : This function enables or disables the Rx and Tx FIFOs of
|
||||
* the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : ENABLE or DISABLE
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_FifoConfig(UART_TypeDef *UARTx, FunctionalState NewState)
|
||||
{
|
||||
if (NewState==ENABLE) UARTx->CR|=0x0400; else UARTx->CR&=~0x0400;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_FifoReset
|
||||
* Description : This function resets the Rx and the Tx FIFOs of the
|
||||
* selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : UART_RxFIFO or UART_TxFIFO
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_FifoReset(UART_TypeDef *UARTx, UARTFIFO_TypeDef FIFO)
|
||||
{
|
||||
if (FIFO==UART_RxFIFO) UARTx->RxRSTR=0xFFFF; else UARTx->TxRSTR=0xFFFF;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_LoopBackConfig
|
||||
* Description : This function enables or disables the loop back mode of
|
||||
* the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : ENABLE or DISABLE
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_LoopBackConfig(UART_TypeDef *UARTx, FunctionalState NewState)
|
||||
{
|
||||
if (NewState==ENABLE) UARTx->CR|=0x0040; else UARTx->CR&=~0x0040;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_RxConfig
|
||||
* Description : This function enables or disables the UART data reception.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : ENABLE or DISABLE
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_RxConfig(UART_TypeDef *UARTx, FunctionalState NewState)
|
||||
{
|
||||
if (NewState==ENABLE) UARTx->CR|=0x0100; else UARTx->CR&=~0x0100;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_OnOffConfig
|
||||
* Description : This function sets On/Off the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : ENABLE or DISABLE
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_OnOffConfig(UART_TypeDef *UARTx, FunctionalState NewState)
|
||||
{
|
||||
if (NewState==ENABLE) UARTx->CR|=0x0080; else UARTx->CR&=~0x0080;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_ByteSend
|
||||
* Description : This function sends a data byte to the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the data byte to send
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_ByteSend(UART_TypeDef *UARTx, u8 *Data)
|
||||
{
|
||||
if (UARTx->CR & (0x0001<<UART_FIFOEnableBit))// if FIFO ENABLED
|
||||
while((UARTx->SR & UART_TxFull)); // while the UART_TxFIFO contain 16 characters.
|
||||
else // if FIFO DISABLED
|
||||
while (!(UARTx->SR & UART_TxEmpty)); // while the transmit shift register not empty
|
||||
UARTx->TxBUFR = *Data;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_9BitByteSend
|
||||
* Description : This function sends a 9 bits data byte to the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the data to send
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_9BitByteSend(UART_TypeDef *UARTx, u16 *Data)
|
||||
{
|
||||
if(UARTx->CR & (0x0001<<UART_FIFOEnableBit))// if FIFO ENABLED
|
||||
while((UARTx->SR & UART_TxFull)); // while the UART_TxFIFO contain 16 characters.
|
||||
else // if FIFO DISABLED
|
||||
while (!(UARTx->SR & UART_TxEmpty)); // while the transmit shift register not empty
|
||||
UARTx->TxBUFR = *Data;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_DataSend
|
||||
* Description : This function sends several data bytes to the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the data to send
|
||||
* Input 3 : The data length in bytes
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_DataSend(UART_TypeDef *UARTx, u8 *Data, u8 DataLength)
|
||||
{
|
||||
while(DataLength--)
|
||||
{
|
||||
UART_ByteSend(UARTx,Data);
|
||||
Data++;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_9BitDataSend
|
||||
* Description : This function sends several 9 bits data bytes to the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the data to send
|
||||
* Input 3 : The data length
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_9BitDataSend(UART_TypeDef *UARTx, u16 *Data, u8 DataLength)
|
||||
{
|
||||
while(DataLength--)
|
||||
{
|
||||
UART_9BitByteSend(UARTx,Data);
|
||||
Data++;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_StringSend
|
||||
* Description : This function sends a string to the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the string to send
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void UART_StringSend(UART_TypeDef *UARTx, u8 *String)
|
||||
{
|
||||
u8 *Data=String;
|
||||
while(*Data != '\0')
|
||||
UART_ByteSend(UARTx, Data++);
|
||||
*Data='\0';
|
||||
UART_ByteSend(UARTx, Data);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_ByteReceive
|
||||
* Description : This function gets a data byte from the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the buffer where the data will be stored
|
||||
* Input 3 : The time-out period
|
||||
* Output : The received data
|
||||
* Return : The UARTx.SR register contents
|
||||
*******************************************************************************/
|
||||
u16 UART_ByteReceive(UART_TypeDef *UARTx, u8 *Data, u8 TimeOut)
|
||||
{
|
||||
u16 wStatus;
|
||||
UARTx->TOR=TimeOut;// reload the Timeout counter
|
||||
while (!((wStatus=UARTx->SR) & (UART_TimeOutIdle|UART_RxHalfFull|UART_RxBufFull)));// while the UART_RxFIFO is empty and no Timeoutidle
|
||||
*Data = (u8)UARTx->RxBUFR; // then read the Receive Buffer Register
|
||||
return wStatus;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_9BitByteReceive
|
||||
* Description : This function gets a 9 bits data byte from the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the buffer where the data will be stored
|
||||
* Input 3 : The time-out period value
|
||||
* Output : The received data
|
||||
* Return : The UARTx.SR register contents
|
||||
*******************************************************************************/
|
||||
u16 UART_9BitByteReceive(UART_TypeDef *UARTx, u16 *Data, u8 TimeOut)
|
||||
{
|
||||
u16 wStatus;
|
||||
UARTx->TOR=TimeOut;// reload the Timeout counter
|
||||
while (!((wStatus=UARTx->SR) & (UART_TimeOutIdle|UART_RxHalfFull|UART_RxBufFull)));// while the UART_RxFIFO is empty and no Timeoutidle
|
||||
*Data = (u16)UARTx->RxBUFR; // then read the RxBUFR
|
||||
return wStatus;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_DataReceive
|
||||
* Description : This function gets 8 bits data bytes from the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the buffer where the data will be stored
|
||||
* Input 3 : The data length
|
||||
* Input 4 : The time-out period value
|
||||
* Output : The received data
|
||||
* Return : The UARTx.SR register contents
|
||||
*******************************************************************************/
|
||||
u16 UART_DataReceive(UART_TypeDef *UARTx, u8 *Data, u8 DataLength, u8 TimeOut)
|
||||
{
|
||||
u16 wStatus;
|
||||
while(DataLength--)
|
||||
wStatus=UART_ByteReceive(UARTx,Data++,TimeOut);
|
||||
return wStatus;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_9BitDataReceive
|
||||
* Description : This function gets 9 bits data bytes from the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the buffer where the data will be stored
|
||||
* Input 3 : The data length
|
||||
* Input 4 : The time-out value
|
||||
* Output : The received data
|
||||
* Return : The UARTx.SR register contents
|
||||
*******************************************************************************/
|
||||
u16 UART_9BitDataReceive(UART_TypeDef *UARTx, u16 *Data, u8 DataLength, u8 TimeOut)
|
||||
{
|
||||
u16 wStatus;
|
||||
while(DataLength--)
|
||||
wStatus=UART_9BitByteReceive(UARTx,Data++,TimeOut);
|
||||
return wStatus;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : UART_StringReceive
|
||||
* Description : This function gets 8 bits data bytes from the selected UART.
|
||||
* Input 1 : UARTx (x can be 0,1, 2 or 3) the desired UART
|
||||
* Input 2 : A pointer to the buffer where the string will be stored
|
||||
* Output : The received string
|
||||
* Return : The UARTx.SR register contents
|
||||
*******************************************************************************/
|
||||
u16 UART_StringReceive(UART_TypeDef *UARTx, u8 *Data)
|
||||
{
|
||||
u8 *pSTRING=Data;
|
||||
u16 wStatus;
|
||||
do
|
||||
{
|
||||
while (!((wStatus=UARTx->SR) & (UART_RxHalfFull|UART_RxBufFull)));// while the UART_RxFIFO is empty and no Timeoutidle
|
||||
*(pSTRING++) = (u8)UARTx->RxBUFR; // then read the RxBUFR
|
||||
} while((*(pSTRING - 1)!=0x0D)&(*(pSTRING - 1)!='\0'));
|
||||
*(pSTRING - 1)='\0';
|
||||
return wStatus;
|
||||
}
|
||||
|
||||
#ifdef USE_SERIAL_PORT
|
||||
/*******************************************************************************
|
||||
* Function Name : sendchar
|
||||
* Description : This function sends a character to the selected UART.
|
||||
* Input 1 : A pointer to the character to send.
|
||||
* Output : None
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
void sendchar( char *ch )
|
||||
{
|
||||
#ifdef USE_UART0
|
||||
#define UARTx UART0
|
||||
#endif /* Use_UART0 */
|
||||
|
||||
#ifdef USE_UART1
|
||||
#define UARTx UART1
|
||||
#endif /* Use_UART1 */
|
||||
|
||||
#ifdef USE_UART2
|
||||
#define UARTx UART2
|
||||
#endif /* Use_UART2 */
|
||||
|
||||
#ifdef USE_UART3
|
||||
#define UARTx UART3
|
||||
#endif /* Use_UART3 */
|
||||
|
||||
UART_ByteSend(UARTx,(u8 *)ch);
|
||||
}
|
||||
#endif /* USE_SERIAL_PORT */
|
||||
|
||||
/******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****/
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/* Library includes. */
|
||||
#include "GPIO.h"
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "partest.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines for the LED's - which are
|
||||
* connected to the second nibble of GPIO port 1.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
#define partstLED_3 0x0080
|
||||
#define partstLED_2 0x0040
|
||||
#define partstLED_1 0x0020
|
||||
#define partstLED_0 0x0010
|
||||
#define partstON_BOARD 0x0100 /* The LED built onto the KickStart board. */
|
||||
|
||||
#define partstALL_LEDs ( partstLED_0 | partstLED_1 | partstLED_2 | partstLED_3 | partstON_BOARD )
|
||||
|
||||
#define partstFIRST_LED_BIT 4
|
||||
|
||||
/* This demo application uses files that are common to all port demo
|
||||
applications. These files assume 6 LED's are available, whereas I have
|
||||
only 5 (including the LED built onto the development board). To prevent
|
||||
two tasks trying to use the same LED a bit of remapping is performed.
|
||||
The ComTest tasks will try and use LED's 6 and 7. LED 6 is ignored and
|
||||
has no effect, LED 7 is mapped to LED3. The LED usage is described in
|
||||
the port documentation available from the FreeRTOS.org WEB site. */
|
||||
#define partstCOM_TEST_LED 7
|
||||
#define partstRX_CHAR_LED 3
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* Configure the bits used to flash LED's on port 1 as output. */
|
||||
GPIO_Config(GPIO1, partstALL_LEDs, GPIO_OUT_OD);
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
if( uxLED == partstCOM_TEST_LED )
|
||||
{
|
||||
/* Remap as described above. */
|
||||
uxLED = partstRX_CHAR_LED;
|
||||
}
|
||||
|
||||
/* Adjust the LED value to map to the port pins actually being used,
|
||||
then write the required value to the port. */
|
||||
uxLED += partstFIRST_LED_BIT;
|
||||
GPIO_BitWrite( GPIO1, uxLED, !xValue );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
if( uxLED == partstCOM_TEST_LED )
|
||||
{
|
||||
/* Remap as described above. */
|
||||
uxLED = partstRX_CHAR_LED;
|
||||
}
|
||||
|
||||
/* Adjust the LED value to map to the port pins actually being used,
|
||||
then write the opposite value to the current state to the port pin. */
|
||||
uxLED += partstFIRST_LED_BIT;
|
||||
GPIO_BitWrite(GPIO1, uxLED, ~GPIO_BitRead( GPIO1, uxLED ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,866 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>2</fileVersion>
|
||||
<configuration>
|
||||
<name>Debug</name>
|
||||
<outputs>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\comtest.c</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\tasks.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\serial.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\71x_lib.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\wdg.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\semtest.r79</file>
|
||||
<file>$TOOLKIT_DIR$\inc\string.h</file>
|
||||
<file>$TOOLKIT_DIR$\inc\ysizet.h</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\comtest.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\BlockQ.pbi</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\dynamic.h</file>
|
||||
<file>$PROJ_DIR$\Library\include\71x_map.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\list.r79</file>
|
||||
<file>$PROJ_DIR$\Library\include\eic.h</file>
|
||||
<file>$TOOLKIT_DIR$\inc\xencoding_limits.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\list.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\ParTest.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\BlockQ.r79</file>
|
||||
<file>$TOOLKIT_DIR$\inc\yvals.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\main.r79</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\partest.h</file>
|
||||
<file>$PROJ_DIR$\Library\include\rccu.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\portasm.r79</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\ISR_Support.h</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\PollQ.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\cstartup.r79</file>
|
||||
<file>$TOOLKIT_DIR$\inc\DLib_Threads.h</file>
|
||||
<file>$PROJ_DIR$\FreeRTOSConfig.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\dynamic.pbi</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\FreeRTOS.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\heap_2.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\queue.r79</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\queue.h</file>
|
||||
<file>$TOOLKIT_DIR$\inc\stdlib.h</file>
|
||||
<file>$PROJ_DIR$\Library\include\wdg.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\serialISR.r79</file>
|
||||
<file>$TOOLKIT_DIR$\lib\dl4tptinl8n.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\heap_2.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\integer.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\rccu.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\uart.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\port.pbi</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\croutine.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\queue.pbi</file>
|
||||
<file>$TOOLKIT_DIR$\inc\DLib_Defaults.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\port.r79</file>
|
||||
<file>$TOOLKIT_DIR$\inc\stddef.h</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\comtest2.h</file>
|
||||
<file>$PROJ_DIR$\Library\include\71x_conf.h</file>
|
||||
<file>$TOOLKIT_DIR$\inc\stdio.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\serial.r79</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\BlockQ.h</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\integer.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\comtest.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\71x_lib.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\dynamic.r79</file>
|
||||
<file>$PROJ_DIR$\Library\include\gpio.h</file>
|
||||
<file>$TOOLKIT_DIR$\inc\DLib_Product.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\tasks.r79</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\semphr.h</file>
|
||||
<file>$TOOLKIT_DIR$\inc\intrinsic.h</file>
|
||||
<file>$PROJ_DIR$\Library\include\uart.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Exe\RTOSDemo.sim</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\flash.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\integer.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\PollQ.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Exe\RTOSDemo.d79</file>
|
||||
<file>$TOOLKIT_DIR$\lib\dl4tptinl8n.r79</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\task.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\uart.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\gpio.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\flash.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\vect.r79</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\serial.h</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\flash.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\rccu.r79</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\ParTest.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\PollQ.pbi</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\semtest.pbi</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\projdefs.h</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\list.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\comtest.pbi</file>
|
||||
<file>$PROJ_DIR$\Library\include\71x_type.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\gpio.r79</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\include\portable.h</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\portmacro.h</file>
|
||||
<file>$PROJ_DIR$\Debug\Obj\wdg.r79</file>
|
||||
<file>$PROJ_DIR$\..\Common\include\semtest.h</file>
|
||||
<file>$PROJ_DIR$\cstartup.s79</file>
|
||||
<file>$PROJ_DIR$\lnkarm.xcl</file>
|
||||
<file>$PROJ_DIR$\vect.s79</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\BlockQ.c</file>
|
||||
<file>$PROJ_DIR$\serial\serialISR.s79</file>
|
||||
<file>$PROJ_DIR$\Library\rccu.c</file>
|
||||
<file>$PROJ_DIR$\Library\uart.c</file>
|
||||
<file>$PROJ_DIR$\Library\wdg.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\list.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\port.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\portasm.s79</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\queue.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\tasks.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\flash.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_2.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\dynamic.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\integer.c</file>
|
||||
<file>$PROJ_DIR$\main.c</file>
|
||||
<file>$PROJ_DIR$\ParTest\ParTest.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\PollQ.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\semtest.c</file>
|
||||
<file>$PROJ_DIR$\serial\serial.c</file>
|
||||
<file>$PROJ_DIR$\Library\gpio.c</file>
|
||||
<file>$PROJ_DIR$\Library\71x_lib.c</file>
|
||||
</outputs>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 53</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 82</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81 74 8 20</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>[ROOT_NODE]</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>XLINK</name>
|
||||
<file> 67 63</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Debug\Exe\RTOSDemo.d79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>XLINK</name>
|
||||
<file> 63</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>XLINK</name>
|
||||
<file> 90 54 17 16 66 53 25 56 64 84 30 65 12 19 45 22 31 76 5 50 35 59 40 73 87 68</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\cstartup.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 25</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\vect.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 73</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 27</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\BlockQ.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 17</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 9</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81 32 51</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\serial\serialISR.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 35</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 23</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\rccu.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 76</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 39</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 21 11 48 83</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\uart.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 40</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 70</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 62 11 48 83 21</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\wdg.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 87</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 4</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 34 11 48 83 21</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\list.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 12</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 15</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 81</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\port.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 45</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 41</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 34 11 48 83 21 13 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\portasm.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 22</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 23</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 31</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 43</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 6 29 46 80 27 85 86 61 69 81 42</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 59</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 1</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 49 18 44 36 58 14 26 7 33 6 29 46 80 27 85 86 61 69 81</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\flash.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 64</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 72</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81 20 75</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_2.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 30</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 37</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\dynamic.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 56</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 28</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81 60 32 10</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 65</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 38</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81 52</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\main.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 19</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 55</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 21 11 48 83 34 29 46 18 44 36 58 14 26 7 80 27 85 86 61 69 81 75 52 24 51 88 10 20 47</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\ParTest\ParTest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 16</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 77</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 57 11 48 83 29 46 18 44 36 58 14 26 7 80 27 85 86 61 20</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 66</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 78</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81 32 24</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\semtest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 5</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 79</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 33 18 44 36 58 14 26 7 29 46 80 27 85 86 61 69 81 60 32 88</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\serial\serial.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 50</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 2</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 62 11 48 83 21 57 13 29 46 18 44 36 58 14 26 7 80 27 85 86 61 32 74</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\gpio.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 84</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 71</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 57 11 48 83</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\71x_lib.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 54</file>
|
||||
</tool>
|
||||
<tool>
|
||||
<name>BICOMP</name>
|
||||
<file> 3</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
<inputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 11 48 83</file>
|
||||
</tool>
|
||||
</inputs>
|
||||
</file>
|
||||
</configuration>
|
||||
<configuration>
|
||||
<name>Release</name>
|
||||
<outputs>
|
||||
<file>$PROJ_DIR$\Release\Obj\dynamic.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\list.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\wdg.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\ParTest.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\71x_lib.r79</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\comtest.c</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\cstartup.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\uart.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\vect.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\portasm.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\heap_2.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\tasks.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\BlockQ.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\integer.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\rccu.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\PollQ.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\flash.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\main.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\gpio.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\semtest.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Exe\RTOSDemo.d79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\serialISR.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\port.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\comtest.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\serial.r79</file>
|
||||
<file>$PROJ_DIR$\Release\Obj\queue.r79</file>
|
||||
<file>$PROJ_DIR$\cstartup.s79</file>
|
||||
<file>$PROJ_DIR$\vect.s79</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\BlockQ.c</file>
|
||||
<file>$PROJ_DIR$\serial\serialISR.s79</file>
|
||||
<file>$PROJ_DIR$\Library\rccu.c</file>
|
||||
<file>$PROJ_DIR$\Library\uart.c</file>
|
||||
<file>$PROJ_DIR$\Library\wdg.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\list.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\port.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\portasm.s79</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\queue.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\tasks.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\flash.c</file>
|
||||
<file>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_2.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\dynamic.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\integer.c</file>
|
||||
<file>$PROJ_DIR$\main.c</file>
|
||||
<file>$PROJ_DIR$\ParTest\ParTest.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\PollQ.c</file>
|
||||
<file>$PROJ_DIR$\..\Common\Minimal\semtest.c</file>
|
||||
<file>$PROJ_DIR$\serial\serial.c</file>
|
||||
<file>$PROJ_DIR$\Library\gpio.c</file>
|
||||
<file>$PROJ_DIR$\Library\71x_lib.c</file>
|
||||
</outputs>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 23</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>[ROOT_NODE]</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>XLINK</name>
|
||||
<file> 20</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\cstartup.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 6</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\vect.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 8</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\BlockQ.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 12</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\serial\serialISR.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 21</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\rccu.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 14</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\uart.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 7</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\wdg.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 2</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\list.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 1</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\port.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 22</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\STR71x\portasm.s79</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AARM</name>
|
||||
<file> 9</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 25</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 11</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\flash.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 16</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_2.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 10</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\dynamic.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 0</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 13</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\main.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 17</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\ParTest\ParTest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 3</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 15</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\semtest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 19</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\serial\serial.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 24</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\gpio.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 18</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\Library\71x_lib.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCARM</name>
|
||||
<file> 4</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<forcedrebuild>
|
||||
<name>[MULTI_TOOL]</name>
|
||||
<tool>XLINK</tool>
|
||||
</forcedrebuild>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
|
||||
@@ -1,913 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<configuration>
|
||||
<name>Debug</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>1</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>12</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCVariant</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\iostr712.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDDFArgumentProducer</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadSuppressDownload</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadVerifyAll</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashDownload</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashOverride</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashLoader</name>
|
||||
<state>$TOOLKIT_DIR$\config\flashloader\ST\FlashSTR71xF.d79</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashLoaderSlave</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCProductVersion</name>
|
||||
<state>4.20A</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>4.20A</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashLoaderArgs</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashBaseAddrOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashBaseAddr</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadAttachToProgram</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ARMSIM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCSimDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ANGEL_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CCAngelHeartbeat</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ANGELTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoAngelLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AngelLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARROM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRomLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommunication</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>JLinkSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWReset</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTRSTReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDoJlinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWResetDelay</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>JLinkInitialSpeed</name>
|
||||
<state>4000</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>jtag</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoEmuMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuMultiTarget</name>
|
||||
<state>0@ARM7TDMI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>jtago</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UnusedAddr</name>
|
||||
<state>0x00800000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>RDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CRDIDriverDll</name>
|
||||
<state>Browse to your RDI driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileEdit</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIUseETM</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CThirdPartyDriverDll</name>
|
||||
<state>Browse to your third-party driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Trace\Trace.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXTinyArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OSE\OseEpsilonPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
<configuration>
|
||||
<name>Release</name>
|
||||
<toolchain>
|
||||
<name>ARM</name>
|
||||
</toolchain>
|
||||
<debug>0</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>12</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEndian</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCVariant</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemOverride</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MemFile</name>
|
||||
<state>$TOOLKIT_DIR$\CONFIG\iostr712.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CFpuProcessor</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDDFArgumentProducer</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadSuppressDownload</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadVerifyAll</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashDownload</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashOverride</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashLoader</name>
|
||||
<state>$TOOLKIT_DIR$\config\flashloader\ST\FlashSTR71xF.d79</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashLoaderSlave</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCProductVersion</name>
|
||||
<state>4.20A</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDynDriverList</name>
|
||||
<state>JLINK_ID</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCLastSavedByProductVersion</name>
|
||||
<state>4.20A</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashLoaderArgs</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashBaseAddrOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadFlashBaseAddr</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDownloadAttachToProgram</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ARMSIM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>OCSimDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ANGEL_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CCAngelHeartbeat</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>3</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CAngelCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>ANGELTCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoAngelLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>AngelLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>IARROM_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CRomLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommunication</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRomCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>7</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JLINK_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>JLinkSpeed</name>
|
||||
<state>32</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWReset</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkTRSTReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCDoJlinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkLogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkHWResetDelay</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCJLinkSpeedRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>JLinkInitialSpeed</name>
|
||||
<state>4000</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>MACRAIGOR_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>jtag</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>TCPIP</name>
|
||||
<state>aaa.bbb.ccc.ddd</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>LogFile</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DoEmuMultiTarget</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuMultiTarget</name>
|
||||
<state>0@ARM7TDMI</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>EmuHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommBaud</name>
|
||||
<version>0</version>
|
||||
<state>4</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CEmuCommPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>jtago</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>UnusedAddr</name>
|
||||
<state>0x00800000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCMacraigorHWResetDelay</name>
|
||||
<state></state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>RDI_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CRDIDriverDll</name>
|
||||
<state>Browse to your RDI driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CRDILogFileEdit</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIHWReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchUndef</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchSWI</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchPrefetch</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchIRQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDICatchFIQ</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CCRDIUseETM</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTY_ID</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>0</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>0</debug>
|
||||
<option>
|
||||
<name>CThirdPartyDriverDll</name>
|
||||
<state>Browse to your third-party driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CThirdPartyLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCDriverInfo</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Trace\Trace.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CMXTinyArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$TOOLKIT_DIR$\plugins\rtos\OSE\OseEpsilonPlugin.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,212 +0,0 @@
|
||||
;-----------------------------------------------------------------------------
|
||||
; This file contains the startup code used by the ICCARM C compiler.
|
||||
;
|
||||
; The modules in this file are included in the libraries, and may be replaced
|
||||
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||
; a user defined start symbol.
|
||||
; To override the cstartup defined in the library, simply add your modified
|
||||
; version to the workbench project.
|
||||
;
|
||||
; All code in the modules (except ?RESET) will be placed in the ICODE segment.
|
||||
;
|
||||
; $Revision: 1.1 $
|
||||
;
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
;
|
||||
; Naming covention of labels in this file:
|
||||
;
|
||||
; ?xxx - External labels only accessed from assembler.
|
||||
; __xxx - External labels accessed from or defined in C.
|
||||
; xxx - Labels local to one module (note: this file contains
|
||||
; several modules).
|
||||
; main - The starting point of the user program.
|
||||
;
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; Macros and definitions for the whole file
|
||||
;---------------------------------------------------------------
|
||||
|
||||
|
||||
; --- Standard definitions of mode bits and interrupt (I & F) flags in PSRs
|
||||
|
||||
|
||||
|
||||
Mode_USR DEFINE 0x10
|
||||
Mode_FIQ DEFINE 0x11
|
||||
Mode_IRQ DEFINE 0x12
|
||||
Mode_SVC DEFINE 0x13
|
||||
Mode_ABT DEFINE 0x17
|
||||
Mode_UNDEF DEFINE 0x1B
|
||||
Mode_SYS DEFINE 0x1F ; available on ARM Arch 4 and later
|
||||
|
||||
I_Bit DEFINE 0x80 ; when I bit is set, IRQ is disabled
|
||||
F_Bit DEFINE 0x40 ; when F bit is set, FIQ is disabled
|
||||
|
||||
|
||||
; --- System memory locations
|
||||
|
||||
RAM_Base DEFINE 0x20000000
|
||||
RAM_Limit DEFINE 0x20010000
|
||||
SRAM_Base DEFINE 0x60000000
|
||||
|
||||
SVC_Stack DEFINE RAM_Limit ; 512 byte SVC stack at
|
||||
; top of memory - used by kernel.
|
||||
IRQ_Stack DEFINE SVC_Stack-512 ; followed by IRQ stack
|
||||
USR_Stack DEFINE IRQ_Stack-512 ; followed by USR stack. Tasks run in
|
||||
; system mode but task stacks are allocated
|
||||
; when the task is created.
|
||||
FIQ_Stack DEFINE USR_Stack-8 ; followed by FIQ stack
|
||||
ABT_Stack DEFINE FIQ_Stack-8 ; followed by ABT stack
|
||||
UNDEF_Stack DEFINE ABT_Stack-8 ; followed by UNDEF stack
|
||||
|
||||
EIC_Base_addr DEFINE 0xFFFFF800 ; EIC base address
|
||||
ICR_off_addr DEFINE 0x00 ; Interrupt Control register offset
|
||||
CIPR_off_addr DEFINE 0x08 ; Current Interrupt Priority Register offset
|
||||
IVR_off_addr DEFINE 0x18 ; Interrupt Vector Register offset
|
||||
FIR_off_addr DEFINE 0x1C ; Fast Interrupt Register offset
|
||||
IER_off_addr DEFINE 0x20 ; Interrupt Enable Register offset
|
||||
IPR_off_addr DEFINE 0x40 ; Interrupt Pending Bit Register offset
|
||||
SIR0_off_addr DEFINE 0x60 ; Source Interrupt Register 0
|
||||
|
||||
EMI_Base_addr DEFINE 0x6C000000 ; EMI base address
|
||||
BCON0_off_addr DEFINE 0x00 ; Bank 0 configuration register offset
|
||||
BCON1_off_addr DEFINE 0x04 ; Bank 1 configuration register offset
|
||||
BCON2_off_addr DEFINE 0x08 ; Bank 2 configuration register offset
|
||||
BCON3_off_addr DEFINE 0x0C ; Bank 3 configuration register offset
|
||||
|
||||
GPIO2_Base_addr DEFINE 0xE0005000 ; GPIO2 base address
|
||||
PC0_off_addr DEFINE 0x00 ; Port Configuration Register 0 offset
|
||||
PC1_off_addr DEFINE 0x04 ; Port Configuration Register 1 offset
|
||||
PC2_off_addr DEFINE 0x08 ; Port Configuration Register 2 offset
|
||||
PD_off_addr DEFINE 0x0C ; Port Data Register offset
|
||||
|
||||
CPM_Base_addr DEFINE 0xA0000040 ; CPM Base Address
|
||||
BOOTCONF_off_addr DEFINE 0x10 ; CPM - Boot Configuration Register
|
||||
FLASH_mask DEFINE 0x0000 ; to remap FLASH at 0x0
|
||||
RAM_mask DEFINE 0x0002 ; to remap RAM at 0x0
|
||||
EXTMEM_mask DEFINE 0x0003 ; to remap EXTMEM at 0x0
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?RESET
|
||||
; Reset Vector.
|
||||
; Normally, segment INTVEC is linked at address 0.
|
||||
; For debugging purposes, INTVEC may be placed at other
|
||||
; addresses.
|
||||
; A debugger that honors the entry point will start the
|
||||
; program in a normal way even if INTVEC is not at address 0.
|
||||
;---------------------------------------------------------------
|
||||
|
||||
MODULE ?RESET
|
||||
COMMON INTVEC:CODE:NOROOT(2)
|
||||
PUBLIC __program_start
|
||||
EXTERN ?cstartup
|
||||
CODE32 ; Always ARM mode after reset
|
||||
|
||||
__program_start
|
||||
ldr pc,=?cstartup ; Absolute jump can reach 4 GByte
|
||||
b ?cstartup ; Relative branch allows remap, limited to 32 MByte
|
||||
|
||||
LTORG
|
||||
ENDMOD
|
||||
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; ?CSTARTUP
|
||||
;---------------------------------------------------------------
|
||||
MODULE ?CSTARTUP
|
||||
|
||||
; RSEG IRQ_STACK:DATA(2)
|
||||
; RSEG SVC_STACK:DATA:NOROOT(2)
|
||||
; RSEG CSTACK:DATA(2)
|
||||
RSEG ICODE:CODE:NOROOT(2)
|
||||
PUBLIC ?cstartup
|
||||
EXTERN ?main
|
||||
|
||||
|
||||
|
||||
|
||||
CODE32
|
||||
?cstartup
|
||||
|
||||
|
||||
NOP ; Wait for OSC stabilization
|
||||
NOP
|
||||
NOP
|
||||
NOP
|
||||
NOP
|
||||
NOP
|
||||
NOP
|
||||
NOP
|
||||
NOP
|
||||
|
||||
|
||||
/* Setup a stack for each mode - note that this only sets up a usable stack
|
||||
for system/user, SWI and IRQ modes. Also each mode is setup with
|
||||
interrupts initially disabled. */
|
||||
msr CPSR_c, #Mode_UNDEF|I_Bit|F_Bit /* Undefined Instruction Mode */
|
||||
LDR SP, =UNDEF_Stack
|
||||
|
||||
msr CPSR_c, #Mode_ABT|I_Bit|F_Bit /* Abort Mode */
|
||||
LDR SP, =ABT_Stack
|
||||
|
||||
msr CPSR_c, #Mode_FIQ|I_Bit|F_Bit /* FIQ Mode */
|
||||
LDR SP, =FIQ_Stack
|
||||
|
||||
msr CPSR_c, #Mode_IRQ|I_Bit|F_Bit /* IRQ Mode */
|
||||
LDR SP, =IRQ_Stack
|
||||
|
||||
msr CPSR_c, #Mode_SVC|I_Bit|F_Bit /* Supervisor Mode */
|
||||
LDR SP, =SVC_Stack
|
||||
|
||||
msr CPSR_c, #Mode_SYS|I_Bit|F_Bit /* System Mode */
|
||||
LDR SP, =USR_Stack
|
||||
|
||||
/* We want to start in supervisor mode. Operation will switch to system
|
||||
mode when the first task starts. */
|
||||
msr CPSR_c, #Mode_SVC|I_Bit|F_Bit
|
||||
|
||||
|
||||
IMPORT T0TIMI_Addr
|
||||
|
||||
EIC_INIT
|
||||
LDR r3, =EIC_Base_addr
|
||||
LDR r4, =0x00000000
|
||||
STR r4, [r3, #ICR_off_addr] ; Disable FIQ and IRQ
|
||||
STR r4, [r3, #IER_off_addr] ; Disable all channels interrupts
|
||||
LDR r4, =0xFFFFFFFF
|
||||
STR r4, [r3, #IPR_off_addr] ; Clear all IRQ pending bits
|
||||
LDR r4, =0x0C
|
||||
STR r4, [r3, #FIR_off_addr] ; Disable FIQ channels and clear FIQ pending bits
|
||||
LDR r4, =0x00000000
|
||||
STR r4, [r3, #CIPR_off_addr] ; Reset the current priority register
|
||||
LDR r4, =0xE59F0000
|
||||
STR r4, [r3, #IVR_off_addr] ; Write the LDR pc,pc,#offset instruction code in IVR[31:16]
|
||||
LDR r2, =32 ; 32 Channel to initialize
|
||||
LDR r0, =T0TIMI_Addr ; Read the address of the IRQs address table
|
||||
LDR r1, =0x00000FFF
|
||||
AND r0,r0,r1
|
||||
LDR r5, =SIR0_off_addr ; Read SIR0 address
|
||||
SUB r4,r0,#8 ; subtract 8 for prefetch
|
||||
LDR r1, =0xF7E8 ; add the offset to the 0x00000000 address(IVR address + 7E8 = 0x00000000)
|
||||
; 0xF7E8 used to complete the LDR pc,pc,#offset opcode
|
||||
ADD r1,r4,r1 ; compute the jump offset
|
||||
EIC_INI MOV r4, r1, LSL #16 ; Left shift the result
|
||||
STR r4, [r3, r5] ; Store the result in SIRx register
|
||||
ADD r1, r1, #4 ; Next IRQ address
|
||||
ADD r5, r5, #4 ; Next SIR
|
||||
SUBS r2, r2, #1 ; Decrement the number of SIR registers to initialize
|
||||
BNE EIC_INI ; If more then continue
|
||||
|
||||
|
||||
ldr r0,=?main
|
||||
bx r0
|
||||
|
||||
LTORG
|
||||
|
||||
ENDMOD
|
||||
|
||||
|
||||
END
|
||||
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
//*************************************************************************
|
||||
// XLINK command file template for EWARM/ICCARM
|
||||
//
|
||||
// Usage: xlink -f lnkarm <your_object_file(s)>
|
||||
// -s <program start label> <C/C++ runtime library>
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
//*************************************************************************
|
||||
|
||||
// Code memory in flash
|
||||
-DROMSTART=0x00000000
|
||||
-DROMEND=0x0003FFFF
|
||||
-DVECSTART=ROMSTART
|
||||
|
||||
// Data memory
|
||||
-DRAMSTART=0x20000000
|
||||
-DRAMEND=0x2000FFFF
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
// In this file it is assumed that the system has the following
|
||||
// memory layout:
|
||||
//
|
||||
// Exception vectors [0x000000--0x00001F] RAM or ROM
|
||||
// ROMSTART--ROMEND [0x008000--0x0FFFFF] ROM (or other non-volatile memory)
|
||||
// RAMSTART--RAMEND [0x100000--0x7FFFFF] RAM (or other read/write memory)
|
||||
//
|
||||
// -------------
|
||||
// Code segments - may be placed anywhere in memory.
|
||||
// -------------
|
||||
//
|
||||
// INTVEC -- Exception vector table.
|
||||
// SWITAB -- Software interrupt vector table.
|
||||
// ICODE -- Startup (cstartup) and exception code.
|
||||
// DIFUNCT -- Dynamic initialization vectors used by C++.
|
||||
// CODE -- Compiler generated code.
|
||||
// CODE_I -- Compiler generated code declared __ramfunc (executes in RAM)
|
||||
// CODE_ID -- Initializer for CODE_I (ROM).
|
||||
//
|
||||
// -------------
|
||||
// Data segments - may be placed anywhere in memory.
|
||||
// -------------
|
||||
//
|
||||
// CSTACK -- The stack used by C/C++ programs (system and user mode).
|
||||
// IRQ_STACK -- The stack used by IRQ service routines.
|
||||
// SVC_STACK -- The stack used in supervisor mode
|
||||
// (Define other exception stacks as needed for
|
||||
// FIQ, ABT, UND).
|
||||
// HEAP -- The heap used by malloc and free in C and new and
|
||||
// delete in C++.
|
||||
// INITTAB -- Table containing addresses and sizes of segments that
|
||||
// need to be initialized at startup (by cstartup).
|
||||
// CHECKSUM -- The linker places checksum byte(s) in this segment,
|
||||
// when the -J linker command line option is used.
|
||||
// DATA_y -- Data objects.
|
||||
//
|
||||
// Where _y can be one of:
|
||||
//
|
||||
// _AN -- Holds uninitialized located objects, i.e. objects with
|
||||
// an absolute location given by the @ operator or the
|
||||
// #pragma location directive. Since these segments
|
||||
// contain objects which already have a fixed address,
|
||||
// they should not be mentioned in this linker command
|
||||
// file.
|
||||
// _C -- Constants (ROM).
|
||||
// _I -- Initialized data (RAM).
|
||||
// _ID -- The original content of _I (copied to _I by cstartup) (ROM).
|
||||
// _N -- Uninitialized data (RAM).
|
||||
// _Z -- Zero initialized data (RAM).
|
||||
//
|
||||
// Note: Be sure to use end values for the defined address ranges.
|
||||
// Otherwise, the linker may allocate space outside the
|
||||
// intended memory range.
|
||||
//*************************************************************************
|
||||
|
||||
|
||||
//************************************************
|
||||
// Inform the linker about the CPU family used.
|
||||
//************************************************
|
||||
|
||||
-carm
|
||||
|
||||
//*************************************************************************
|
||||
// Segment placement - General information
|
||||
//
|
||||
// All numbers in the segment placement command lines below are interpreted
|
||||
// as hexadecimal unless they are immediately preceded by a '.', which
|
||||
// denotes decimal notation.
|
||||
//
|
||||
// When specifying the segment placement using the -P instead of the -Z
|
||||
// option, the linker is free to split each segment into its segment parts
|
||||
// and randomly place these parts within the given ranges in order to
|
||||
// achieve a more efficient memory usage. One disadvantage, however, is
|
||||
// that it is not possible to find the start or end address (using
|
||||
// the assembler operators .sfb./.sfe.) of a segment which has been split
|
||||
// and reformed.
|
||||
//
|
||||
// When generating an output file which is to be used for programming
|
||||
// external ROM/Flash devices, the -M linker option is very useful
|
||||
// (see xlink.pdf for details).
|
||||
//*************************************************************************
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
// Read-only segments mapped to ROM.
|
||||
//*************************************************************************
|
||||
|
||||
//************************************************
|
||||
// Address range for reset and exception
|
||||
// vectors (INTVEC).
|
||||
// The vector area is 32 bytes,
|
||||
// an additional 32 bytes is allocated for the
|
||||
// constant table used by ldr PC in cstartup.s79.
|
||||
//************************************************
|
||||
|
||||
-Z(CODE)INTVEC=VECSTART:+0x940
|
||||
|
||||
//************************************************
|
||||
// Startup code and exception routines (ICODE).
|
||||
//************************************************
|
||||
|
||||
-Z(CODE)ICODE,DIFUNCT=ROMSTART-ROMEND
|
||||
-Z(CODE)SWITAB=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Code segments may be placed anywhere.
|
||||
//************************************************
|
||||
|
||||
-Z(CODE)CODE=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Original ROM location for __ramfunc code copied
|
||||
// to and executed from RAM.
|
||||
//************************************************
|
||||
|
||||
-Z(CONST)CODE_ID=ROMSTART-ROMEND
|
||||
|
||||
//************************************************
|
||||
// Various constants and initializers.
|
||||
//************************************************
|
||||
|
||||
-Z(CONST)INITTAB,DATA_ID,DATA_C=ROMSTART-ROMEND
|
||||
-Z(CONST)CHECKSUM=ROMSTART-ROMEND
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
// Read/write segments mapped to RAM.
|
||||
//*************************************************************************
|
||||
|
||||
//************************************************
|
||||
// Data segments.
|
||||
//************************************************
|
||||
|
||||
-Z(DATA)DATA_I,DATA_Z,DATA_N=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// __ramfunc code copied to and executed from RAM.
|
||||
//************************************************
|
||||
|
||||
-Z(DATA)CODE_I=RAMSTART-RAMEND
|
||||
|
||||
//************************************************
|
||||
// ICCARM produces code for __ramfunc functions in
|
||||
// CODE_I segments. The -Q XLINK command line
|
||||
// option redirects XLINK to emit the code in the
|
||||
// CODE_ID segment instead, but to keep symbol and
|
||||
// debug information associated with the CODE_I
|
||||
// segment, where the code will execute.
|
||||
//************************************************
|
||||
|
||||
-QCODE_I=CODE_ID
|
||||
|
||||
//*************************************************************************
|
||||
// Stack and heap segments.
|
||||
//*************************************************************************
|
||||
|
||||
//-D_CSTACK_SIZE=400
|
||||
// -D_SVC_STACK_SIZE=10
|
||||
//-D_IRQ_STACK_SIZE=500
|
||||
//-D_HEAP_SIZE=4
|
||||
|
||||
//-Z(DATA)CSTACK+_CSTACK_SIZE=RAMSTART-RAMEND
|
||||
//-Z(DATA)SVC_STACK+_SVC_STACK_SIZE=RAMSTART-RAMEND
|
||||
//-Z(DATA)IRQ_STACK+_IRQ_STACK_SIZE,HEAP+_HEAP_SIZE=RAMSTART-RAMEND
|
||||
|
||||
//*************************************************************************
|
||||
// ELF/DWARF support.
|
||||
//
|
||||
// Uncomment the line "-Felf" below to generate ELF/DWARF output.
|
||||
// Available format specifiers are:
|
||||
//
|
||||
// "-yn": Suppress DWARF debug output
|
||||
// "-yp": Multiple ELF program sections
|
||||
// "-yas": Format suitable for debuggers from ARM Ltd (also sets -p flag)
|
||||
//
|
||||
// "-Felf" and the format specifiers can also be supplied directly as
|
||||
// command line options, or selected from the Xlink Output tab in the
|
||||
// IAR Embedded Workbench.
|
||||
//*************************************************************************
|
||||
|
||||
// -Felf
|
||||
@@ -1,246 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) 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
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Library includes. */
|
||||
#include "RCCU.h"
|
||||
#include "wdg.h"
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "flash.h"
|
||||
#include "integer.h"
|
||||
#include "PollQ.h"
|
||||
#include "BlockQ.h"
|
||||
#include "semtest.h"
|
||||
#include "dynamic.h"
|
||||
#include "partest.h"
|
||||
#include "comtest2.h"
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
|
||||
/* Constants required by the 'Check' task. */
|
||||
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( 4 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 6 ) /* The LED built onto the kickstart board. */
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||
* of the file.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Configure the processor for use with the IAR STR71x demo board. This
|
||||
* just sets the PLL for the required frequency.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*
|
||||
* Checks that all the demo application tasks are still executing without error
|
||||
* - as described at the top of the file. Called by vErrorChecks().
|
||||
*/
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Starts all the other tasks, then starts the scheduler.
|
||||
*/
|
||||
void main( void )
|
||||
{
|
||||
/* Setup any hardware that has not already been configured by the low
|
||||
level init routines. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Initialise the LED outputs for use by the demo application tasks. */
|
||||
vParTestInitialise();
|
||||
|
||||
/* Start all the standard demo application tasks. */
|
||||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* We should never get here as control is now taken by the scheduler. */
|
||||
return;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL to generate a 48MHz clock from the 4MHz CLK. */
|
||||
|
||||
/* Turn of the div by two. */
|
||||
RCCU_Div2Config( DISABLE );
|
||||
|
||||
/* 48MHz = ( 4MHz * 12 ) / 1 */
|
||||
RCCU_PLL1Config( RCCU_PLL1_Mul_12, RCCU_Div_1 );
|
||||
RCCU_RCLKSourceConfig( RCCU_PLL1_Output );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
portTickType xLastWakeTime;
|
||||
|
||||
/* The parameters are not used in this task. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil()
|
||||
functions correctly. */
|
||||
xLastWakeTime = xTaskGetTickCount();
|
||||
|
||||
/* 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
|
||||
the on board LED flash rate will increase. */
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Delay until it is time to execute again. The delay period is
|
||||
shorter following an error so the LED flashes faster. */
|
||||
vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );
|
||||
|
||||
/* Check all the standard demo application tasks are executing without
|
||||
error. */
|
||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||
{
|
||||
/* An error has been detected in one of the tasks - flash faster. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) 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() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||
*/
|
||||
|
||||
/* Library includes. */
|
||||
#include "uart.h"
|
||||
#include "gpio.h"
|
||||
#include "eic.h"
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "serial.h"
|
||||
|
||||
#define UART0_Rx_Pin ( 0x0001<< 8 )
|
||||
#define UART0_Tx_Pin ( 0x0001<< 9 )
|
||||
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
#define serNO_BLOCK ( ( portTickType ) 0 )
|
||||
|
||||
/* Macros to turn on and off the Tx empty interrupt. */
|
||||
#define serINTERRUPT_ON() UART0->IER |= UART_TxHalfEmpty
|
||||
#define serINTERRUPT_OFF() UART0->IER &= ~UART_TxHalfEmpty
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Interrupt entry point written in the assembler file serialISR.s79. */
|
||||
extern void vSerialISREntry( void );
|
||||
|
||||
/* The interrupt service routine - called from the assembly entry point. */
|
||||
__arm void vSerialISR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See the serial2.h header file.
|
||||
*/
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
xComPortHandle xReturn;
|
||||
|
||||
/* 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 ) );
|
||||
|
||||
/* If the queues were created correctly then setup the serial port
|
||||
hardware. */
|
||||
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Setup the UART port pins. */
|
||||
GPIO_Config( GPIO0, UART0_Tx_Pin, GPIO_AF_PP );
|
||||
GPIO_Config( GPIO0, UART0_Rx_Pin, GPIO_IN_TRI_CMOS );
|
||||
|
||||
/* Configure the UART. */
|
||||
UART_OnOffConfig( UART0, ENABLE );
|
||||
UART_FifoConfig( UART0, DISABLE );
|
||||
UART_FifoReset( UART0, UART_RxFIFO );
|
||||
UART_FifoReset( UART0, UART_TxFIFO );
|
||||
UART_LoopBackConfig(UART0, DISABLE );
|
||||
UART_Config( UART0, ulWantedBaud, UART_NO_PARITY, UART_1_StopBits, UARTM_8D );
|
||||
UART_RxConfig( UART0, ENABLE );
|
||||
|
||||
/* Configure the IEC for the UART interrupts. */
|
||||
EIC_IRQChannelPriorityConfig( UART0_IRQChannel, 1 );
|
||||
EIC_IRQChannelConfig( UART0_IRQChannel, ENABLE );
|
||||
EIC_IRQConfig( ENABLE );
|
||||
UART_ItConfig( UART0, UART_RxBufFull, ENABLE );
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = ( xComPortHandle ) 0;
|
||||
}
|
||||
|
||||
/* This demo file only supports a single port but we have to return
|
||||
something to comply with the standard demo header file. */
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports one port. */
|
||||
( 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;
|
||||
|
||||
/* A couple of parameters that this port does not use. */
|
||||
( void ) usStringLength;
|
||||
( void ) pxPort;
|
||||
|
||||
/* 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;
|
||||
|
||||
/* 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 )
|
||||
{
|
||||
/* Place the character in the queue of characters to be transmitted. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
{
|
||||
return pdFAIL;
|
||||
}
|
||||
|
||||
/* Turn on the Tx interrupt so the ISR will remove the character from the
|
||||
queue and send it. This does not need to be in a critical section as
|
||||
if the interrupt has already removed the character the next interrupt
|
||||
will simply turn off the Tx interrupt again. */
|
||||
serINTERRUPT_ON();
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
/* Not supported as not required by the demo application. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Serial port ISR. This can cause a context switch so is not defined as a
|
||||
standard ISR using the __irq keyword. Instead a wrapper function is defined
|
||||
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 portSHORT usStatus;
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
usStatus = UART_FlagStatus( UART0 );
|
||||
|
||||
if( usStatus & UART_TxHalfEmpty )
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
UART0->TxBUFR = cChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||
serINTERRUPT_OFF();
|
||||
}
|
||||
}
|
||||
|
||||
if( usStatus & UART_RxBufFull )
|
||||
{
|
||||
/* The interrupt was caused by a character being received. Grab the
|
||||
character from the RHR and place it in the queue of received
|
||||
characters. */
|
||||
cChar = UART0->RxBUFR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
}
|
||||
|
||||
/* 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 ) );
|
||||
|
||||
/* End the interrupt in the EIC. */
|
||||
portCLEAR_EIC();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Project>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
|
||||
<Column0>129</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
<PreferedWindows>
|
||||
|
||||
|
||||
|
||||
|
||||
<Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows>
|
||||
|
||||
|
||||
|
||||
<MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly>
|
||||
<Debug-Log/>
|
||||
<Build>
|
||||
|
||||
|
||||
|
||||
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1153</ColumnWidth1><ColumnWidth2>307</ColumnWidth2><ColumnWidth3>76</ColumnWidth3></Build>
|
||||
<Register><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows></Register><Breakpoints/></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-24393-22702</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source</ExpandedNode><ExpandedNode>RTOSDemo/RTOS Source</ExpandedNode><ExpandedNode>RTOSDemo/System Files</ExpandedNode><ExpandedNode>RTOSDemo/System Files/vect.s79</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-13122-22708</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-23870-22711</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab><Identity>TabID-19116-28152</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory><Session/></Tab></Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd3><Wnd0><Tabs><Tab><Identity>TabID-10243-6871</Identity><TabName>Register</TabName><Factory>Register</Factory><Session><REG1>0</REG1><REG2>0</REG2><Group>0</Group><States>1</States><State0>CPSR</State0></Session></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd0></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane/><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084c368><key>iaridepm1</key></Toolbar-0084c368><Toolbar-011f0628><key>debuggergui1</key></Toolbar-011f0628></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>853</Bottom><Right>203</Right><x>-2</x><y>-2</y><xscreen>125</xscreen><yscreen>125</yscreen><sizeHorzCX>78125</sizeHorzCX><sizeHorzCY>111706</sizeHorzCY><sizeVertCX>128124</sizeVertCX><sizeVertCY>764075</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>853</Bottom><Right>447</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>125000</sizeHorzCX><sizeHorzCY>178731</sizeHorzCY><sizeVertCX>280625</sizeVertCX><sizeVertCY>764075</sizeVertCY></Rect></Wnd0></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>219</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>221</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>197497</sizeHorzCY><sizeVertCX>78125</sizeVertCX><sizeVertCY>111706</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
[JLinkDriver]
|
||||
WatchVectorCatch=_ 0
|
||||
WatchCond=_ 0
|
||||
Watch0=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
|
||||
Watch1=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
|
||||
[Low Level]
|
||||
Pipeline mode=0
|
||||
Initialized=0
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints]
|
||||
Bp0=_ "Code" "{E:\Dev\FreeRTOS\Source\portable\IAR\STR71x\port.c}.240.4@1" 1 0 0 0 "" 0 ""
|
||||
Count=1
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
@@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>RTOSDemo/Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
|
||||
<Column0>227</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Build>
|
||||
|
||||
|
||||
|
||||
|
||||
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1153</ColumnWidth1><ColumnWidth2>307</ColumnWidth2><ColumnWidth3>76</ColumnWidth3></Build>
|
||||
<TerminalIO/>
|
||||
<Profiling/>
|
||||
<Debug-Log/>
|
||||
<CodeCoveragePlugin/><Breakpoints/></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-14962-21036</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/source</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-24623-22493</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-13645-22698</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab><Identity>TabID-25855-25419</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory><Session/></Tab></Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_STR71x_IAR\main.c</Filename><XPos>0</XPos><YPos>98</YPos><SelStart>4693</SelStart><SelEnd>4693</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-0084c368><key>iaridepm1</key></Toolbar-0084c368></Sizes></Row0><Row1><Sizes><Toolbar-011f0628><key>debuggergui1</key></Toolbar-011f0628></Sizes></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>675</Bottom><Right>301</Right><x>-2</x><y>-2</y><xscreen>21</xscreen><yscreen>21</yscreen><sizeHorzCX>13125</sizeHorzCX><sizeHorzCY>18766</sizeHorzCY><sizeVertCX>189375</sizeVertCX><sizeVertCY>605004</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>397</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>399</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>356568</sizeHorzCY><sizeVertCX>13125</sizeVertCX><sizeVertCY>18766</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
#include "FreeRTOSConfig.h"
|
||||
|
||||
IVR_ADDR DEFINE 0xFFFFF818
|
||||
|
||||
;*******************************************************************************
|
||||
; Import the Reset_Handler address from 71x_init.s
|
||||
;*******************************************************************************
|
||||
|
||||
IMPORT __program_start
|
||||
|
||||
;*******************************************************************************
|
||||
; Import exception handlers
|
||||
;*******************************************************************************
|
||||
|
||||
IMPORT vPortYieldProcessor ; FreeRTOS SWI handler
|
||||
|
||||
;*******************************************************************************
|
||||
; Import IRQ handlers from 71x_it.c
|
||||
;*******************************************************************************
|
||||
|
||||
IMPORT vPortNonPreemptiveTick ; Cooperative FreeRTOS tick handler
|
||||
IMPORT vPortPreemptiveTickISR ; Preemptive FreeRTOS tick handler
|
||||
IMPORT vSerialISREntry ; Demo serial port handler
|
||||
|
||||
;*******************************************************************************
|
||||
; Export Peripherals IRQ handlers table address
|
||||
;*******************************************************************************
|
||||
|
||||
CODE32
|
||||
|
||||
|
||||
LDR PC, Reset_Addr
|
||||
LDR PC, Undefined_Addr
|
||||
LDR PC, SWI_Addr
|
||||
LDR PC, Prefetch_Addr
|
||||
LDR PC, Abort_Addr
|
||||
NOP ; Reserved vector
|
||||
LDR PC, =IVR_ADDR
|
||||
LDR PC, FIQ_Addr
|
||||
|
||||
|
||||
|
||||
;*******************************************************************************
|
||||
; Exception handlers address table
|
||||
;*******************************************************************************
|
||||
|
||||
Reset_Addr DCD __program_start
|
||||
Undefined_Addr DCD UndefinedHandler
|
||||
SWI_Addr DCD vPortYieldProcessor
|
||||
Prefetch_Addr DCD PrefetchAbortHandler
|
||||
Abort_Addr DCD DataAbortHandler
|
||||
DCD 0 ; Reserved vector
|
||||
IRQ_Addr DCD IRQHandler
|
||||
FIQ_Addr DCD FIQHandler
|
||||
|
||||
;*******************************************************************************
|
||||
; Peripherals IRQ handlers address table
|
||||
;*******************************************************************************
|
||||
|
||||
EXPORT T0TIMI_Addr
|
||||
|
||||
T0TIMI_Addr DCD DefaultISR
|
||||
FLASH_Addr DCD DefaultISR
|
||||
RCCU_Addr DCD DefaultISR
|
||||
RTC_Addr DCD DefaultISR
|
||||
#if configUSE_PREEMPTION == 0
|
||||
WDG_Addr DCD vPortNonPreemptiveTick ; Tick ISR if the cooperative scheduler is used.
|
||||
#else
|
||||
WDG_Addr DCD vPortPreemptiveTickISR ; Tick ISR if the preemptive scheduler is used.
|
||||
#endif
|
||||
XTI_Addr DCD DefaultISR
|
||||
USBHP_Addr DCD DefaultISR
|
||||
I2C0ITERR_Addr DCD DefaultISR
|
||||
I2C1ITERR_ADDR DCD DefaultISR
|
||||
UART0_Addr DCD vSerialISREntry
|
||||
UART1_Addr DCD DefaultISR
|
||||
UART2_ADDR DCD DefaultISR
|
||||
UART3_ADDR DCD DefaultISR
|
||||
BSPI0_ADDR DCD DefaultISR
|
||||
BSPI1_Addr DCD DefaultISR
|
||||
I2C0_Addr DCD DefaultISR
|
||||
I2C1_Addr DCD DefaultISR
|
||||
CAN_Addr DCD DefaultISR
|
||||
ADC12_Addr DCD DefaultISR
|
||||
T1TIMI_Addr DCD DefaultISR
|
||||
T2TIMI_Addr DCD DefaultISR
|
||||
T3TIMI_Addr DCD DefaultISR
|
||||
DCD 0 ; reserved
|
||||
DCD 0 ; reserved
|
||||
DCD 0 ; reserved
|
||||
HDLC_Addr DCD DefaultISR
|
||||
USBLP_Addr DCD DefaultISR
|
||||
DCD 0 ; reserved
|
||||
DCD 0 ; reserved
|
||||
T0TOI_Addr DCD DefaultISR
|
||||
T0OC1_Addr DCD DefaultISR
|
||||
T0OC2_Addr DCD DefaultISR
|
||||
|
||||
|
||||
;*******************************************************************************
|
||||
; Exception Handlers
|
||||
;*******************************************************************************
|
||||
|
||||
|
||||
UndefinedHandler
|
||||
b UndefinedHandler
|
||||
|
||||
PrefetchAbortHandler
|
||||
b PrefetchAbortHandler
|
||||
|
||||
DataAbortHandler
|
||||
b DataAbortHandler
|
||||
|
||||
IRQHandler
|
||||
b DefaultISR
|
||||
|
||||
FIQHandler
|
||||
b FIQHandler
|
||||
|
||||
DefaultISR
|
||||
b DefaultISR
|
||||
|
||||
|
||||
|
||||
LTORG
|
||||
|
||||
END
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <iom323.h>
|
||||
|
||||
#define configCALL_STACK_SIZE 20
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* 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 ) 8000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 85 )
|
||||
#define configTOTAL_HEAP_SIZE ( (size_t ) ( 1500 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 8 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 1
|
||||
#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 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.0.0
|
||||
|
||||
+ Use scheduler suspends in place of critical sections.
|
||||
|
||||
Changes from V2.6.0
|
||||
|
||||
+ Replaced the inb() and outb() functions with direct memory
|
||||
access. This allows the port to be built with the 20050414 build of
|
||||
WinAVR.
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "partest.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
#define partstALL_BITS_OUTPUT ( ( unsigned portCHAR ) 0xff )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0xff )
|
||||
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 7 )
|
||||
|
||||
static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
ucCurrentOutputValue = partstALL_OUTPUTS_OFF;
|
||||
|
||||
/* Set port B direction to outputs. Start with all output off. */
|
||||
DDRB = partstALL_BITS_OUTPUT;
|
||||
PORTB = ucCurrentOutputValue;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
|
||||
|
||||
if( uxLED <= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit <<= uxLED;
|
||||
}
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( xValue == pdTRUE )
|
||||
{
|
||||
ucBit ^= ( unsigned portCHAR ) 0xff;
|
||||
ucCurrentOutputValue &= ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucCurrentOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PORTB = ucCurrentOutputValue;
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
|
||||
if( uxLED <= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( ucCurrentOutputValue & ucBit )
|
||||
{
|
||||
ucCurrentOutputValue &= ~ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucCurrentOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PORTB = ucCurrentOutputValue;
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,249 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main. c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task that does not flash an LED 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
|
||||
* toggles an LED. Should any task contain an error at any time the LED toggle
|
||||
* will stop.
|
||||
*
|
||||
* The LED flash and communications test tasks do not maintain a count.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V1.2.0
|
||||
|
||||
+ Changed the baud rate for the serial test from 19200 to 57600.
|
||||
|
||||
Changes from V1.2.3
|
||||
|
||||
+ The integer and comtest tasks are now used when the cooperative scheduler
|
||||
is being used. Previously they were only used with the preemptive
|
||||
scheduler.
|
||||
|
||||
Changes from V1.2.5
|
||||
|
||||
+ Set the baud rate to 38400. This has a smaller error percentage with an
|
||||
8MHz clock (according to the manual).
|
||||
|
||||
Changes from V2.0.0
|
||||
|
||||
+ Delay periods are now specified using variables and constants of
|
||||
portTickType rather than unsigned portLONG.
|
||||
|
||||
Changes from V2.2.0
|
||||
|
||||
+ File can now be built using either the IAR or WinAVR compiler.
|
||||
|
||||
Changes from V2.6.1
|
||||
|
||||
+ The IAR and WinAVR AVR ports are now maintained separately.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef GCC_MEGA_AVR
|
||||
/* EEPROM routines used only with the WinAVR compiler. */
|
||||
#include <avr/eeprom.h>
|
||||
#endif
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo file headers. */
|
||||
#include "PollQ.h"
|
||||
#include "integer.h"
|
||||
#include "serial.h"
|
||||
#include "comtest.h"
|
||||
#include "flash.h"
|
||||
#include "print.h"
|
||||
#include "partest.h"
|
||||
|
||||
/* Priority definitions for most of the tasks in the demo application. Some
|
||||
tasks just use the idle priority. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
|
||||
/* Baud rate used by the serial port tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 38400 )
|
||||
|
||||
/* LED used by the serial port tasks. This is toggled on each character Tx,
|
||||
and mainCOM_TEST_LED + 1 is toggles on each character Rx. */
|
||||
#define mainCOM_TEST_LED ( 4 )
|
||||
|
||||
/* LED that is toggled by the check task. The check task periodically checks
|
||||
that all the other tasks are operating without error. If no errors are found
|
||||
the LED is toggled. If an error is found at any time the LED is never toggles
|
||||
again. */
|
||||
#define mainCHECK_TASK_LED ( 7 )
|
||||
|
||||
/* The period between executions of the check task. */
|
||||
#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
|
||||
/* An address in the EEPROM used to count resets. This is used to check that
|
||||
the demo application is not unexpectedly resetting. */
|
||||
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Flashes an LED if everything is okay.
|
||||
*/
|
||||
static void prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*
|
||||
* Called on boot to increment a count stored in the EEPROM. This is used to
|
||||
* ensure the CPU does not reset unexpectedly.
|
||||
*/
|
||||
static void prvIncrementResetCount( void );
|
||||
|
||||
portSHORT main( void )
|
||||
{
|
||||
prvIncrementResetCount();
|
||||
|
||||
/* Setup the LED's for output. */
|
||||
vParTestInitialise();
|
||||
|
||||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||
configUSE_PREEMPTION as 0. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
static volatile unsigned portLONG ulDummyVariable = 3UL;
|
||||
|
||||
/* The parameters are not used. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Cycle for ever, delaying then checking all the other tasks are still
|
||||
operating without error. */
|
||||
for( ;; )
|
||||
{
|
||||
vTaskDelay( mainCHECK_PERIOD );
|
||||
|
||||
/* Perform a bit of 32bit maths to ensure the registers used by the
|
||||
integer tasks get some exercise. The result here is not important -
|
||||
see the demo application documentation for more info. */
|
||||
ulDummyVariable *= 3;
|
||||
|
||||
prvCheckOtherTasksAreStillRunning();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorHasOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorHasOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorHasOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
if( xErrorHasOccurred == pdFALSE )
|
||||
{
|
||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||
using console IO. */
|
||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvIncrementResetCount( void )
|
||||
{
|
||||
unsigned portCHAR ucCount;
|
||||
const unsigned portCHAR ucReadBit = ( unsigned portCHAR ) 0x01;
|
||||
const unsigned portCHAR ucWrite1 = ( unsigned portCHAR ) 0x04;
|
||||
const unsigned portCHAR ucWrite2 = ( unsigned portCHAR ) 0x02;
|
||||
|
||||
/* Increment the EEPROM value at 0x00.
|
||||
|
||||
Setup the EEPROM address. */
|
||||
EEARH = 0x00;
|
||||
EEARL = 0x00;
|
||||
|
||||
/* Set the read enable bit. */
|
||||
EECR |= ucReadBit;
|
||||
|
||||
/* Wait for the read. */
|
||||
while( EECR & ucReadBit );
|
||||
|
||||
/* The byte is ready. */
|
||||
ucCount = EEDR;
|
||||
|
||||
/* Increment the reset count, then write the byte back. */
|
||||
ucCount++;
|
||||
EEDR = ucCount;
|
||||
EECR = ucWrite1;
|
||||
EECR = ( ucWrite1 | ucWrite2 );
|
||||
}
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<configuration>
|
||||
<name>Debug</name>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\ParTest\ParTest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\ParTest.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\serial\serial.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\serial.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\portmacro.s90</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>AAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\portmacro.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\comtest.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\tasks.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\integer.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\heap_1.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\port.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\port.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\PollQ.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\queue.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\Common\Minimal\flash.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\flash.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\main.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\main.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\Source\list.c</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>ICCAVR</name>
|
||||
<file>$PROJ_DIR$\Output\Obj\list.r90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<file>
|
||||
<name>[ROOT_NODE]</name>
|
||||
<outputs>
|
||||
<tool>
|
||||
<name>XLINK</name>
|
||||
<file>$PROJ_DIR$\Output\Exe\rtosdemo.a90</file>
|
||||
<file>$PROJ_DIR$\Output\Exe\rtosdemo.d90</file>
|
||||
</tool>
|
||||
</outputs>
|
||||
</file>
|
||||
<forcedrebuild>
|
||||
<name>[MULTI_TOOL]</name>
|
||||
<tool>XLINK</tool>
|
||||
</forcedrebuild>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
|
||||
@@ -1,613 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<project>
|
||||
<fileVersion>1</fileVersion>
|
||||
<configuration>
|
||||
<name>Debug</name>
|
||||
<toolchain>
|
||||
<name>AVR</name>
|
||||
</toolchain>
|
||||
<debug>1</debug>
|
||||
<settings>
|
||||
<name>C-SPY</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>11</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>CSVariantProcessor</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>MacFile</name>
|
||||
<state>$TOOLKIT_DIR$\*.mac</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DDFile</name>
|
||||
<state>$TOOLKIT_DIR$\Config\iom323.ddf</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CInput</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCEnhancedCore</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OC64BitDoubles</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>DdfFileSlave</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToEnable</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>RunToName</name>
|
||||
<state>main</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>newDDFileOverride</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CSVariantEepromSize</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CSVariant64KFlash</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CdDllSlave</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>CDynDriver</name>
|
||||
<state>SIMAVR</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>CCRAVR</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OCCRAVRDriver</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRBaud</name>
|
||||
<version>0</version>
|
||||
<state>5</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRParity</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRDataBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRStopBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRHandshake</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRAllComm</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRLogFile</name>
|
||||
<state>cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRSuppressLoad</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRFastDownload</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRTargetCCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OCCRAVRdownloadToData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>ICE200AVR</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OICE200AVRDriver</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRBaud</name>
|
||||
<version>0</version>
|
||||
<state>5</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRParity</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRDataBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRStopBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRHandshake</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRAllComm</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRLogFile</name>
|
||||
<state>cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRHighSpeed</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRSingleStepTimers</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRRestoreEEPROM</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRComPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRSuppLoad</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRConsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRIce200ResetDelayList</name>
|
||||
<version>8</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OICE200AVRIce200downloadToData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JTAGICEAVR</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OJTAGICEAVRDriver</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRBaud</name>
|
||||
<version>0</version>
|
||||
<state>5</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRParity</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRDataBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRStopBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRHandshake</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRAllComm</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRLogFile</name>
|
||||
<state>cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceDefaultCom</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceComPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceSuppLoad</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceConsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceJtagFreqRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceJtagFreqManually</name>
|
||||
<state>100000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceJtagFreq</name>
|
||||
<version>0</version>
|
||||
<state>5</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceJtagDeviceBefore</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceJtagDeviceAfter</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceJtagInstrBitsBefore</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceJtagInstrBitsAfter</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIceDaisyChain</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagDebugTimers</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagDebugEeprom</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagDebugReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagDebugFuses</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEAVRJtagIcedownloadToData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>JTAGICEMKIIAVR</name>
|
||||
<archiveVersion>1</archiveVersion>
|
||||
<data>
|
||||
<version>3</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRDriver</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRBaud</name>
|
||||
<version>0</version>
|
||||
<state>5</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRParity</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRDataBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRStopBits</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRHandshake</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRAllComm</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRDoLogfile</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRLogFile</name>
|
||||
<state>cspycomm.log</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceDefaultCom</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceComPort</name>
|
||||
<version>0</version>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceSuppLoad</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceConsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceJtagFreqRadio</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceJtagFreqManually</name>
|
||||
<state>100000</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceJtagFreq</name>
|
||||
<version>0</version>
|
||||
<state>8</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceJtagDeviceBefore</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceJtagDeviceAfter</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceJtagInstrBitsBefore</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceJtagInstrBitsAfter</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIceDaisyChain</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagDebugTimers</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagDebugEeprom</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagDebugReset</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagDebugFuses</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagIcedownloadToData</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRCommunication</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OJTAGICEMKIIAVRJtagSoftwareBreak</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>SIMAVR</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OSIMAVRDriver</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OSIMAVRExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OSIMAVRExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<settings>
|
||||
<name>THIRDPARTYAVR</name>
|
||||
<archiveVersion>2</archiveVersion>
|
||||
<data>
|
||||
<version>1</version>
|
||||
<wantNonLocal>1</wantNonLocal>
|
||||
<debug>1</debug>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRDriver</name>
|
||||
<state>1</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRExtraOptions</name>
|
||||
<state></state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRExtraOptionsCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRDriverDll</name>
|
||||
<state>Browse to your Third party driver</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRSuppress</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRVerify</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRLogFileCheck</name>
|
||||
<state>0</state>
|
||||
</option>
|
||||
<option>
|
||||
<name>OTHIRDPARTYAVRLogFileEditB</name>
|
||||
<state>$TOOLKIT_DIR$\cspycomm.log</state>
|
||||
</option>
|
||||
</data>
|
||||
</settings>
|
||||
<debuggerPlugins>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Trace\Trace.ewplugin</file>
|
||||
<loadFlag>1</loadFlag>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<file>$EW_DIR$\common\plugins\Orti\Orti.ewplugin</file>
|
||||
<loadFlag>0</loadFlag>
|
||||
</plugin>
|
||||
</debuggerPlugins>
|
||||
</configuration>
|
||||
</project>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,195 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/* BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR IAR AVR PORT. */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "task.h"
|
||||
#include "serial.h"
|
||||
|
||||
#define serBAUD_DIV_CONSTANT ( ( unsigned portLONG ) 16 )
|
||||
|
||||
/* Constants for writing to UCSRB. */
|
||||
#define serRX_INT_ENABLE ( ( unsigned portCHAR ) 0x80 )
|
||||
#define serRX_ENABLE ( ( unsigned portCHAR ) 0x10 )
|
||||
#define serTX_ENABLE ( ( unsigned portCHAR ) 0x08 )
|
||||
#define serTX_INT_ENABLE ( ( unsigned portCHAR ) 0x20 )
|
||||
|
||||
/* Constants for writing to UCSRC. */
|
||||
#define serUCSRC_SELECT ( ( unsigned portCHAR ) 0x80 )
|
||||
#define serEIGHT_DATA_BITS ( ( unsigned portCHAR ) 0x06 )
|
||||
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
#define vInterruptOn() \
|
||||
{ \
|
||||
unsigned portCHAR ucByte; \
|
||||
\
|
||||
ucByte = UCSRB; \
|
||||
ucByte |= serTX_INT_ENABLE; \
|
||||
outb( UCSRB, ucByte ); \
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#define vInterruptOff() \
|
||||
{ \
|
||||
unsigned portCHAR ucByte; \
|
||||
\
|
||||
ucByte = UCSRB; \
|
||||
ucByte &= ~serTX_INT_ENABLE; \
|
||||
outb( UCSRB, ucByte ); \
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulBaudRateCounter;
|
||||
unsigned portCHAR ucByte;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Create the queues used by the com test task. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
|
||||
/* Calculate the baud rate register value from the equation in the
|
||||
data sheet. */
|
||||
ulBaudRateCounter = ( configCPU_CLOCK_HZ / ( serBAUD_DIV_CONSTANT * ulWantedBaud ) ) - ( unsigned portLONG ) 1;
|
||||
|
||||
/* Set the baud rate. */
|
||||
ucByte = ( unsigned portCHAR ) ( ulBaudRateCounter & ( unsigned portLONG ) 0xff );
|
||||
outb( UBRRL, ucByte );
|
||||
|
||||
ulBaudRateCounter >>= ( unsigned portLONG ) 8;
|
||||
ucByte = ( unsigned portCHAR ) ( ulBaudRateCounter & ( unsigned portLONG ) 0xff );
|
||||
outb( UBRRH, ucByte );
|
||||
|
||||
/* Enable the Rx interrupt. The Tx interrupt will get enabled
|
||||
later. Also enable the Rx and Tx. */
|
||||
outb( UCSRB, serRX_INT_ENABLE | serRX_ENABLE | serTX_ENABLE );
|
||||
|
||||
/* Set the data bits to 8. */
|
||||
outb( UCSRC, serUCSRC_SELECT | serEIGHT_DATA_BITS );
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
/* Unlike other ports, this serial code does not allow for more than one
|
||||
com port. We therefore don't return a pointer to a port structure and can
|
||||
instead just return NULL. */
|
||||
return NULL;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Return false if after the block time there is no room on the Tx queue. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
{
|
||||
return pdFAIL;
|
||||
}
|
||||
|
||||
vInterruptOn();
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
unsigned portCHAR ucByte;
|
||||
|
||||
/* Turn off the interrupts. We may also want to delete the queues and/or
|
||||
re-install the original ISR. */
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
vInterruptOff();
|
||||
ucByte = UCSRB;
|
||||
ucByte &= ~serRX_INT_ENABLE;
|
||||
outb( UCSRB, ucByte );
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
__interrupt void SIG_UART_RECV( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
|
||||
/* Get the character and post it on the queue of Rxed characters.
|
||||
If the post causes a task to wake force a context switch as the woken task
|
||||
may have a higher priority than the task we have interrupted. */
|
||||
cChar = UDR;
|
||||
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
__interrupt void SIG_UART_DATA( void )
|
||||
{
|
||||
signed portCHAR cChar, cTaskWoken;
|
||||
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &cTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* Send the next character queued for Tx. */
|
||||
outb( UDR, cChar );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Queue empty, nothing to send. */
|
||||
vInterruptOff();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
[Watch]
|
||||
Watch 1=_ 1 "usCurrentNumberOfTasks"
|
||||
Watch 2=
|
||||
Watch 3=
|
||||
[CodeCoverage]
|
||||
State=_ 0
|
||||
[Profiling]
|
||||
State=_ 0
|
||||
[TermIOSettings]
|
||||
Filename=_ ""
|
||||
InputMode=_ 1
|
||||
[QWatch]
|
||||
WindowContent=_ 100 100 100 100
|
||||
[Desktop-Debug]
|
||||
Wnd0=_ "Watch" "open" 44 0 1 -1 -1 -1 -1 1139 276 1595 524 100 100 100 100
|
||||
Wnd1=_ "Memory" "open" 44 0 1 -1 -1 -1 -1 1139 217 1591 939 1 1872 0 1872 0 1 0 1 0
|
||||
Wnd2=_ "CallStack" "open" 44 0 1 -1 -1 -1 -1 30 699 277 1037 1
|
||||
Wnd3=_ "Register" "open" 44 0 1 -1 -1 -1 -1 1237 0 1569 1019 0 0 0 0
|
||||
Wnd4=_ "Register" "open" 44 0 1 -1 -1 -1 -1 40 264 1312 986 0 0 0 0
|
||||
Wnd5=_ "Editor-DebugSource" "open" 44 0 1 -1 -1 -1 -1 169 991 1062 2036 "E:\Dev\FreeRTOS\Source\portable\IAR\ATMega323\portmacro.s90" 1 1 0 206 6825 6825
|
||||
Wnd6=_ "Disassembly" "open" 44 0 1 -1 -1 -4 -28 586 28 1196 854
|
||||
Wnd7=_ "Log" "closed" 44 0 1 -1 -1 -4 -28 872 845 1595 1069
|
||||
Wnd8=_ "Locals" "closed" 44 0 1 -1 -1 -1 -1 1139 0 1595 276 100 100 100 100
|
||||
Wnd9=_ "Terminal I/O" "closed" 44 0 1 -1 -1 -1 -1 1138 522 1595 826
|
||||
Maximized=_ 0
|
||||
Count=_ 10
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[Breakpoints]
|
||||
Count=0
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>rtosdemo/Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
|
||||
<Column0>109</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Build><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1153</ColumnWidth1><ColumnWidth2>307</ColumnWidth2><ColumnWidth3>76</ColumnWidth3></Build></Static>
|
||||
<Windows>
|
||||
|
||||
<Wnd0>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-12388-19520</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/portheap.c</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-19172-8303</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane/><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084f828><key>iaridepm1</key></Toolbar-0084f828></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>718</Bottom><Right>183</Right><x>-2</x><y>-2</y><xscreen>185</xscreen><yscreen>185</yscreen><sizeHorzCX>115625</sizeHorzCX><sizeHorzCY>165326</sizeHorzCY><sizeVertCX>115625</sizeVertCX><sizeVertCY>643431</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>354</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>356</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>318141</sizeHorzCY><sizeVertCX>116250</sizeVertCX><sizeVertCY>166219</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <avr/io.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 ) 8000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 85 )
|
||||
#define configTOTAL_HEAP_SIZE ( (size_t ) ( 1500 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 8 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 1
|
||||
#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 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,123 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.0.0
|
||||
|
||||
+ Use scheduler suspends in place of critical sections.
|
||||
|
||||
Changes from V2.6.0
|
||||
|
||||
+ Replaced the inb() and outb() functions with direct memory
|
||||
access. This allows the port to be built with the 20050414 build of
|
||||
WinAVR.
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "partest.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
#define partstALL_BITS_OUTPUT ( ( unsigned portCHAR ) 0xff )
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0xff )
|
||||
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 7 )
|
||||
|
||||
static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
ucCurrentOutputValue = partstALL_OUTPUTS_OFF;
|
||||
|
||||
/* Set port B direction to outputs. Start with all output off. */
|
||||
DDRB = partstALL_BITS_OUTPUT;
|
||||
PORTB = ucCurrentOutputValue;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
|
||||
|
||||
if( uxLED <= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit <<= uxLED;
|
||||
}
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( xValue == pdTRUE )
|
||||
{
|
||||
ucBit ^= ( unsigned portCHAR ) 0xff;
|
||||
ucCurrentOutputValue &= ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucCurrentOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PORTB = ucCurrentOutputValue;
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
|
||||
if( uxLED <= partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( ucCurrentOutputValue & ucBit )
|
||||
{
|
||||
ucCurrentOutputValue &= ~ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucCurrentOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PORTB = ucCurrentOutputValue;
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks.
|
||||
*
|
||||
* Main. c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task that does not flash an LED 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
|
||||
* toggles an LED. Should any task contain an error at any time the LED toggle
|
||||
* will stop.
|
||||
*
|
||||
* The LED flash and communications test tasks do not maintain a count.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from V1.2.0
|
||||
|
||||
+ Changed the baud rate for the serial test from 19200 to 57600.
|
||||
|
||||
Changes from V1.2.3
|
||||
|
||||
+ The integer and comtest tasks are now used when the cooperative scheduler
|
||||
is being used. Previously they were only used with the preemptive
|
||||
scheduler.
|
||||
|
||||
Changes from V1.2.5
|
||||
|
||||
+ Set the baud rate to 38400. This has a smaller error percentage with an
|
||||
8MHz clock (according to the manual).
|
||||
|
||||
Changes from V2.0.0
|
||||
|
||||
+ Delay periods are now specified using variables and constants of
|
||||
portTickType rather than unsigned portLONG.
|
||||
|
||||
Changes from V2.6.1
|
||||
|
||||
+ The IAR and WinAVR AVR ports are now maintained separately.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef GCC_MEGA_AVR
|
||||
/* EEPROM routines used only with the WinAVR compiler. */
|
||||
#include <avr/eeprom.h>
|
||||
#endif
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo file headers. */
|
||||
#include "PollQ.h"
|
||||
#include "integer.h"
|
||||
#include "serial.h"
|
||||
#include "comtest.h"
|
||||
#include "flash.h"
|
||||
#include "print.h"
|
||||
#include "partest.h"
|
||||
|
||||
/* Priority definitions for most of the tasks in the demo application. Some
|
||||
tasks just use the idle priority. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
|
||||
/* Baud rate used by the serial port tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 38400 )
|
||||
|
||||
/* LED used by the serial port tasks. This is toggled on each character Tx,
|
||||
and mainCOM_TEST_LED + 1 is toggles on each character Rx. */
|
||||
#define mainCOM_TEST_LED ( 4 )
|
||||
|
||||
/* LED that is toggled by the check task. The check task periodically checks
|
||||
that all the other tasks are operating without error. If no errors are found
|
||||
the LED is toggled. If an error is found at any time the LED is never toggles
|
||||
again. */
|
||||
#define mainCHECK_TASK_LED ( 7 )
|
||||
|
||||
/* The period between executions of the check task. */
|
||||
#define mainCHECK_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
|
||||
/* An address in the EEPROM used to count resets. This is used to check that
|
||||
the demo application is not unexpectedly resetting. */
|
||||
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
|
||||
|
||||
/*
|
||||
* The task function for the "Check" task.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Checks the unique counts of other tasks to ensure they are still operational.
|
||||
* Flashes an LED if everything is okay.
|
||||
*/
|
||||
static void prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*
|
||||
* Called on boot to increment a count stored in the EEPROM. This is used to
|
||||
* ensure the CPU does not reset unexpectedly.
|
||||
*/
|
||||
static void prvIncrementResetCount( void );
|
||||
|
||||
portSHORT main( void )
|
||||
{
|
||||
prvIncrementResetCount();
|
||||
|
||||
/* Setup the LED's for output. */
|
||||
vParTestInitialise();
|
||||
|
||||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||
configUSE_PREEMPTION as 0. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
static volatile unsigned portLONG ulDummyVariable = 3UL;
|
||||
|
||||
/* The parameters are not used. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Cycle for ever, delaying then checking all the other tasks are still
|
||||
operating without error. */
|
||||
for( ;; )
|
||||
{
|
||||
vTaskDelay( mainCHECK_PERIOD );
|
||||
|
||||
/* Perform a bit of 32bit maths to ensure the registers used by the
|
||||
integer tasks get some exercise. The result here is not important -
|
||||
see the demo application documentation for more info. */
|
||||
ulDummyVariable *= 3;
|
||||
|
||||
prvCheckOtherTasksAreStillRunning();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorHasOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorHasOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
xErrorHasOccurred = pdTRUE;
|
||||
}
|
||||
|
||||
if( xErrorHasOccurred == pdFALSE )
|
||||
{
|
||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||
using console IO. */
|
||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvIncrementResetCount( void )
|
||||
{
|
||||
unsigned portCHAR ucCount;
|
||||
|
||||
eeprom_read_block( &ucCount, mainRESET_COUNT_ADDRESS, sizeof( ucCount ) );
|
||||
ucCount++;
|
||||
eeprom_write_byte( mainRESET_COUNT_ADDRESS, ucCount );
|
||||
}
|
||||
|
||||
@@ -1,426 +0,0 @@
|
||||
# WinAVR Sample makefile written by Eric B. Weddington, J<>rg Wunsch, et al.
|
||||
# Released to the Public Domain
|
||||
# Please read the make user manual!
|
||||
#
|
||||
# Additional material for this makefile was submitted by:
|
||||
# Tim Henigan
|
||||
# Peter Fleury
|
||||
# Reiner Patommel
|
||||
# Sander Pool
|
||||
# Frederik Rouleau
|
||||
# Markus Pfaff
|
||||
#
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF (for use with AVR Studio 3.x or VMLAB).
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF (for use with AVR Studio
|
||||
# 4.07 or greater).
|
||||
#
|
||||
# make program = Download the hex file to the device, using avrdude. Please
|
||||
# customize the avrdude settings below first!
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#
|
||||
|
||||
|
||||
# MCU name
|
||||
MCU = atmega323
|
||||
|
||||
# Output format. (can be srec, ihex, binary)
|
||||
FORMAT = ihex
|
||||
|
||||
# Target file name (without extension).
|
||||
TARGET = rtosdemo
|
||||
|
||||
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
|
||||
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
|
||||
OPT = s
|
||||
|
||||
|
||||
# List C source files here. (C dependencies are automatically generated.)
|
||||
DEMO_DIR = ../Common/Minimal
|
||||
SOURCE_DIR = ../../Source
|
||||
PORT_DIR = ../../Source/portable/GCC/ATMega323
|
||||
|
||||
SRC = \
|
||||
main.c \
|
||||
ParTest/ParTest.c \
|
||||
serial/serial.c \
|
||||
$(SOURCE_DIR)/tasks.c \
|
||||
$(SOURCE_DIR)/queue.c \
|
||||
$(SOURCE_DIR)/list.c \
|
||||
$(SOURCE_DIR)/portable/MemMang/heap_1.c \
|
||||
$(PORT_DIR)/port.c \
|
||||
$(DEMO_DIR)/flash.c \
|
||||
$(DEMO_DIR)/integer.c \
|
||||
$(DEMO_DIR)/PollQ.c \
|
||||
$(DEMO_DIR)/comtest.c
|
||||
|
||||
|
||||
# If there is more than one source file, append them above, or modify and
|
||||
# uncomment the following:
|
||||
#SRC += foo.c bar.c
|
||||
|
||||
# You can also wrap lines by appending a backslash to the end of the line:
|
||||
#SRC += baz.c \
|
||||
#xyzzy.c
|
||||
|
||||
|
||||
|
||||
# List Assembler source files here.
|
||||
# Make them always end in a capital .S. Files ending in a lowercase .s
|
||||
# will not be considered source files but generated files (assembler
|
||||
# output from the compiler), and will be deleted upon "make clean"!
|
||||
# Even though the DOS/Win* filesystem matches both .s and .S the same,
|
||||
# it will preserve the spelling of the filenames, and gcc itself does
|
||||
# care about how the name is spelled on its command-line.
|
||||
ASRC =
|
||||
|
||||
|
||||
# List any extra directories to look for include files here.
|
||||
# Each directory must be seperated by a space.
|
||||
EXTRAINCDIRS =
|
||||
|
||||
|
||||
# Optional compiler flags.
|
||||
# -g: generate debugging information (for GDB, or for COFF conversion)
|
||||
# -O*: optimization level
|
||||
# -f...: tuning, see gcc manual and avr-libc documentation
|
||||
# -Wall...: warning level
|
||||
# -Wa,...: tell GCC to pass this to the assembler.
|
||||
# -ahlms: create assembler listing
|
||||
|
||||
DEBUG_LEVEL=-g
|
||||
WARNINGS=-Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare \
|
||||
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused
|
||||
|
||||
CFLAGS = -D GCC_MEGA_AVR -I. -I../../Source/include -I../Common/include \
|
||||
$(DEBUG_LEVEL) -O$(OPT) \
|
||||
-fsigned-char -funsigned-bitfields -fpack-struct -fshort-enums \
|
||||
$(WARNINGS) \
|
||||
-Wa,-adhlns=$(<:.c=.lst) \
|
||||
$(patsubst %,-I%,$(EXTRAINCDIRS))
|
||||
|
||||
|
||||
# Set a "language standard" compiler flag.
|
||||
# Unremark just one line below to set the language standard to use.
|
||||
# gnu99 = C99 + GNU extensions. See GCC manual for more information.
|
||||
#CFLAGS += -std=c89
|
||||
#CFLAGS += -std=gnu89
|
||||
#CFLAGS += -std=c99
|
||||
CFLAGS += -std=gnu99
|
||||
|
||||
|
||||
|
||||
# Optional assembler flags.
|
||||
# -Wa,...: tell GCC to pass this to the assembler.
|
||||
# -ahlms: create listing
|
||||
# -gstabs: have the assembler create line number information; note that
|
||||
# for use in COFF files, additional information about filenames
|
||||
# and function names needs to be present in the assembler source
|
||||
# files -- see avr-libc docs [FIXME: not yet described there]
|
||||
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
||||
|
||||
|
||||
|
||||
# Optional linker flags.
|
||||
# -Wl,...: tell GCC to pass this to linker.
|
||||
# -Map: create map file
|
||||
# --cref: add cross reference to map file
|
||||
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
|
||||
|
||||
|
||||
|
||||
# Additional libraries
|
||||
|
||||
# Minimalistic printf version
|
||||
#LDFLAGS += -Wl,-u,vfprintf -lprintf_min
|
||||
|
||||
# Floating point printf version (requires -lm below)
|
||||
#LDFLAGS += -Wl,-u,vfprintf -lprintf_flt
|
||||
|
||||
# -lm = math library
|
||||
LDFLAGS += -lm
|
||||
|
||||
|
||||
|
||||
|
||||
# Programming support using avrdude. Settings and variables.
|
||||
|
||||
# Programming hardware: alf avr910 avrisp bascom bsd
|
||||
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
|
||||
#
|
||||
# Type: avrdude -c ?
|
||||
# to get a full listing.
|
||||
#
|
||||
AVRDUDE_PROGRAMMER = stk500
|
||||
|
||||
|
||||
AVRDUDE_PORT = com1 # programmer connected to serial device
|
||||
#AVRDUDE_PORT = lpt1 # programmer connected to parallel port
|
||||
|
||||
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
|
||||
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
|
||||
|
||||
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
|
||||
|
||||
# Uncomment the following if you want avrdude's erase cycle counter.
|
||||
# Note that this counter needs to be initialized first using -Yn,
|
||||
# see avrdude manual.
|
||||
#AVRDUDE_ERASE += -y
|
||||
|
||||
# Uncomment the following if you do /not/ wish a verification to be
|
||||
# performed after programming the device.
|
||||
#AVRDUDE_FLAGS += -V
|
||||
|
||||
# Increase verbosity level. Please use this when submitting bug
|
||||
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
|
||||
# to submit bug reports.
|
||||
#AVRDUDE_FLAGS += -v -v
|
||||
|
||||
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Define directories, if needed.
|
||||
DIRAVR = c:/winavr
|
||||
DIRAVRBIN = $(DIRAVR)/bin
|
||||
DIRAVRUTILS = $(DIRAVR)/utils/bin
|
||||
DIRINC = .
|
||||
DIRLIB = $(DIRAVR)/avr/lib
|
||||
|
||||
|
||||
# Define programs and commands.
|
||||
SHELL = sh
|
||||
|
||||
CC = avr-gcc
|
||||
|
||||
OBJCOPY = avr-objcopy
|
||||
OBJDUMP = avr-objdump
|
||||
SIZE = avr-size
|
||||
|
||||
|
||||
# Programming support using avrdude.
|
||||
AVRDUDE = avrdude
|
||||
|
||||
|
||||
REMOVE = rm -f
|
||||
COPY = cp
|
||||
|
||||
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
|
||||
ELFSIZE = $(SIZE) -A $(TARGET).elf
|
||||
|
||||
|
||||
|
||||
# Define Messages
|
||||
# English
|
||||
MSG_ERRORS_NONE = Errors: none
|
||||
MSG_BEGIN = -------- begin --------
|
||||
MSG_END = -------- end --------
|
||||
MSG_SIZE_BEFORE = Size before:
|
||||
MSG_SIZE_AFTER = Size after:
|
||||
MSG_COFF = Converting to AVR COFF:
|
||||
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
|
||||
MSG_FLASH = Creating load file for Flash:
|
||||
MSG_EEPROM = Creating load file for EEPROM:
|
||||
MSG_EXTENDED_LISTING = Creating Extended Listing:
|
||||
MSG_SYMBOL_TABLE = Creating Symbol Table:
|
||||
MSG_LINKING = Linking:
|
||||
MSG_COMPILING = Compiling:
|
||||
MSG_ASSEMBLING = Assembling:
|
||||
MSG_CLEANING = Cleaning project:
|
||||
|
||||
|
||||
|
||||
|
||||
# Define all object files.
|
||||
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
|
||||
|
||||
# Define all listing files.
|
||||
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
|
||||
|
||||
# Combine all necessary flags and optional flags.
|
||||
# Add target processor to flags.
|
||||
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
|
||||
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
||||
|
||||
|
||||
|
||||
# Default target.
|
||||
all: begin gccversion sizebefore $(TARGET).elf $(TARGET).hex $(TARGET).eep \
|
||||
$(TARGET).lss $(TARGET).sym sizeafter finished end
|
||||
|
||||
|
||||
# Eye candy.
|
||||
# AVR Studio 3.x does not check make's exit code but relies on
|
||||
# the following magic strings to be generated by the compile job.
|
||||
begin:
|
||||
@echo
|
||||
@echo $(MSG_BEGIN)
|
||||
|
||||
finished:
|
||||
@echo $(MSG_ERRORS_NONE)
|
||||
|
||||
end:
|
||||
@echo $(MSG_END)
|
||||
@echo
|
||||
|
||||
|
||||
# Display size of file.
|
||||
sizebefore:
|
||||
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
|
||||
|
||||
sizeafter:
|
||||
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
|
||||
|
||||
|
||||
|
||||
# Display compiler version information.
|
||||
gccversion :
|
||||
@$(CC) --version
|
||||
|
||||
|
||||
|
||||
|
||||
# Convert ELF to COFF for use in debugging / simulating in
|
||||
# AVR Studio or VMLAB.
|
||||
COFFCONVERT=$(OBJCOPY) --debugging \
|
||||
--change-section-address .data-0x800000 \
|
||||
--change-section-address .bss-0x800000 \
|
||||
--change-section-address .noinit-0x800000 \
|
||||
--change-section-address .eeprom-0x810000
|
||||
|
||||
|
||||
coff: $(TARGET).elf
|
||||
@echo
|
||||
@echo $(MSG_COFF) $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
|
||||
|
||||
|
||||
extcoff: $(TARGET).elf
|
||||
@echo
|
||||
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
|
||||
|
||||
|
||||
|
||||
|
||||
# Program the device.
|
||||
program: $(TARGET).hex $(TARGET).eep
|
||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
|
||||
|
||||
|
||||
|
||||
|
||||
# Create final output files (.hex, .eep) from ELF output file.
|
||||
%.hex: %.elf
|
||||
@echo
|
||||
@echo $(MSG_FLASH) $@
|
||||
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||
|
||||
%.eep: %.elf
|
||||
@echo
|
||||
@echo $(MSG_EEPROM) $@
|
||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||
|
||||
# Create extended listing file from ELF output file.
|
||||
%.lss: %.elf
|
||||
@echo
|
||||
@echo $(MSG_EXTENDED_LISTING) $@
|
||||
$(OBJDUMP) -h -S $< > $@
|
||||
|
||||
# Create a symbol table from ELF output file.
|
||||
%.sym: %.elf
|
||||
@echo
|
||||
@echo $(MSG_SYMBOL_TABLE) $@
|
||||
avr-nm -n $< > $@
|
||||
|
||||
|
||||
|
||||
# Link: create ELF output file from object files.
|
||||
.SECONDARY : $(TARGET).elf
|
||||
.PRECIOUS : $(OBJ)
|
||||
%.elf: $(OBJ)
|
||||
@echo
|
||||
@echo $(MSG_LINKING) $@
|
||||
$(CC) $(ALL_CFLAGS) $(OBJ) --output $@ $(LDFLAGS)
|
||||
|
||||
|
||||
# Compile: create object files from C source files.
|
||||
%.o : %.c
|
||||
@echo
|
||||
@echo $(MSG_COMPILING) $<
|
||||
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Compile: create assembler files from C source files.
|
||||
%.s : %.c
|
||||
$(CC) -S $(ALL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Assemble: create object files from assembler source files.
|
||||
%.o : %.S
|
||||
@echo
|
||||
@echo $(MSG_ASSEMBLING) $<
|
||||
$(CC) -c $(ALL_ASFLAGS) $< -o $@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Target: clean project.
|
||||
clean: begin clean_list finished end
|
||||
|
||||
clean_list :
|
||||
@echo
|
||||
@echo $(MSG_CLEANING)
|
||||
$(REMOVE) $(TARGET).hex
|
||||
$(REMOVE) $(TARGET).eep
|
||||
$(REMOVE) $(TARGET).obj
|
||||
$(REMOVE) $(TARGET).cof
|
||||
$(REMOVE) $(TARGET).elf
|
||||
$(REMOVE) $(TARGET).map
|
||||
$(REMOVE) $(TARGET).obj
|
||||
$(REMOVE) $(TARGET).a90
|
||||
$(REMOVE) $(TARGET).sym
|
||||
$(REMOVE) $(TARGET).lnk
|
||||
$(REMOVE) $(TARGET).lss
|
||||
$(REMOVE) $(OBJ)
|
||||
$(REMOVE) $(LST)
|
||||
$(REMOVE) $(SRC:.c=.s)
|
||||
$(REMOVE) $(SRC:.c=.d)
|
||||
|
||||
|
||||
# Automatically generate C source code dependencies.
|
||||
# (Code originally taken from the GNU make user manual and modified
|
||||
# (See README.txt Credits).)
|
||||
#
|
||||
# Note that this will work with sh (bash) and sed that is shipped with WinAVR
|
||||
# (see the SHELL variable defined above).
|
||||
# This may not work with other shells or other seds.
|
||||
#
|
||||
%.d: %.c
|
||||
set -e; $(CC) -MM $(ALL_CFLAGS) $< \
|
||||
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > $@; \
|
||||
[ -s $@ ] || rm -f $@
|
||||
|
||||
|
||||
# Remove the '-' if you want to see the dependency files generated.
|
||||
-include $(SRC:.c=.d)
|
||||
|
||||
|
||||
|
||||
# Listing of phony targets.
|
||||
.PHONY : all begin finish end sizebefore sizeafter gccversion coff extcoff \
|
||||
clean clean_list program
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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 V1.2.3
|
||||
|
||||
+ The function xPortInitMinimal() has been renamed to
|
||||
xSerialPortInitMinimal() and the function xPortInit() has been renamed
|
||||
to xSerialPortInit().
|
||||
|
||||
Changes from V2.0.0
|
||||
|
||||
+ Delay periods are now specified using variables and constants of
|
||||
portTickType rather than unsigned portLONG.
|
||||
+ xQueueReceiveFromISR() used in place of xQueueReceive() within the ISR.
|
||||
|
||||
Changes from V2.6.0
|
||||
|
||||
+ Replaced the inb() and outb() functions with direct memory
|
||||
access. This allows the port to be built with the 20050414 build of
|
||||
WinAVR.
|
||||
*/
|
||||
|
||||
/* BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER. */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "task.h"
|
||||
#include "serial.h"
|
||||
|
||||
#define serBAUD_DIV_CONSTANT ( ( unsigned portLONG ) 16 )
|
||||
|
||||
/* Constants for writing to UCSRB. */
|
||||
#define serRX_INT_ENABLE ( ( unsigned portCHAR ) 0x80 )
|
||||
#define serRX_ENABLE ( ( unsigned portCHAR ) 0x10 )
|
||||
#define serTX_ENABLE ( ( unsigned portCHAR ) 0x08 )
|
||||
#define serTX_INT_ENABLE ( ( unsigned portCHAR ) 0x20 )
|
||||
|
||||
/* Constants for writing to UCSRC. */
|
||||
#define serUCSRC_SELECT ( ( unsigned portCHAR ) 0x80 )
|
||||
#define serEIGHT_DATA_BITS ( ( unsigned portCHAR ) 0x06 )
|
||||
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
#define vInterruptOn() \
|
||||
{ \
|
||||
unsigned portCHAR ucByte; \
|
||||
\
|
||||
ucByte = UCSRB; \
|
||||
ucByte |= serTX_INT_ENABLE; \
|
||||
UCSRB = ucByte; \
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#define vInterruptOff() \
|
||||
{ \
|
||||
unsigned portCHAR ucInByte; \
|
||||
\
|
||||
ucInByte = UCSRB; \
|
||||
ucInByte &= ~serTX_INT_ENABLE; \
|
||||
UCSRB = ucInByte; \
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulBaudRateCounter;
|
||||
unsigned portCHAR ucByte;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Create the queues used by the com test task. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
|
||||
/* Calculate the baud rate register value from the equation in the
|
||||
data sheet. */
|
||||
ulBaudRateCounter = ( configCPU_CLOCK_HZ / ( serBAUD_DIV_CONSTANT * ulWantedBaud ) ) - ( unsigned portLONG ) 1;
|
||||
|
||||
/* Set the baud rate. */
|
||||
ucByte = ( unsigned portCHAR ) ( ulBaudRateCounter & ( unsigned portLONG ) 0xff );
|
||||
UBRRL = ucByte;
|
||||
|
||||
ulBaudRateCounter >>= ( unsigned portLONG ) 8;
|
||||
ucByte = ( unsigned portCHAR ) ( ulBaudRateCounter & ( unsigned portLONG ) 0xff );
|
||||
UBRRH = ucByte;
|
||||
|
||||
/* Enable the Rx interrupt. The Tx interrupt will get enabled
|
||||
later. Also enable the Rx and Tx. */
|
||||
UCSRB = ( serRX_INT_ENABLE | serRX_ENABLE | serTX_ENABLE );
|
||||
|
||||
/* Set the data bits to 8. */
|
||||
UCSRC = ( serUCSRC_SELECT | serEIGHT_DATA_BITS );
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
/* Unlike other ports, this serial code does not allow for more than one
|
||||
com port. We therefore don't return a pointer to a port structure and can
|
||||
instead just return NULL. */
|
||||
return NULL;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Only one port is supported. */
|
||||
( 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;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Only one port is supported. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Return false if after the block time there is no room on the Tx queue. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
{
|
||||
return pdFAIL;
|
||||
}
|
||||
|
||||
vInterruptOn();
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
unsigned portCHAR ucByte;
|
||||
|
||||
/* The parameter is not used. */
|
||||
( void ) xPort;
|
||||
|
||||
/* Turn off the interrupts. We may also want to delete the queues and/or
|
||||
re-install the original ISR. */
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
vInterruptOff();
|
||||
ucByte = UCSRB;
|
||||
ucByte &= ~serRX_INT_ENABLE;
|
||||
UCSRB = ucByte;
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
SIGNAL( SIG_UART_RECV )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
|
||||
/* Get the character and post it on the queue of Rxed characters.
|
||||
If the post causes a task to wake force a context switch as the woken task
|
||||
may have a higher priority than the task we have interrupted. */
|
||||
cChar = UDR;
|
||||
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
SIGNAL( SIG_UART_DATA )
|
||||
{
|
||||
signed portCHAR cChar, cTaskWoken;
|
||||
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &cTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* Send the next character queued for Tx. */
|
||||
UDR = cChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Queue empty, nothing to send. */
|
||||
vInterruptOff();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_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 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 3 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 2 )
|
||||
#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 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 0
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,604 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* This demo application creates six co-routines and two tasks (three including
|
||||
* the idle task). The co-routines execute as part of the idle task hook.
|
||||
*
|
||||
* Five of the created co-routines are the standard 'co-routine flash'
|
||||
* co-routines contained within the Demo/Common/Minimal/crflash.c file and
|
||||
* documented on the FreeRTOS.org WEB site.
|
||||
*
|
||||
* The 'LCD Task' rotates a string on the LCD, delaying between each character
|
||||
* as necessitated by the slow interface, and delaying between each string just
|
||||
* long enough to enable the text to be read.
|
||||
*
|
||||
* The sixth co-routine and final task control the transmission and reception
|
||||
* of a string to UART 0. The co-routine periodically sends the first
|
||||
* character of the string to the UART, with the UART's TxEnd interrupt being
|
||||
* used to transmit the remaining characters. The UART's RxEnd interrupt
|
||||
* receives the characters and places them on a queue to be processed by the
|
||||
* 'COMs Rx' task. An error is latched should an unexpected character be
|
||||
* received, or any character be received out of sequence.
|
||||
*
|
||||
* A loopback connector is required to ensure that each character transmitted
|
||||
* on the UART is also received on the same UART. For test purposes the UART
|
||||
* FIFO's are not utalised in order to maximise the interrupt overhead. Also
|
||||
* a pseudo random interval is used between the start of each transmission in
|
||||
* order that the resultant interrupts are more randomly distributed and
|
||||
* therefore more likely to highlight any problems.
|
||||
*
|
||||
* The flash co-routines control LED's zero to four. LED five is toggled each
|
||||
* time the string is transmitted on the UART. LED six is toggled each time
|
||||
* the string is CORRECTLY received on the UART. LED seven is latched on should
|
||||
* an error be detected in any task or co-routine.
|
||||
*
|
||||
* In addition the idle task makes repetative calls to
|
||||
* prvSetAndCheckRegisters(). This simply loads the general purpose registers
|
||||
* with a known value, then checks each register to ensure the held value is
|
||||
* still correct. As a low priority task this checking routine is likely to
|
||||
* get repeatedly swapped in and out. A register being found to contain an
|
||||
* incorrect value is therefore indicative of an error in the task switching
|
||||
* mechansim.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "croutine.h"
|
||||
|
||||
/* Demo application include files. */
|
||||
#include "partest.h"
|
||||
#include "crflash.h"
|
||||
|
||||
/* Library include files. */
|
||||
#include "DriverLib.h"
|
||||
|
||||
/* The time to delay between writing each character to the LCD. */
|
||||
#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )
|
||||
|
||||
/* The time to delay between writing each string to the LCD. */
|
||||
#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )
|
||||
|
||||
/* The number of flash co-routines to create. */
|
||||
#define mainNUM_FLASH_CO_ROUTINES ( 5 )
|
||||
|
||||
/* The length of the queue used to pass received characters to the Comms Rx
|
||||
task. */
|
||||
#define mainRX_QUEUE_LEN ( 5 )
|
||||
|
||||
/* The priority of the co-routine used to initiate the transmission of the
|
||||
string on UART 0. */
|
||||
#define mainTX_CO_ROUTINE_PRIORITY ( 1 )
|
||||
|
||||
/* Only one co-routine is created so its index is not important. */
|
||||
#define mainTX_CO_ROUTINE_INDEX ( 0 )
|
||||
|
||||
/* The time between transmissions of the string on UART 0. This is pseudo
|
||||
random in order to generate a bit or randomness to when the interrupts occur.*/
|
||||
#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )
|
||||
#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )
|
||||
#define mainOFFSET_TIME ( ( portTickType ) 3 )
|
||||
|
||||
/* The time the Comms Rx task should wait to receive a character. This should
|
||||
be slightly longer than the time between transmissions. If we do not receive
|
||||
a character after this time then there must be an error in the transmission or
|
||||
the timing of the transmission. */
|
||||
#define mainCOMMS_RX_DELAY ( mainMAX_TX_DELAY + 20 )
|
||||
|
||||
/* The task priorites. */
|
||||
#define mainLCD_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainCOMMS_RX_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The LED's toggled by the various tasks. */
|
||||
#define mainCOMMS_FAIL_LED ( 7 )
|
||||
#define mainCOMMS_RX_LED ( 6 )
|
||||
#define mainCOMMS_TX_LED ( 5 )
|
||||
|
||||
/* The baud rate used by the UART comms tasks/co-routine. */
|
||||
#define mainBAUD_RATE ( 57600 )
|
||||
|
||||
/* FIFO setting for the UART. The FIFO is not used to create a better test. */
|
||||
#define mainFIFO_SET ( 0x10 )
|
||||
|
||||
/* The string that is transmitted on the UART contains sequentially the
|
||||
characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
|
||||
#define mainFIRST_TX_CHAR '0'
|
||||
#define mainLAST_TX_CHAR 'z'
|
||||
|
||||
/* Just used to walk through the program memory in order that some random data
|
||||
can be generated. */
|
||||
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) )
|
||||
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 )
|
||||
|
||||
/* The error routine that is called if the driver library encounters an error. */
|
||||
#ifdef DEBUG
|
||||
void
|
||||
__error__(char *pcFilename, unsigned long ulLine)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The task that rotates text on the LCD.
|
||||
*/
|
||||
static void vLCDTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The task that receives the characters from UART 0.
|
||||
*/
|
||||
static void vCommsRxTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The co-routine that periodically initiates the transmission of the string on
|
||||
* the UART.
|
||||
*/
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
|
||||
|
||||
/*
|
||||
* Writes a string the the LCD.
|
||||
*/
|
||||
static void prvWriteString( const portCHAR *pcString );
|
||||
|
||||
/*
|
||||
* Initialisation routine for the UART.
|
||||
*/
|
||||
static void vSerialInit( void );
|
||||
|
||||
/*
|
||||
* Thread safe write to the PDC.
|
||||
*/
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData );
|
||||
|
||||
/*
|
||||
* Function to simply set a known value into the general purpose registers
|
||||
* then read them back to ensure they remain set correctly. An incorrect value
|
||||
* being indicative of an error in the task switching mechanism.
|
||||
*/
|
||||
void prvSetAndCheckRegisters( void );
|
||||
|
||||
/*
|
||||
* Latch the LED that indicates that an error has occurred.
|
||||
*/
|
||||
void vSetErrorLED( void );
|
||||
|
||||
/*
|
||||
* Sets up the PLL and ports used by the demo.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Error flag set to pdFAIL if an error is encountered in the tasks/co-routines
|
||||
defined within this file. */
|
||||
unsigned portBASE_TYPE uxErrorStatus = pdPASS;
|
||||
|
||||
/* The next character to transmit. */
|
||||
static portCHAR cNextChar;
|
||||
|
||||
/* The queue used to transmit characters from the interrupt to the Comms Rx
|
||||
task. */
|
||||
static xQueueHandle xCommsQueue;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void Main( void )
|
||||
{
|
||||
/* Create the queue used to communicate between the UART ISR and the Comms
|
||||
Rx task. */
|
||||
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) );
|
||||
|
||||
/* Setup the ports used by the demo and the clock. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Create the co-routines that flash the LED's. */
|
||||
vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );
|
||||
|
||||
/* Create the co-routine that initiates the transmission of characters
|
||||
on the UART. */
|
||||
xCoRoutineCreate( vSerialTxCoRoutine, mainTX_CO_ROUTINE_PRIORITY, mainTX_CO_ROUTINE_INDEX );
|
||||
|
||||
/* Create the LCD and Comms Rx tasks. */
|
||||
xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vCommsRxTask, "CMS", configMINIMAL_STACK_SIZE, NULL, mainCOMMS_RX_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler running the tasks and co-routines just created. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should not get here unless we did not have enough memory to start the
|
||||
scheduler. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL. */
|
||||
SysCtlClockSet( SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_6MHZ );
|
||||
|
||||
/* Initialise the hardware used to talk to the LCD, LED's and UART. */
|
||||
PDCInit();
|
||||
vParTestInitialise();
|
||||
vSerialInit();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* The co-routines are executed in the idle task using the idle task
|
||||
hook. */
|
||||
for( ;; )
|
||||
{
|
||||
/* Schedule the co-routines. */
|
||||
vCoRoutineSchedule();
|
||||
|
||||
/* Run the register check function between each co-routine. */
|
||||
prvSetAndCheckRegisters();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvWriteString( const portCHAR *pcString )
|
||||
{
|
||||
/* Write pcString to the LED, pausing between each character. */
|
||||
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
|
||||
while( *pcString )
|
||||
{
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_RAM, *pcString );
|
||||
pcString++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vLCDTask( void * pvParameters )
|
||||
{
|
||||
unsigned portBASE_TYPE uxIndex;
|
||||
const unsigned portCHAR ucCFGData[] = {
|
||||
0x30, /* Set data bus to 8-bits. */
|
||||
0x30,
|
||||
0x30,
|
||||
0x3C, /* Number of lines/font. */
|
||||
0x08, /* Display off. */
|
||||
0x01, /* Display clear. */
|
||||
0x06, /* Entry mode [cursor dir][shift]. */
|
||||
0x0C /* Display on [display on][curson on][blinking on]. */
|
||||
};
|
||||
|
||||
/* The strings that are written to the LCD. */
|
||||
const portCHAR *pcStringsToDisplay[] = {
|
||||
"Stellaris",
|
||||
"Demo",
|
||||
"One",
|
||||
"www.FreeRTOS.org",
|
||||
""
|
||||
};
|
||||
|
||||
/* Configure the LCD. */
|
||||
uxIndex = 0;
|
||||
while( uxIndex < sizeof( ucCFGData ) )
|
||||
{
|
||||
prvPDCWrite( PDC_LCD_CSR, ucCFGData[ uxIndex ] );
|
||||
uxIndex++;
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
}
|
||||
|
||||
/* Turn the LCD Backlight on. */
|
||||
prvPDCWrite( PDC_CSR, 0x01 );
|
||||
|
||||
/* Clear display. */
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_CSR, LCD_CLEAR );
|
||||
|
||||
uxIndex = 0;
|
||||
for( ;; )
|
||||
{
|
||||
/* Display the string on the LCD. */
|
||||
prvWriteString( pcStringsToDisplay[ uxIndex ] );
|
||||
|
||||
/* Move on to the next string - wrapping if necessary. */
|
||||
uxIndex++;
|
||||
if( *( pcStringsToDisplay[ uxIndex ] ) == 0x00 )
|
||||
{
|
||||
uxIndex = 0;
|
||||
/* Longer pause on the last string to be sent. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY * 2 );
|
||||
}
|
||||
|
||||
/* Wait until it is time to move onto the next string. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vCommsRxTask( void * pvParameters )
|
||||
{
|
||||
static portCHAR cRxedChar, cExpectedChar;
|
||||
|
||||
/* Set the char we expect to receive to the start of the string. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Wait for a character to be received. */
|
||||
xQueueReceive( xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY );
|
||||
|
||||
/* Was the character recived (if any) the expected character. */
|
||||
if( cRxedChar != cExpectedChar )
|
||||
{
|
||||
/* Got an unexpected character. This can sometimes occur when
|
||||
reseting the system using the debugger leaving characters already
|
||||
in the UART regsters. */
|
||||
uxErrorStatus = pdFAIL;
|
||||
|
||||
/* Resync by waiting for the end of the current string. */
|
||||
while( cRxedChar != mainLAST_TX_CHAR )
|
||||
{
|
||||
while( !xQueueReceive( xCommsQueue, ( void * ) &cRxedChar, portMAX_DELAY ) );
|
||||
}
|
||||
|
||||
/* The next expected character is the start of the string again. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( cExpectedChar == mainLAST_TX_CHAR )
|
||||
{
|
||||
/* We have reached the end of the string - we now expect to
|
||||
receive the first character in the string again. The LED is
|
||||
toggled to indicate that the entire string was received without
|
||||
error. */
|
||||
vParTestToggleLED( mainCOMMS_RX_LED );
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We got the expected character, we now expect to receive the
|
||||
next character in the string. */
|
||||
cExpectedChar++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
portTickType xDelayPeriod;
|
||||
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
|
||||
/* Co-routine MUST start with a call to crSTART. */
|
||||
crSTART( xHandle );
|
||||
|
||||
for(;;)
|
||||
{
|
||||
/* Was the previously transmitted string received correctly? */
|
||||
if( uxErrorStatus != pdPASS )
|
||||
{
|
||||
/* An error was encountered so set the error LED. */
|
||||
vSetErrorLED();
|
||||
}
|
||||
|
||||
/* The next character to Tx is the first in the string. */
|
||||
cNextChar = mainFIRST_TX_CHAR;
|
||||
|
||||
UARTIntDisable( UART0_BASE, UART_INT_TX );
|
||||
{
|
||||
/* Send the first character. */
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
|
||||
/* Move the variable to the char to Tx on so the ISR transmits
|
||||
the next character in the string once this one has completed. */
|
||||
cNextChar++;
|
||||
}
|
||||
UARTIntEnable(UART0_BASE, UART_INT_TX);
|
||||
|
||||
/* Toggle the LED to show a new string is being transmitted. */
|
||||
vParTestToggleLED( mainCOMMS_TX_LED );
|
||||
|
||||
/* Delay before we start the string off again. A pseudo-random delay
|
||||
is used as this will provide a better test. */
|
||||
xDelayPeriod = xTaskGetTickCount() + ( *pulRandomBytes );
|
||||
|
||||
pulRandomBytes++;
|
||||
if( pulRandomBytes > mainTOTAL_PROGRAM_MEMORY )
|
||||
{
|
||||
pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
}
|
||||
|
||||
/* Make sure we don't wait too long... */
|
||||
xDelayPeriod &= mainMAX_TX_DELAY;
|
||||
|
||||
/* ...but we do want to wait. */
|
||||
if( xDelayPeriod < mainMIN_TX_DELAY )
|
||||
{
|
||||
xDelayPeriod = mainMIN_TX_DELAY;
|
||||
}
|
||||
|
||||
/* Block for the random(ish) time. */
|
||||
crDELAY( xHandle, xDelayPeriod );
|
||||
}
|
||||
|
||||
/* Co-routine MUST end with a call to crEND. */
|
||||
crEND();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialInit( void )
|
||||
{
|
||||
/* Enable the UART. GPIOA has already been initialised. */
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
|
||||
|
||||
/* Set GPIO A0 and A1 as peripheral function. They are used to output the
|
||||
UART signals. */
|
||||
GPIODirModeSet( GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1, GPIO_DIR_MODE_HW );
|
||||
|
||||
/* Configure the UART for 8-N-1 operation. */
|
||||
UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
|
||||
|
||||
/* We dont want to use the fifo. This is for test purposes to generate
|
||||
as many interrupts as possible. */
|
||||
HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET;
|
||||
|
||||
/* Enable both Rx and Tx interrupts. */
|
||||
HWREG( UART0_BASE + UART_O_IM ) |= ( UART_INT_TX | UART_INT_RX );
|
||||
IntEnable( INT_UART0 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
|
||||
/* Clear the interrupt. */
|
||||
UARTIntClear( UART0_BASE, ulStatus );
|
||||
|
||||
/* Was an Rx interrpt pending? */
|
||||
if( ulStatus & UART_INT_RX )
|
||||
{
|
||||
if( ( HWREG(UART0_BASE + UART_O_FR ) & UART_FR_RXFF ) )
|
||||
{
|
||||
/* Get the char from the buffer and post it onto the queue of
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
|
||||
/* Was a Tx interrupt pending? */
|
||||
if( ulStatus & UART_INT_TX )
|
||||
{
|
||||
/* Send the next character in the string. We are not using the FIFO. */
|
||||
if( cNextChar <= mainLAST_TX_CHAR )
|
||||
{
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
cNextChar++;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData )
|
||||
{
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
PDCWrite( cAddress, cData );
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSetErrorLED( void )
|
||||
{
|
||||
vParTestSetLED( mainCOMMS_FAIL_LED, pdTRUE );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void prvSetAndCheckRegisters( void )
|
||||
{
|
||||
/* Fill the general purpose registers with known values. */
|
||||
__asm volatile( " mov r11, #10\n"
|
||||
" add r0, r11, #1\n"
|
||||
" add r1, r11, #2\n"
|
||||
" add r2, r11, #3\n"
|
||||
" add r3, r11, #4\n"
|
||||
" add r4, r11, #5\n"
|
||||
" add r5, r11, #6\n"
|
||||
" add r6, r11, #7\n"
|
||||
" add r7, r11, #8\n"
|
||||
" add r8, r11, #9\n"
|
||||
" add r9, r11, #10\n"
|
||||
" add r10, r11, #11\n"
|
||||
" add r12, r11, #12" );
|
||||
|
||||
/* Check the values are as expected. */
|
||||
__asm volatile( " cmp r11, #10\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r0, #11\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r1, #12\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r2, #13\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r3, #14\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r4, #15\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r5, #16\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r6, #17\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r7, #18\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r8, #19\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r9, #20\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r10, #21\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r12, #22\n"
|
||||
" bne set_error_led\n"
|
||||
" bx lr" );
|
||||
|
||||
__asm volatile( "set_error_led:\n"
|
||||
" push {r14}\n"
|
||||
" ldr r1, =vSetErrorLED\n"
|
||||
" blx r1\n"
|
||||
" pop {r14}\n"
|
||||
" bx lr" );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_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 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 3 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 2 )
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 3 )
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
|
||||
#define INCLUDE_vTaskPrioritySet 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 0
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,600 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* This demo application creates seven co-routines and one task (two including
|
||||
* the idle task). The co-routines execute as part of the idle task hook.
|
||||
*
|
||||
* Five of the created co-routines are the standard 'co-routine flash'
|
||||
* co-routines contained within the Demo/Common/Minimal/crflash.c file and
|
||||
* documented on the FreeRTOS.org WEB site.
|
||||
*
|
||||
* The 'LCD Task' rotates a string on the LCD, delaying between each character
|
||||
* as necessitated by the slow interface, and delaying between each string just
|
||||
* long enough to enable the text to be read.
|
||||
*
|
||||
* The sixth co-routine controls the transmission of a string to UART 0. The
|
||||
* co-routine periodically sends the first character of the string to the UART,
|
||||
* with the UART's TxEnd interrupt being used to transmit the remaining
|
||||
* characters. The UART's RxEnd interrupt receives the characters and places
|
||||
* them on a queue to be processed by the seventh and final co-routine. An
|
||||
* error is latched should an unexpected character be received, or any
|
||||
* character be received out of sequence.
|
||||
*
|
||||
* A loopback connector is required to ensure that each character transmitted
|
||||
* on the UART is also received on the same UART. For test purposes the UART
|
||||
* FIFO's are not utalised in order to maximise the interrupt overhead. Also
|
||||
* a pseudo random interval is used between the start of each transmission in
|
||||
* order that the resultant interrupts are more randomly distributed and
|
||||
* therefore more likely to highlight any problems.
|
||||
*
|
||||
* The flash co-routines control LED's zero to four. LED five is toggled each
|
||||
* time the string is transmitted on the UART. LED six is toggled each time
|
||||
* the string is CORRECTLY received on the UART. LED seven is latched on should
|
||||
* an error be detected in any task or co-routine.
|
||||
*
|
||||
* In addition the idle task makes repetative calls to
|
||||
* prvSetAndCheckRegisters(). This simply loads the general purpose registers
|
||||
* with a known value, then checks each register to ensure the held value is
|
||||
* still correct. As a low priority task this checking routine is likely to
|
||||
* get repeatedly swapped in and out. A register being found to contain an
|
||||
* incorrect value is therefore indicative of an error in the task switching
|
||||
* mechansim.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "croutine.h"
|
||||
|
||||
/* Demo application include files. */
|
||||
#include "partest.h"
|
||||
#include "crflash.h"
|
||||
|
||||
/* Library include files. */
|
||||
#include "DriverLib.h"
|
||||
|
||||
/* The time to delay between writing each character to the LCD. */
|
||||
#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )
|
||||
|
||||
/* The time to delay between writing each string to the LCD. */
|
||||
#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )
|
||||
|
||||
/* The number of flash co-routines to create. */
|
||||
#define mainNUM_FLASH_CO_ROUTINES ( 5 )
|
||||
|
||||
/* The length of the queue used to pass received characters to the Comms Rx
|
||||
task. */
|
||||
#define mainRX_QUEUE_LEN ( 5 )
|
||||
|
||||
/* The priority of the co-routine used to initiate the transmission of the
|
||||
string on UART 0. */
|
||||
#define mainTX_CO_ROUTINE_PRIORITY ( 1 )
|
||||
|
||||
/* The priority of the co-routine used to receive characters from the UART. */
|
||||
#define mainRX_CO_ROUTINE_PRIORITY ( 2 )
|
||||
|
||||
/* Only one co-routine is created so its index is not important. */
|
||||
#define mainTX_CO_ROUTINE_INDEX ( 0 )
|
||||
#define mainRX_CO_ROUTINE_INDEX ( 0 )
|
||||
|
||||
/* The time between transmissions of the string on UART 0. This is pseudo
|
||||
random in order to generate a bit or randomness to when the interrupts occur.*/
|
||||
#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )
|
||||
#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )
|
||||
#define mainOFFSET_TIME ( ( portTickType ) 3 )
|
||||
|
||||
/* The time the Comms Rx task should wait to receive a character. This should
|
||||
be slightly longer than the time between transmissions. If we do not receive
|
||||
a character after this time then there must be an error in the transmission or
|
||||
the timing of the transmission. */
|
||||
#define mainCOMMS_RX_DELAY ( mainMAX_TX_DELAY + 20 )
|
||||
|
||||
/* The task priorites. */
|
||||
#define mainLCD_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainCOMMS_RX_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The LED's toggled by the various tasks. */
|
||||
#define mainCOMMS_FAIL_LED ( 7 )
|
||||
#define mainCOMMS_RX_LED ( 6 )
|
||||
#define mainCOMMS_TX_LED ( 5 )
|
||||
|
||||
/* The baud rate used by the UART comms tasks/co-routine. */
|
||||
#define mainBAUD_RATE ( 57600 )
|
||||
|
||||
/* FIFO setting for the UART. The FIFO is not used to create a better test. */
|
||||
#define mainFIFO_SET ( 0x10 )
|
||||
|
||||
/* The string that is transmitted on the UART contains sequentially the
|
||||
characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
|
||||
#define mainFIRST_TX_CHAR '0'
|
||||
#define mainLAST_TX_CHAR 'z'
|
||||
|
||||
/* Just used to walk through the program memory in order that some random data
|
||||
can be generated. */
|
||||
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) )
|
||||
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 )
|
||||
|
||||
/* The error routine that is called if the driver library encounters an error. */
|
||||
#ifdef DEBUG
|
||||
void
|
||||
__error__(char *pcFilename, unsigned long ulLine)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The task that rotates text on the LCD.
|
||||
*/
|
||||
static void vLCDTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The task that receives the characters from UART 0.
|
||||
*/
|
||||
static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
|
||||
|
||||
/*
|
||||
* The co-routine that periodically initiates the transmission of the string on
|
||||
* the UART.
|
||||
*/
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
|
||||
|
||||
/*
|
||||
* Writes a string the the LCD.
|
||||
*/
|
||||
static void prvWriteString( const portCHAR *pcString );
|
||||
|
||||
/*
|
||||
* Initialisation routine for the UART.
|
||||
*/
|
||||
static void vSerialInit( void );
|
||||
|
||||
/*
|
||||
* Thread safe write to the PDC.
|
||||
*/
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData );
|
||||
|
||||
/*
|
||||
* Function to simply set a known value into the general purpose registers
|
||||
* then read them back to ensure they remain set correctly. An incorrect value
|
||||
* being indicative of an error in the task switching mechanism.
|
||||
*/
|
||||
void prvSetAndCheckRegisters( void );
|
||||
|
||||
/*
|
||||
* Latch the LED that indicates that an error has occurred.
|
||||
*/
|
||||
void vSetErrorLED( void );
|
||||
|
||||
/*
|
||||
* Sets up the PLL and ports used by the demo.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Error flag set to pdFAIL if an error is encountered in the tasks/co-routines
|
||||
defined within this file. */
|
||||
unsigned portBASE_TYPE uxErrorStatus = pdPASS;
|
||||
|
||||
/* The next character to transmit. */
|
||||
static portCHAR cNextChar;
|
||||
|
||||
/* The queue used to transmit characters from the interrupt to the Comms Rx
|
||||
task. */
|
||||
static xQueueHandle xCommsQueue;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void Main( void )
|
||||
{
|
||||
/* Create the queue used to communicate between the UART ISR and the Comms
|
||||
Rx task. */
|
||||
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) );
|
||||
|
||||
/* Setup the ports used by the demo and the clock. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Create the co-routines that flash the LED's. */
|
||||
vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );
|
||||
|
||||
/* Create the co-routine that initiates the transmission of characters
|
||||
on the UART. */
|
||||
xCoRoutineCreate( vSerialTxCoRoutine, mainTX_CO_ROUTINE_PRIORITY, mainTX_CO_ROUTINE_INDEX );
|
||||
|
||||
/* Create the co-routine that receives characters from the UART. */
|
||||
xCoRoutineCreate( vCommsRxCoRoutine, mainRX_CO_ROUTINE_PRIORITY, mainRX_CO_ROUTINE_INDEX );
|
||||
|
||||
/* Create the LCD task. */
|
||||
xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler running the tasks and co-routines just created. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should not get here unless we did not have enough memory to start the
|
||||
scheduler. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL. */
|
||||
SysCtlClockSet( SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_6MHZ );
|
||||
|
||||
/* Initialise the hardware used to talk to the LCD, LED's and UART. */
|
||||
PDCInit();
|
||||
vParTestInitialise();
|
||||
vSerialInit();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* The co-routines are executed in the idle task using the idle task
|
||||
hook. */
|
||||
for( ;; )
|
||||
{
|
||||
/* Schedule the co-routines. */
|
||||
vCoRoutineSchedule();
|
||||
|
||||
/* Run the register check function between each co-routine. */
|
||||
prvSetAndCheckRegisters();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvWriteString( const portCHAR *pcString )
|
||||
{
|
||||
/* Write pcString to the LED, pausing between each character. */
|
||||
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
|
||||
while( *pcString )
|
||||
{
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_RAM, *pcString );
|
||||
pcString++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vLCDTask( void * pvParameters )
|
||||
{
|
||||
unsigned portBASE_TYPE uxIndex;
|
||||
const unsigned portCHAR ucCFGData[] = {
|
||||
0x30, /* Set data bus to 8-bits. */
|
||||
0x30,
|
||||
0x30,
|
||||
0x3C, /* Number of lines/font. */
|
||||
0x08, /* Display off. */
|
||||
0x01, /* Display clear. */
|
||||
0x06, /* Entry mode [cursor dir][shift]. */
|
||||
0x0C /* Display on [display on][curson on][blinking on]. */
|
||||
};
|
||||
|
||||
/* The strings that are written to the LCD. */
|
||||
const portCHAR *pcStringsToDisplay[] = {
|
||||
"Stellaris",
|
||||
"Demo",
|
||||
"Two",
|
||||
"www.FreeRTOS.org",
|
||||
""
|
||||
};
|
||||
|
||||
/* Configure the LCD. */
|
||||
uxIndex = 0;
|
||||
while( uxIndex < sizeof( ucCFGData ) )
|
||||
{
|
||||
prvPDCWrite( PDC_LCD_CSR, ucCFGData[ uxIndex ] );
|
||||
uxIndex++;
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
}
|
||||
|
||||
/* Turn the LCD Backlight on. */
|
||||
prvPDCWrite( PDC_CSR, 0x01 );
|
||||
|
||||
/* Clear display. */
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_CSR, LCD_CLEAR );
|
||||
|
||||
uxIndex = 0;
|
||||
for( ;; )
|
||||
{
|
||||
/* Display the string on the LCD. */
|
||||
prvWriteString( pcStringsToDisplay[ uxIndex ] );
|
||||
|
||||
/* Move on to the next string - wrapping if necessary. */
|
||||
uxIndex++;
|
||||
if( *( pcStringsToDisplay[ uxIndex ] ) == 0x00 )
|
||||
{
|
||||
uxIndex = 0;
|
||||
/* Longer pause on the last string to be sent. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY * 2 );
|
||||
}
|
||||
|
||||
/* Wait until it is time to move onto the next string. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
static portCHAR cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;
|
||||
portBASE_TYPE xResult;
|
||||
|
||||
crSTART( xHandle );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Wait for a character to be received. */
|
||||
crQUEUE_RECEIVE( xHandle, xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY, &xResult );
|
||||
|
||||
/* Was the character recived (if any) the expected character. */
|
||||
if( ( cRxedChar != cExpectedChar ) || ( xResult != pdPASS ) )
|
||||
{
|
||||
/* Got an unexpected character. This can sometimes occur when
|
||||
reseting the system using the debugger leaving characters already
|
||||
in the UART regsters. */
|
||||
uxErrorStatus = pdFAIL;
|
||||
|
||||
/* Resync by waiting for the end of the current string. */
|
||||
while( cRxedChar != mainLAST_TX_CHAR )
|
||||
{
|
||||
crQUEUE_RECEIVE( xHandle, xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY, &xResult );
|
||||
}
|
||||
|
||||
/* The next expected character is the start of the string again. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( cExpectedChar == mainLAST_TX_CHAR )
|
||||
{
|
||||
/* We have reached the end of the string - we now expect to
|
||||
receive the first character in the string again. The LED is
|
||||
toggled to indicate that the entire string was received without
|
||||
error. */
|
||||
vParTestToggleLED( mainCOMMS_RX_LED );
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We got the expected character, we now expect to receive the
|
||||
next character in the string. */
|
||||
cExpectedChar++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
crEND();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
portTickType xDelayPeriod;
|
||||
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
|
||||
/* Co-routine MUST start with a call to crSTART. */
|
||||
crSTART( xHandle );
|
||||
|
||||
for(;;)
|
||||
{
|
||||
/* Was the previously transmitted string received correctly? */
|
||||
if( uxErrorStatus != pdPASS )
|
||||
{
|
||||
/* An error was encountered so set the error LED. */
|
||||
vSetErrorLED();
|
||||
}
|
||||
|
||||
/* The next character to Tx is the first in the string. */
|
||||
cNextChar = mainFIRST_TX_CHAR;
|
||||
|
||||
UARTIntDisable( UART0_BASE, UART_INT_TX );
|
||||
{
|
||||
/* Send the first character. */
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
|
||||
/* Move the variable to the char to Tx on so the ISR transmits
|
||||
the next character in the string once this one has completed. */
|
||||
cNextChar++;
|
||||
}
|
||||
UARTIntEnable(UART0_BASE, UART_INT_TX);
|
||||
|
||||
/* Toggle the LED to show a new string is being transmitted. */
|
||||
vParTestToggleLED( mainCOMMS_TX_LED );
|
||||
|
||||
/* Delay before we start the string off again. A pseudo-random delay
|
||||
is used as this will provide a better test. */
|
||||
xDelayPeriod = xTaskGetTickCount() + ( *pulRandomBytes );
|
||||
|
||||
pulRandomBytes++;
|
||||
if( pulRandomBytes > mainTOTAL_PROGRAM_MEMORY )
|
||||
{
|
||||
pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
}
|
||||
|
||||
/* Make sure we don't wait too long... */
|
||||
xDelayPeriod &= mainMAX_TX_DELAY;
|
||||
|
||||
/* ...but we do want to wait. */
|
||||
if( xDelayPeriod < mainMIN_TX_DELAY )
|
||||
{
|
||||
xDelayPeriod = mainMIN_TX_DELAY;
|
||||
}
|
||||
|
||||
/* Block for the random(ish) time. */
|
||||
crDELAY( xHandle, xDelayPeriod );
|
||||
}
|
||||
|
||||
/* Co-routine MUST end with a call to crEND. */
|
||||
crEND();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialInit( void )
|
||||
{
|
||||
/* Enable the UART. GPIOA has already been initialised. */
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
|
||||
|
||||
/* Set GPIO A0 and A1 as peripheral function. They are used to output the
|
||||
UART signals. */
|
||||
GPIODirModeSet( GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1, GPIO_DIR_MODE_HW );
|
||||
|
||||
/* Configure the UART for 8-N-1 operation. */
|
||||
UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
|
||||
|
||||
/* We dont want to use the fifo. This is for test purposes to generate
|
||||
as many interrupts as possible. */
|
||||
HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET;
|
||||
|
||||
/* Enable both Rx and Tx interrupts. */
|
||||
HWREG( UART0_BASE + UART_O_IM ) |= ( UART_INT_TX | UART_INT_RX );
|
||||
IntEnable( INT_UART0 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
|
||||
/* Clear the interrupt. */
|
||||
UARTIntClear( UART0_BASE, ulStatus );
|
||||
|
||||
/* Was an Rx interrpt pending? */
|
||||
if( ulStatus & UART_INT_RX )
|
||||
{
|
||||
if( ( HWREG(UART0_BASE + UART_O_FR ) & UART_FR_RXFF ) )
|
||||
{
|
||||
/* Get the char from the buffer and post it onto the queue of
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
|
||||
/* Was a Tx interrupt pending? */
|
||||
if( ulStatus & UART_INT_TX )
|
||||
{
|
||||
/* Send the next character in the string. We are not using the FIFO. */
|
||||
if( cNextChar <= mainLAST_TX_CHAR )
|
||||
{
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
cNextChar++;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* We are posting to a co-routine rather than a task so don't bother
|
||||
causing a task switch. */
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData )
|
||||
{
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
PDCWrite( cAddress, cData );
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSetErrorLED( void )
|
||||
{
|
||||
vParTestSetLED( mainCOMMS_FAIL_LED, pdTRUE );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void prvSetAndCheckRegisters( void )
|
||||
{
|
||||
/* Fill the general purpose registers with known values. */
|
||||
__asm volatile( " mov r11, #10\n"
|
||||
" add r0, r11, #1\n"
|
||||
" add r1, r11, #2\n"
|
||||
" add r2, r11, #3\n"
|
||||
" add r3, r11, #4\n"
|
||||
" add r4, r11, #5\n"
|
||||
" add r5, r11, #6\n"
|
||||
" add r6, r11, #7\n"
|
||||
" add r7, r11, #8\n"
|
||||
" add r12, r11, #12" );
|
||||
|
||||
/* Check the values are as expected. */
|
||||
__asm volatile( " cmp r11, #10\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r0, #11\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r1, #12\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r2, #13\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r3, #14\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r4, #15\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r5, #16\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r6, #17\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r7, #18\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r12, #22\n"
|
||||
" bne set_error_led\n"
|
||||
" bx lr" );
|
||||
|
||||
__asm volatile( "set_error_led:\n"
|
||||
" push {r14}\n"
|
||||
" ldr r1, =vSetErrorLED\n"
|
||||
" blx r1\n"
|
||||
" pop {r14}\n"
|
||||
" bx lr" );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_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 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 3 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 2 )
|
||||
#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 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 0
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "Task.h"
|
||||
#include "partest.h"
|
||||
|
||||
#include "pdc.h"
|
||||
|
||||
#define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
|
||||
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )
|
||||
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 )
|
||||
|
||||
static volatile unsigned portCHAR ucOutputValue = partstALL_OUTPUTS_OFF;
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
PDCInit();
|
||||
PDCWrite( PDC_LED, ucOutputValue );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( uxLED < partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
|
||||
if( xValue == pdFALSE )
|
||||
{
|
||||
ucBit ^= ( unsigned portCHAR ) 0xff;
|
||||
ucOutputValue &= ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PDCWrite( PDC_LED, ucOutputValue );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( uxLED < partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
|
||||
if( ucOutputValue & ucBit )
|
||||
{
|
||||
ucOutputValue &= ~ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PDCWrite( PDC_LED, ucOutputValue );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
|
||||
@@ -1,325 +0,0 @@
|
||||
//*****************************************************************************
|
||||
//
|
||||
// hw_sysctl.h - Macros used when accessing the system control hardware.
|
||||
//
|
||||
// Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.
|
||||
//
|
||||
// Software License Agreement
|
||||
//
|
||||
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
|
||||
// exclusively on LMI's Stellaris Family of microcontroller products.
|
||||
//
|
||||
// The software is owned by LMI and/or its suppliers, and is protected under
|
||||
// applicable copyright laws. All rights are reserved. Any use in violation
|
||||
// of the foregoing restrictions may subject the user to criminal sanctions
|
||||
// under applicable laws, as well as to civil liability for the breach of the
|
||||
// terms and conditions of this license.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
||||
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
//
|
||||
// This is part of revision 523 of the Stellaris Driver Library.
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
#ifndef __HW_SYSCTL_H__
|
||||
#define __HW_SYSCTL_H__
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the offsets of the system control registers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DID0 0x400fe000 // Device identification register 0
|
||||
#define SYSCTL_DID1 0x400fe004 // Device identification register 1
|
||||
#define SYSCTL_DC0 0x400fe008 // Device capabilities register 0
|
||||
#define SYSCTL_DC1 0x400fe010 // Device capabilities register 1
|
||||
#define SYSCTL_DC2 0x400fe014 // Device capabilities register 2
|
||||
#define SYSCTL_DC3 0x400fe018 // Device capabilities register 3
|
||||
#define SYSCTL_DC4 0x400fe01C // Device capabilities register 4
|
||||
#define SYSCTL_PBORCTL 0x400fe030 // POR/BOR reset control register
|
||||
#define SYSCTL_LDOPCTL 0x400fe034 // LDO power control register
|
||||
#define SYSCTL_SRCR0 0x400fe040 // Software reset control reg 0
|
||||
#define SYSCTL_SRCR1 0x400fe044 // Software reset control reg 1
|
||||
#define SYSCTL_SRCR2 0x400fe048 // Software reset control reg 2
|
||||
#define SYSCTL_RIS 0x400fe050 // Raw interrupt status register
|
||||
#define SYSCTL_IMC 0x400fe054 // Interrupt mask/control register
|
||||
#define SYSCTL_MISC 0x400fe058 // Interrupt status register
|
||||
#define SYSCTL_RESC 0x400fe05c // Reset cause register
|
||||
#define SYSCTL_RCC 0x400fe060 // Run-mode clock config register
|
||||
#define SYSCTL_PLLCFG 0x400fe064 // PLL configuration register
|
||||
#define SYSCTL_RCGC0 0x400fe100 // Run-mode clock gating register 0
|
||||
#define SYSCTL_RCGC1 0x400fe104 // Run-mode clock gating register 1
|
||||
#define SYSCTL_RCGC2 0x400fe108 // Run-mode clock gating register 2
|
||||
#define SYSCTL_SCGC0 0x400fe110 // Sleep-mode clock gating reg 0
|
||||
#define SYSCTL_SCGC1 0x400fe114 // Sleep-mode clock gating reg 1
|
||||
#define SYSCTL_SCGC2 0x400fe118 // Sleep-mode clock gating reg 2
|
||||
#define SYSCTL_DCGC0 0x400fe120 // Deep Sleep-mode clock gate reg 0
|
||||
#define SYSCTL_DCGC1 0x400fe124 // Deep Sleep-mode clock gate reg 1
|
||||
#define SYSCTL_DCGC2 0x400fe128 // Deep Sleep-mode clock gate reg 2
|
||||
#define SYSCTL_CLKVCLR 0x400fe150 // Clock verifcation clear register
|
||||
#define SYSCTL_LDOARST 0x400fe160 // LDO reset control register
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_DID0 register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DID0_MAJ_MASK 0x0000FF00 // Major revision mask
|
||||
#define SYSCTL_DID0_MAJ_A 0x00000000 // Major revision A
|
||||
#define SYSCTL_DID0_MAJ_B 0x00000100 // Major revision B
|
||||
#define SYSCTL_DID0_MIN_MASK 0x000000FF // Minor revision mask
|
||||
#define SYSCTL_DID0_MIN_0 0x00000000 // Minor revision 0
|
||||
#define SYSCTL_DID0_MIN_1 0x00000001 // Minor revision 1
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_DID1 register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DID1_VER_MASK 0xF0000000 // Register version mask
|
||||
#define SYSCTL_DID1_FAM_MASK 0x0F000000 // Family mask
|
||||
#define SYSCTL_DID1_FAM_S 0x00000000 // Stellaris family
|
||||
#define SYSCTL_DID1_PRTNO_MASK 0x00FF0000 // Part number mask
|
||||
#define SYSCTL_DID1_PRTNO_101 0x00010000 // LM3S101
|
||||
#define SYSCTL_DID1_PRTNO_102 0x00020000 // LM3S102
|
||||
#define SYSCTL_DID1_TEMP_MASK 0x000000E0 // Temperature range mask
|
||||
#define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temp range (0..70C)
|
||||
#define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temp range (-40..85C)
|
||||
#define SYSCTL_DID1_PKG_MASK 0x00000018 // Package mask
|
||||
#define SYSCTL_DID1_PKG_28SOIC 0x00000000 // 28-pin SOIC
|
||||
#define SYSCTL_DID1_ROHS 0x00000004 // Part is RoHS compliant
|
||||
#define SYSCTL_DID1_QUAL_MASK 0x00000003 // Qualification status mask
|
||||
#define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering sample (unqualified)
|
||||
#define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot production (unqualified)
|
||||
#define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully qualified
|
||||
#define SYSCTL_DID1_PRTNO_SHIFT 16
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_DC0 register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DC0_SRAMSZ_MASK 0xFFFF0000 // SRAM size mask
|
||||
#define SYSCTL_DC0_SRAMSZ_2KB 0x00070000 // 2kB of SRAM
|
||||
#define SYSCTL_DC0_FLASHSZ_MASK 0x0000FFFF // Flash size mask
|
||||
#define SYSCTL_DC0_FLASHSZ_8KB 0x00000003 // 8kB of flash
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_DC1 register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DC1_SYSDIV_MASK 0x0000F000 // Minimum system divider mask
|
||||
#define SYSCTL_DC1_MPU 0x00000080 // Cortex M3 MPU present
|
||||
#define SYSCTL_DC1_PLL 0x00000010 // PLL present
|
||||
#define SYSCTL_DC1_WDOG 0x00000008 // Watchdog present
|
||||
#define SYSCTL_DC1_SWO 0x00000004 // Serial wire output present
|
||||
#define SYSCTL_DC1_SWD 0x00000002 // Serial wire debug present
|
||||
#define SYSCTL_DC1_JTAG 0x00000001 // JTAG debug present
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_DC2 register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DC2_COMP1 0x02000000 // Analog comparator 1 present
|
||||
#define SYSCTL_DC2_COMP0 0x01000000 // Analog comparator 0 present
|
||||
#define SYSCTL_DC2_TIMER1 0x00020000 // Timer 1 present
|
||||
#define SYSCTL_DC2_TIMER0 0x00010000 // Timer 0 present
|
||||
#define SYSCTL_DC2_I2C 0x00001000 // I2C present
|
||||
#define SYSCTL_DC2_SSI 0x00000010 // SSI present
|
||||
#define SYSCTL_DC2_UART0 0x00000001 // UART 0 present
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_DC3 register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DC3_32KHZ 0x80000000 // 32kHz pin present
|
||||
#define SYSCTL_DC3_CCP1 0x02000000 // CCP1 pin present
|
||||
#define SYSCTL_DC3_CCP0 0x01000000 // CCP0 pin present
|
||||
#define SYSCTL_DC3_C1MINUS 0x00000200 // C1- pin present
|
||||
#define SYSCTL_DC3_C0O 0x00000100 // C0o pin present
|
||||
#define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ pin present
|
||||
#define SYSCTL_DC3_C0MINUS 0x00000040 // C0- pin present
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_DC4 register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_DC4_GPIOC 0x00000004 // GPIO port C present
|
||||
#define SYSCTL_DC4_GPIOB 0x00000002 // GPIO port B present
|
||||
#define SYSCTL_DC4_GPIOA 0x00000001 // GPIO port A present
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_PBORCTL register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_PBORCTL_BOR_MASK 0x0000FFFC // BOR wait timer
|
||||
#define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR interrupt or reset
|
||||
#define SYSCTL_PBORCTL_BORWT 0x00000001 // BOR wait and check for noise
|
||||
#define SYSCTL_PBORCTL_BOR_SH 2
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_LDOPCTL register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_LDOPCTL_MASK 0x0000003F // Voltage adjust mask
|
||||
#define SYSCTL_LDOPCTL_2_25V 0x00000005 // LDO output of 2.25V
|
||||
#define SYSCTL_LDOPCTL_2_30V 0x00000004 // LDO output of 2.30V
|
||||
#define SYSCTL_LDOPCTL_2_35V 0x00000003 // LDO output of 2.35V
|
||||
#define SYSCTL_LDOPCTL_2_40V 0x00000002 // LDO output of 2.40V
|
||||
#define SYSCTL_LDOPCTL_2_45V 0x00000001 // LDO output of 2.45V
|
||||
#define SYSCTL_LDOPCTL_2_50V 0x00000000 // LDO output of 2.50V
|
||||
#define SYSCTL_LDOPCTL_2_55V 0x0000001F // LDO output of 2.55V
|
||||
#define SYSCTL_LDOPCTL_2_60V 0x0000001E // LDO output of 2.60V
|
||||
#define SYSCTL_LDOPCTL_2_65V 0x0000001D // LDO output of 2.65V
|
||||
#define SYSCTL_LDOPCTL_2_70V 0x0000001C // LDO output of 2.70V
|
||||
#define SYSCTL_LDOPCTL_2_75V 0x0000001B // LDO output of 2.75V
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_SRCR0, SYSCTL_RCGC0,
|
||||
// SYSCTL_SCGC0, and SYSCTL_DCGC0 registers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_SET0_WDOG 0x00000008 // Watchdog module
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_SRCR1, SYSCTL_RCGC1,
|
||||
// SYSCTL_SCGC1, and SYSCTL_DCGC1 registers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_SET1_COMP1 0x02000000 // Analog comparator module 1
|
||||
#define SYSCTL_SET1_COMP0 0x01000000 // Analog comparator module 0
|
||||
#define SYSCTL_SET1_TIMER1 0x00020000 // Timer module 1
|
||||
#define SYSCTL_SET1_TIMER0 0x00010000 // Timer module 0
|
||||
#define SYSCTL_SET1_I2C 0x00001000 // I2C module
|
||||
#define SYSCTL_SET1_SSI 0x00000010 // SSI module
|
||||
#define SYSCTL_SET1_UART0 0x00000001 // UART module 0
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_SRCR2, SYSCTL_RCGC2,
|
||||
// SYSCTL_SCGC2, and SYSCTL_DCGC2 registers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_SET2_GPIOC 0x00000004 // GPIO C module
|
||||
#define SYSCTL_SET2_GPIOB 0x00000002 // GPIO B module
|
||||
#define SYSCTL_SET2_GPIOA 0x00000001 // GIPO A module
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_RIS, SYSCTL_IMC, and
|
||||
// SYSCTL_IMS registers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_INT_PLL_LOCK 0x00000040 // PLL lock interrupt
|
||||
#define SYSCTL_INT_CUR_LIMIT 0x00000020 // Current limit interrupt
|
||||
#define SYSCTL_INT_BOSC_FAIL 0x00000010 // Boot oscillator failure int
|
||||
#define SYSCTL_INT_MOSC_FAIL 0x00000008 // Main oscillator failure int
|
||||
#define SYSCTL_INT_POR 0x00000004 // Power on reset interrupt
|
||||
#define SYSCTL_INT_BOR 0x00000002 // Brown out interrupt
|
||||
#define SYSCTL_INT_PLL_FAIL 0x00000001 // PLL failure interrupt
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_RESC register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_RESC_LDO 0x00000020 // LDO power OK lost reset
|
||||
#define SYSCTL_RESC_SW 0x00000010 // Software reset
|
||||
#define SYSCTL_RESC_WDOG 0x00000008 // Watchdog reset
|
||||
#define SYSCTL_RESC_BOR 0x00000004 // Brown-out reset
|
||||
#define SYSCTL_RESC_POR 0x00000002 // Power on reset
|
||||
#define SYSCTL_RESC_EXT 0x00000001 // External reset
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_RCC register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_RCC_ACG 0x08000000 // Automatic clock gating
|
||||
#define SYSCTL_RCC_SYSDIV_MASK 0x07800000 // System clock divider
|
||||
#define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2
|
||||
#define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3
|
||||
#define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4
|
||||
#define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5
|
||||
#define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6
|
||||
#define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7
|
||||
#define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8
|
||||
#define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9
|
||||
#define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10
|
||||
#define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11
|
||||
#define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12
|
||||
#define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13
|
||||
#define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14
|
||||
#define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15
|
||||
#define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16
|
||||
#define SYSCTL_RCC_USE_SYSDIV 0x00400000 // Use sytem clock divider
|
||||
#define SYSCTL_RCC_PWRDN 0x00002000 // PLL power down
|
||||
#define SYSCTL_RCC_OE 0x00001000 // PLL output enable
|
||||
#define SYSCTL_RCC_BYPASS 0x00000800 // PLL bypass
|
||||
#define SYSCTL_RCC_PLLVER 0x00000400 // PLL verification timer enable
|
||||
#define SYSCTL_RCC_XTAL_MASK 0x000003C0 // Crystal attached to main osc
|
||||
#define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // Using a 3.579545MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_3_68MHz 0x00000140 // Using a 3.6864MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_4MHz 0x00000180 // Using a 4MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // Using a 4.096MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // Using a 4.9152MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // Using a 5MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // Using a 5.12MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // Using a 6MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // Using a 6.144MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // Using a 7.3728MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // Using a 8MHz crystal
|
||||
#define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // Using a 8.192MHz crystal
|
||||
#define SYSCTL_RCC_OSCSRC_MASK 0x00000030 // Oscillator input select
|
||||
#define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // Use the main oscillator
|
||||
#define SYSCTL_RCC_OSCSRC_BOOT 0x00000010 // Use the boot oscillator
|
||||
#define SYSCTL_RCC_OSCSRC_BOOT4 0x00000020 // Use the boot oscillator / 4
|
||||
#define SYSCTL_RCC_BOSCVER 0x00000008 // Boot osc. verification timer en
|
||||
#define SYSCTL_RCC_MOSCVER 0x00000004 // Main osc. verification timer en
|
||||
#define SYSCTL_RCC_BOSCDIS 0x00000002 // Boot oscillator disable
|
||||
#define SYSCTL_RCC_MOSCDIS 0x00000001 // Main oscillator disable
|
||||
#define SYSCTL_RCC_SYSDIV_SHIFT 23 // Shift to the SYSDIV field
|
||||
#define SYSCTL_RCC_XTAL_SHIFT 6 // Shift to the XTAL field
|
||||
#define SYSCTL_RCC_OSCSRC_SHIFT 4 // Shift to the OSCSRC field
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_PLLCFG register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_PLLCFG_OD_MASK 0x0000C000 // Output divider
|
||||
#define SYSCTL_PLLCFG_OD_1 0x00000000 // Output divider is 1
|
||||
#define SYSCTL_PLLCFG_OD_2 0x00004000 // Output divider is 2
|
||||
#define SYSCTL_PLLCFG_OD_4 0x00008000 // Output divider is 4
|
||||
#define SYSCTL_PLLCFG_F_MASK 0x00003FE0 // PLL multiplier
|
||||
#define SYSCTL_PLLCFG_R_MASK 0x0000001F // Input predivider
|
||||
#define SYSCTL_PLLCFG_F_SHIFT 5
|
||||
#define SYSCTL_PLLCFG_R_SHIFT 0
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_CLKVCLR register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_CLKVCLR_CLR 0x00000001 // Clear clock verification fault
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following define the bit fields in the SYSCTL_LDOARST register.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SYSCTL_LDOARST_ARST 0x00000001 // Allow LDO to reset device
|
||||
|
||||
#endif // __HW_SYSCTL_H__
|
||||
@@ -1,174 +0,0 @@
|
||||
//*****************************************************************************
|
||||
//
|
||||
// startup.c - Boot code for Stellaris.
|
||||
//
|
||||
// Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.
|
||||
//
|
||||
// Software License Agreement
|
||||
//
|
||||
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
|
||||
// exclusively on LMI's Stellaris Family of microcontroller products.
|
||||
//
|
||||
// The software is owned by LMI and/or its suppliers, and is protected under
|
||||
// applicable copyright laws. All rights are reserved. Any use in violation
|
||||
// of the foregoing restrictions may subject the user to criminal sanctions
|
||||
// under applicable laws, as well as to civil liability for the breach of the
|
||||
// terms and conditions of this license.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
||||
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Forward declaration of the default fault handlers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
void ResetISR(void);
|
||||
static void NmiSR(void);
|
||||
void FaultISR(void);
|
||||
extern void xPortPendSVHandler(void);
|
||||
extern void xPortSysTickHandler(void);
|
||||
extern void vUART_ISR( void );
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The entry point for the application.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void entry(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Reserve space for the system stack.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#ifndef STACK_SIZE
|
||||
#define STACK_SIZE 51
|
||||
#endif
|
||||
static unsigned long pulMainStack[STACK_SIZE];
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The minimal vector table for a Cortex M3. Note that the proper constructs
|
||||
// must be placed on this to ensure that it ends up at physical address
|
||||
// 0x0000.0000.
|
||||
//
|
||||
//*****************************************************************************
|
||||
__attribute__ ((section("vectors")))
|
||||
void (* const g_pfnVectors[])(void) =
|
||||
{
|
||||
(void (*)(void))((unsigned long)pulMainStack + sizeof(pulMainStack)),
|
||||
ResetISR,
|
||||
NmiSR,
|
||||
FaultISR, //FAULT
|
||||
0, // The MPU fault handler
|
||||
0, // The bus fault handler
|
||||
0, // The usage fault handler
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // Reserved
|
||||
0, // SVCall handler
|
||||
0, // Debug monitor handler
|
||||
0, // Reserved
|
||||
xPortPendSVHandler, // The PendSV handler
|
||||
xPortSysTickHandler, // The SysTick handler
|
||||
0, // GPIO Port A
|
||||
0, // GPIO Port B
|
||||
0, // GPIO Port C
|
||||
0, // GPIO Port D
|
||||
0, // GPIO Port E
|
||||
vUART_ISR // UART0 Rx and Tx
|
||||
};
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The following are constructs created by the linker, indicating where the
|
||||
// the "data" and "bss" segments reside in memory. The initializers for the
|
||||
// for the "data" segment resides immediately following the "text" segment.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern unsigned long _etext;
|
||||
extern unsigned long _data;
|
||||
extern unsigned long _edata;
|
||||
extern unsigned long _bss;
|
||||
extern unsigned long _ebss;
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// This is the code that gets called when the processor first starts execution
|
||||
// following a reset event. Only the absolutely necessary set is performed,
|
||||
// after which the application supplied entry() routine is called. Any fancy
|
||||
// actions (such as making decisions based on the reset cause register, and
|
||||
// resetting the bits in that register) are left solely in the hands of the
|
||||
// application.
|
||||
//
|
||||
//*****************************************************************************
|
||||
void
|
||||
ResetISR(void)
|
||||
{
|
||||
unsigned long *pulSrc, *pulDest;
|
||||
|
||||
//
|
||||
// Copy the data segment initializers from flash to SRAM.
|
||||
//
|
||||
pulSrc = &_etext;
|
||||
for(pulDest = &_data; pulDest < &_edata; )
|
||||
{
|
||||
*pulDest++ = *pulSrc++;
|
||||
}
|
||||
|
||||
//
|
||||
// Zero fill the bss segment.
|
||||
//
|
||||
for(pulDest = &_bss; pulDest < &_ebss; )
|
||||
{
|
||||
*pulDest++ = 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Call the application's entry point.
|
||||
//
|
||||
Main();
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// This is the code that gets called when the processor receives a NMI. This
|
||||
// simply enters an infinite loop, preserving the system state for examination
|
||||
// by a debugger.
|
||||
//
|
||||
//*****************************************************************************
|
||||
static void
|
||||
NmiSR(void)
|
||||
{
|
||||
//
|
||||
// Enter an infinite loop.
|
||||
//
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// This is the code that gets called when the processor receives a fault
|
||||
// interrupt. This simply enters an infinite loop, preserving the system state
|
||||
// for examination by a debugger.
|
||||
//
|
||||
//*****************************************************************************
|
||||
void
|
||||
FaultISR(void)
|
||||
{
|
||||
//
|
||||
// Enter an infinite loop.
|
||||
//
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,604 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* This demo application creates six co-routines and two tasks (three including
|
||||
* the idle task). The co-routines execute as part of the idle task hook.
|
||||
*
|
||||
* Five of the created co-routines are the standard 'co-routine flash'
|
||||
* co-routines contained within the Demo/Common/Minimal/crflash.c file and
|
||||
* documented on the FreeRTOS.org WEB site.
|
||||
*
|
||||
* The 'LCD Task' rotates a string on the LCD, delaying between each character
|
||||
* as necessitated by the slow interface, and delaying between each string just
|
||||
* long enough to enable the text to be read.
|
||||
*
|
||||
* The sixth co-routine and final task control the transmission and reception
|
||||
* of a string to UART 0. The co-routine periodically sends the first
|
||||
* character of the string to the UART, with the UART's TxEnd interrupt being
|
||||
* used to transmit the remaining characters. The UART's RxEnd interrupt
|
||||
* receives the characters and places them on a queue to be processed by the
|
||||
* 'COMs Rx' task. An error is latched should an unexpected character be
|
||||
* received, or any character be received out of sequence.
|
||||
*
|
||||
* A loopback connector is required to ensure that each character transmitted
|
||||
* on the UART is also received on the same UART. For test purposes the UART
|
||||
* FIFO's are not utalised in order to maximise the interrupt overhead. Also
|
||||
* a pseudo random interval is used between the start of each transmission in
|
||||
* order that the resultant interrupts are more randomly distributed and
|
||||
* therefore more likely to highlight any problems.
|
||||
*
|
||||
* The flash co-routines control LED's zero to four. LED five is toggled each
|
||||
* time the string is transmitted on the UART. LED six is toggled each time
|
||||
* the string is CORRECTLY received on the UART. LED seven is latched on should
|
||||
* an error be detected in any task or co-routine.
|
||||
*
|
||||
* In addition the idle task makes repetative calls to
|
||||
* prvSetAndCheckRegisters(). This simply loads the general purpose registers
|
||||
* with a known value, then checks each register to ensure the held value is
|
||||
* still correct. As a low priority task this checking routine is likely to
|
||||
* get repeatedly swapped in and out. A register being found to contain an
|
||||
* incorrect value is therefore indicative of an error in the task switching
|
||||
* mechansim.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "croutine.h"
|
||||
|
||||
/* Demo application include files. */
|
||||
#include "partest.h"
|
||||
#include "crflash.h"
|
||||
|
||||
/* Library include files. */
|
||||
#include "DriverLib.h"
|
||||
|
||||
/* The time to delay between writing each character to the LCD. */
|
||||
#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )
|
||||
|
||||
/* The time to delay between writing each string to the LCD. */
|
||||
#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )
|
||||
|
||||
/* The number of flash co-routines to create. */
|
||||
#define mainNUM_FLASH_CO_ROUTINES ( 5 )
|
||||
|
||||
/* The length of the queue used to pass received characters to the Comms Rx
|
||||
task. */
|
||||
#define mainRX_QUEUE_LEN ( 5 )
|
||||
|
||||
/* The priority of the co-routine used to initiate the transmission of the
|
||||
string on UART 0. */
|
||||
#define mainTX_CO_ROUTINE_PRIORITY ( 1 )
|
||||
|
||||
/* Only one co-routine is created so its index is not important. */
|
||||
#define mainTX_CO_ROUTINE_INDEX ( 0 )
|
||||
|
||||
/* The time between transmissions of the string on UART 0. This is pseudo
|
||||
random in order to generate a bit or randomness to when the interrupts occur.*/
|
||||
#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )
|
||||
#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )
|
||||
#define mainOFFSET_TIME ( ( portTickType ) 3 )
|
||||
|
||||
/* The time the Comms Rx task should wait to receive a character. This should
|
||||
be slightly longer than the time between transmissions. If we do not receive
|
||||
a character after this time then there must be an error in the transmission or
|
||||
the timing of the transmission. */
|
||||
#define mainCOMMS_RX_DELAY ( mainMAX_TX_DELAY + 20 )
|
||||
|
||||
/* The task priorites. */
|
||||
#define mainLCD_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainCOMMS_RX_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The LED's toggled by the various tasks. */
|
||||
#define mainCOMMS_FAIL_LED ( 7 )
|
||||
#define mainCOMMS_RX_LED ( 6 )
|
||||
#define mainCOMMS_TX_LED ( 5 )
|
||||
|
||||
/* The baud rate used by the UART comms tasks/co-routine. */
|
||||
#define mainBAUD_RATE ( 57600 )
|
||||
|
||||
/* FIFO setting for the UART. The FIFO is not used to create a better test. */
|
||||
#define mainFIFO_SET ( 0x10 )
|
||||
|
||||
/* The string that is transmitted on the UART contains sequentially the
|
||||
characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
|
||||
#define mainFIRST_TX_CHAR '0'
|
||||
#define mainLAST_TX_CHAR 'z'
|
||||
|
||||
/* Just used to walk through the program memory in order that some random data
|
||||
can be generated. */
|
||||
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) )
|
||||
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 )
|
||||
|
||||
/* The error routine that is called if the driver library encounters an error. */
|
||||
#ifdef DEBUG
|
||||
void
|
||||
__error__(char *pcFilename, unsigned long ulLine)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The task that rotates text on the LCD.
|
||||
*/
|
||||
static void vLCDTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The task that receives the characters from UART 0.
|
||||
*/
|
||||
static void vCommsRxTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The co-routine that periodically initiates the transmission of the string on
|
||||
* the UART.
|
||||
*/
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
|
||||
|
||||
/*
|
||||
* Writes a string the the LCD.
|
||||
*/
|
||||
static void prvWriteString( const portCHAR *pcString );
|
||||
|
||||
/*
|
||||
* Initialisation routine for the UART.
|
||||
*/
|
||||
static void vSerialInit( void );
|
||||
|
||||
/*
|
||||
* Thread safe write to the PDC.
|
||||
*/
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData );
|
||||
|
||||
/*
|
||||
* Function to simply set a known value into the general purpose registers
|
||||
* then read them back to ensure they remain set correctly. An incorrect value
|
||||
* being indicative of an error in the task switching mechanism.
|
||||
*/
|
||||
void prvSetAndCheckRegisters( void );
|
||||
|
||||
/*
|
||||
* Latch the LED that indicates that an error has occurred.
|
||||
*/
|
||||
void vSetErrorLED( void );
|
||||
|
||||
/*
|
||||
* Sets up the PLL and ports used by the demo.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Error flag set to pdFAIL if an error is encountered in the tasks/co-routines
|
||||
defined within this file. */
|
||||
unsigned portBASE_TYPE uxErrorStatus = pdPASS;
|
||||
|
||||
/* The next character to transmit. */
|
||||
static portCHAR cNextChar;
|
||||
|
||||
/* The queue used to transmit characters from the interrupt to the Comms Rx
|
||||
task. */
|
||||
static xQueueHandle xCommsQueue;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void Main( void )
|
||||
{
|
||||
/* Create the queue used to communicate between the UART ISR and the Comms
|
||||
Rx task. */
|
||||
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) );
|
||||
|
||||
/* Setup the ports used by the demo and the clock. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Create the co-routines that flash the LED's. */
|
||||
vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );
|
||||
|
||||
/* Create the co-routine that initiates the transmission of characters
|
||||
on the UART. */
|
||||
xCoRoutineCreate( vSerialTxCoRoutine, mainTX_CO_ROUTINE_PRIORITY, mainTX_CO_ROUTINE_INDEX );
|
||||
|
||||
/* Create the LCD and Comms Rx tasks. */
|
||||
xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vCommsRxTask, "CMS", configMINIMAL_STACK_SIZE, NULL, mainCOMMS_RX_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler running the tasks and co-routines just created. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should not get here unless we did not have enough memory to start the
|
||||
scheduler. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL. */
|
||||
SysCtlClockSet( SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_6MHZ );
|
||||
|
||||
/* Initialise the hardware used to talk to the LCD, LED's and UART. */
|
||||
PDCInit();
|
||||
vParTestInitialise();
|
||||
vSerialInit();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* The co-routines are executed in the idle task using the idle task
|
||||
hook. */
|
||||
for( ;; )
|
||||
{
|
||||
/* Schedule the co-routines. */
|
||||
vCoRoutineSchedule();
|
||||
|
||||
/* Run the register check function between each co-routine. */
|
||||
prvSetAndCheckRegisters();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvWriteString( const portCHAR *pcString )
|
||||
{
|
||||
/* Write pcString to the LED, pausing between each character. */
|
||||
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
|
||||
while( *pcString )
|
||||
{
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_RAM, *pcString );
|
||||
pcString++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vLCDTask( void * pvParameters )
|
||||
{
|
||||
unsigned portBASE_TYPE uxIndex;
|
||||
const unsigned portCHAR ucCFGData[] = {
|
||||
0x30, /* Set data bus to 8-bits. */
|
||||
0x30,
|
||||
0x30,
|
||||
0x3C, /* Number of lines/font. */
|
||||
0x08, /* Display off. */
|
||||
0x01, /* Display clear. */
|
||||
0x06, /* Entry mode [cursor dir][shift]. */
|
||||
0x0C /* Display on [display on][curson on][blinking on]. */
|
||||
};
|
||||
|
||||
/* The strings that are written to the LCD. */
|
||||
const portCHAR *pcStringsToDisplay[] = {
|
||||
"Stellaris",
|
||||
"Demo",
|
||||
"One",
|
||||
"www.FreeRTOS.org",
|
||||
""
|
||||
};
|
||||
|
||||
/* Configure the LCD. */
|
||||
uxIndex = 0;
|
||||
while( uxIndex < sizeof( ucCFGData ) )
|
||||
{
|
||||
prvPDCWrite( PDC_LCD_CSR, ucCFGData[ uxIndex ] );
|
||||
uxIndex++;
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
}
|
||||
|
||||
/* Turn the LCD Backlight on. */
|
||||
prvPDCWrite( PDC_CSR, 0x01 );
|
||||
|
||||
/* Clear display. */
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_CSR, LCD_CLEAR );
|
||||
|
||||
uxIndex = 0;
|
||||
for( ;; )
|
||||
{
|
||||
/* Display the string on the LCD. */
|
||||
prvWriteString( pcStringsToDisplay[ uxIndex ] );
|
||||
|
||||
/* Move on to the next string - wrapping if necessary. */
|
||||
uxIndex++;
|
||||
if( *( pcStringsToDisplay[ uxIndex ] ) == 0x00 )
|
||||
{
|
||||
uxIndex = 0;
|
||||
/* Longer pause on the last string to be sent. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY * 2 );
|
||||
}
|
||||
|
||||
/* Wait until it is time to move onto the next string. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vCommsRxTask( void * pvParameters )
|
||||
{
|
||||
static portCHAR cRxedChar, cExpectedChar;
|
||||
|
||||
/* Set the char we expect to receive to the start of the string. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Wait for a character to be received. */
|
||||
xQueueReceive( xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY );
|
||||
|
||||
/* Was the character recived (if any) the expected character. */
|
||||
if( cRxedChar != cExpectedChar )
|
||||
{
|
||||
/* Got an unexpected character. This can sometimes occur when
|
||||
reseting the system using the debugger leaving characters already
|
||||
in the UART regsters. */
|
||||
uxErrorStatus = pdFAIL;
|
||||
|
||||
/* Resync by waiting for the end of the current string. */
|
||||
while( cRxedChar != mainLAST_TX_CHAR )
|
||||
{
|
||||
while( !xQueueReceive( xCommsQueue, ( void * ) &cRxedChar, portMAX_DELAY ) );
|
||||
}
|
||||
|
||||
/* The next expected character is the start of the string again. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( cExpectedChar == mainLAST_TX_CHAR )
|
||||
{
|
||||
/* We have reached the end of the string - we now expect to
|
||||
receive the first character in the string again. The LED is
|
||||
toggled to indicate that the entire string was received without
|
||||
error. */
|
||||
vParTestToggleLED( mainCOMMS_RX_LED );
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We got the expected character, we now expect to receive the
|
||||
next character in the string. */
|
||||
cExpectedChar++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
portTickType xDelayPeriod;
|
||||
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
|
||||
/* Co-routine MUST start with a call to crSTART. */
|
||||
crSTART( xHandle );
|
||||
|
||||
for(;;)
|
||||
{
|
||||
/* Was the previously transmitted string received correctly? */
|
||||
if( uxErrorStatus != pdPASS )
|
||||
{
|
||||
/* An error was encountered so set the error LED. */
|
||||
vSetErrorLED();
|
||||
}
|
||||
|
||||
/* The next character to Tx is the first in the string. */
|
||||
cNextChar = mainFIRST_TX_CHAR;
|
||||
|
||||
UARTIntDisable( UART0_BASE, UART_INT_TX );
|
||||
{
|
||||
/* Send the first character. */
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
|
||||
/* Move the variable to the char to Tx on so the ISR transmits
|
||||
the next character in the string once this one has completed. */
|
||||
cNextChar++;
|
||||
}
|
||||
UARTIntEnable(UART0_BASE, UART_INT_TX);
|
||||
|
||||
/* Toggle the LED to show a new string is being transmitted. */
|
||||
vParTestToggleLED( mainCOMMS_TX_LED );
|
||||
|
||||
/* Delay before we start the string off again. A pseudo-random delay
|
||||
is used as this will provide a better test. */
|
||||
xDelayPeriod = xTaskGetTickCount() + ( *pulRandomBytes );
|
||||
|
||||
pulRandomBytes++;
|
||||
if( pulRandomBytes > mainTOTAL_PROGRAM_MEMORY )
|
||||
{
|
||||
pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
}
|
||||
|
||||
/* Make sure we don't wait too long... */
|
||||
xDelayPeriod &= mainMAX_TX_DELAY;
|
||||
|
||||
/* ...but we do want to wait. */
|
||||
if( xDelayPeriod < mainMIN_TX_DELAY )
|
||||
{
|
||||
xDelayPeriod = mainMIN_TX_DELAY;
|
||||
}
|
||||
|
||||
/* Block for the random(ish) time. */
|
||||
crDELAY( xHandle, xDelayPeriod );
|
||||
}
|
||||
|
||||
/* Co-routine MUST end with a call to crEND. */
|
||||
crEND();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialInit( void )
|
||||
{
|
||||
/* Enable the UART. GPIOA has already been initialised. */
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
|
||||
|
||||
/* Set GPIO A0 and A1 as peripheral function. They are used to output the
|
||||
UART signals. */
|
||||
GPIODirModeSet( GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1, GPIO_DIR_MODE_HW );
|
||||
|
||||
/* Configure the UART for 8-N-1 operation. */
|
||||
UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
|
||||
|
||||
/* We dont want to use the fifo. This is for test purposes to generate
|
||||
as many interrupts as possible. */
|
||||
HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET;
|
||||
|
||||
/* Enable both Rx and Tx interrupts. */
|
||||
HWREG( UART0_BASE + UART_O_IM ) |= ( UART_INT_TX | UART_INT_RX );
|
||||
IntEnable( INT_UART0 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
|
||||
/* Clear the interrupt. */
|
||||
UARTIntClear( UART0_BASE, ulStatus );
|
||||
|
||||
/* Was an Rx interrpt pending? */
|
||||
if( ulStatus & UART_INT_RX )
|
||||
{
|
||||
if( ( HWREG(UART0_BASE + UART_O_FR ) & UART_FR_RXFF ) )
|
||||
{
|
||||
/* Get the char from the buffer and post it onto the queue of
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
|
||||
/* Was a Tx interrupt pending? */
|
||||
if( ulStatus & UART_INT_TX )
|
||||
{
|
||||
/* Send the next character in the string. We are not using the FIFO. */
|
||||
if( cNextChar <= mainLAST_TX_CHAR )
|
||||
{
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
cNextChar++;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData )
|
||||
{
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
PDCWrite( cAddress, cData );
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSetErrorLED( void )
|
||||
{
|
||||
vParTestSetLED( mainCOMMS_FAIL_LED, pdTRUE );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void prvSetAndCheckRegisters( void )
|
||||
{
|
||||
/* Fill the general purpose registers with known values. */
|
||||
__asm volatile( " mov r11, #10\n"
|
||||
" add r0, r11, #1\n"
|
||||
" add r1, r11, #2\n"
|
||||
" add r2, r11, #3\n"
|
||||
" add r3, r11, #4\n"
|
||||
" add r4, r11, #5\n"
|
||||
" add r5, r11, #6\n"
|
||||
" add r6, r11, #7\n"
|
||||
" add r7, r11, #8\n"
|
||||
" add r8, r11, #9\n"
|
||||
" add r9, r11, #10\n"
|
||||
" add r10, r11, #11\n"
|
||||
" add r12, r11, #12" );
|
||||
|
||||
/* Check the values are as expected. */
|
||||
__asm volatile( " cmp r11, #10\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r0, #11\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r1, #12\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r2, #13\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r3, #14\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r4, #15\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r5, #16\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r6, #17\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r7, #18\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r8, #19\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r9, #20\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r10, #21\n"
|
||||
" bne set_error_led\n"
|
||||
" cmp r12, #22\n"
|
||||
" bne set_error_led\n"
|
||||
" bx lr" );
|
||||
|
||||
__asm volatile( "set_error_led:\n"
|
||||
" push {r14}\n"
|
||||
" ldr r1, =vSetErrorLED\n"
|
||||
" blx r1\n"
|
||||
" pop {r14}\n"
|
||||
" bx lr" );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -1,193 +0,0 @@
|
||||
#******************************************************************************
|
||||
#
|
||||
# makedefs - Definitions common to all makefiles.
|
||||
#
|
||||
# Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.
|
||||
#
|
||||
# Software License Agreement
|
||||
#
|
||||
# Luminary Micro, Inc. (LMI) is supplying this software for use solely and
|
||||
# exclusively on LMI's Stellaris Family of microcontroller products.
|
||||
#
|
||||
# The software is owned by LMI and/or its suppliers, and is protected under
|
||||
# applicable copyright laws. All rights are reserved. Any use in violation
|
||||
# of the foregoing restrictions may subject the user to criminal sanctions
|
||||
# under applicable laws, as well as to civil liability for the breach of the
|
||||
# terms and conditions of this license.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
# OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
# LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
||||
# CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
#
|
||||
#******************************************************************************
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# The compiler to be used.
|
||||
#
|
||||
#******************************************************************************
|
||||
ifndef COMPILER
|
||||
COMPILER=gcc
|
||||
endif
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# The debugger to be used.
|
||||
#
|
||||
#******************************************************************************
|
||||
ifndef DEBUGGER
|
||||
DEBUGGER=gdb
|
||||
endif
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# Definitions for using GCC.
|
||||
#
|
||||
#******************************************************************************
|
||||
ifeq (${COMPILER}, gcc)
|
||||
|
||||
#
|
||||
# The command for calling the compiler.
|
||||
#
|
||||
CC=arm-stellaris-eabi-gcc
|
||||
|
||||
#
|
||||
# The flags passed to the assembler.
|
||||
#
|
||||
AFLAGS=-mthumb \
|
||||
-mcpu=cortex-m3 \
|
||||
-MD
|
||||
|
||||
#
|
||||
# The flags passed to the compiler.
|
||||
#
|
||||
CFLAGS=-mthumb \
|
||||
-mcpu=cortex-m3 \
|
||||
-O2 \
|
||||
-MD
|
||||
|
||||
#
|
||||
# The command for calling the library archiver.
|
||||
#
|
||||
AR=arm-stellaris-eabi-ar
|
||||
|
||||
#
|
||||
# The command for calling the linker.
|
||||
#
|
||||
LD=arm-stellaris-eabi-ld
|
||||
|
||||
#
|
||||
# The flags passed to the linker.
|
||||
#
|
||||
LDFLAGS= -Map gcc/out.map
|
||||
|
||||
#
|
||||
# Get the location of libgcc.a from the GCC front-end.
|
||||
#
|
||||
LIBGCC=${shell ${CC} -mthumb -march=armv6t2 -print-libgcc-file-name}
|
||||
|
||||
#
|
||||
# Get the location of libc.a from the GCC front-end.
|
||||
#
|
||||
LIBC=${shell ${CC} -mthumb -march=armv6t2 -print-file-name=libc.a}
|
||||
|
||||
#
|
||||
# The command for extracting images from the linked executables.
|
||||
#
|
||||
OBJCOPY=arm-stellaris-eabi-objcopy
|
||||
|
||||
endif
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# Tell the compiler to include debugging information if the DEBUG environment
|
||||
# variable is set.
|
||||
#
|
||||
#******************************************************************************
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g
|
||||
endif
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# The rule for building the object file from each C source file.
|
||||
#
|
||||
#******************************************************************************
|
||||
${COMPILER}/%.o: %.c
|
||||
@if [ 'x${VERBOSE}' = x ]; \
|
||||
then \
|
||||
echo " CC ${<}"; \
|
||||
else \
|
||||
echo ${CC} ${CFLAGS} -D${COMPILER} -o ${@} -c ${<}; \
|
||||
fi
|
||||
@${CC} ${CFLAGS} -D${COMPILER} -o ${@} -c ${<}
|
||||
ifeq (${COMPILER}, rvds)
|
||||
@mv -f ${notdir ${@:.o=.d}} ${COMPILER}
|
||||
endif
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# The rule for building the object file from each assembly source file.
|
||||
#
|
||||
#******************************************************************************
|
||||
${COMPILER}/%.o: %.S
|
||||
@if [ 'x${VERBOSE}' = x ]; \
|
||||
then \
|
||||
echo " CC ${<}"; \
|
||||
else \
|
||||
echo ${CC} ${AFLAGS} -D${COMPILER} -o ${@} -c ${<}; \
|
||||
fi
|
||||
ifeq (${COMPILER}, rvds)
|
||||
@${CC} ${AFLAGS} -D${COMPILER} -E ${<} > ${@:.o=_.S}
|
||||
@${CC} ${AFLAGS} -o ${@} -c ${@:.o=_.S}
|
||||
@rm ${@:.o=_.S}
|
||||
@${CC} ${AFLAGS} -D${COMPILER} --md -E ${<}
|
||||
@sed 's,<stdout>,${@},g' ${notdir ${<:.S=.d}} > ${@:.o=.d}
|
||||
@rm ${notdir ${<:.S=.d}}
|
||||
endif
|
||||
ifeq (${COMPILER}, gcc)
|
||||
@${CC} ${AFLAGS} -D${COMPILER} -o ${@} -c ${<}
|
||||
endif
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# The rule for creating an object library.
|
||||
#
|
||||
#******************************************************************************
|
||||
${COMPILER}/%.a:
|
||||
@if [ 'x${VERBOSE}' = x ]; \
|
||||
then \
|
||||
echo " AR ${@}"; \
|
||||
else \
|
||||
echo ${AR} -cr ${@} ${^}; \
|
||||
fi
|
||||
@${AR} -cr ${@} ${^}
|
||||
|
||||
#******************************************************************************
|
||||
#
|
||||
# The rule for linking the application.
|
||||
#
|
||||
#******************************************************************************
|
||||
${COMPILER}/%.axf:
|
||||
@if [ 'x${VERBOSE}' = x ]; \
|
||||
then \
|
||||
echo " LD ${@}"; \
|
||||
fi
|
||||
ifeq (${COMPILER}, gcc)
|
||||
@if [ 'x${VERBOSE}' != x ]; \
|
||||
then \
|
||||
echo ${LD} -T ${SCATTER_${notdir ${@:.axf=}}} \
|
||||
--entry ${ENTRY_${notdir ${@:.axf=}}} \
|
||||
${LDFLAGSgcc_${notdir ${@:.axf=}}} \
|
||||
${LDFLAGS} -o ${@} ${^} \
|
||||
'${LIBC}' '${LIBGCC}'; \
|
||||
fi
|
||||
@${LD} -T ${SCATTER_${notdir ${@:.axf=}}} \
|
||||
--entry ${ENTRY_${notdir ${@:.axf=}}} \
|
||||
${LDFLAGSgcc_${notdir ${@:.axf=}}} \
|
||||
${LDFLAGS} -o ${@} ${^} \
|
||||
'${LIBC}' '${LIBGCC}'
|
||||
@${OBJCOPY} -O binary ${@} ${@:.axf=.bin}
|
||||
endif
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_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 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 3 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 2 )
|
||||
#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 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 0
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,599 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* This demo application creates six co-routines and two tasks (three including
|
||||
* the idle task). The co-routines execute as part of the idle task hook.
|
||||
*
|
||||
* Five of the created co-routines are the standard 'co-routine flash'
|
||||
* co-routines contained within the Demo/Common/Minimal/crflash.c file and
|
||||
* documented on the FreeRTOS.org WEB site.
|
||||
*
|
||||
* The 'LCD Task' rotates a string on the LCD, delaying between each character
|
||||
* as necessitated by the slow interface, and delaying between each string just
|
||||
* long enough to enable the text to be read.
|
||||
*
|
||||
* The sixth co-routine and final task control the transmission and reception
|
||||
* of a string to UART 0. The co-routine periodically sends the first
|
||||
* character of the string to the UART, with the UART's TxEnd interrupt being
|
||||
* used to transmit the remaining characters. The UART's RxEnd interrupt
|
||||
* receives the characters and places them on a queue to be processed by the
|
||||
* 'COMs Rx' task. An error is latched should an unexpected character be
|
||||
* received, or any character be received out of sequence.
|
||||
*
|
||||
* A loopback connector is required to ensure that each character transmitted
|
||||
* on the UART is also received on the same UART. For test purposes the UART
|
||||
* FIFO's are not utalised in order to maximise the interrupt overhead. Also
|
||||
* a pseudo random interval is used between the start of each transmission in
|
||||
* order that the resultant interrupts are more randomly distributed and
|
||||
* therefore more likely to highlight any problems.
|
||||
*
|
||||
* The flash co-routines control LED's zero to four. LED five is toggled each
|
||||
* time the string is transmitted on the UART. LED six is toggled each time
|
||||
* the string is CORRECTLY received on the UART. LED seven is latched on should
|
||||
* an error be detected in any task or co-routine.
|
||||
*
|
||||
* In addition the idle task makes repetative calls to
|
||||
* prvSetAndCheckRegisters(). This simply loads the general purpose registers
|
||||
* with a known value, then checks each register to ensure the held value is
|
||||
* still correct. As a low priority task this checking routine is likely to
|
||||
* get repeatedly swapped in and out. A register being found to contain an
|
||||
* incorrect value is therefore indicative of an error in the task switching
|
||||
* mechansim.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "croutine.h"
|
||||
|
||||
/* Demo application include files. */
|
||||
#include "partest.h"
|
||||
#include "crflash.h"
|
||||
|
||||
/* Library include files. */
|
||||
#include "LM3Sxxx.h"
|
||||
#include "pdc.h"
|
||||
|
||||
/* The time to delay between writing each character to the LCD. */
|
||||
#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )
|
||||
|
||||
/* The time to delay between writing each string to the LCD. */
|
||||
#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )
|
||||
|
||||
/* The number of flash co-routines to create. */
|
||||
#define mainNUM_FLASH_CO_ROUTINES ( 5 )
|
||||
|
||||
/* The length of the queue used to pass received characters to the Comms Rx
|
||||
task. */
|
||||
#define mainRX_QUEUE_LEN ( 5 )
|
||||
|
||||
/* The priority of the co-routine used to initiate the transmission of the
|
||||
string on UART 0. */
|
||||
#define mainTX_CO_ROUTINE_PRIORITY ( 1 )
|
||||
|
||||
/* Only one co-routine is created so its index is not important. */
|
||||
#define mainTX_CO_ROUTINE_INDEX ( 0 )
|
||||
|
||||
/* The time between transmissions of the string on UART 0. This is pseudo
|
||||
random in order to generate a bit or randomness to when the interrupts occur.*/
|
||||
#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )
|
||||
#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )
|
||||
#define mainOFFSET_TIME ( ( portTickType ) 3 )
|
||||
|
||||
/* The time the Comms Rx task should wait to receive a character. This should
|
||||
be slightly longer than the time between transmissions. If we do not receive
|
||||
a character after this time then there must be an error in the transmission or
|
||||
the timing of the transmission. */
|
||||
#define mainCOMMS_RX_DELAY ( mainMAX_TX_DELAY + 20 )
|
||||
|
||||
/* The task priorites. */
|
||||
#define mainLCD_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainCOMMS_RX_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The LED's toggled by the various tasks. */
|
||||
#define mainCOMMS_FAIL_LED ( 7 )
|
||||
#define mainCOMMS_RX_LED ( 6 )
|
||||
#define mainCOMMS_TX_LED ( 5 )
|
||||
|
||||
/* The baud rate used by the UART comms tasks/co-routine. */
|
||||
#define mainBAUD_RATE ( 57600 )
|
||||
|
||||
/* FIFO setting for the UART. The FIFO is not used to create a better test. */
|
||||
#define mainFIFO_SET ( 0x10 )
|
||||
|
||||
/* The string that is transmitted on the UART contains sequentially the
|
||||
characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
|
||||
#define mainFIRST_TX_CHAR '0'
|
||||
#define mainLAST_TX_CHAR 'z'
|
||||
|
||||
/* Just used to walk through the program memory in order that some random data
|
||||
can be generated. */
|
||||
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) )
|
||||
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The task that rotates text on the LCD.
|
||||
*/
|
||||
static void vLCDTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The task that receives the characters from UART 0.
|
||||
*/
|
||||
static void vCommsRxTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The co-routine that periodically initiates the transmission of the string on
|
||||
* the UART.
|
||||
*/
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
|
||||
|
||||
/*
|
||||
* Writes a string the the LCD.
|
||||
*/
|
||||
static void prvWriteString( const portCHAR *pcString );
|
||||
|
||||
/*
|
||||
* Initialisation routine for the UART.
|
||||
*/
|
||||
static void vSerialInit( void );
|
||||
|
||||
/*
|
||||
* Thread safe write to the PDC.
|
||||
*/
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData );
|
||||
|
||||
/*
|
||||
* Function to simply set a known value into the general purpose registers
|
||||
* then read them back to ensure they remain set correctly. An incorrect value
|
||||
* being indicative of an error in the task switching mechanism.
|
||||
*/
|
||||
void prvSetAndCheckRegisters( void );
|
||||
|
||||
/*
|
||||
* Latch the LED that indicates that an error has occurred.
|
||||
*/
|
||||
void vSetErrorLED( void );
|
||||
|
||||
/*
|
||||
* Sets up the PLL and ports used by the demo.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Error flag set to pdFAIL if an error is encountered in the tasks/co-routines
|
||||
defined within this file. */
|
||||
unsigned portBASE_TYPE uxErrorStatus = pdPASS;
|
||||
|
||||
/* The next character to transmit. */
|
||||
static portCHAR cNextChar;
|
||||
|
||||
/* The queue used to transmit characters from the interrupt to the Comms Rx
|
||||
task. */
|
||||
static xQueueHandle xCommsQueue;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int main( void )
|
||||
{
|
||||
/* Create the queue used to communicate between the UART ISR and the Comms
|
||||
Rx task. */
|
||||
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) );
|
||||
|
||||
/* Setup the ports used by the demo and the clock. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Create the co-routines that flash the LED's. */
|
||||
vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );
|
||||
|
||||
/* Create the co-routine that initiates the transmission of characters
|
||||
on the UART. */
|
||||
xCoRoutineCreate( vSerialTxCoRoutine, mainTX_CO_ROUTINE_PRIORITY, mainTX_CO_ROUTINE_INDEX );
|
||||
|
||||
/* Create the LCD and Comms Rx tasks. */
|
||||
xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vCommsRxTask, "CMS", configMINIMAL_STACK_SIZE, NULL, mainCOMMS_RX_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler running the tasks and co-routines just created. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should not get here unless we did not have enough memory to start the
|
||||
scheduler. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL. */
|
||||
SysCtlClockSet( SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_6MHZ );
|
||||
|
||||
/* Initialise the hardware used to talk to the LCD, LED's and UART. */
|
||||
PDCInit();
|
||||
vParTestInitialise();
|
||||
vSerialInit();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* The co-routines are executed in the idle task using the idle task
|
||||
hook. */
|
||||
for( ;; )
|
||||
{
|
||||
/* Schedule the co-routines. */
|
||||
vCoRoutineSchedule();
|
||||
|
||||
/* Run the register check function between each co-routine. */
|
||||
prvSetAndCheckRegisters();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvWriteString( const portCHAR *pcString )
|
||||
{
|
||||
/* Write pcString to the LED, pausing between each character. */
|
||||
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
|
||||
while( *pcString )
|
||||
{
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_RAM, *pcString );
|
||||
pcString++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vLCDTask( void * pvParameters )
|
||||
{
|
||||
unsigned portBASE_TYPE uxIndex;
|
||||
const unsigned portCHAR ucCFGData[] = {
|
||||
0x30, /* Set data bus to 8-bits. */
|
||||
0x30,
|
||||
0x30,
|
||||
0x3C, /* Number of lines/font. */
|
||||
0x08, /* Display off. */
|
||||
0x01, /* Display clear. */
|
||||
0x06, /* Entry mode [cursor dir][shift]. */
|
||||
0x0C /* Display on [display on][curson on][blinking on]. */
|
||||
};
|
||||
|
||||
/* The strings that are written to the LCD. */
|
||||
const portCHAR *pcStringsToDisplay[] = {
|
||||
"Stellaris",
|
||||
"Demo",
|
||||
"One",
|
||||
"www.FreeRTOS.org",
|
||||
""
|
||||
};
|
||||
|
||||
/* Configure the LCD. */
|
||||
uxIndex = 0;
|
||||
while( uxIndex < sizeof( ucCFGData ) )
|
||||
{
|
||||
prvPDCWrite( PDC_LCD_CSR, ucCFGData[ uxIndex ] );
|
||||
uxIndex++;
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
}
|
||||
|
||||
/* Turn the LCD Backlight on. */
|
||||
prvPDCWrite( PDC_CSR, 0x01 );
|
||||
|
||||
/* Clear display. */
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_CSR, LCD_CLEAR );
|
||||
|
||||
uxIndex = 0;
|
||||
for( ;; )
|
||||
{
|
||||
/* Display the string on the LCD. */
|
||||
prvWriteString( pcStringsToDisplay[ uxIndex ] );
|
||||
|
||||
/* Move on to the next string - wrapping if necessary. */
|
||||
uxIndex++;
|
||||
if( *( pcStringsToDisplay[ uxIndex ] ) == 0x00 )
|
||||
{
|
||||
uxIndex = 0;
|
||||
/* Longer pause on the last string to be sent. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY * 2 );
|
||||
}
|
||||
|
||||
/* Wait until it is time to move onto the next string. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vCommsRxTask( void * pvParameters )
|
||||
{
|
||||
static portCHAR cRxedChar, cExpectedChar;
|
||||
|
||||
/* Set the char we expect to receive to the start of the string. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Wait for a character to be received. */
|
||||
xQueueReceive( xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY );
|
||||
|
||||
/* Was the character recived (if any) the expected character. */
|
||||
if( cRxedChar != cExpectedChar )
|
||||
{
|
||||
/* Got an unexpected character. This can sometimes occur when
|
||||
reseting the system using the debugger leaving characters already
|
||||
in the UART regsters. */
|
||||
uxErrorStatus = pdFAIL;
|
||||
|
||||
/* Resync by waiting for the end of the current string. */
|
||||
while( cRxedChar != mainLAST_TX_CHAR )
|
||||
{
|
||||
while( !xQueueReceive( xCommsQueue, ( void * ) &cRxedChar, portMAX_DELAY ) );
|
||||
}
|
||||
|
||||
/* The next expected character is the start of the string again. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( cExpectedChar == mainLAST_TX_CHAR )
|
||||
{
|
||||
/* We have reached the end of the string - we now expect to
|
||||
receive the first character in the string again. The LED is
|
||||
toggled to indicate that the entire string was received without
|
||||
error. */
|
||||
vParTestToggleLED( mainCOMMS_RX_LED );
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We got the expected character, we now expect to receive the
|
||||
next character in the string. */
|
||||
cExpectedChar++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
portTickType xDelayPeriod;
|
||||
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
|
||||
/* Co-routine MUST start with a call to crSTART. */
|
||||
crSTART( xHandle );
|
||||
|
||||
for(;;)
|
||||
{
|
||||
/* Was the previously transmitted string received correctly? */
|
||||
if( uxErrorStatus != pdPASS )
|
||||
{
|
||||
/* An error was encountered so set the error LED. */
|
||||
vSetErrorLED();
|
||||
}
|
||||
|
||||
/* The next character to Tx is the first in the string. */
|
||||
cNextChar = mainFIRST_TX_CHAR;
|
||||
|
||||
UARTIntDisable( UART0_BASE, UART_INT_TX );
|
||||
{
|
||||
/* Send the first character. */
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
|
||||
/* Move the variable to the char to Tx on so the ISR transmits
|
||||
the next character in the string once this one has completed. */
|
||||
cNextChar++;
|
||||
}
|
||||
UARTIntEnable(UART0_BASE, UART_INT_TX);
|
||||
|
||||
/* Toggle the LED to show a new string is being transmitted. */
|
||||
vParTestToggleLED( mainCOMMS_TX_LED );
|
||||
|
||||
/* Delay before we start the string off again. A pseudo-random delay
|
||||
is used as this will provide a better test. */
|
||||
xDelayPeriod = xTaskGetTickCount() + ( *pulRandomBytes );
|
||||
|
||||
pulRandomBytes++;
|
||||
if( pulRandomBytes > mainTOTAL_PROGRAM_MEMORY )
|
||||
{
|
||||
pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
}
|
||||
|
||||
/* Make sure we don't wait too long... */
|
||||
xDelayPeriod &= mainMAX_TX_DELAY;
|
||||
|
||||
/* ...but we do want to wait. */
|
||||
if( xDelayPeriod < mainMIN_TX_DELAY )
|
||||
{
|
||||
xDelayPeriod = mainMIN_TX_DELAY;
|
||||
}
|
||||
|
||||
/* Block for the random(ish) time. */
|
||||
crDELAY( xHandle, xDelayPeriod );
|
||||
}
|
||||
|
||||
/* Co-routine MUST end with a call to crEND. */
|
||||
crEND();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialInit( void )
|
||||
{
|
||||
/* Enable the UART. GPIOA has already been initialised. */
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
|
||||
|
||||
/* Set GPIO A0 and A1 as peripheral function. They are used to output the
|
||||
UART signals. */
|
||||
GPIODirModeSet( GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1, GPIO_DIR_MODE_HW );
|
||||
|
||||
/* Configure the UART for 8-N-1 operation. */
|
||||
UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
|
||||
|
||||
/* We dont want to use the fifo. This is for test purposes to generate
|
||||
as many interrupts as possible. */
|
||||
HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET;
|
||||
|
||||
/* Enable both Rx and Tx interrupts. */
|
||||
HWREG( UART0_BASE + UART_O_IM ) |= ( UART_INT_TX | UART_INT_RX );
|
||||
IntEnable( INT_UART0 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
|
||||
/* Clear the interrupt. */
|
||||
UARTIntClear( UART0_BASE, ulStatus );
|
||||
|
||||
/* Was an Rx interrpt pending? */
|
||||
if( ulStatus & UART_INT_RX )
|
||||
{
|
||||
if( ( HWREG(UART0_BASE + UART_O_FR ) & UART_FR_RXFF ) )
|
||||
{
|
||||
/* Get the char from the buffer and post it onto the queue of
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
|
||||
/* Was a Tx interrupt pending? */
|
||||
if( ulStatus & UART_INT_TX )
|
||||
{
|
||||
/* Send the next character in the string. We are not using the FIFO. */
|
||||
if( cNextChar <= mainLAST_TX_CHAR )
|
||||
{
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
cNextChar++;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData )
|
||||
{
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
PDCWrite( cAddress, cData );
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSetErrorLED( void )
|
||||
{
|
||||
vParTestSetLED( mainCOMMS_FAIL_LED, pdTRUE );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
__asm void prvSetAndCheckRegisters( void )
|
||||
{
|
||||
extern vSetErrorLED
|
||||
|
||||
/* Fill the general purpose registers with known values. */
|
||||
mov r11, #10
|
||||
add r0, r11, #1
|
||||
add r1, r11, #2
|
||||
add r2, r11, #3
|
||||
add r3, r11, #4
|
||||
add r4, r11, #5
|
||||
add r5, r11, #6
|
||||
add r6, r11, #7
|
||||
add r7, r11, #8
|
||||
add r8, r11, #9
|
||||
add r9, r11, #10
|
||||
add r10, r11, #11
|
||||
add r12, r11, #12
|
||||
|
||||
/* Check the values are as expected. */
|
||||
cmp r11, #10
|
||||
bne set_error_led
|
||||
cmp r0, #11
|
||||
bne set_error_led
|
||||
cmp r1, #12
|
||||
bne set_error_led
|
||||
cmp r2, #13
|
||||
bne set_error_led
|
||||
cmp r3, #14
|
||||
bne set_error_led
|
||||
cmp r4, #15
|
||||
bne set_error_led
|
||||
cmp r5, #16
|
||||
bne set_error_led
|
||||
cmp r6, #17
|
||||
bne set_error_led
|
||||
cmp r7, #18
|
||||
bne set_error_led
|
||||
cmp r8, #19
|
||||
bne set_error_led
|
||||
cmp r9, #20
|
||||
bne set_error_led
|
||||
cmp r10, #21
|
||||
bne set_error_led
|
||||
cmp r12, #22
|
||||
bne set_error_led
|
||||
bx lr
|
||||
|
||||
set_error_led;
|
||||
push {r14}
|
||||
ldr r1, =vSetErrorLED
|
||||
blx r1
|
||||
pop {r14}
|
||||
bx lr;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -1,3 +0,0 @@
|
||||
Move these two fines into the Demo/CORTEX_LM3S102_KEIL directory to run Demo 1.
|
||||
|
||||
See the port documentation on the www.FreeRTOS.org site for more information.
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_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 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1240 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 3 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 2 )
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 3 )
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
|
||||
#define INCLUDE_vTaskPrioritySet 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 0
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,604 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* This demo application creates seven co-routines and one task (two including
|
||||
* the idle task). The co-routines execute as part of the idle task hook.
|
||||
*
|
||||
* Five of the created co-routines are the standard 'co-routine flash'
|
||||
* co-routines contained within the Demo/Common/Minimal/crflash.c file and
|
||||
* documented on the FreeRTOS.org WEB site.
|
||||
*
|
||||
* The 'LCD Task' rotates a string on the LCD, delaying between each character
|
||||
* as necessitated by the slow interface, and delaying between each string just
|
||||
* long enough to enable the text to be read.
|
||||
*
|
||||
* The sixth co-routine controls the transmission of a string to UART 0. The
|
||||
* co-routine periodically sends the first character of the string to the UART,
|
||||
* with the UART's TxEnd interrupt being used to transmit the remaining
|
||||
* characters. The UART's RxEnd interrupt receives the characters and places
|
||||
* them on a queue to be processed by the seventh and final co-routine. An
|
||||
* error is latched should an unexpected character be received, or any
|
||||
* character be received out of sequence.
|
||||
*
|
||||
* A loopback connector is required to ensure that each character transmitted
|
||||
* on the UART is also received on the same UART. For test purposes the UART
|
||||
* FIFO's are not utalised in order to maximise the interrupt overhead. Also
|
||||
* a pseudo random interval is used between the start of each transmission in
|
||||
* order that the resultant interrupts are more randomly distributed and
|
||||
* therefore more likely to highlight any problems.
|
||||
*
|
||||
* The flash co-routines control LED's zero to four. LED five is toggled each
|
||||
* time the string is transmitted on the UART. LED six is toggled each time
|
||||
* the string is CORRECTLY received on the UART. LED seven is latched on should
|
||||
* an error be detected in any task or co-routine.
|
||||
*
|
||||
* In addition the idle task makes repetative calls to
|
||||
* prvSetAndCheckRegisters(). This simply loads the general purpose registers
|
||||
* with a known value, then checks each register to ensure the held value is
|
||||
* still correct. As a low priority task this checking routine is likely to
|
||||
* get repeatedly swapped in and out. A register being found to contain an
|
||||
* incorrect value is therefore indicative of an error in the task switching
|
||||
* mechansim.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Scheduler include files. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "queue.h"
|
||||
#include "croutine.h"
|
||||
|
||||
/* Demo application include files. */
|
||||
#include "partest.h"
|
||||
#include "crflash.h"
|
||||
|
||||
/* Library include files. */
|
||||
#include "LM3Sxxx.h"
|
||||
#include "pdc.h"
|
||||
|
||||
/* The time to delay between writing each character to the LCD. */
|
||||
#define mainCHAR_WRITE_DELAY ( 2 / portTICK_RATE_MS )
|
||||
|
||||
/* The time to delay between writing each string to the LCD. */
|
||||
#define mainSTRING_WRITE_DELAY ( 400 / portTICK_RATE_MS )
|
||||
|
||||
/* The number of flash co-routines to create. */
|
||||
#define mainNUM_FLASH_CO_ROUTINES ( 5 )
|
||||
|
||||
/* The length of the queue used to pass received characters to the Comms Rx
|
||||
task. */
|
||||
#define mainRX_QUEUE_LEN ( 5 )
|
||||
|
||||
/* The priority of the co-routine used to initiate the transmission of the
|
||||
string on UART 0. */
|
||||
#define mainTX_CO_ROUTINE_PRIORITY ( 1 )
|
||||
|
||||
/* The priority of the co-routine used to receive characters from the UART. */
|
||||
#define mainRX_CO_ROUTINE_PRIORITY ( 2 )
|
||||
|
||||
/* Only one co-routine is created so its index is not important. */
|
||||
#define mainTX_CO_ROUTINE_INDEX ( 0 )
|
||||
#define mainRX_CO_ROUTINE_INDEX ( 0 )
|
||||
|
||||
/* The time between transmissions of the string on UART 0. This is pseudo
|
||||
random in order to generate a bit or randomness to when the interrupts occur.*/
|
||||
#define mainMIN_TX_DELAY ( 40 / portTICK_RATE_MS )
|
||||
#define mainMAX_TX_DELAY ( ( portTickType ) 0x7f )
|
||||
#define mainOFFSET_TIME ( ( portTickType ) 3 )
|
||||
|
||||
/* The time the Comms Rx task should wait to receive a character. This should
|
||||
be slightly longer than the time between transmissions. If we do not receive
|
||||
a character after this time then there must be an error in the transmission or
|
||||
the timing of the transmission. */
|
||||
#define mainCOMMS_RX_DELAY ( mainMAX_TX_DELAY + 20 )
|
||||
|
||||
/* The task priorites. */
|
||||
#define mainLCD_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||
#define mainCOMMS_RX_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* The LED's toggled by the various tasks. */
|
||||
#define mainCOMMS_FAIL_LED ( 7 )
|
||||
#define mainCOMMS_RX_LED ( 6 )
|
||||
#define mainCOMMS_TX_LED ( 5 )
|
||||
|
||||
/* The baud rate used by the UART comms tasks/co-routine. */
|
||||
#define mainBAUD_RATE ( 57600 )
|
||||
|
||||
/* FIFO setting for the UART. The FIFO is not used to create a better test. */
|
||||
#define mainFIFO_SET ( 0x10 )
|
||||
|
||||
/* The string that is transmitted on the UART contains sequentially the
|
||||
characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
|
||||
#define mainFIRST_TX_CHAR '0'
|
||||
#define mainLAST_TX_CHAR 'z'
|
||||
|
||||
/* Just used to walk through the program memory in order that some random data
|
||||
can be generated. */
|
||||
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) )
|
||||
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* The task that rotates text on the LCD.
|
||||
*/
|
||||
static void vLCDTask( void * pvParameters );
|
||||
|
||||
/*
|
||||
* The task that receives the characters from UART 0.
|
||||
*/
|
||||
static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
|
||||
|
||||
/*
|
||||
* The co-routine that periodically initiates the transmission of the string on
|
||||
* the UART.
|
||||
*/
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
|
||||
|
||||
/*
|
||||
* Writes a string the the LCD.
|
||||
*/
|
||||
static void prvWriteString( const portCHAR *pcString );
|
||||
|
||||
/*
|
||||
* Initialisation routine for the UART.
|
||||
*/
|
||||
static void vSerialInit( void );
|
||||
|
||||
/*
|
||||
* Thread safe write to the PDC.
|
||||
*/
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData );
|
||||
|
||||
/*
|
||||
* Function to simply set a known value into the general purpose registers
|
||||
* then read them back to ensure they remain set correctly. An incorrect value
|
||||
* being indicative of an error in the task switching mechanism.
|
||||
*/
|
||||
void prvSetAndCheckRegisters( void );
|
||||
|
||||
/*
|
||||
* Latch the LED that indicates that an error has occurred.
|
||||
*/
|
||||
void vSetErrorLED( void );
|
||||
|
||||
/*
|
||||
* Sets up the PLL and ports used by the demo.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Error flag set to pdFAIL if an error is encountered in the tasks/co-routines
|
||||
defined within this file. */
|
||||
unsigned portBASE_TYPE uxErrorStatus = pdPASS;
|
||||
|
||||
/* The next character to transmit. */
|
||||
static portCHAR cNextChar;
|
||||
|
||||
/* The queue used to transmit characters from the interrupt to the Comms Rx
|
||||
task. */
|
||||
static xQueueHandle xCommsQueue;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
int main( void )
|
||||
{
|
||||
/* Create the queue used to communicate between the UART ISR and the Comms
|
||||
Rx task. */
|
||||
xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) );
|
||||
|
||||
/* Setup the ports used by the demo and the clock. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Create the co-routines that flash the LED's. */
|
||||
vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );
|
||||
|
||||
/* Create the co-routine that initiates the transmission of characters
|
||||
on the UART. */
|
||||
xCoRoutineCreate( vSerialTxCoRoutine, mainTX_CO_ROUTINE_PRIORITY, mainTX_CO_ROUTINE_INDEX );
|
||||
|
||||
/* Create the co-routine that receives characters from the UART. */
|
||||
xCoRoutineCreate( vCommsRxCoRoutine, mainRX_CO_ROUTINE_PRIORITY, mainRX_CO_ROUTINE_INDEX );
|
||||
|
||||
/* Create the LCD task. */
|
||||
xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler running the tasks and co-routines just created. */
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* Should not get here unless we did not have enough memory to start the
|
||||
scheduler. */
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* Setup the PLL. */
|
||||
SysCtlClockSet( SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_6MHZ );
|
||||
|
||||
/* Initialise the hardware used to talk to the LCD, LED's and UART. */
|
||||
PDCInit();
|
||||
vParTestInitialise();
|
||||
vSerialInit();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationIdleHook( void )
|
||||
{
|
||||
/* The co-routines are executed in the idle task using the idle task
|
||||
hook. */
|
||||
for( ;; )
|
||||
{
|
||||
/* Schedule the co-routines. */
|
||||
vCoRoutineSchedule();
|
||||
|
||||
/* Run the register check function between each co-routine. */
|
||||
prvSetAndCheckRegisters();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvWriteString( const portCHAR *pcString )
|
||||
{
|
||||
/* Write pcString to the LED, pausing between each character. */
|
||||
prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);
|
||||
while( *pcString )
|
||||
{
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_RAM, *pcString );
|
||||
pcString++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vLCDTask( void * pvParameters )
|
||||
{
|
||||
unsigned portBASE_TYPE uxIndex;
|
||||
const unsigned portCHAR ucCFGData[] = {
|
||||
0x30, /* Set data bus to 8-bits. */
|
||||
0x30,
|
||||
0x30,
|
||||
0x3C, /* Number of lines/font. */
|
||||
0x08, /* Display off. */
|
||||
0x01, /* Display clear. */
|
||||
0x06, /* Entry mode [cursor dir][shift]. */
|
||||
0x0C /* Display on [display on][curson on][blinking on]. */
|
||||
};
|
||||
|
||||
/* The strings that are written to the LCD. */
|
||||
const portCHAR *pcStringsToDisplay[] = {
|
||||
"Stellaris",
|
||||
"Demo",
|
||||
"Two",
|
||||
"www.FreeRTOS.org",
|
||||
""
|
||||
};
|
||||
|
||||
/* Configure the LCD. */
|
||||
uxIndex = 0;
|
||||
while( uxIndex < sizeof( ucCFGData ) )
|
||||
{
|
||||
prvPDCWrite( PDC_LCD_CSR, ucCFGData[ uxIndex ] );
|
||||
uxIndex++;
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
}
|
||||
|
||||
/* Turn the LCD Backlight on. */
|
||||
prvPDCWrite( PDC_CSR, 0x01 );
|
||||
|
||||
/* Clear display. */
|
||||
vTaskDelay( mainCHAR_WRITE_DELAY );
|
||||
prvPDCWrite( PDC_LCD_CSR, LCD_CLEAR );
|
||||
|
||||
uxIndex = 0;
|
||||
for( ;; )
|
||||
{
|
||||
/* Display the string on the LCD. */
|
||||
prvWriteString( pcStringsToDisplay[ uxIndex ] );
|
||||
|
||||
/* Move on to the next string - wrapping if necessary. */
|
||||
uxIndex++;
|
||||
if( *( pcStringsToDisplay[ uxIndex ] ) == 0x00 )
|
||||
{
|
||||
uxIndex = 0;
|
||||
/* Longer pause on the last string to be sent. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY * 2 );
|
||||
}
|
||||
|
||||
/* Wait until it is time to move onto the next string. */
|
||||
vTaskDelay( mainSTRING_WRITE_DELAY );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
static portCHAR cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;
|
||||
portBASE_TYPE xResult;
|
||||
|
||||
crSTART( xHandle );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Wait for a character to be received. */
|
||||
crQUEUE_RECEIVE( xHandle, xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY, &xResult );
|
||||
|
||||
/* Was the character recived (if any) the expected character. */
|
||||
if( ( cRxedChar != cExpectedChar ) || ( xResult != pdPASS ) )
|
||||
{
|
||||
/* Got an unexpected character. This can sometimes occur when
|
||||
reseting the system using the debugger leaving characters already
|
||||
in the UART regsters. */
|
||||
uxErrorStatus = pdFAIL;
|
||||
|
||||
/* Resync by waiting for the end of the current string. */
|
||||
while( cRxedChar != mainLAST_TX_CHAR )
|
||||
{
|
||||
crQUEUE_RECEIVE( xHandle, xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY, &xResult );
|
||||
}
|
||||
|
||||
/* The next expected character is the start of the string again. */
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( cExpectedChar == mainLAST_TX_CHAR )
|
||||
{
|
||||
/* We have reached the end of the string - we now expect to
|
||||
receive the first character in the string again. The LED is
|
||||
toggled to indicate that the entire string was received without
|
||||
error. */
|
||||
vParTestToggleLED( mainCOMMS_RX_LED );
|
||||
cExpectedChar = mainFIRST_TX_CHAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We got the expected character, we now expect to receive the
|
||||
next character in the string. */
|
||||
cExpectedChar++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
crEND();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
portTickType xDelayPeriod;
|
||||
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
|
||||
/* Co-routine MUST start with a call to crSTART. */
|
||||
crSTART( xHandle );
|
||||
|
||||
for(;;)
|
||||
{
|
||||
/* Was the previously transmitted string received correctly? */
|
||||
if( uxErrorStatus != pdPASS )
|
||||
{
|
||||
/* An error was encountered so set the error LED. */
|
||||
vSetErrorLED();
|
||||
}
|
||||
|
||||
/* The next character to Tx is the first in the string. */
|
||||
cNextChar = mainFIRST_TX_CHAR;
|
||||
|
||||
UARTIntDisable( UART0_BASE, UART_INT_TX );
|
||||
{
|
||||
/* Send the first character. */
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
|
||||
/* Move the variable to the char to Tx on so the ISR transmits
|
||||
the next character in the string once this one has completed. */
|
||||
cNextChar++;
|
||||
}
|
||||
UARTIntEnable(UART0_BASE, UART_INT_TX);
|
||||
|
||||
/* Toggle the LED to show a new string is being transmitted. */
|
||||
vParTestToggleLED( mainCOMMS_TX_LED );
|
||||
|
||||
/* Delay before we start the string off again. A pseudo-random delay
|
||||
is used as this will provide a better test. */
|
||||
xDelayPeriod = xTaskGetTickCount() + ( *pulRandomBytes );
|
||||
|
||||
pulRandomBytes++;
|
||||
if( pulRandomBytes > mainTOTAL_PROGRAM_MEMORY )
|
||||
{
|
||||
pulRandomBytes = mainFIRST_PROGRAM_BYTES;
|
||||
}
|
||||
|
||||
/* Make sure we don't wait too long... */
|
||||
xDelayPeriod &= mainMAX_TX_DELAY;
|
||||
|
||||
/* ...but we do want to wait. */
|
||||
if( xDelayPeriod < mainMIN_TX_DELAY )
|
||||
{
|
||||
xDelayPeriod = mainMIN_TX_DELAY;
|
||||
}
|
||||
|
||||
/* Block for the random(ish) time. */
|
||||
crDELAY( xHandle, xDelayPeriod );
|
||||
}
|
||||
|
||||
/* Co-routine MUST end with a call to crEND. */
|
||||
crEND();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vSerialInit( void )
|
||||
{
|
||||
/* Enable the UART. GPIOA has already been initialised. */
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
|
||||
|
||||
/* Set GPIO A0 and A1 as peripheral function. They are used to output the
|
||||
UART signals. */
|
||||
GPIODirModeSet( GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1, GPIO_DIR_MODE_HW );
|
||||
|
||||
/* Configure the UART for 8-N-1 operation. */
|
||||
UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );
|
||||
|
||||
/* We dont want to use the fifo. This is for test purposes to generate
|
||||
as many interrupts as possible. */
|
||||
HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET;
|
||||
|
||||
/* Enable both Rx and Tx interrupts. */
|
||||
HWREG( UART0_BASE + UART_O_IM ) |= ( UART_INT_TX | UART_INT_RX );
|
||||
IntEnable( INT_UART0 );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
|
||||
/* Clear the interrupt. */
|
||||
UARTIntClear( UART0_BASE, ulStatus );
|
||||
|
||||
/* Was an Rx interrpt pending? */
|
||||
if( ulStatus & UART_INT_RX )
|
||||
{
|
||||
if( ( HWREG(UART0_BASE + UART_O_FR ) & UART_FR_RXFF ) )
|
||||
{
|
||||
/* Get the char from the buffer and post it onto the queue of
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
}
|
||||
}
|
||||
|
||||
/* Was a Tx interrupt pending? */
|
||||
if( ulStatus & UART_INT_TX )
|
||||
{
|
||||
/* Send the next character in the string. We are not using the FIFO. */
|
||||
if( cNextChar <= mainLAST_TX_CHAR )
|
||||
{
|
||||
if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
|
||||
{
|
||||
HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
|
||||
}
|
||||
cNextChar++;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* We are posting to a co-routine rather than a task so don't bother
|
||||
causing a task switch. */
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvPDCWrite( portCHAR cAddress, portCHAR cData )
|
||||
{
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
PDCWrite( cAddress, cData );
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSetErrorLED( void )
|
||||
{
|
||||
vParTestSetLED( mainCOMMS_FAIL_LED, pdTRUE );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
__asm void prvSetAndCheckRegisters( void )
|
||||
{
|
||||
extern vSetErrorLED
|
||||
|
||||
/* Fill the general purpose registers with known values. */
|
||||
mov r11, #10
|
||||
add r0, r11, #1
|
||||
add r1, r11, #2
|
||||
add r2, r11, #3
|
||||
add r3, r11, #4
|
||||
add r4, r11, #5
|
||||
add r5, r11, #6
|
||||
add r6, r11, #7
|
||||
add r7, r11, #8
|
||||
add r8, r11, #9
|
||||
add r9, r11, #10
|
||||
add r10, r11, #11
|
||||
add r12, r11, #12
|
||||
|
||||
/* Check the values are as expected. */
|
||||
cmp r11, #10
|
||||
bne set_error_led
|
||||
cmp r0, #11
|
||||
bne set_error_led
|
||||
cmp r1, #12
|
||||
bne set_error_led
|
||||
cmp r2, #13
|
||||
bne set_error_led
|
||||
cmp r3, #14
|
||||
bne set_error_led
|
||||
cmp r4, #15
|
||||
bne set_error_led
|
||||
cmp r5, #16
|
||||
bne set_error_led
|
||||
cmp r6, #17
|
||||
bne set_error_led
|
||||
cmp r7, #18
|
||||
bne set_error_led
|
||||
cmp r8, #19
|
||||
bne set_error_led
|
||||
cmp r9, #20
|
||||
bne set_error_led
|
||||
cmp r10, #21
|
||||
bne set_error_led
|
||||
cmp r12, #22
|
||||
bne set_error_led
|
||||
bx lr
|
||||
|
||||
set_error_led;
|
||||
push {r14}
|
||||
ldr r1, =vSetErrorLED
|
||||
blx r1
|
||||
pop {r14}
|
||||
bx lr;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -1,3 +0,0 @@
|
||||
Move these two fines into the Demo/CORTEX_LM3S102_KEIL directory to run Demo 2.
|
||||
|
||||
See the port documentation on the www.FreeRTOS.org site for more information.
|
||||
@@ -1,47 +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 (LM3S1xx), 0x0004 // Tools: 'ARM-ADS'
|
||||
GRPOPT 1,(Source),1,0,0
|
||||
GRPOPT 2,(Demo),1,0,0
|
||||
|
||||
OPTFFF 1,1,1,0,0,0,0,0,<..\..\Source\croutine.c><croutine.c>
|
||||
OPTFFF 1,2,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
|
||||
OPTFFF 1,3,1,0,0,0,0,0,<..\..\Source\queue.c><queue.c>
|
||||
OPTFFF 1,4,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
|
||||
OPTFFF 1,5,1,0,0,0,0,0,<..\..\Source\portable\MemMang\heap_1.c><heap_1.c>
|
||||
OPTFFF 1,6,1,0,0,0,0,0,<..\..\Source\portable\RVDS\ARM_CM3\port.c><port.c>
|
||||
OPTFFF 2,7,1,0,0,0,0,0,<.\main.c><main.c>
|
||||
OPTFFF 2,8,2,0,0,0,0,0,<.\init\Startup.s><Startup.s>
|
||||
OPTFFF 2,9,1,0,0,0,0,0,<..\Common\Minimal\crflash.c><crflash.c>
|
||||
OPTFFF 2,10,1,0,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
|
||||
OPTFFF 2,11,1,0,0,0,0,0,<.\include\pdc.c><pdc.c>
|
||||
OPTFFF 2,12,4,0,0,0,0,0,<C:\Keil\ARM\RV30\LIB\Luminary\DriverLib.lib><DriverLib.lib>
|
||||
|
||||
|
||||
TARGOPT 1, (LM3S1xx)
|
||||
ADSCLK=20000000
|
||||
OPTTT 1,1,1,0
|
||||
OPTHX 1,65535,0,0,0
|
||||
OPTLX 79,66,8,<.\uvision\>
|
||||
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
|
||||
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S101)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S101)
|
||||
OPTDBG 49150,1,()()()()()()()()()() (BIN\UL2CM3.DLL)()()()
|
||||
OPTKEY 0,(UL2CM3)(-U -O14 -S0 -C-1 -FO7 -FD20000000 -FC800 -FN1 -FF0LM3S_8 -FS00 -FL02000)
|
||||
OPTDF 0x0
|
||||
OPTLE <>
|
||||
OPTLC <>
|
||||
EndOpt
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
### uVision2 Project, (C) Keil Software
|
||||
### Do not modify !
|
||||
|
||||
Target (LM3S1xx), 0x0004 // Tools: 'ARM-ADS'
|
||||
|
||||
Group (Source)
|
||||
Group (Demo)
|
||||
|
||||
File 1,1,<..\..\Source\croutine.c><croutine.c> 0x440790D8
|
||||
File 1,1,<..\..\Source\list.c><list.c> 0x440790D8
|
||||
File 1,1,<..\..\Source\queue.c><queue.c> 0x440790D8
|
||||
File 1,1,<..\..\Source\tasks.c><tasks.c> 0x440790D8
|
||||
File 1,1,<..\..\Source\portable\MemMang\heap_1.c><heap_1.c> 0x440790D8
|
||||
File 1,1,<..\..\Source\portable\RVDS\ARM_CM3\port.c><port.c> 0x440790D8
|
||||
File 2,1,<.\main.c><main.c> 0x441EE317
|
||||
File 2,2,<.\init\Startup.s><Startup.s> 0x44172A20
|
||||
File 2,1,<..\Common\Minimal\crflash.c><crflash.c> 0x440790D8
|
||||
File 2,1,<.\ParTest\ParTest.c><ParTest.c> 0x440790D8
|
||||
File 2,1,<.\include\pdc.c><pdc.c> 0x44187439
|
||||
File 2,4,<C:\Keil\ARM\RV30\LIB\Luminary\DriverLib.lib><DriverLib.lib> 0x44206F94
|
||||
|
||||
|
||||
Options 1,0,0 // Target 'LM3S1xx'
|
||||
Device (LM3S101)
|
||||
Vendor (Luminary Micro)
|
||||
Cpu (IRAM(0x20000000-0x200007FF) IROM(0-0x1FFF) CLOCK(20000000) CPUTYPE("Cortex-M3"))
|
||||
FlashUt ()
|
||||
StupF ("STARTUP\Luminary\Startup.s" ("Luminary Startup Code"))
|
||||
FlashDR (UL2CM3(-U40296420 -O7 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0LM3S_8 -FS00 -FL02000))
|
||||
DevID (4079)
|
||||
Rgf (LM3Sxxx.H)
|
||||
Mem ()
|
||||
C ()
|
||||
A ()
|
||||
RL ()
|
||||
OH ()
|
||||
DBC_IFX ()
|
||||
DBC_CMS ()
|
||||
DBC_AMS ()
|
||||
DBC_LMS ()
|
||||
UseEnv=0
|
||||
EnvBin ()
|
||||
EnvInc ()
|
||||
EnvLib ()
|
||||
EnvReg (<28>Luminary\)
|
||||
OrgReg (<28>Luminary\)
|
||||
TgStat=0
|
||||
OutDir (.\uvision\)
|
||||
OutName (RTOSDemo)
|
||||
GenApp=1
|
||||
GenLib=0
|
||||
GenHex=0
|
||||
Debug=1
|
||||
Browse=1
|
||||
LstDir (.\uvision\)
|
||||
HexSel=1
|
||||
MG32K=0
|
||||
TGMORE=0
|
||||
RunUsr 0 0 <>
|
||||
RunUsr 1 0 <>
|
||||
BrunUsr 0 0 <>
|
||||
BrunUsr 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 (Cortex-M3)
|
||||
ADSTFLGA { 0,12,0,0,99,0,0,0,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,32,0,8,0,0 }
|
||||
OCMADSIROM { 1,0,0,0,0,0,32,0,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,32,0,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,32,0,8,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
RV_STAVEC ()
|
||||
ADSCCFLG { 8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSCMISC ()
|
||||
ADSCDEFN (RVDS_ARMCM3_LM3S102)
|
||||
ADSCUDEF ()
|
||||
ADSCINCD (C:\Keil\ARM\RV30\LIB\Luminary;..\CORTEX_LM3S102_KEIL;..\..\Source\portable\RVDS\ARM_CM3;..\..\Source\include;..\Common\include;.\include)
|
||||
ADSASFLG { 65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSAMISC (--diag_suppress 1581)
|
||||
ADSADEFN ()
|
||||
ADSAUDEF ()
|
||||
ADSAINCD ()
|
||||
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 { 16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
ADSLDTA (0x00000000)
|
||||
ADSLDDA (0x20000000)
|
||||
ADSLDSC ()
|
||||
ADSLDIB ()
|
||||
ADSLDIC ()
|
||||
ADSLDMC (--entry Reset_Handler)
|
||||
ADSLDIF ()
|
||||
ADSLDDW (6306)
|
||||
OPTDL (SARMCM3.DLL)()(DLM.DLL)(-pLM3S101)(SARMCM3.DLL)()(TLM.DLL)(-pLM3S101)
|
||||
OPTDBG 49150,1,()()()()()()()()()() (BIN\UL2CM3.DLL)()()()
|
||||
FLASH1 { 1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
FLASH2 (BIN\UL2CM3.DLL)
|
||||
FLASH3 ("" ())
|
||||
FLASH4 ()
|
||||
EndOpt
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_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 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 20000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 59 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 1468 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 3 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 2 )
|
||||
#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 0
|
||||
#define INCLUDE_uxTaskPriorityGet 0
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 0
|
||||
#define INCLUDE_vTaskDelayUntil 0
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
FreeRTOS.org V4.0.2 - Copyright (C) 2003-2006 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.
|
||||
|
||||
***************************************************************************
|
||||
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.
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "Task.h"
|
||||
#include "partest.h"
|
||||
|
||||
#include "pdc.h"
|
||||
|
||||
#define partstPINS (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 Z | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)
|
||||
|
||||
#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )
|
||||
#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 )
|
||||
|
||||
static volatile unsigned portCHAR ucOutputValue = partstALL_OUTPUTS_OFF;
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
PDCInit();
|
||||
PDCWrite( PDC_LED, ucOutputValue );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portCHAR ucBit = ( unsigned portCHAR ) 1;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( uxLED < partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
|
||||
if( xValue == pdFALSE )
|
||||
{
|
||||
ucBit ^= ( unsigned portCHAR ) 0xff;
|
||||
ucOutputValue &= ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PDCWrite( PDC_LED, ucOutputValue );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portCHAR ucBit;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( uxLED < partstMAX_OUTPUT_LED )
|
||||
{
|
||||
ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;
|
||||
|
||||
if( ucOutputValue & ucBit )
|
||||
{
|
||||
ucOutputValue &= ~ucBit;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucOutputValue |= ucBit;
|
||||
}
|
||||
|
||||
PDCWrite( PDC_LED, ucOutputValue );
|
||||
}
|
||||
}
|
||||
xTaskResumeAll();
|
||||
}
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
//*****************************************************************************
|
||||
//
|
||||
// pdc.c - Driver for the Peripheral Device Controller (PDC) on the Stellaris
|
||||
// development board.
|
||||
//
|
||||
// Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.
|
||||
//
|
||||
// Software License Agreement
|
||||
//
|
||||
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
|
||||
// exclusively on LMI's Stellaris Family of microcontroller products.
|
||||
//
|
||||
// The software is owned by LMI and/or its suppliers, and is protected under
|
||||
// applicable copyright laws. All rights are reserved. Any use in violation
|
||||
// of the foregoing restrictions may subject the user to criminal sanctions
|
||||
// under applicable laws, as well as to civil liability for the breach of the
|
||||
// terms and conditions of this license.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
||||
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
#include "LM3Sxxx.h"
|
||||
#include "pdc.h"
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Initializes the connection to the PDC.
|
||||
//!
|
||||
//! This function will enable clocking to the SSI and GPIO A modules, configure
|
||||
//! the GPIO pins to be used for an SSI interface, and it will configure the
|
||||
//! SSI as a 1Mb master device, operating in MOTO mode. It will also enable
|
||||
//! the SSI module, and will enable the chip select for the PDC on the
|
||||
//! Stellaris development board.
|
||||
//!
|
||||
//! This function is contained in <tt>utils/pdc.c</tt>, with
|
||||
//! <tt>utils/pdc.h</tt> containing the API definition for use by applications.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
void
|
||||
PDCInit(void)
|
||||
{
|
||||
//
|
||||
// Enable the peripherals used to drive the PDC.
|
||||
//
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI);
|
||||
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
|
||||
|
||||
//
|
||||
// Configure the appropriate pins to be SSI instead of GPIO.
|
||||
//
|
||||
GPIODirModeSet(GPIO_PORTA_BASE, SSI_CLK | SSI_TX | SSI_RX,
|
||||
GPIO_DIR_MODE_HW);
|
||||
GPIODirModeSet(GPIO_PORTA_BASE, SSI_CS, GPIO_DIR_MODE_OUT);
|
||||
GPIOPadConfigSet(GPIO_PORTA_BASE, SSI_CLK, GPIO_STRENGTH_4MA,
|
||||
GPIO_PIN_TYPE_STD_WPU);
|
||||
|
||||
//
|
||||
// Configure the SSI port.
|
||||
//
|
||||
SSIConfig(SSI_BASE, SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 1000000, 8);
|
||||
SSIEnable(SSI_BASE);
|
||||
|
||||
//
|
||||
// Reset the PDC SSI state machine. The chip select needs to be held low
|
||||
// for 100ns; the procedure call overhead more than accounts for this time.
|
||||
//
|
||||
GPIOPinWrite(GPIO_PORTA_BASE, PDC_CS, 0);
|
||||
GPIOPinWrite(GPIO_PORTA_BASE, PDC_CS, PDC_CS);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Write a PDC register.
|
||||
//!
|
||||
//! \param ucAddr specifies the PDC register to write.
|
||||
//! \param ucData specifies the data to write.
|
||||
//!
|
||||
//! This function will perform the SSI transfers required to write a register
|
||||
//! in the PDC on the Stellaris development board.
|
||||
//!
|
||||
//! This function is contained in <tt>utils/pdc.c</tt>, with
|
||||
//! <tt>utils/pdc.h</tt> containing the API definition for use by applications.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
void
|
||||
PDCWrite(unsigned char ucAddr, unsigned char ucData)
|
||||
{
|
||||
unsigned long ulTemp;
|
||||
|
||||
//
|
||||
// Send address and write command.
|
||||
//
|
||||
SSIDataPut(SSI_BASE, (ucAddr & 0x0F) | PDC_WR);
|
||||
|
||||
//
|
||||
// Write the data.
|
||||
//
|
||||
SSIDataPut(SSI_BASE, ucData);
|
||||
|
||||
//
|
||||
// Flush data read during address write.
|
||||
//
|
||||
SSIDataGet(SSI_BASE, &ulTemp);
|
||||
|
||||
//
|
||||
// Flush data read during data write.
|
||||
//
|
||||
SSIDataGet(SSI_BASE, &ulTemp);
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
//*****************************************************************************
|
||||
//
|
||||
// pdc.h - Stellaris development board Peripheral Device Controller definitions
|
||||
// and prototypes.
|
||||
//
|
||||
// Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.
|
||||
//
|
||||
// Software License Agreement
|
||||
//
|
||||
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
|
||||
// exclusively on LMI's Stellaris Family of microcontroller products.
|
||||
//
|
||||
// The software is owned by LMI and/or its suppliers, and is protected under
|
||||
// applicable copyright laws. All rights are reserved. Any use in violation
|
||||
// of the foregoing restrictions may subject the user to criminal sanctions
|
||||
// under applicable laws, as well as to civil liability for the breach of the
|
||||
// terms and conditions of this license.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
||||
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
#ifndef __PDC_H__
|
||||
#define __PDC_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The registers within the peripheral device controller.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define PDC_VER 0x0 // Version register
|
||||
#define PDC_CSR 0x1 // Command/Status register
|
||||
#define PDC_DSW 0x4 // DIP Switch register
|
||||
#define PDC_LED 0x5 // LED register
|
||||
#define PDC_LCD_CSR 0x6 // LCD Command/Status register
|
||||
#define PDC_LCD_RAM 0x7 // LCD RAM register
|
||||
#define PDC_GPXDAT 0x8 // GPIO X Data register
|
||||
#define PDC_GPXDIR 0x9 // GPIO X Direction register
|
||||
#define PDC_GPYDAT 0xA // GPIO Y Data register
|
||||
#define PDC_GPYDIR 0xB // GPIO Y Direction register
|
||||
#define PDC_GPZDAT 0xC // GPIO Z Data register
|
||||
#define PDC_GPZDIR 0xD // GPIO Z Direction register
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Flags indicating a read or write to the peripheral device controller.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define PDC_RD 0x80 // PDC read command
|
||||
#define PDC_WR 0x00 // PDC write command
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// LCD panel (Crystalfontz CFAH1602B) commands, RS = 0
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define LCD_CLEAR 0x01 // Clear display (0 fill DDRAM).
|
||||
#define LCD_HOME 0x02 // Cursor home.
|
||||
#define LCD_MODE 0x04 // Set entry mode (cursor dir)
|
||||
#define LCD_ON 0x08 // Set display, cursor, blinking
|
||||
// on/off
|
||||
#define LCD_CUR 0x10 // Cursor, display shift
|
||||
#define LCD_IF 0x20 // Set interface data length,
|
||||
// lines, font
|
||||
#define LCD_CGADDR 0x40 // Set CGRAM AC address
|
||||
#define LCD_DDADDR 0x80 // Set DDRAM AC address
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// LCD Status bit
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define LCD_B_BUSY 0x80 // Busy flag.
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// The GPIO port A pin numbers for the various SSI signals.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#define SSI_CS GPIO_PIN_3
|
||||
#define PDC_CS GPIO_PIN_3
|
||||
#define SSI_CLK GPIO_PIN_2
|
||||
#define SSI_TX GPIO_PIN_5
|
||||
#define SSI_RX GPIO_PIN_4
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void PDCInit(void);
|
||||
extern unsigned char PDCRead(unsigned char ucAddr);
|
||||
extern void PDCWrite(unsigned char ucAddr, unsigned char ucData);
|
||||
extern unsigned char PDCDIPRead(void);
|
||||
extern void PDCLEDWrite(unsigned char ucLED);
|
||||
extern unsigned char PDCLEDRead(void);
|
||||
extern void PDCLCDInit(void);
|
||||
extern void PDCLCDBacklightOn(void);
|
||||
extern void PDCLCDBacklightOff(void);
|
||||
extern void PDCLCDClear(void);
|
||||
extern void PDCLCDCreateChar(unsigned char ucChar, unsigned char *pucData);
|
||||
extern void PDCLCDSetPos(unsigned char ucX, unsigned char ucY);
|
||||
extern void PDCLCDWrite(const char *pcStr, unsigned long ulCount);
|
||||
extern unsigned char PDCGPIODirRead(unsigned char ucIdx);
|
||||
extern void PDCGPIODirWrite(unsigned char ucIdx, unsigned char ucValue);
|
||||
extern unsigned char PDCGPIORead(unsigned char ucIdx);
|
||||
extern void PDCGPIOWrite(unsigned char ucIdx, unsigned char ucValue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __PDC_H__
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user