Compare commits
917
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e365f91254 | ||
|
|
3f3787872d | ||
|
|
1c852d7082 | ||
|
|
1d5ec957f2 | ||
|
|
c9d2ed3f49 | ||
|
|
a16fec11ae | ||
|
|
3ce50785e9 | ||
|
|
e5c9d63059 | ||
|
|
85fc19e998 | ||
|
|
3034ede3a6 | ||
|
|
4017a336a9 | ||
|
|
2cb4c6c9b3 | ||
|
|
3bf8683bc4 | ||
|
|
123a0d46d0 | ||
|
|
92353018fa | ||
|
|
4f8352270a | ||
|
|
dd60e17b18 | ||
|
|
a223dd3b89 | ||
|
|
3a9fe643c9 | ||
|
|
f85a7b0ece | ||
|
|
e06ddfbbe8 | ||
|
|
310f612884 | ||
|
|
c3e8171329 | ||
|
|
d6e7d93958 | ||
|
|
7f1afb8786 | ||
|
|
dcf0797f11 | ||
|
|
4d37bfcf42 | ||
|
|
45dc5b564a | ||
|
|
6293dfb48f | ||
|
|
8b5c3477b4 | ||
|
|
743698fb26 | ||
|
|
ebf745a916 | ||
|
|
3f071add1d | ||
|
|
c0fc3a6e97 | ||
|
|
3e884359dc | ||
|
|
a6543b6b0a | ||
|
|
0a80ff93a0 | ||
|
|
5a30b0f61c | ||
|
|
4d1dbf1324 | ||
|
|
5e5299c456 | ||
|
|
cf3b937e8f | ||
|
|
1a29b7499c | ||
|
|
51b28c5e1f | ||
|
|
e0f91ee339 | ||
|
|
14ac39a052 | ||
|
|
7b4e8fa3a4 | ||
|
|
acd6dc7db1 | ||
|
|
a793d4993e | ||
|
|
5c0cf1489f | ||
|
|
8466d7573b | ||
|
|
c43582587a | ||
|
|
0297c08b8e | ||
|
|
3e480541f8 | ||
|
|
48755cc3cb | ||
|
|
1dfbedac64 | ||
|
|
e0a2ba8af3 | ||
|
|
5d433ec916 | ||
|
|
0da62531c0 | ||
|
|
339e50e1a6 | ||
|
|
25971f0aef | ||
|
|
c2816ba549 | ||
|
|
87f21c711a | ||
|
|
95ed69c32c | ||
|
|
e5cedeba3d | ||
|
|
e5a7d03f64 | ||
|
|
0d845e2c14 | ||
|
|
9ca272dd76 | ||
|
|
75677cf1a7 | ||
|
|
ca041d331b | ||
|
|
4ec02ea882 | ||
|
|
c1ff9a7181 | ||
|
|
7addadeb70 | ||
|
|
0bd66b86ba | ||
|
|
6160bc4fe8 | ||
|
|
5b7e7940a9 | ||
|
|
62db6515c9 | ||
|
|
c938b07cc6 | ||
|
|
7193b0961e | ||
|
|
53dcc23bd6 | ||
|
|
53f45bc7cc | ||
|
|
2763966f4c | ||
|
|
a5e20fdd1c | ||
|
|
a91b492b61 | ||
|
|
5108a03221 | ||
|
|
ff403fc7a3 | ||
|
|
4c15edaab2 | ||
|
|
098a6d32fa | ||
|
|
d3e41ab396 | ||
|
|
ab6d99ca9f | ||
|
|
50e6b3f6d9 | ||
|
|
31e15f4508 | ||
|
|
78d1969b75 | ||
|
|
481697e0d9 | ||
|
|
72eb1494b0 | ||
|
|
b7d4c4e91a | ||
|
|
2d34a5b8ad | ||
|
|
38d1e75887 | ||
|
|
3df699861a | ||
|
|
8d7a6da7c7 | ||
|
|
c55f0e48f8 | ||
|
|
41582c0381 | ||
|
|
0b3ce22164 | ||
|
|
e05881352f | ||
|
|
afba456b92 | ||
|
|
bc3c9d1375 | ||
|
|
b6b824f3e3 | ||
|
|
65f057ff57 | ||
|
|
0cf42dbbf9 | ||
|
|
060dcbfed3 | ||
|
|
1ff69eafde | ||
|
|
fdc2724ffb | ||
|
|
4892ab1b87 | ||
|
|
04d2dccfde | ||
|
|
4337d25e4c | ||
|
|
f0ac72b1d5 | ||
|
|
a96933b54b | ||
|
|
7ef985a705 | ||
|
|
3277b64bed | ||
|
|
500b581a61 | ||
|
|
c4a2a5f912 | ||
|
|
524c94d465 | ||
|
|
95dc6f0714 | ||
|
|
5f41f6e33f | ||
|
|
7229b94ba3 | ||
|
|
e50cb30711 | ||
|
|
813460e5d0 | ||
|
|
c6cebc5e97 | ||
|
|
b6ff1f0338 | ||
|
|
2823a69409 | ||
|
|
4175b8ec8f | ||
|
|
586993afaa | ||
|
|
5b42e432cc | ||
|
|
f715cd0792 | ||
|
|
6ba2fb3cb3 | ||
|
|
8c39320c54 | ||
|
|
b61ed9608c | ||
|
|
1f637d3758 | ||
|
|
ca7e700ec4 | ||
|
|
89b5ac1769 | ||
|
|
c149528436 | ||
|
|
5fde4637ca | ||
|
|
46fbcd7391 | ||
|
|
337321b0bd | ||
|
|
202217dcbe | ||
|
|
001376c0c3 | ||
|
|
ff2661ead2 | ||
|
|
ef96759184 | ||
|
|
01bcf8f466 | ||
|
|
433c1f8d5e | ||
|
|
e31c2f172b | ||
|
|
e2d4324d20 | ||
|
|
045d76f917 | ||
|
|
0529a69032 | ||
|
|
37008b682a | ||
|
|
67ed9b04c5 | ||
|
|
6c8fe0760e | ||
|
|
768a9ac216 | ||
|
|
dd340c71a6 | ||
|
|
a18b1d1d9a | ||
|
|
e46346425a | ||
|
|
279c994711 | ||
|
|
e22e0fe9ba | ||
|
|
94fb84aaa0 | ||
|
|
9d36718049 | ||
|
|
a97d38e9f9 | ||
|
|
1c1362f33a | ||
|
|
ba436846d4 | ||
|
|
8f12188261 | ||
|
|
08756da558 | ||
|
|
057f8e6dde | ||
|
|
092b3189db | ||
|
|
0173d6260e | ||
|
|
dda75086fd | ||
|
|
68b8d43510 | ||
|
|
ad776f66af | ||
|
|
7bd0a5f1a3 | ||
|
|
bd4f85b07d | ||
|
|
b2677b5c8e | ||
|
|
a1e9e74c64 | ||
|
|
f698349be7 | ||
|
|
44361ab1a1 | ||
|
|
110367ad73 | ||
|
|
a8502bc856 | ||
|
|
bc1cd70d8e | ||
|
|
4cb667facd | ||
|
|
349dbff762 | ||
|
|
5c9dc8c4d4 | ||
|
|
bdb9fc69a4 | ||
|
|
fff5cd371d | ||
|
|
722b6213aa | ||
|
|
527f443758 | ||
|
|
f164da60fc | ||
|
|
519f3a9d0f | ||
|
|
ad1dda1e42 | ||
|
|
681a0e36b1 | ||
|
|
aacb8ee021 | ||
|
|
a0b79c96e9 | ||
|
|
b7121739c8 | ||
|
|
83ecf74857 | ||
|
|
dc206817d0 | ||
|
|
a77806930c | ||
|
|
0b5519fa76 | ||
|
|
0e8187afab | ||
|
|
e862b616b0 | ||
|
|
af32d5b6ee | ||
|
|
6c4507ba0a | ||
|
|
2e37cdb604 | ||
|
|
26a5415e4c | ||
|
|
3f435ed80e | ||
|
|
e3f5acba6f | ||
|
|
245cbe3a08 | ||
|
|
50c65879e3 | ||
|
|
f1169f6d8f | ||
|
|
238678a359 | ||
|
|
6da3f7c1e6 | ||
|
|
007a7f7857 | ||
|
|
f45336d214 | ||
|
|
751072247e | ||
|
|
0575d5c28d | ||
|
|
4022030db6 | ||
|
|
7ac1da5beb | ||
|
|
9cdd8cb1db | ||
|
|
4b6abde76a | ||
|
|
9212c00113 | ||
|
|
5ac936c6cc | ||
|
|
405a0922f6 | ||
|
|
c663744764 | ||
|
|
02d182395d | ||
|
|
993906cf9a | ||
|
|
5b9ca4609a | ||
|
|
bf1a8bef38 | ||
|
|
5af37f21c3 | ||
|
|
cc5846c483 | ||
|
|
a092461d20 | ||
|
|
eca01095b1 | ||
|
|
46e3b946cb | ||
|
|
9bdd387ce4 | ||
|
|
939397cf36 | ||
|
|
c8f9aed32e | ||
|
|
6d3680fbd2 | ||
|
|
5baad03944 | ||
|
|
79e0dfb418 | ||
|
|
f6515fae84 | ||
|
|
826bbcab30 | ||
|
|
19f3e2c39d | ||
|
|
d1210fa0fd | ||
|
|
89dd4ab845 | ||
|
|
d6210afa3a | ||
|
|
942f417b13 | ||
|
|
70365f08e4 | ||
|
|
d14bfd1cf2 | ||
|
|
d11cfe5ba0 | ||
|
|
8a63d64746 | ||
|
|
76c4c0d7c0 | ||
|
|
6a73a85620 | ||
|
|
3b74e476b4 | ||
|
|
1ee3ff8412 | ||
|
|
a8a989191c | ||
|
|
3b2ab0a284 | ||
|
|
18a1861c02 | ||
|
|
a2f88ebc77 | ||
|
|
70d2a312eb | ||
|
|
8977191d84 | ||
|
|
a4f3058879 | ||
|
|
b02ffc7c75 | ||
|
|
918359acdb | ||
|
|
7815c29075 | ||
|
|
e970a21573 | ||
|
|
181b409f0b | ||
|
|
09c762b143 | ||
|
|
1d2ff27f68 | ||
|
|
a7b6c9cffa | ||
|
|
4ed171811f | ||
|
|
f2fb701890 | ||
|
|
eb77b08caa | ||
|
|
4ef1bec938 | ||
|
|
6b0dcee284 | ||
|
|
8d550a07d7 | ||
|
|
3d77413237 | ||
|
|
6dc5c2e996 | ||
|
|
77fa6f2732 | ||
|
|
47a7981f24 | ||
|
|
74c699e35a | ||
|
|
03e691ad2b | ||
|
|
f2e56296ad | ||
|
|
f6c708e239 | ||
|
|
5ad5220965 | ||
|
|
8d37dd35a4 | ||
|
|
e27a45520f | ||
|
|
8ae034edd2 | ||
|
|
bc7d021157 | ||
|
|
573b370805 | ||
|
|
1259b556ed | ||
|
|
7472a60fa4 | ||
|
|
faa07b02d1 | ||
|
|
296507c430 | ||
|
|
7ac1e76ca3 | ||
|
|
72ad187f89 | ||
|
|
efaef1bb75 | ||
|
|
6dad5b7e1d | ||
|
|
e06cd1a368 | ||
|
|
edf35c1a27 | ||
|
|
1d45c22e04 | ||
|
|
574b62462b | ||
|
|
67f65dc588 | ||
|
|
2c07c85fe8 | ||
|
|
a373d55795 | ||
|
|
dde60b17b8 | ||
|
|
b467eb73c7 | ||
|
|
f7b68f912c | ||
|
|
9f332114f0 | ||
|
|
8e0740230e | ||
|
|
7179943952 | ||
|
|
250aae4ac4 | ||
|
|
bfe9a1e1b7 | ||
|
|
720f3dc720 | ||
|
|
681343829c | ||
|
|
6b4431ed84 | ||
|
|
c45a959364 | ||
|
|
ccf8fde8b4 | ||
|
|
8fe1fd8583 | ||
|
|
f844f2514b | ||
|
|
15a0e8554d | ||
|
|
de83026135 | ||
|
|
cd02365300 | ||
|
|
c2d2947d22 | ||
|
|
28c0dd322a | ||
|
|
cde104238b | ||
|
|
399a3119d6 | ||
|
|
1a49c8efc2 | ||
|
|
ea7c1790c9 | ||
|
|
d0eee6ed4b | ||
|
|
a8a37135f1 | ||
|
|
d179b26abc | ||
|
|
7775f24064 | ||
|
|
a5ba6ce563 | ||
|
|
693f1eb86f | ||
|
|
0de5f99c9e | ||
|
|
0bffba7fc0 | ||
|
|
d7636c7d87 | ||
|
|
124eea02ff | ||
|
|
b63698dabf | ||
|
|
bf77426318 | ||
|
|
b102527850 | ||
|
|
2867cabd45 | ||
|
|
88b68847d1 | ||
|
|
29df2ea4c1 | ||
|
|
7f2d47245c | ||
|
|
8d7bbfc840 | ||
|
|
c7ef84fcb6 | ||
|
|
00065971c7 | ||
|
|
c144d1c017 | ||
|
|
77807d038a | ||
|
|
39c2006586 | ||
|
|
77f9ecf13b | ||
|
|
0f6a88260b | ||
|
|
6342196e2b | ||
|
|
850f6a7827 | ||
|
|
dd2cc0d3b9 | ||
|
|
8a7f62060a | ||
|
|
8d8cf206c6 | ||
|
|
c511094549 | ||
|
|
8a3c591c3b | ||
|
|
c149d2ecb8 | ||
|
|
b6fdc3af2b | ||
|
|
2835be6aaa | ||
|
|
bcf2d16b31 | ||
|
|
920e5e6490 | ||
|
|
e478d9446c | ||
|
|
2b446e52a5 | ||
|
|
e4fb9f9c5d | ||
|
|
d61056eaf0 | ||
|
|
7a3084d76f | ||
|
|
c255c43282 | ||
|
|
59b4445c13 | ||
|
|
75a6839424 | ||
|
|
d45f29f74f | ||
|
|
d7384414e7 | ||
|
|
cd3302d2fd | ||
|
|
a69c21b884 | ||
|
|
a5f0348e16 | ||
|
|
4d548399c4 | ||
|
|
93ea562e22 | ||
|
|
8144312fbb | ||
|
|
b1c2f79de3 | ||
|
|
ce6e14d347 | ||
|
|
844dc74a2c | ||
|
|
3a7ad511b6 | ||
|
|
2771b8e774 | ||
|
|
71a9ec6ecd | ||
|
|
2fd415ecd2 | ||
|
|
6a1869de06 | ||
|
|
e7f00a0a47 | ||
|
|
af3690ed45 | ||
|
|
cf402e19c2 | ||
|
|
89d85d9d5a | ||
|
|
3dd062d092 | ||
|
|
1ab9a7fda8 | ||
|
|
56aca5559d | ||
|
|
aad2fb23eb | ||
|
|
7c6ec6b6fe | ||
|
|
6c476c99b2 | ||
|
|
cd1e6e7bde | ||
|
|
32920a20c6 | ||
|
|
080c18f7d8 | ||
|
|
3a06fa9465 | ||
|
|
e0e3d3515c | ||
|
|
0913d8456c | ||
|
|
6d68c07ae1 | ||
|
|
941ef2c234 | ||
|
|
fe4666f58d | ||
|
|
f4c8890b2f | ||
|
|
f58e4f5e08 | ||
|
|
75da9c46f2 | ||
|
|
97e2834377 | ||
|
|
2090f21359 | ||
|
|
375131230b | ||
|
|
fa05f3808d | ||
|
|
892cab8379 | ||
|
|
5ca670f1a6 | ||
|
|
924edd9cf4 | ||
|
|
96c49c096b | ||
|
|
87da9d6125 | ||
|
|
8dac15a4c5 | ||
|
|
8448b2e579 | ||
|
|
06ee231e55 | ||
|
|
d343441384 | ||
|
|
feb6a27869 | ||
|
|
79bc80daa1 | ||
|
|
a3b8f8b64b | ||
|
|
63938fcbfb | ||
|
|
21139924fc | ||
|
|
951447352c | ||
|
|
e0e93657c4 | ||
|
|
2a9a57eeea | ||
|
|
20b62d63b2 | ||
|
|
c4014e8c0f | ||
|
|
bf21d1277e | ||
|
|
f86cf45cbf | ||
|
|
bf0945b5ff | ||
|
|
e073fe46cb | ||
|
|
fa35d25903 | ||
|
|
8e899f146b | ||
|
|
e08cb7a8fa | ||
|
|
8030f2c99f | ||
|
|
f30e251bfa | ||
|
|
ec3eb5a51f | ||
|
|
1773c68af9 | ||
|
|
884f9eedd4 | ||
|
|
074f0176fc | ||
|
|
fb1b06f545 | ||
|
|
b765960ebb | ||
|
|
1ac7a27e81 | ||
|
|
439ccea341 | ||
|
|
59286d9c99 | ||
|
|
245572438e | ||
|
|
eb61096300 | ||
|
|
ede61da5d5 | ||
|
|
a8744a81e8 | ||
|
|
ebc8f90743 | ||
|
|
843ef46d81 | ||
|
|
1c1f6407a2 | ||
|
|
871f2717a9 | ||
|
|
559c8f3b96 | ||
|
|
d122267841 | ||
|
|
348be15dd6 | ||
|
|
8ff592e6cd | ||
|
|
257f23b55c | ||
|
|
7b320ac12c | ||
|
|
9539cf0c32 | ||
|
|
af1fe581f6 | ||
|
|
ad12d18ca5 | ||
|
|
c34ef0848a | ||
|
|
78d53264b7 | ||
|
|
82dd0eee4d | ||
|
|
28036be06b | ||
|
|
0a9c396d39 | ||
|
|
ab94a57783 | ||
|
|
41fa049f5b | ||
|
|
ea701a052f | ||
|
|
3f2c9e5877 | ||
|
|
f722fff16c | ||
|
|
3bfd0147bf | ||
|
|
a6cc9dc5ff | ||
|
|
be0ebdde26 | ||
|
|
65708ecfc7 | ||
|
|
927db1bcdc | ||
|
|
f148eb0400 | ||
|
|
cb62660a41 | ||
|
|
12b83ec1c5 | ||
|
|
f2b70e5904 | ||
|
|
4b7dc9c5a0 | ||
|
|
62f5eae5dd | ||
|
|
0095363b08 | ||
|
|
838e731ef6 | ||
|
|
d64f4571f9 | ||
|
|
6cc63afcec | ||
|
|
610d138f19 | ||
|
|
80a1828eca | ||
|
|
8121085e37 | ||
|
|
540527d42f | ||
|
|
c9fbffcff0 | ||
|
|
4d1da19b09 | ||
|
|
397e4d0bfb | ||
|
|
b18293f7c9 | ||
|
|
dc40bf93a0 | ||
|
|
9c3c58d641 | ||
|
|
2181ccd3ab | ||
|
|
c85c3edc88 | ||
|
|
57ca8afb26 | ||
|
|
a8a4226d6f | ||
|
|
f387a8a43b | ||
|
|
6b029a4122 | ||
|
|
eb54a08de3 | ||
|
|
79d2f079aa | ||
|
|
d789ac6a8c | ||
|
|
9854df5018 | ||
|
|
c17e47177f | ||
|
|
839277710a | ||
|
|
2f566bc499 | ||
|
|
30373c5909 | ||
|
|
fa5c08e54c | ||
|
|
c9f2d83715 | ||
|
|
58236509d5 | ||
|
|
46ace88463 | ||
|
|
f4e8f4d107 | ||
|
|
33e7745b25 | ||
|
|
2330224714 | ||
|
|
e2fbb6e339 | ||
|
|
b6ef78cdfd | ||
|
|
fdbcfaf94e | ||
|
|
a92c134454 | ||
|
|
447f961088 | ||
|
|
d7c632c206 | ||
|
|
8069d83787 | ||
|
|
5d5fcd1c37 | ||
|
|
1731b417b6 | ||
|
|
657c105ee6 | ||
|
|
a1e072f16f | ||
|
|
83695a927a | ||
|
|
1a6d81ed1d | ||
|
|
b49c9e628d | ||
|
|
8f2612ae10 | ||
|
|
0a2afd578a | ||
|
|
860d0bd703 | ||
|
|
257e92df8b | ||
|
|
c28a1c49df | ||
|
|
63304d13c8 | ||
|
|
b37e507590 | ||
|
|
4615d7a757 | ||
|
|
5bf9679129 | ||
|
|
e9c7b5e453 | ||
|
|
af9815d6b8 | ||
|
|
f3825b729e | ||
|
|
864a67c7e5 | ||
|
|
6e0165f6b8 | ||
|
|
d81879b86a | ||
|
|
075062972b | ||
|
|
d4819749d6 | ||
|
|
67ede2fddb | ||
|
|
69f147e9cf | ||
|
|
d759370bfc | ||
|
|
307720cbfc | ||
|
|
b4f05cfdf3 | ||
|
|
14ac2e71ba | ||
|
|
a875f4062a | ||
|
|
b34d9fa714 | ||
|
|
2483fecf74 | ||
|
|
67a53b7f29 | ||
|
|
c5106fbe91 | ||
|
|
f0f829ab31 | ||
|
|
062db40213 | ||
|
|
0094bd87a7 | ||
|
|
b4d25e2f94 | ||
|
|
371adb5581 | ||
|
|
9a80c36081 | ||
|
|
a7065c2494 | ||
|
|
8f48e3b3af | ||
|
|
18e402f6c3 | ||
|
|
ee344278a7 | ||
|
|
edf004c542 | ||
|
|
b9c72eb9e8 | ||
|
|
58504bdf98 | ||
|
|
38247c79a9 | ||
|
|
b842c061e5 | ||
|
|
c461730076 | ||
|
|
fd1b041675 | ||
|
|
b257a93211 | ||
|
|
55c2f783b2 | ||
|
|
53842173cb | ||
|
|
b32848ebbd | ||
|
|
6bfdcea1ba | ||
|
|
88f3708506 | ||
|
|
613c55b7c6 | ||
|
|
cc41e6e49b | ||
|
|
21ff94f57c | ||
|
|
0fd987e847 | ||
|
|
5b7ee343e9 | ||
|
|
e298e1b4c9 | ||
|
|
68194329d2 | ||
|
|
499c6af355 | ||
|
|
a1c1b039b4 | ||
|
|
1a718db4aa | ||
|
|
b2f1b22335 | ||
|
|
51561769c6 | ||
|
|
97c82f6345 | ||
|
|
89b3d2980e | ||
|
|
9840bf0640 | ||
|
|
25d341b48f | ||
|
|
77f0164502 | ||
|
|
182ae661ce | ||
|
|
c6b029860f | ||
|
|
7cdf71810f | ||
|
|
b85b977223 | ||
|
|
bb5159cca4 | ||
|
|
8020d107b1 | ||
|
|
85d23c994a | ||
|
|
a9d3cfeeb5 | ||
|
|
5d97a5161e | ||
|
|
b084209e46 | ||
|
|
f2aa8f6bad | ||
|
|
459e39a42d | ||
|
|
55d26c5271 | ||
|
|
11b5d0c01b | ||
|
|
5ae1cf4cb1 | ||
|
|
1f89005d16 | ||
|
|
b3b93a8041 | ||
|
|
8edac06f30 | ||
|
|
f0d6cf3abd | ||
|
|
c826e061f2 | ||
|
|
2077415729 | ||
|
|
a38f607dfc | ||
|
|
77748bdbff | ||
|
|
1df70e6aee | ||
|
|
9aa82d6a91 | ||
|
|
e6f5d863fc | ||
|
|
f4a0dec4e1 | ||
|
|
700ee9adf6 | ||
|
|
b8eb3353db | ||
|
|
70bfe34a99 | ||
|
|
913ea1f46a | ||
|
|
08b35e4997 | ||
|
|
bf929ec880 | ||
|
|
3b83097df1 | ||
|
|
1e0c28a8e5 | ||
|
|
d27ffe07d7 | ||
|
|
807f433a2d | ||
|
|
8c123b0ac3 | ||
|
|
02aeeb262f | ||
|
|
0c23668b0f | ||
|
|
023fda6e70 | ||
|
|
d306e15c92 | ||
|
|
75a92fa9e0 | ||
|
|
0404bf0721 | ||
|
|
4a47bc9c03 | ||
|
|
169159df65 | ||
|
|
1eaf901c48 | ||
|
|
7b64a5664f | ||
|
|
88ecc876a9 | ||
|
|
71a89c5213 | ||
|
|
93e537b0e7 | ||
|
|
4ec8898ed2 | ||
|
|
25b5df12b4 | ||
|
|
97099dc581 | ||
|
|
ca1671cf52 | ||
|
|
c9b5813511 | ||
|
|
81f4abfa61 | ||
|
|
4a969e2452 | ||
|
|
3f810e8a8d | ||
|
|
55f690fcf8 | ||
|
|
532d29a8d6 | ||
|
|
0522ed6182 | ||
|
|
6a7014114b | ||
|
|
54f084e84f | ||
|
|
772cee1775 | ||
|
|
c5c82e884a | ||
|
|
5c4b6573e0 | ||
|
|
75ea5a353b | ||
|
|
8bad0545d2 | ||
|
|
43d20c0e14 | ||
|
|
f0e53a7f94 | ||
|
|
d02a99cc51 | ||
|
|
f0c7eb55e3 | ||
|
|
63d30c3943 | ||
|
|
62f8897ad3 | ||
|
|
413fe9bc96 | ||
|
|
06bda16b90 | ||
|
|
b65fcc3d26 | ||
|
|
0d341c123b | ||
|
|
067e20f3ac | ||
|
|
4f07bb08e3 | ||
|
|
6f8034a742 | ||
|
|
42136299aa | ||
|
|
92fed40335 | ||
|
|
96e92d4a8f | ||
|
|
ad9f0688b3 | ||
|
|
b1f94d9228 | ||
|
|
a344ad1f7e | ||
|
|
9eb7479998 | ||
|
|
4cd4695c62 | ||
|
|
bd3e32ebf7 | ||
|
|
ca9e947431 | ||
|
|
4b2bbf369a | ||
|
|
bbc26c07ec | ||
|
|
d0fb13f92d | ||
|
|
73a1979bf5 | ||
|
|
b501b653c3 | ||
|
|
45b45a0996 | ||
|
|
aefd1fd339 | ||
|
|
b36a5cf00d | ||
|
|
254317c13b | ||
|
|
9c20f60004 | ||
|
|
5f4fe0fbeb | ||
|
|
fcf3a611ce | ||
|
|
a6a9be0dd4 | ||
|
|
a6364df966 | ||
|
|
4149d38b9c | ||
|
|
4f18cbed74 | ||
|
|
bb4e12b2c7 | ||
|
|
62ad30e1c1 | ||
|
|
785c6dfe30 | ||
|
|
7a7b94beb2 | ||
|
|
7dc9997371 | ||
|
|
55e6937179 | ||
|
|
437d0b9998 | ||
|
|
b4b8c42743 | ||
|
|
ae3fa79206 | ||
|
|
4b15407ebc | ||
|
|
bb44af66f0 | ||
|
|
aeeb933f7f | ||
|
|
ba879fe17f | ||
|
|
ac7c5b723b | ||
|
|
1ef789a202 | ||
|
|
b4da7d0178 | ||
|
|
508cd9d571 | ||
|
|
bb447e2e79 | ||
|
|
72915d01dc | ||
|
|
24325ba33a | ||
|
|
262df23d1f | ||
|
|
4029305d7b | ||
|
|
a4d461898e | ||
|
|
5e6ca2b6ce | ||
|
|
9e9863c4a4 | ||
|
|
46380d5e32 | ||
|
|
51e934d0ca | ||
|
|
ab164926df | ||
|
|
28093e62b9 | ||
|
|
cb7c4224ea | ||
|
|
fbb2d96742 | ||
|
|
2ff22c058f | ||
|
|
5e055843db | ||
|
|
20031b5d47 | ||
|
|
5287589fec | ||
|
|
178a346f13 | ||
|
|
441215969f | ||
|
|
607622cb97 | ||
|
|
0881a73623 | ||
|
|
044a0622ca | ||
|
|
1a9581d0e5 | ||
|
|
ddaf164925 | ||
|
|
04cbe047a1 | ||
|
|
5b1069153e | ||
|
|
96232849d6 | ||
|
|
13ad013053 | ||
|
|
4da5ebaae0 | ||
|
|
bfb2f36115 | ||
|
|
4b9a865733 | ||
|
|
065bab4805 | ||
|
|
8f048ff5c3 | ||
|
|
69cca9fcec | ||
|
|
a3b935d636 | ||
|
|
de1f61c859 | ||
|
|
1ffdbfb2d2 | ||
|
|
059b040a87 | ||
|
|
ca9268141d | ||
|
|
86318c0fed | ||
|
|
f56e5efee7 | ||
|
|
f42078c70b | ||
|
|
f5cd61cf77 | ||
|
|
0d209804ec | ||
|
|
7473e59eb0 | ||
|
|
07d8e58eb6 | ||
|
|
4de8e10801 | ||
|
|
a7489da1b8 | ||
|
|
34bebc33ba | ||
|
|
480e2479f7 | ||
|
|
79df8eec6d | ||
|
|
d949959dec | ||
|
|
e73b0d7414 | ||
|
|
7c28b6cdd0 | ||
|
|
c918d3ebaa | ||
|
|
e0224679c8 | ||
|
|
d51fca7fe7 | ||
|
|
79c5f6e2f2 | ||
|
|
0eb8cfaabf | ||
|
|
191925349f | ||
|
|
56020c16f9 | ||
|
|
ec510c63b0 | ||
|
|
f7e74c3a30 | ||
|
|
4bd15ce43d | ||
|
|
70db807390 | ||
|
|
e4bb284a67 | ||
|
|
29d5f074a5 | ||
|
|
06fe72434e | ||
|
|
73cb535b51 | ||
|
|
8a9d0def72 | ||
|
|
2f3dd0375c | ||
|
|
a7d051abb0 | ||
|
|
f26c457629 | ||
|
|
d1c9dc074b | ||
|
|
574e5b9ff8 | ||
|
|
8f7d447d74 | ||
|
|
f7ea2e575b | ||
|
|
3a006d5799 | ||
|
|
8f03ffc132 | ||
|
|
badfd377f7 | ||
|
|
b640d6c45d | ||
|
|
c69f2487e3 | ||
|
|
fbe077dbf5 | ||
|
|
81a6566595 | ||
|
|
dd9d8bc48b | ||
|
|
6bab037d3e | ||
|
|
0e073f9e60 | ||
|
|
12ead94bf4 | ||
|
|
4c425e533a | ||
|
|
01e6e29005 | ||
|
|
72c1bc0cb8 | ||
|
|
09cb47eb4c | ||
|
|
905c901d26 | ||
|
|
e44077e52a | ||
|
|
43834e9bdf | ||
|
|
939d980271 | ||
|
|
a0db3a87c2 | ||
|
|
034af32f46 | ||
|
|
3baa6c2085 | ||
|
|
f39d23a1df | ||
|
|
6b425ee1f8 | ||
|
|
f33df48dd4 | ||
|
|
48e4d858c6 | ||
|
|
8c807fb452 | ||
|
|
5759bf9ca3 | ||
|
|
3593aaf604 | ||
|
|
2f2b613eb8 | ||
|
|
47ef9b01de | ||
|
|
3968b26505 | ||
|
|
5061a3472f | ||
|
|
01e20772c6 | ||
|
|
b49934f552 | ||
|
|
09238a0e11 | ||
|
|
3105c6b08e | ||
|
|
7c15937189 | ||
|
|
f0c0b4a739 | ||
|
|
08661df6fe | ||
|
|
a24b2e38a3 | ||
|
|
40b109d5ec | ||
|
|
00282894b6 | ||
|
|
6803d4311b | ||
|
|
32b7e91c6f | ||
|
|
a96bc1986d | ||
|
|
7c608e2612 | ||
|
|
94b2b99509 | ||
|
|
40b979d962 | ||
|
|
40d6ffcb6c | ||
|
|
7641f3a574 | ||
|
|
e796403736 | ||
|
|
b765b4d48d | ||
|
|
e50cc71df2 | ||
|
|
ba38052af4 | ||
|
|
85e5549c71 | ||
|
|
e4ff5a17fe | ||
|
|
358850f020 | ||
|
|
54d8fc3551 | ||
|
|
f77aef440f | ||
|
|
579d5295bb | ||
|
|
1655cce14f | ||
|
|
5a96eaa1dd | ||
|
|
6df4ac34f0 | ||
|
|
330423612e | ||
|
|
3ec386db35 | ||
|
|
173e63b603 | ||
|
|
953681fd21 | ||
|
|
44b4495c01 | ||
|
|
30f1dd9fbc | ||
|
|
7bb8660c98 | ||
|
|
7ec64043db | ||
|
|
c870c67bea | ||
|
|
9486ddfb35 | ||
|
|
78848eb4cf | ||
|
|
a485a7c204 | ||
|
|
89bfa11bb3 | ||
|
|
31d43147d3 | ||
|
|
5d72a35b98 | ||
|
|
3694968d0d | ||
|
|
10bfc8f070 | ||
|
|
4b912abd61 | ||
|
|
56edf469ba | ||
|
|
8c9e6feac5 | ||
|
|
f15170afc0 | ||
|
|
eede39545f | ||
|
|
caaf401218 | ||
|
|
d0d73590b5 | ||
|
|
ab11bbcbea | ||
|
|
638c4e8ac2 | ||
|
|
3009001613 | ||
|
|
fcd5a83223 | ||
|
|
328c3e478d | ||
|
|
2f736b27dd | ||
|
|
15e91aa70f | ||
|
|
23ec80b8d1 | ||
|
|
90f9ee4b5e | ||
|
|
e2ab8087fc | ||
|
|
7dcefa5e9b | ||
|
|
e6d5bc9114 | ||
|
|
6865ff80cd | ||
|
|
ed4b3dae69 | ||
|
|
749c17f7c6 | ||
|
|
0a5ae7ed0b |
@@ -1,12 +1,12 @@
|
||||
#set disassemble-next-line on
|
||||
define tr
|
||||
# target remote | m68k-bdm-gdbserver pipe /dev/bdmcf3
|
||||
#target remote | m68k-bdm-gdbserver pipe /dev/bdmcf3
|
||||
target remote | m68k-bdm-gdbserver pipe /dev/tblcf3
|
||||
monitor bdm-reset
|
||||
#target dbug /dev/ttyS0
|
||||
#monitor bdm-reset
|
||||
end
|
||||
define tbtr
|
||||
target remote | m68k-bdm-gdbserver pipe /dev/tblcf3
|
||||
monitor bdm-reset
|
||||
end
|
||||
source mcf5474.gdb
|
||||
set breakpoint auto-hw
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
-bad
|
||||
-bap
|
||||
-bbb
|
||||
-bbo
|
||||
-bl
|
||||
-blf
|
||||
-bli0
|
||||
-bls
|
||||
-bs
|
||||
-cbi0
|
||||
-cdb
|
||||
-cli4
|
||||
-cs
|
||||
-i4
|
||||
-lp
|
||||
-saf
|
||||
-sai
|
||||
-saw
|
||||
-ts4
|
||||
-npcs
|
||||
-npsl
|
||||
|
||||
@@ -1,263 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.500844171">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.500844171" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="BaS_GNU" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.toolchain.gnu.cross.base.500844171" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.251316721" name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.237011896" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.272340778" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.572966236" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
|
||||
<targetPlatform archList="all" binaryParser="" id="cdt.managedbuild.targetPlatform.gnu.cross.1946104397" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder id="cdt.managedbuild.builder.gnu.cross.116010461" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1346392496" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option id="gnu.c.compiler.option.include.paths.869536174" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="/usr/m68k-elf/include"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2036594113" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1539098439" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.983740799" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.406272886" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.57852077" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1399280647" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1268440718" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.468245267" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.1693274825" name="Makefile" rcbsApplicability="disable" resourcePath="Makefile" toolsToInvoke=""/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686" moduleId="org.eclipse.cdt.core.settings" name="firebee-cross">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="BaS_GNU" buildProperties="" description="cross development for firebee firmware" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GmakeErrorParser" id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686" name="firebee-cross" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1967179068" name="Cross GCC" resourceTypeBasedDiscovery="true" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.129963777" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.176129148" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
|
||||
<targetPlatform archList="all" binaryParser="" id="cdt.managedbuild.targetPlatform.gnu.cross.2042576934" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder autoBuildTarget="all" buildPath="${workspace_loc:/BaS_GNU}" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="cdt.managedbuild.builder.gnu.cross.1808605670" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.283290301" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option id="gnu.c.compiler.option.include.paths.103275678" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/BaS_gcc/include}""/>
|
||||
<listOptionValue builtIn="false" value="/usr/m68k-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="/opt/cross-mint/m68k-atari-mint/include"/>
|
||||
<listOptionValue builtIn="false" value="/usr/lib/gcc/m68k-atari-mint/4.6.3/include"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1445023059" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1303101590" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.2089383321" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.305885086" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.413671435" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.88300823" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.810274043" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.719845882" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686.149483996" name="bas_printf.h" rcbsApplicability="disable" resourcePath="include/bas_printf.h" toolsToInvoke=""/>
|
||||
<fileInfo id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686.Makefile" name="Makefile" rcbsApplicability="disable" resourcePath="Makefile" toolsToInvoke=""/>
|
||||
<sourceEntries>
|
||||
<entry excluding="include|sources" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="sources"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="include"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.1557606920">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.1557606920" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.1557606920" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.1557606920.894087346" name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.808036944" name="cdt.managedbuild.toolchain.gnu.cross.base" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.579880707" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.2139341053" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1712307593" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder id="cdt.managedbuild.builder.gnu.cross.1872779390" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1693427002" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option id="gnu.c.compiler.option.include.paths.559413321" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="/usr/m68k-elf/include"/>
|
||||
<listOptionValue builtIn="false" value="/usr/lib/gcc/m68k-elf/4.6.3/include"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.589685537" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.66237432" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.651961483" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.801196180" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1012333610" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.273251286" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2032495512" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1703324170" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.2129741386" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1949654614" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="BaS_GNU.null.2057987123" name="BaS_GNU"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="firebee-cross">
|
||||
<resource resourceType="PROJECT" workspacePath="/BaS_GNU"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Default">
|
||||
<resource resourceType="PROJECT" workspacePath="/BaS_GNU"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
|
||||
<doc-comment-owner id="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentOwner">
|
||||
<path value=""/>
|
||||
</doc-comment-owner>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildTarget>clean</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="ram" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>ram</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="bfl" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>bfl</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.500844171;cdt.managedbuild.toolchain.gnu.cross.base.500844171.251316721;cdt.managedbuild.tool.gnu.cross.c.compiler.1346392496;cdt.managedbuild.tool.gnu.c.compiler.input.2036594113">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686;cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686.;cdt.managedbuild.tool.gnu.cross.c.compiler.1024005096;cdt.managedbuild.tool.gnu.c.compiler.input.1427165564">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="m68k-atari-mint-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686;cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686.;cdt.managedbuild.tool.gnu.cross.c.compiler.283290301;cdt.managedbuild.tool.gnu.c.compiler.input.1445023059">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="m68k-atari-mint-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686;cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686.;cdt.managedbuild.tool.gnu.cross.c.compiler.359669870;cdt.managedbuild.tool.gnu.c.compiler.input.374200372">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.500844171;cdt.managedbuild.toolchain.gnu.cross.base.500844171.251316721;cdt.managedbuild.tool.gnu.cross.c.compiler.915906842;cdt.managedbuild.tool.gnu.c.compiler.input.1420707322">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.500844171;cdt.managedbuild.toolchain.gnu.cross.base.500844171.2140460233;cdt.managedbuild.tool.gnu.cross.c.compiler.915906842.729509112;cdt.managedbuild.tool.gnu.c.compiler.input.2002421488">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1557606920;cdt.managedbuild.toolchain.gnu.cross.base.1557606920.894087346;cdt.managedbuild.tool.gnu.cross.c.compiler.1693427002;cdt.managedbuild.tool.gnu.c.compiler.input.589685537">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>BaS_gcc</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,68 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
|
||||
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
|
||||
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
|
||||
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.checkers.noreturn=Error
|
||||
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()}
|
||||
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
|
||||
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=Info
|
||||
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
|
||||
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>()}
|
||||
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},paramNot\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},else\=>false,afterelse\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>("@(\#)","$Id")}
|
||||
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||
useParentScope=false
|
||||
@@ -1,173 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
indexer/filesToParseUpFront=cstdarg, stdarg.h, stddef.h, sys/resource.h, ctime, sys/types.h, signal.h, cstdio
|
||||
indexer/indexAllFiles=true
|
||||
indexer/indexOnOpen=true
|
||||
indexer/indexUnusedHeadersWithDefaultLang=true
|
||||
indexer/indexerId=org.eclipse.cdt.core.fastIndexer
|
||||
indexer/skipFilesLargerThanMB=80
|
||||
indexer/skipImplicitReferences=false
|
||||
indexer/skipMacroReferences=false
|
||||
indexer/skipReferences=false
|
||||
indexer/skipTypeReferences=false
|
||||
indexer/useHeuristicIncludeResolution=true
|
||||
org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.cdt.core.formatter.alignment_for_assignment=16
|
||||
org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80
|
||||
org.eclipse.cdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.cdt.core.formatter.alignment_for_compact_if=0
|
||||
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression_chain=18
|
||||
org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list=0
|
||||
org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16
|
||||
org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48
|
||||
org.eclipse.cdt.core.formatter.alignment_for_expression_list=0
|
||||
org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.cdt.core.formatter.alignment_for_member_access=0
|
||||
org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain=16
|
||||
org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=next_line
|
||||
org.eclipse.cdt.core.formatter.brace_position_for_block=next_line
|
||||
org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=next_line
|
||||
org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=next_line
|
||||
org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=next_line
|
||||
org.eclipse.cdt.core.formatter.brace_position_for_switch=next_line
|
||||
org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=next_line
|
||||
org.eclipse.cdt.core.formatter.comment.min_distance_between_code_and_line_comment=1
|
||||
org.eclipse.cdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||
org.eclipse.cdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.cdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=false
|
||||
org.eclipse.cdt.core.formatter.indent_access_specifier_extra_spaces=0
|
||||
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true
|
||||
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=false
|
||||
org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=false
|
||||
org.eclipse.cdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.cdt.core.formatter.indentation.size=4
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_before_colon_in_constructor_initializer_list=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.cdt.core.formatter.join_wrapped_lines=true
|
||||
org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.cdt.core.formatter.lineSplit=80
|
||||
org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.cdt.core.formatter.tabulation.char=tab
|
||||
org.eclipse.cdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
@@ -1,3 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
formatter_profile=org.eclipse.cdt.ui.default.allman_profile
|
||||
formatter_settings_version=1
|
||||
@@ -1,2 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
@@ -1,2 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
|
||||
@@ -1,173 +0,0 @@
|
||||
#
|
||||
# Makefile for Firebee BaS
|
||||
#
|
||||
# This Makefile is meant for cross compiling the BaS with Vincent Riviere's cross compilers.
|
||||
# If you want to compile native on an Atari (you will need at least GCC 4.6.3), set
|
||||
# TCPREFIX to be empty.
|
||||
# If you want to compile with the m68k-elf- toolchain, set TCPREFIX accordingly. Requires an extra
|
||||
# installation, but allows source level debugging over BDM with a recent gdb (tested with 7.5),
|
||||
# the m68k BDM tools from sourceforge (http://bdm.sourceforge.net) and a BDM pod (TBLCF and P&E tested).
|
||||
|
||||
# can be either "Y" or "N" (without quotes). "Y" for using the m68k-elf-, "N" for using the m68k-atari-mint
|
||||
# toolchain
|
||||
COMPILE_ELF=Y
|
||||
|
||||
ifeq (Y,$(COMPILE_ELF))
|
||||
TCPREFIX=m68k-elf-
|
||||
EXE=elf
|
||||
FORMAT=elf32-m68k
|
||||
else
|
||||
TCPREFIX=m68k-atari-mint-
|
||||
EXE=s19
|
||||
FORMAT=srec
|
||||
endif
|
||||
|
||||
CC=$(TCPREFIX)gcc
|
||||
LD=$(TCPREFIX)ld
|
||||
CPP=$(TCPREFIX)cpp
|
||||
OBJCOPY=$(TCPREFIX)objcopy
|
||||
AR=$(TCPREFIX)ar
|
||||
RANLIB=$(TCPREFIX)ranlib
|
||||
|
||||
INCLUDE=-Iinclude -Imcdapi
|
||||
CFLAGS=-mcpu=5474\
|
||||
-Wall\
|
||||
-g\
|
||||
-Wno-multichar\
|
||||
-Winline\
|
||||
-O \
|
||||
-fomit-frame-pointer\
|
||||
-ffreestanding\
|
||||
-fleading-underscore\
|
||||
-Wa,--register-prefix-optional
|
||||
|
||||
SRCDIR=sources
|
||||
MCDSRC=mcdapi
|
||||
OBJDIR=objs
|
||||
|
||||
# Linker control file. The final $(LDCFILE) is intermediate only (preprocessed version of $(LDCSRC)
|
||||
LDCFILE=bas.lk
|
||||
LDRFILE=ram.lk
|
||||
LDCSRC=bas.lk.in
|
||||
LDCBSRC=basflash.lk.in
|
||||
LDCBFS=bashflash.lk
|
||||
|
||||
# this Makefile can create the BaS to flash or an arbitrary ram address (for BDM debugging). See
|
||||
# below for the definition of TARGET_ADDRESS
|
||||
FLASH_EXEC=bas.$(EXE)
|
||||
RAM_EXEC=ram.$(EXE)
|
||||
BASFLASH_EXEC=basflash.$(EXE)
|
||||
|
||||
CSRCS= \
|
||||
$(SRCDIR)/sysinit.c \
|
||||
$(SRCDIR)/init_fpga.c \
|
||||
$(SRCDIR)/fault_vectors.c \
|
||||
$(SRCDIR)/interrupts.c \
|
||||
$(SRCDIR)/bas_printf.c \
|
||||
$(SRCDIR)/bas_string.c \
|
||||
$(SRCDIR)/BaS.c \
|
||||
$(SRCDIR)/cache.c \
|
||||
$(SRCDIR)/mmc.c \
|
||||
$(SRCDIR)/unicode.c \
|
||||
$(SRCDIR)/ff.c \
|
||||
$(SRCDIR)/sd_card.c \
|
||||
$(SRCDIR)/wait.c \
|
||||
$(SRCDIR)/s19reader.c \
|
||||
$(SRCDIR)/flash.c \
|
||||
$(SRCDIR)/dma.c \
|
||||
$(SRCDIR)/xhdi_sd.c \
|
||||
$(SRCDIR)/xhdi_interface.c \
|
||||
$(SRCDIR)/pci.c
|
||||
|
||||
ASRCS= \
|
||||
$(SRCDIR)/startcf.S \
|
||||
$(SRCDIR)/mmu.S \
|
||||
$(SRCDIR)/printf_helper.S \
|
||||
$(SRCDIR)/exceptions.S \
|
||||
$(SRCDIR)/supervisor.S \
|
||||
$(SRCDIR)/illegal_instruction.S \
|
||||
$(SRCDIR)/xhdi_vec.S
|
||||
|
||||
MCDSRCS=\
|
||||
$(MCDSRC)/MCD_dmaApi.c \
|
||||
$(MCDSRC)/MCD_tasks.c \
|
||||
$(MCDSRC)/MCD_tasksInit.c
|
||||
|
||||
COBJS=$(patsubst $(SRCDIR)/%.o,$(OBJDIR)/%.o,$(patsubst %.c,%.o,$(CSRCS)))
|
||||
AOBJS=$(patsubst $(SRCDIR)/%.o,$(OBJDIR)/%.o,$(patsubst %.S,%.o,$(ASRCS)))
|
||||
MCDOBJS=$(patsubst $(MCDSRCS)/%.o,$(OBJDIR)/%.o,$(patsubst %.c,%.o,$(MCDSRCS)))
|
||||
|
||||
OBJS=$(COBJS) $(AOBJS) $(MCDOBJS)
|
||||
LIBBAS=libbas.a
|
||||
|
||||
all: fls ram bfl lib
|
||||
fls: $(FLASH_EXEC)
|
||||
ram: $(RAM_EXEC)
|
||||
bfl: $(BASFLASH_EXEC)
|
||||
lib: $(LIBBAS)
|
||||
|
||||
.PHONY clean:
|
||||
@ rm -f $(FLASH_EXEC) $(FLASH_EXEC).elf $(FLASH_EXEC).s19 \
|
||||
$(RAM_EXEC) $(RAM_EXEC).elf $(RAM_EXEC).s19 \
|
||||
$(BASFLASH_EXEC) $(BASFLASH_EXEC).elf $(BASFLASH_EXEC).s19 $(OBJDIR)/basflash.o $(OBJDIR)/basflash_start.o \
|
||||
$(OBJS) $(LIBBAS) \
|
||||
bas.lk bas.map ram.lk ram.map basflash.lk basflash.map depend
|
||||
|
||||
$(FLASH_EXEC): TARGET_ADDRESS=0xe0000000
|
||||
$(FLASH_EXEC): LDCFILE=bas.lk
|
||||
$(FLASH_EXEC): MAPFILE=bas.map
|
||||
|
||||
$(RAM_EXEC): TARGET_ADDRESS=0x1ff00000
|
||||
$(RAM_EXEC): LDCFILE=ram.lk
|
||||
$(RAM_EXEC): MAPFILE=ram.map
|
||||
|
||||
$(BASFLASH_EXEC): TARGET_ADDRESS=0x00100000
|
||||
$(BASFLASH_EXEC): LDCFILE=basflash.lk
|
||||
$(BASFLASH_EXEC): MAPFILE=basflash.map
|
||||
|
||||
# the final link stage (BaS in RAM and BaS in flash)
|
||||
$(FLASH_EXEC) $(RAM_EXEC): $(LIBBAS) $(LDCSRC)
|
||||
$(CPP) -P -DTARGET_ADDRESS=$(TARGET_ADDRESS) -DFORMAT=$(FORMAT) $(LDCSRC) -o $(LDCFILE)
|
||||
$(LD) --oformat $(FORMAT) -Map $(MAPFILE) --cref -T $(LDCFILE) -o $@
|
||||
ifeq ($(COMPILE_ELF),Y)
|
||||
$(OBJCOPY) -O srec $@ $@.s19
|
||||
else
|
||||
objcopy -I srec -O elf32-big --alt-machine-code 4 $@ $@.elf
|
||||
endif
|
||||
|
||||
# the basflash (SD-card executable called from BaS) final link stage
|
||||
$(BASFLASH_EXEC): $(OBJDIR)/basflash.o $(OBJDIR)/basflash_start.o $(LIBBAS) $(LDCBFL)
|
||||
$(CPP) -P -DTARGET_ADDRESS=$(TARGET_ADDRESS) -DFORMAT=$(FORMAT) $(LDCBSRC) -o $(LDCFILE)
|
||||
$(LD) --oformat $(FORMAT) -Map $(MAPFILE) --cref -T $(LDCFILE) -L. -lbas -o $@
|
||||
ifeq ($(COMPILE_ELF),Y)
|
||||
$(OBJCOPY) -O srec $@ $@.s19
|
||||
else
|
||||
objcopy -I srec -O elf32-big --alt-machine-code 4 $@ $@.elf
|
||||
endif
|
||||
|
||||
# (re)create library. Currently suboptimal because it rewrites the whole lib even if only a single object changed
|
||||
$(LIBBAS): $(OBJS)
|
||||
$(AR) rv $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
# compile init_fpga with -mbitfield for testing purposes
|
||||
#$(OBJDIR)/init_fpga.o: CFLAGS += -mbitfield
|
||||
|
||||
# compile printf pc-relative so it can be used as well before and after copy of BaS
|
||||
#$(OBJDIR)/bas_printf.o: CFLAGS += -mpcrel
|
||||
# the same for flush_and_invalidate_cache()
|
||||
#$(OBJDIR)/cache.o: CFLAGS += -mpcrel
|
||||
|
||||
$(OBJDIR)/%.o:$(SRCDIR)/%.c
|
||||
$(CC) -c $(CFLAGS) $(INCLUDE) $< -o $@
|
||||
|
||||
$(OBJDIR)/%.o:$(SRCDIR)/%.S
|
||||
$(CC) -c $(CFLAGS) -Wa,--bitwise-or $(INCLUDE) $< -o $@
|
||||
|
||||
depend: $(ASRCS) $(CSRCS)
|
||||
$(CC) $(CFLAGS) $(INCLUDE) -M $(ASRCS) $(CSRCS) | sed -e 's/^\(.*\).o:/$(OBJDIR)\/\1.o:/' > depend
|
||||
|
||||
|
||||
ifneq (clean,$(MAKECMDGOALS))
|
||||
-include depend
|
||||
endif
|
||||
@@ -1,183 +0,0 @@
|
||||
MEMORY
|
||||
{
|
||||
bas_rom (RX) : ORIGIN = TARGET_ADDRESS, LENGTH = 0x00100000
|
||||
/*
|
||||
* target to copy BaS data segment to. 20k should be enough for now
|
||||
*/
|
||||
bas_ram (WX) : ORIGIN = 0x1FFFC000, LENGTH = 0x005000
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* BaS in ROM */
|
||||
.text :
|
||||
{
|
||||
objs/startcf.o(.text) /* this one is the entry point so it must be the first */
|
||||
objs/sysinit.o(.text)
|
||||
objs/fault_vectors.o(.text)
|
||||
objs/init_fpga.o(.text)
|
||||
objs/wait.o(.text)
|
||||
objs/exceptions.o(.text)
|
||||
objs/illegal_instruction.o(.text)
|
||||
objs/supervisor.o(.text)
|
||||
objs/mmu.o(.text)
|
||||
|
||||
objs/BaS.o(.text)
|
||||
objs/wait.o(.text)
|
||||
|
||||
/* put other routines into the same segment (RAM) as BaS.o */
|
||||
objs/unicode.o(.text)
|
||||
objs/mmc.o(.text)
|
||||
objs/ff.o(.text)
|
||||
objs/sd_card.o(.text)
|
||||
objs/s19reader.o(.text)
|
||||
objs/bas_printf.o(.text)
|
||||
objs/bas_string.o(.text)
|
||||
objs/printf_helper.o(.text)
|
||||
objs/cache.o(.text)
|
||||
objs/dma.o(.text)
|
||||
mcdapi/MCD_dmaApi.o(.text)
|
||||
mcdapi/MCD_tasks.o(.text)
|
||||
mcdapi/MCD_tasksInit.o(.text)
|
||||
objs/xhdi_sd.o(.text)
|
||||
objs/xhdi_interface.o(.text)
|
||||
objs/xhdi_vec.o(.text)
|
||||
|
||||
/*
|
||||
* if we compile to RAM anyway, there is no need to copy anything
|
||||
*/
|
||||
#if (TARGET_ADDRESS < 0x1FFFFFFF && TARGET_ADDRESS > 0)
|
||||
. = ALIGN(16);
|
||||
__BAS_DATA_START = .;
|
||||
*(.data)
|
||||
__BAS_DATA_END = .;
|
||||
*(.bss)
|
||||
. = ALIGN(16);
|
||||
#endif /* TARGET_ADDRESS */
|
||||
|
||||
#if (FORMAT == elf32-m68k)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
#endif
|
||||
} > bas_rom
|
||||
|
||||
#if (TARGET_ADDRESS == 0xe0000000)
|
||||
/* BaS in RAM */
|
||||
.bas :
|
||||
/*
|
||||
* The BaS is stored in the flash, just after the init part.
|
||||
* Then it will be copied to its final location in the RAM.
|
||||
* This data must be aligned for optimal copy loop speed.
|
||||
*/
|
||||
AT (ALIGN(ADDR(.text) + SIZEOF(.text), 4))
|
||||
{
|
||||
. = ALIGN(16);
|
||||
__BAS_DATA_START = .;
|
||||
*(.data)
|
||||
__BAS_DATA_END = .;
|
||||
*(.bss)
|
||||
|
||||
/* The BaS copy routine assumes that tha BaS size
|
||||
* is a multiple of the following value.
|
||||
*/
|
||||
. = ALIGN(16);
|
||||
} > bas_ram
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global memory map
|
||||
*/
|
||||
|
||||
/* SDRAM Initialization @ 0000_0000 - 1FFF_FFFF 512Mbytes */
|
||||
___SDRAM = 0x00000000;
|
||||
___SDRAM_SIZE = 0x20000000;
|
||||
_SDRAM_VECTOR_TABLE = ___SDRAM;
|
||||
|
||||
/* ST-RAM */
|
||||
__STRAM = ___SDRAM;
|
||||
__STRAM_END = __TOS;
|
||||
|
||||
/* TOS */
|
||||
__TOS = 0x00e00000;
|
||||
|
||||
/* FastRAM */
|
||||
__FASTRAM = 0x10000000;
|
||||
__TARGET_ADDRESS = TARGET_ADDRESS;
|
||||
|
||||
#if TARGET_ADDRESS == 0xe0000000
|
||||
__FASTRAM_END = __BAS_IN_RAM;
|
||||
#else
|
||||
__FASTRAM_END = TARGET_ADDRESS;
|
||||
#endif
|
||||
|
||||
/* Init CS0 (BootFLASH @ E000_0000 - E07F_FFFF 8Mbytes) */
|
||||
___BOOT_FLASH = 0xe0000000;
|
||||
___BOOT_FLASH_SIZE = 0x00800000;
|
||||
|
||||
#if TARGET_ADDRESS == 0xe0000000
|
||||
/* BaS */
|
||||
__BAS_LMA = LOADADDR(.bas);
|
||||
__BAS_IN_RAM = ADDR(.bas);
|
||||
__BAS_SIZE = SIZEOF(.bas);
|
||||
#else
|
||||
/* BaS is already in RAM - no need to copy anything */
|
||||
__BAS_IN_RAM = __FASTRAM_END;
|
||||
__BAS_SIZE = 0;
|
||||
__BAS_LMA = __BAS_IN_RAM;
|
||||
#endif
|
||||
|
||||
/* Other flash components */
|
||||
__FIRETOS = 0xe0400000;
|
||||
__EMUTOS = 0xe0600000;
|
||||
__EMUTOS_SIZE = 0x00100000;
|
||||
|
||||
/* where FPGA data lives in flash */
|
||||
__FPGA_FLASH_DATA = 0xe0700000;
|
||||
__FPGA_FLASH_DATA_SIZE = 0x100000;
|
||||
|
||||
/* VIDEO RAM BASIS */
|
||||
__VRAM = 0x60000000;
|
||||
|
||||
/* Memory mapped registers */
|
||||
__MBAR = 0xFF000000;
|
||||
|
||||
/* 32KB on-chip System SRAM */
|
||||
__SYS_SRAM = __MBAR + 0x10000;
|
||||
__SYS_SRAM_SIZE = 0x00008000;
|
||||
|
||||
/* MMU memory mapped registers */
|
||||
__MMUBAR = 0xFF040000;
|
||||
|
||||
/*
|
||||
* 4KB on-chip Core SRAM0: -> exception table
|
||||
*/
|
||||
__RAMBAR0 = 0xFF100000;
|
||||
__RAMBAR0_SIZE = 0x00001000;
|
||||
|
||||
__SUP_SP = __RAMBAR0 + __RAMBAR0_SIZE - 4;
|
||||
|
||||
/* system variables */
|
||||
|
||||
/* RAMBAR0 0 to 0x7FF -> exception vectors */
|
||||
_rt_mod = __RAMBAR0 + 0x800;
|
||||
_rt_ssp = __RAMBAR0 + 0x804;
|
||||
_rt_usp = __RAMBAR0 + 0x808;
|
||||
_rt_vbr = __RAMBAR0 + 0x80C; /* (8)01 */
|
||||
_rt_cacr = __RAMBAR0 + 0x810; /* 002 */
|
||||
_rt_asid = __RAMBAR0 + 0x814; /* 003 */
|
||||
_rt_acr0 = __RAMBAR0 + 0x818; /* 004 */
|
||||
_rt_acr1 = __RAMBAR0 + 0x81c; /* 005 */
|
||||
_rt_acr2 = __RAMBAR0 + 0x820; /* 006 */
|
||||
_rt_acr3 = __RAMBAR0 + 0x824; /* 007 */
|
||||
_rt_mmubar = __RAMBAR0 + 0x828; /* 008 */
|
||||
_rt_sr = __RAMBAR0 + 0x82c;
|
||||
_d0_save = __RAMBAR0 + 0x830;
|
||||
_a7_save = __RAMBAR0 + 0x834;
|
||||
_video_tlb = __RAMBAR0 + 0x838;
|
||||
_video_sbt = __RAMBAR0 + 0x83C;
|
||||
_rt_mbar = __RAMBAR0 + 0x844; /* (c)0f */
|
||||
|
||||
/* 4KB on-chip Core SRAM1 */
|
||||
__RAMBAR1 = 0xFF101000;
|
||||
__RAMBAR1_SIZE = 0x00001000;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* bas_string.h
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: mfro
|
||||
*/
|
||||
|
||||
#ifndef BAS_STRING_H_
|
||||
#define BAS_STRING_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern int strncmp(const char *s1, const char *s2, int max);
|
||||
extern char *strcpy(char *dst, const char *src);
|
||||
char *strncpy(char *dst, const char *src, int max);
|
||||
extern size_t strlen(const char *str);
|
||||
extern char *strcat(char *dst, const char *src);
|
||||
extern char *strncat(char *dst, const char *src, int max);
|
||||
extern int atoi(const char *c);
|
||||
extern void *memcpy(void *dst, const void *src, size_t n);
|
||||
extern void bzero(void *s, size_t n);
|
||||
|
||||
#define isdigit(c) (((c) >= '0') && ((c) <= '9'))
|
||||
#define isupper(c) ((c) >= 'A' && ((c) <= 'Z'))
|
||||
#define islower(c) ((c) >= 'a' && ((c) <= 'z'))
|
||||
#define isalpha(c) (isupper((c)) || islower(c))
|
||||
#define tolower(c) (isupper(c) ? ((c) + 'a' - 'A') : (c))
|
||||
|
||||
#endif /* BAS_STRING_H_ */
|
||||
@@ -1,14 +0,0 @@
|
||||
/*
|
||||
* bas_utils.h
|
||||
*
|
||||
* Created on: 08.08.2013
|
||||
* Author: froesm1
|
||||
*/
|
||||
|
||||
#ifndef _BAS_UTILS_H_
|
||||
#define _BAS_UTILS_H_
|
||||
|
||||
#define CLEAR_BIT(p,bit) p &= ~(bit)
|
||||
#define CLEAR_BIT_NO(p,nr) CLEAR_BIT(p, (1 << (nr)))
|
||||
|
||||
#endif /* _BAS_UTILS_H_ */
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* spidma.h
|
||||
*
|
||||
* Created on: 27.07.2013
|
||||
* Author: mfro
|
||||
*/
|
||||
|
||||
#ifndef _SPIDMA_H_
|
||||
#define _SPIDMA_H_
|
||||
|
||||
#include <MCF5475.h>
|
||||
|
||||
extern int dma_init(void);
|
||||
|
||||
|
||||
#endif /* _SPIDMA_H_ */
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* mmu.h
|
||||
*
|
||||
* Created on: 01.08.2013
|
||||
* Author: froesm1
|
||||
*/
|
||||
|
||||
#ifndef _MMU_H_
|
||||
#define _MMU_H_
|
||||
|
||||
#define STD_MMUTR (MCF_MMU_MMUTR_SG | MCF_MMU_MMUTR_V)
|
||||
#define MMUORD_D (MCF_MMU_MMUOR_ACC | MCF_MMU_MMUOR_UAA)
|
||||
#define MMUORD_I (MCF_MMU_MMUOR_ITLB | MCF_MMU_MMUOR_ACC | MCF_MMU_MMUOR_UAA)
|
||||
|
||||
#define WRITETHROUGH_MMUDR (MCF_MMU_MMUDR_SZ(00) | MCF_MMU_MMUDR_CM(00) | MCF_MMU_MMUDR_R | MCF_MMU_MMUDR_W | MCF_MMU_MMUDR_X)
|
||||
#define COPYBACK_MMUDR (MCF_MMU_MMUDR_SZ(00) | MCF_MMU_MMUDR_CM(01) | MCF_MMU_MMUDR_R | MCF_MMU_MMUDR_W | MCF_MMU_MMUDR_X)
|
||||
#define NOCACHE_PRECISE_MMUDR (MCF_MMU_MMUDR_SZ(00) | MCF_MMU_MMUDR_CM(10) | MCF_MMU_MMUDR_R | MCF_MMU_MMUDR_W | MCF_MMU_MMUDR_X)
|
||||
|
||||
#define SCA_PAGE_ID 6
|
||||
|
||||
/*
|
||||
* global variables from linker script
|
||||
*/
|
||||
extern long video_tlb;
|
||||
extern long video_sbt;
|
||||
|
||||
extern void mmu_init(void);
|
||||
extern void mmutr_miss(void) __attribute__((interrupt));
|
||||
|
||||
#endif /* _MMU_H_ */
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef _PCI_H_
|
||||
#define _PCI_H_
|
||||
|
||||
#define PCI_MEMORY_OFFSET 0x80000000
|
||||
#define PCI_MEMORY_SIZE 0x40000000
|
||||
#define PCI_IO_OFFSET 0xB0000000
|
||||
#define PCI_IO_SIZE 0x10000000
|
||||
|
||||
|
||||
#endif /* _PCI_H_ */
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
#define cf_stack
|
||||
|
||||
#define DIP_SWITCH (*(volatile uint8_t *)(&_MBAR[0xA2C]))
|
||||
#define DIP_SWITCHa __MBAR + 0xA2C
|
||||
|
||||
#define sca_page_ID 6
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
/*
|
||||
* File: MCD_tasksInit.c
|
||||
* Purpose: Functions for initializing variable tables of different
|
||||
* types of tasks.
|
||||
*
|
||||
* Notes:
|
||||
*/
|
||||
|
||||
/*
|
||||
* Do not edit!
|
||||
*/
|
||||
|
||||
#include "MCD_dma.h"
|
||||
#include "MCD_tasksInit.h"
|
||||
|
||||
extern dmaRegs *MCD_dmaBar;
|
||||
|
||||
|
||||
/*
|
||||
* Task 0
|
||||
*/
|
||||
|
||||
void MCD_startDmaChainNoEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 2, (u32)currBD); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (u32)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (u32)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (u32)xferSize); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (u32)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (u32)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (u32)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (u32)0x00000000); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (u32)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (u32)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (u32)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (u32)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (u32)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (u32)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (u32)0x00000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (u32)0x00000000); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 13, (u32)0x80000000); /* var[13] */
|
||||
MCD_SET_VAR(taskTable+channel, 14, (u32)0x00000010); /* var[14] */
|
||||
MCD_SET_VAR(taskTable+channel, 15, (u32)0x00000004); /* var[15] */
|
||||
MCD_SET_VAR(taskTable+channel, 16, (u32)0x08000000); /* var[16] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (u32)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (u32)0x80000000); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (u32)0x80000001); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (u32)0x40000000); /* inc[6] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (u16)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 1
|
||||
*/
|
||||
|
||||
void MCD_startDmaSingleNoEu(char *srcAddr, short srcIncr, char *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 7, (u32)srcAddr); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (u32)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (u32)destAddr); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (u32)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (u32)dmaSize); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (u32)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (u32)flags); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (u32)currBD); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (u32)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (u32)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (u32)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (u32)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (u32)0x00000004); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (u32)0x08000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (u32)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (u32)0x80000001); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (u32)0x40000000); /* inc[5] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (u16)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 2
|
||||
*/
|
||||
|
||||
void MCD_startDmaChainEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 3, (u32)currBD); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (u32)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (u32)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (u32)xferSize); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (u32)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (u32)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (u32)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (u32)0x00000000); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (u32)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (u32)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (u32)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (u32)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (u32)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (u32)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (u32)0x00000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (u32)0x00000000); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 13, (u32)0x00000000); /* var[13] */
|
||||
MCD_SET_VAR(taskTable+channel, 14, (u32)0x80000000); /* var[14] */
|
||||
MCD_SET_VAR(taskTable+channel, 15, (u32)0x00000010); /* var[15] */
|
||||
MCD_SET_VAR(taskTable+channel, 16, (u32)0x00000001); /* var[16] */
|
||||
MCD_SET_VAR(taskTable+channel, 17, (u32)0x00000004); /* var[17] */
|
||||
MCD_SET_VAR(taskTable+channel, 18, (u32)0x08000000); /* var[18] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (u32)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (u32)0x80000000); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (u32)0xc0000000); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (u32)0x80000001); /* inc[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 31, (u32)0x40000000); /* inc[7] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (u16)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 3
|
||||
*/
|
||||
|
||||
void MCD_startDmaSingleEu(char *srcAddr, short srcIncr, char *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 8, (u32)srcAddr); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (u32)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (u32)destAddr); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (u32)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (u32)dmaSize); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (u32)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (u32)flags); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (u32)currBD); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (u32)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (u32)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (u32)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (u32)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (u32)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (u32)0x00000001); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (u32)0x00000004); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (u32)0x08000000); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (u32)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (u32)0xc0000000); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (u32)0x80000000); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (u32)0x80000001); /* inc[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 31, (u32)0x40000000); /* inc[7] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (u16)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 4
|
||||
*/
|
||||
|
||||
void MCD_startDmaENetRcv(char *bDBase, char *currBD, char *rcvFifoPtr, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 0, (u32)bDBase); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (u32)currBD); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (u32)rcvFifoPtr); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (u32)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (u32)0x00000000); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (u32)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (u32)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (u32)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (u32)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (u32)0x0000ffff); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (u32)0x30000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (u32)0x0fffffff); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (u32)0x00000008); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (u32)0x00000000); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (u32)0x60000000); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (u32)0x20000004); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (u32)0x40000000); /* inc[3] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (u16)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 5
|
||||
*/
|
||||
|
||||
void MCD_startDmaENetXmit(char *bDBase, char *currBD, char *xmitFifoPtr, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 0, (u32)bDBase); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (u32)currBD); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (u32)xmitFifoPtr); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (u32)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (u32)0x00000000); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (u32)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (u32)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (u32)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (u32)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (u32)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (u32)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (u32)0x00000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (u32)0x00000000); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 13, (u32)0x0000ffff); /* var[13] */
|
||||
MCD_SET_VAR(taskTable+channel, 14, (u32)0xffffffff); /* var[14] */
|
||||
MCD_SET_VAR(taskTable+channel, 15, (u32)0x00000004); /* var[15] */
|
||||
MCD_SET_VAR(taskTable+channel, 16, (u32)0x00000008); /* var[16] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (u32)0x00000000); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (u32)0x60000000); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (u32)0x40000000); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (u32)0xc000fffc); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (u32)0xe0000004); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (u32)0x80000000); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (u32)0x4000ffff); /* inc[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 31, (u32)0xe0000001); /* inc[7] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (u16)0x8000;
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
#ifndef MCD_TSK_INIT_H
|
||||
#define MCD_TSK_INIT_H 1
|
||||
|
||||
/*
|
||||
* Do not edit!
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Task 0
|
||||
*/
|
||||
void MCD_startDmaChainNoEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 1
|
||||
*/
|
||||
void MCD_startDmaSingleNoEu(char *srcAddr, short srcIncr, char *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 2
|
||||
*/
|
||||
void MCD_startDmaChainEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 3
|
||||
*/
|
||||
void MCD_startDmaSingleEu(char *srcAddr, short srcIncr, char *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 4
|
||||
*/
|
||||
void MCD_startDmaENetRcv(char *bDBase, char *currBD, char *rcvFifoPtr, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 5
|
||||
*/
|
||||
void MCD_startDmaENetXmit(char *bDBase, char *currBD, char *xmitFifoPtr, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
#endif /* MCD_TSK_INIT_H */
|
||||
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
* bas_string.c
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: mfro
|
||||
*/
|
||||
|
||||
#include "bas_types.h"
|
||||
#include <stdint.h>
|
||||
#include "bas_string.h"
|
||||
|
||||
void *memcpy(void *dst, const void *src, size_t n)
|
||||
{
|
||||
uint8_t *to = dst;
|
||||
|
||||
while (to < (uint8_t *) dst + n)
|
||||
*to++ = * (uint8_t *) src++;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
void bzero(void *s, size_t n)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
((unsigned char *) s)[i] = '\0';
|
||||
}
|
||||
|
||||
|
||||
int strncmp(const char *s1, const char *s2, int max)
|
||||
{
|
||||
int i;
|
||||
int cmp;
|
||||
|
||||
for (i = 0; i < max && *s1++ && *s2++; i++);
|
||||
{
|
||||
cmp = (*s1 - *s2);
|
||||
if (cmp != 0) return cmp;
|
||||
}
|
||||
return cmp;
|
||||
}
|
||||
|
||||
char *strcpy(char *dst, const char *src)
|
||||
{
|
||||
char *ptr = dst;
|
||||
|
||||
while ((*dst++ = *src++) != '\0');
|
||||
return ptr;
|
||||
}
|
||||
|
||||
char *strncpy(char *dst, const char *src, int max)
|
||||
{
|
||||
char *ptr = dst;
|
||||
|
||||
while ((*dst++ = *src++) != '\0' && max-- >= 0);
|
||||
return ptr;
|
||||
}
|
||||
int atoi(const char *c)
|
||||
{
|
||||
int value = 0;
|
||||
while (isdigit(*c))
|
||||
{
|
||||
value *= 10;
|
||||
value += (int) (*c - '0');
|
||||
c++;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
size_t strlen(const char *s)
|
||||
{
|
||||
const char *start = s;
|
||||
|
||||
while (*s++);
|
||||
|
||||
return s - start - 1;
|
||||
}
|
||||
|
||||
|
||||
char *strcat(char *dst, const char *src)
|
||||
{
|
||||
char *ret = dst;
|
||||
dst = &dst[strlen(dst)];
|
||||
while ((*dst++ = *src++) != '\0');
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *strncat(char *dst, const char *src, int max)
|
||||
{
|
||||
int i;
|
||||
char *ret = dst;
|
||||
|
||||
dst = &dst[strlen(dst)];
|
||||
for (i = 0; i < max && *src; i++)
|
||||
{
|
||||
*dst++ = *src++;
|
||||
}
|
||||
*dst++ = '\0';
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* basflash_start.c
|
||||
*
|
||||
* Created on: 16.02.2013
|
||||
* Author: mfro
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static uint32_t ownstack[4096];
|
||||
static uint32_t *stackptr = &ownstack[4095];
|
||||
|
||||
/*
|
||||
* setup our own stack in SDRAM to prevent clashing BaS's in SRAM (size limited).
|
||||
*/
|
||||
void startup(void)
|
||||
{
|
||||
static uint32_t oldstack;
|
||||
|
||||
void basflash(void);
|
||||
__asm__ __volatile__("move.l sp,%0\n\t" : "=g"(oldstack) : :);
|
||||
__asm__ __volatile__("move.l %0,sp\n\t" : : "g"(stackptr) : );
|
||||
basflash();
|
||||
__asm__ __volatile__("move.l %0,sp\n\t" : : "g"(oldstack) : "sp");
|
||||
(void) stackptr; /* make compiler happy about unused variables */
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
/*
|
||||
* dma.c
|
||||
*
|
||||
* Created on: 27.07.2013
|
||||
* Author: mfro
|
||||
*/
|
||||
|
||||
#include "dma.h"
|
||||
#include <MCD_dma.h>
|
||||
#include "mcd_initiators.h"
|
||||
#include "bas_printf.h"
|
||||
#include "bas_string.h"
|
||||
#include "cache.h"
|
||||
|
||||
extern char _SYS_SRAM[];
|
||||
#define SYS_SRAM &_SYS_SRAM[0]
|
||||
|
||||
void print_sp(void)
|
||||
{
|
||||
register char *sp asm("sp");
|
||||
xprintf("sp=%x\r\n", sp);
|
||||
}
|
||||
|
||||
|
||||
void *dma_memcpy(void *dst, void *src, size_t n)
|
||||
{
|
||||
int ret;
|
||||
volatile int32_t time;
|
||||
volatile int32_t start;
|
||||
volatile int32_t end;
|
||||
uint8_t *d;
|
||||
uint8_t *s;
|
||||
|
||||
xprintf("compare memcpy() to memory to memory DMA from %p to %p (0x%x bytes ending at 0x%x)\r\n",
|
||||
src, dst, n, dst + n);
|
||||
d = dst;
|
||||
s = src;
|
||||
|
||||
//#ifdef _NOT_USED_
|
||||
start = MCF_SLT0_SCNT;
|
||||
/* first check if we can do a "traditional" memcpy() to the destination and measure speed */
|
||||
|
||||
memcpy(d, s, n);
|
||||
|
||||
//#endif /* _NOT_USED_ */
|
||||
|
||||
end = MCF_SLT0_SCNT;
|
||||
|
||||
time = (start - end) / 132 / 1000;
|
||||
xprintf("memcpy() took %d ms (%d.%d Mbytes/second)\r\n",
|
||||
time, n / time / 1000, n / time % 1000);
|
||||
flush_and_invalidate_caches();
|
||||
//#endif
|
||||
|
||||
xprintf("clear target area after memcpy():");
|
||||
start = MCF_SLT0_SCNT;
|
||||
bzero(dst, n);
|
||||
end = MCF_SLT0_SCNT;
|
||||
time = (start - end) / 132;
|
||||
xprintf("bzero() took %d ms (%d.%d Mbytes/second)\r\n", time, n / time / 1000, n / time % 1000);
|
||||
|
||||
xprintf(" finished, flush caches: ");
|
||||
flush_and_invalidate_caches();
|
||||
xprintf("finished\r\n");
|
||||
|
||||
start = MCF_SLT0_SCNT;
|
||||
ret = MCD_startDma(1, src, 4, dst, 4, n, 4, DMA_ALWAYS, 0, MCD_SINGLE_DMA, 0);
|
||||
if (ret == MCD_OK)
|
||||
{
|
||||
xprintf("DMA on channel 1 successfully started\r\n");
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
ret = MCD_dmaStatus(1);
|
||||
switch (ret)
|
||||
{
|
||||
case MCD_NO_DMA:
|
||||
xprintf("MCD_NO_DMA: no DMA active on this channel\r\n");
|
||||
return NULL;
|
||||
break;
|
||||
case MCD_IDLE:
|
||||
xprintf("MCD_IDLE: DMA defined but not active (initiator not ready)\r\n");
|
||||
break;
|
||||
case MCD_RUNNING:
|
||||
xprintf("MCD_RUNNING: DMA active and working on this channel\r\n");
|
||||
break;
|
||||
case MCD_PAUSED:
|
||||
xprintf("MCD_PAUSED: DMA defined and enabled, but currently paused\r\n");
|
||||
break;
|
||||
case MCD_HALTED:
|
||||
xprintf("MCD_HALTED: DMA killed\r\n");
|
||||
return NULL;
|
||||
break;
|
||||
case MCD_DONE:
|
||||
xprintf("MCD_DONE: DMA finished\r\n");
|
||||
break;
|
||||
case MCD_CHANNEL_INVALID:
|
||||
xprintf("MCD_CHANNEL_INVALID: invalid DMA channel\r\n");
|
||||
return NULL;
|
||||
break;
|
||||
default:
|
||||
xprintf("unknown DMA status %d\r\n", ret);
|
||||
break;
|
||||
}
|
||||
} while (ret != MCD_DONE);
|
||||
|
||||
end = MCF_SLT0_SCNT;
|
||||
time = (start - end) / 132 / 1000;
|
||||
xprintf("start = %d, end = %d, time = %d\r\n", start, end, time);
|
||||
//xprintf("took %d ms (%d.%d Mbytes/second)\r\n", time, n / time / 1000, n / time % 1000);
|
||||
|
||||
/*
|
||||
* verify if copy succeeded
|
||||
*/
|
||||
xprintf("verify if DMA copy succeeded:\r\n");
|
||||
|
||||
xprintf("flush caches first:");
|
||||
flush_and_invalidate_caches();
|
||||
xprintf(" done.\r\n");
|
||||
|
||||
s = src;
|
||||
d = dst;
|
||||
|
||||
start = MCF_SLT0_SCNT;
|
||||
do
|
||||
{
|
||||
if (*d != *s)
|
||||
{
|
||||
xprintf("copy verification failed: %d (%p) != %d (%p) !\r\n", *d, d, *s, s);
|
||||
break;
|
||||
}
|
||||
d++; s++;
|
||||
} while (d < (uint8_t *) dst + n);
|
||||
if (d >= (uint8_t *) dst + n)
|
||||
{
|
||||
xprintf("DMA copy verification successful!\r\n");
|
||||
end = MCF_SLT0_SCNT;
|
||||
|
||||
time = (start - end) / 132 / 1000;
|
||||
xprintf("took %d ms (%d.%d Mbytes/second)\r\n", time, n / time / 1000, n / time % 1000);
|
||||
|
||||
}
|
||||
|
||||
#ifdef _NOT_USED_
|
||||
__asm__ __volatile__("move.w sr,d0\n\t"
|
||||
"stop #0x2700\n\t"
|
||||
"move.w d0,sr": : :); /* halt CPU until DMA finished */
|
||||
#endif /* _NOT_USED_ */
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
int dma_init(void)
|
||||
{
|
||||
int res;
|
||||
int version;
|
||||
char *long_version;
|
||||
|
||||
xprintf("MCD DMA API initialization: ");
|
||||
res = MCD_initDma((dmaRegs *) &_MBAR[0x8000], SYS_SRAM, MCD_RELOC_TASKS | MCD_COMM_PREFETCH_EN);
|
||||
if (res != MCD_OK)
|
||||
{
|
||||
xprintf("DMA API initialization failed (0x%x)\r\n", res);
|
||||
return 0;
|
||||
}
|
||||
version = MCD_getVersion(&long_version);
|
||||
xprintf("DMA API version %d.%d initialized. Tasks are at %p\r\n", version / 0xff, version % 0xff, SYS_SRAM);
|
||||
|
||||
// test
|
||||
dma_memcpy((void *) 0x01000000, (void *) 0xe0000000, 0x00100000); /* copy one megabyte of flash to RAM */
|
||||
|
||||
xprintf("DMA finished\r\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
/*
|
||||
* flash.c
|
||||
*
|
||||
* flashing routines for BaS_gcc
|
||||
*
|
||||
* Created on: 19.12.2012
|
||||
* Author: mfro
|
||||
* The ACP Firebee project
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc 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 BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2012 M. Froeschle
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void chip_erase(uint8_t *address)
|
||||
{
|
||||
* (volatile uint8_t *) (address + 0xaaa) = 0xaa;
|
||||
* (volatile uint8_t *) (address + 0x555) = 0x55;
|
||||
* (volatile uint8_t *) (address + 0xaaa) = 0x80;
|
||||
* (volatile uint8_t *) (address + 0xaaa) = 0xaa;
|
||||
* (volatile uint8_t *) (address + 0x555) = 0x55;
|
||||
* (volatile uint8_t *) (address + 0xaaa) = 0x10;
|
||||
}
|
||||
|
||||
void sector_erase(uint8_t *address, uint16_t sector)
|
||||
{
|
||||
* (volatile uint8_t *) (address + 0xaaa) = 0xaa;
|
||||
* (volatile uint8_t *) (address + 0x555) = 0x55;
|
||||
* (volatile uint8_t *) (address + 0xaaa) = 0x80;
|
||||
* (volatile uint8_t *) (address + 0xaaa) = 0xaa;
|
||||
* (volatile uint8_t *) (address + 0x555) = 0x55;
|
||||
* (volatile uint8_t *) (address + sector) = 0x30;
|
||||
|
||||
do {
|
||||
;
|
||||
} while (* (volatile uint32_t *) (address + sector) != 0xffffffff);
|
||||
}
|
||||
|
||||
|
||||
#ifdef _NOT_USED_
|
||||
* MX28LV640DB.alg
|
||||
bra lab0x5a
|
||||
move.w #0xaa,d0
|
||||
move.w d0,0xaaa(a5)
|
||||
move.w #0xff,d0
|
||||
move.w d0,0x554(a5)
|
||||
move.w #0x20,d0
|
||||
move.w d0,0xaaa(a5)
|
||||
lab0x1c:
|
||||
move.w #0xa0,d0
|
||||
move.w d0,(a5)
|
||||
moveq #0,d0
|
||||
move.w (a3),d0
|
||||
move.w d0,(a4)
|
||||
lab0x28:
|
||||
move.w (a4),d1
|
||||
andi.l #0xffff,d1
|
||||
cmp.l d1,d0
|
||||
bne.s lab0x28
|
||||
adda.l #2,a3
|
||||
adda.l #2,a4
|
||||
cmpa.l a2,a3
|
||||
blt.s lab0x1c
|
||||
move.w #0x90,d0
|
||||
move.w d0,(a5)
|
||||
move.w #0,d0
|
||||
move.w d0,(a5)
|
||||
lab0x50:
|
||||
nop
|
||||
nop
|
||||
halt
|
||||
nop
|
||||
bra.s lab0x50
|
||||
lab0x5a:
|
||||
move.w #0xaa,d0
|
||||
move.w d0,0xaaa(a5)
|
||||
move.w #0x55,d0
|
||||
move.w d0,0x554(a5)
|
||||
move.w #0x80,d0
|
||||
move.w d0,0xaaa(a5)
|
||||
move.w #0xaa,d0
|
||||
move.w d0,0xaaa(a5)
|
||||
move.w #0x55,d0
|
||||
move.w d0,0x554(a5)
|
||||
move.w #0x30,d0
|
||||
move.w d0,(a4)
|
||||
lab0x88:
|
||||
move.l (a4),d1
|
||||
move.l #-1,d0
|
||||
cmp.l d1,d0
|
||||
bne.s lab0x88
|
||||
nop
|
||||
nop
|
||||
halt
|
||||
nop
|
||||
#endif /* _NOT_USED_ */
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Interrupts
|
||||
*
|
||||
* Handle interrupts, the levels.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "bas_utils.h"
|
||||
#include "interrupts.h"
|
||||
#include "MCF5475.h"
|
||||
|
||||
extern uint8_t _rtl_vbr[];
|
||||
#define VBR ((uint32_t **) &_rtl_vbr[0])
|
||||
|
||||
/*
|
||||
* register an interrupt handler at the Coldfire interrupt controller and add the handler to the interrupt vector table
|
||||
*/
|
||||
int register_handler(uint8_t priority, uint8_t intr, void (*func)())
|
||||
{
|
||||
int i;
|
||||
uint8_t level = 0b01111111;
|
||||
uint32_t **adr = VBR;
|
||||
|
||||
intr &= 63;
|
||||
priority &= 7;
|
||||
|
||||
if (intr <= 0)
|
||||
return -1;
|
||||
|
||||
for (i = 1; i < 64; i++)
|
||||
if (i != intr)
|
||||
{
|
||||
if ((MCF_INTC_ICR(i) & 7) == priority)
|
||||
CLEAR_BIT_NO(level, (MCF_INTC_ICR(i) >> 3) & 7);
|
||||
}
|
||||
|
||||
for (i = 0; 1 < 7; i++)
|
||||
if (level & (1 << i))
|
||||
break;
|
||||
|
||||
if (i >= 7)
|
||||
return -1;
|
||||
|
||||
/*
|
||||
* Make sure priority level is high, before changing registers
|
||||
*/
|
||||
__asm__ volatile (
|
||||
"move.w sr,d0\n\t"
|
||||
"move.w d0,-(sp) \n\t"
|
||||
"move.w #0x2700,sr\n\t"
|
||||
:
|
||||
:
|
||||
: "sp","d0","memory"
|
||||
);
|
||||
|
||||
if (intr < 32)
|
||||
CLEAR_BIT(MCF_INTC_IMRL, (1 << intr));
|
||||
else
|
||||
CLEAR_BIT(MCF_INTC_IMRH, (1 << (intr - 32)));
|
||||
|
||||
MCF_INTC_ICR(intr) = MCF_INTC_ICR_IP(priority) | MCF_INTC_ICR_IL(i);
|
||||
|
||||
adr[64 + intr] = (uint32_t *) func; /* first 64 vectors are system exceptions */
|
||||
|
||||
/*
|
||||
* Return the saved priority level
|
||||
*/
|
||||
__asm__ volatile (
|
||||
"move.w (sp)+,d2\n\t"
|
||||
"move.w d2,sr\n\t"
|
||||
:
|
||||
:
|
||||
: "sp","d2","memory"
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* FatFs sample project for generic microcontrollers (C)ChaN, 2012 */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ff.h"
|
||||
|
||||
|
||||
FATFS Fatfs; /* File system object */
|
||||
FIL Fil; /* File object */
|
||||
uint8_t Buff[128]; /* File read buffer */
|
||||
|
||||
|
||||
void die ( /* Stop with dying message */
|
||||
FRESULT rc /* FatFs return value */
|
||||
)
|
||||
{
|
||||
xprintf("Failed with rc=%u.\n", rc);
|
||||
for (;;) ;
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/* Program Main */
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
||||
int main (void)
|
||||
{
|
||||
FRESULT rc; /* Result code */
|
||||
DIR dir; /* Directory object */
|
||||
FILINFO fno; /* File information object */
|
||||
uint32_t bw, br, i;
|
||||
|
||||
|
||||
f_mount(0, &Fatfs); /* Register volume work area (never fails) */
|
||||
|
||||
xprintf("\nOpen an existing file (message.txt).\n");
|
||||
rc = f_open(&Fil, "MESSAGE.TXT", FA_READ);
|
||||
if (rc) die(rc);
|
||||
|
||||
xprintf("\nType the file content.\n");
|
||||
for (;;) {
|
||||
rc = f_read(&Fil, Buff, sizeof Buff, &br); /* Read a chunk of file */
|
||||
if (rc || !br) break; /* Error or end of file */
|
||||
for (i = 0; i < br; i++) /* Type the data */
|
||||
putchar(Buff[i]);
|
||||
}
|
||||
if (rc) die(rc);
|
||||
|
||||
xprintf("\nClose the file.\n");
|
||||
rc = f_close(&Fil);
|
||||
if (rc) die(rc);
|
||||
|
||||
xprintf("\nCreate a new file (hello.txt).\n");
|
||||
rc = f_open(&Fil, "HELLO.TXT", FA_WRITE | FA_CREATE_ALWAYS);
|
||||
if (rc) die(rc);
|
||||
|
||||
xprintf("\nWrite a text data. (Hello world!)\n");
|
||||
rc = f_write(&Fil, "Hello world!\r\n", 14, &bw);
|
||||
if (rc) die(rc);
|
||||
xprintf("%u bytes written.\n", bw);
|
||||
|
||||
xprintf("\nClose the file.\n");
|
||||
rc = f_close(&Fil);
|
||||
if (rc) die(rc);
|
||||
|
||||
xprintf("\nOpen root directory.\n");
|
||||
rc = f_opendir(&dir, "");
|
||||
if (rc) die(rc);
|
||||
|
||||
xprintf("\nDirectory listing...\n");
|
||||
for (;;) {
|
||||
rc = f_readdir(&dir, &fno); /* Read a directory item */
|
||||
if (rc || !fno.fname[0]) break; /* Error or end of dir */
|
||||
if (fno.fattrib & AM_DIR)
|
||||
xprintf(" <dir> %s\n", fno.fname);
|
||||
else
|
||||
xprintf("%8lu %s\n", fno.fsize, fno.fname);
|
||||
}
|
||||
if (rc) die(rc);
|
||||
|
||||
xprintf("\nTest completed.\n");
|
||||
for (;;) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------*/
|
||||
/* User Provided Timer Function for FatFs module */
|
||||
/*---------------------------------------------------------*/
|
||||
|
||||
uint32_t get_fattime (void)
|
||||
{
|
||||
return ((uint32_t)(2012 - 1980) << 25) /* Year = 2012 */
|
||||
| ((uint32_t)1 << 21) /* Month = 1 */
|
||||
| ((uint32_t)1 << 16) /* Day_m = 1*/
|
||||
| ((uint32_t)0 << 11) /* Hour = 0 */
|
||||
| ((uint32_t)0 << 5) /* Min = 0 */
|
||||
| ((uint32_t)0 >> 1); /* Sec = 0 */
|
||||
}
|
||||
@@ -1,217 +0,0 @@
|
||||
/*
|
||||
* INIT ACR and MMU
|
||||
*/
|
||||
|
||||
#include "startcf.h"
|
||||
|
||||
.extern _rt_vbr
|
||||
.extern _rt_cacr
|
||||
.extern _rt_asid
|
||||
.extern _rt_acr0
|
||||
.extern _rt_acr1
|
||||
.extern _rt_acr2
|
||||
.extern _rt_acr3
|
||||
.extern _rt_mmubar
|
||||
.extern ___MMUBAR
|
||||
.extern cpusha
|
||||
.extern _video_tlb
|
||||
.extern _video_sbt
|
||||
.extern __TOS
|
||||
|
||||
/* Register read/write macros */
|
||||
#define MCF_MMU_MMUCR __MMUBAR
|
||||
#define MCF_MMU_MMUOR __MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR __MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR __MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR __MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR __MMUBAR+0x18
|
||||
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUCR */
|
||||
#define MCF_MMU_MMUCR_EN (0x1)
|
||||
#define MCF_MMU_MMUCR_ASM (0x2)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUOR */
|
||||
#define MCF_MMU_MMUOR_UAA (0x1)
|
||||
#define MCF_MMU_MMUOR_ACC (0x2)
|
||||
#define MCF_MMU_MMUOR_RW (0x4)
|
||||
#define MCF_MMU_MMUOR_ADR (0x8)
|
||||
#define MCF_MMU_MMUOR_ITLB (0x10)
|
||||
#define MCF_MMU_MMUOR_CAS (0x20)
|
||||
#define MCF_MMU_MMUOR_CNL (0x40)
|
||||
#define MCF_MMU_MMUOR_CA (0x80)
|
||||
#define MCF_MMU_MMUOR_STLB (0x100)
|
||||
#define MCF_MMU_MMUOR_AA(x) (((x)&0xFFFF)<<0x10)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUSR */
|
||||
#define MCF_MMU_MMUSR_HIT (0x2)
|
||||
#define MCF_MMU_MMUSR_WF (0x8)
|
||||
#define MCF_MMU_MMUSR_RF (0x10)
|
||||
#define MCF_MMU_MMUSR_SPF (0x20)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUAR */
|
||||
#define MCF_MMU_MMUAR_FA(x) (((x)&0xFFFFFFFF)<<0)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUTR */
|
||||
#define MCF_MMU_MMUTR_V (0x1)
|
||||
#define MCF_MMU_MMUTR_SG (0x2)
|
||||
#define MCF_MMU_MMUTR_ID(x) (((x)&0xFF)<<0x2)
|
||||
#define MCF_MMU_MMUTR_VA(x) (((x)&0x3FFFFF)<<0xA)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUDR */
|
||||
#define MCF_MMU_MMUDR_LK (0x2)
|
||||
#define MCF_MMU_MMUDR_X (0x4)
|
||||
#define MCF_MMU_MMUDR_W (0x8)
|
||||
#define MCF_MMU_MMUDR_R (0x10)
|
||||
#define MCF_MMU_MMUDR_SP (0x20)
|
||||
#define MCF_MMU_MMUDR_CM(x) (((x)&0x3)<<0x6)
|
||||
#define MCF_MMU_MMUDR_SZ(x) (((x)&0x3)<<0x8)
|
||||
#define MCF_MMU_MMUDR_PA(x) (((x)&0x3FFFFF)<<0xA)
|
||||
|
||||
#define std_mmutr (MCF_MMU_MMUTR_SG|MCF_MMU_MMUTR_V)
|
||||
#define mmuord_d ( MCF_MMU_MMUOR_ACC|MCF_MMU_MMUOR_UAA)
|
||||
#define mmuord_i (MCF_MMU_MMUOR_ITLB|MCF_MMU_MMUOR_ACC|MCF_MMU_MMUOR_UAA)
|
||||
#define writethrough_mmudr (MCF_MMU_MMUDR_SZ(00)|MCF_MMU_MMUDR_CM(00)|MCF_MMU_MMUDR_R|MCF_MMU_MMUDR_W|MCF_MMU_MMUDR_X)
|
||||
#define copyback_mmudr (MCF_MMU_MMUDR_SZ(00)|MCF_MMU_MMUDR_CM(01)|MCF_MMU_MMUDR_R|MCF_MMU_MMUDR_W|MCF_MMU_MMUDR_X)
|
||||
#define nocache_precise_mmudr (MCF_MMU_MMUDR_SZ(00)|MCF_MMU_MMUDR_CM(10)|MCF_MMU_MMUDR_R|MCF_MMU_MMUDR_W|MCF_MMU_MMUDR_X)
|
||||
|
||||
.global _mmu_init
|
||||
.global _mmutr_miss
|
||||
|
||||
//
|
||||
// to avoid chicken and egg situations, we need to make sure that MMU TLB miss exceptions do not end up in a memory
|
||||
// area that in turn cause a TLB miss exception themself after the MMU is enabled. At least the exception handler must live
|
||||
// in an area that's either covered by one of the ACR's or a locked MMU TLB entry. This is especially important when we link
|
||||
// BaS for RAM.
|
||||
//
|
||||
.text
|
||||
_mmu_init:
|
||||
move.l d3,-(sp) // Backup registers
|
||||
move.l d2,-(sp)
|
||||
|
||||
clr.l d0
|
||||
movec d0,ASID // ASID always 0
|
||||
move.l d0,_rt_asid // save shadow register
|
||||
|
||||
move.l #0xC03FC040,d0 // data r/w precise c000'0000-ffff'ffff
|
||||
movec d0,ACR0
|
||||
move.l d0,_rt_acr0 // save shadow register
|
||||
|
||||
move.l #0x601FC000,d0 // data r/w wt 6000'0000-7fff'ffff
|
||||
movec d0,ACR1
|
||||
move.l d0,_rt_acr1 // save shadow register
|
||||
|
||||
move.l #0xe007C400,d0 // instruction r wt e000'0000-e07f'ffff
|
||||
movec d0,ACR2
|
||||
move.l d0,_rt_acr2 // save shadow register
|
||||
|
||||
clr.l d0 // acr3 off
|
||||
movec d0,ACR3
|
||||
move.l d0,_rt_acr3 // save shadow register
|
||||
|
||||
move.l #__MMUBAR+1,d0
|
||||
movec d0,MMUBAR // set MMUBAR
|
||||
move.l d0,_rt_mmubar // save shadow register
|
||||
|
||||
nop
|
||||
|
||||
move.l #MCF_MMU_MMUOR_CA,d0 // clear all entries,
|
||||
move.l d0,MCF_MMU_MMUOR
|
||||
nop
|
||||
|
||||
// 0000'0000 locked
|
||||
moveq.l #0x00000000|std_mmutr,d0
|
||||
moveq.l #0x00000000|copyback_mmudr|MCF_MMU_MMUDR_LK,d1
|
||||
moveq.l #mmuord_d,d2 // MMU update data
|
||||
moveq.l #mmuord_i,d3 // MMU update instruction
|
||||
move.l d0,MCF_MMU_MMUTR
|
||||
move.l d1,MCF_MMU_MMUDR
|
||||
move.l d2,MCF_MMU_MMUOR // MMU update data
|
||||
move.l d3,MCF_MMU_MMUOR // MMU update instruction
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
// 00d0'0000 locked ID=6
|
||||
// video ram: read write execute normal write true
|
||||
move.l #0x00d00000|MCF_MMU_MMUTR_ID(sca_page_ID)|std_mmutr,d0
|
||||
move.l #0x60d00000|writethrough_mmudr|MCF_MMU_MMUDR_LK,d1
|
||||
move.l d0,MCF_MMU_MMUTR
|
||||
move.l d1,MCF_MMU_MMUDR
|
||||
move.l d2,MCF_MMU_MMUOR // MMU update data
|
||||
move.l #0x00d00000|std_mmutr,d0
|
||||
move.l d3,MCF_MMU_MMUOR // MMU update instruction
|
||||
|
||||
move.l #0x2000,d0
|
||||
move.l d0,_video_tlb // set page as video page
|
||||
clr.l _video_sbt // clear time
|
||||
|
||||
|
||||
// create locked TLB entries which must be available as soon as the MMU gets enabled
|
||||
// Make the TOS (in SDRAM) read-only
|
||||
move.l #__TOS+std_mmutr,d0
|
||||
move.l #__TOS+copyback_mmudr+MCF_MMU_MMUDR_LK,d1
|
||||
move.l d0,MCF_MMU_MMUTR
|
||||
move.l d1,MCF_MMU_MMUDR
|
||||
move.l d2,MCF_MMU_MMUOR // setzen read only ?????? noch nicht
|
||||
move.l d3,MCF_MMU_MMUOR // setzen
|
||||
|
||||
// 00f0'0000 locked
|
||||
move.l #0x00f00000|std_mmutr,d0
|
||||
move.l #0xfff00000|nocache_precise_mmudr|MCF_MMU_MMUDR_LK,d1
|
||||
move.l d0,MCF_MMU_MMUTR
|
||||
move.l d1,MCF_MMU_MMUDR
|
||||
move.l d2,MCF_MMU_MMUOR // mapped to ffffxxx, precise,
|
||||
move.l d3,MCF_MMU_MMUOR // mapped to ffffxxx, precise,
|
||||
|
||||
// 1ff0'0000 locked
|
||||
move.l #0x1FF00000|std_mmutr,d0 // last megabyte of RAM. Reserved for BaS
|
||||
move.l #0x1FF00000|copyback_mmudr|MCF_MMU_MMUDR_LK,d1
|
||||
move.l d0,MCF_MMU_MMUTR
|
||||
move.l d1,MCF_MMU_MMUDR
|
||||
move.l d2,MCF_MMU_MMUOR // setzen data
|
||||
move.l d3,MCF_MMU_MMUOR // setzen instr
|
||||
// instr 0xFFF0'0000 nach 0x1FF0'0000 umleiten -->> short sprung
|
||||
/* move.l #0xFFF00000|std_mmutr,d0
|
||||
move.l #0x1FF00000|copyback_mmudr|MCF_MMU_MMUDR_LK,d1
|
||||
move.l d0,MCF_MMU_MMUTR
|
||||
move.l d1,MCF_MMU_MMUDR
|
||||
move.l d3,MCF_MMU_MMUOR // setzen instr
|
||||
*/
|
||||
move.l (sp)+,d2 // Restore registers
|
||||
move.l (sp)+,d3
|
||||
rts
|
||||
|
||||
/*
|
||||
* MMU table add on miss
|
||||
*/
|
||||
_mmutr_miss:
|
||||
lea -8 * 4(sp),sp
|
||||
movem.l d0-d3/a0-a3,(sp)
|
||||
|
||||
move.l d0,-(sp)
|
||||
pea MISS_text
|
||||
jsr _xprintf
|
||||
addq.l #8,sp
|
||||
|
||||
movem.l (sp),d0-d3/a0-a3
|
||||
lea 8 * 4(sp),sp
|
||||
|
||||
bsr cpusha // clear caches
|
||||
|
||||
and.l #0xFFF00000,d0 // d0 is the address not found (MMUAR at the time of the exception)
|
||||
or.l #std_mmutr,d0 // mark shared and valid
|
||||
move.l d0,MCF_MMU_MMUTR // add to TLB
|
||||
and.l #0xFFF00000,d0 // mask out page
|
||||
or.l #copyback_mmudr,d0 // 1MB page size, cachable copyback, read, write, execute
|
||||
move.l d0,MCF_MMU_MMUDR // add to TLB
|
||||
moveq.l #mmuord_d,d0 // MMU update data
|
||||
move.l d0,MCF_MMU_MMUOR // set
|
||||
moveq.l #mmuord_i,d0 // MMU update instruction
|
||||
move.l d0,MCF_MMU_MMUOR // set
|
||||
|
||||
move.l (sp)+,d0 // restore register saved in acess
|
||||
rte
|
||||
|
||||
.data
|
||||
MISS_text:
|
||||
.ascii "MMU TLB MISS at %p"
|
||||
.byte 13, 10, 0
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* pci.c
|
||||
*
|
||||
* Created on: 08.01.2013
|
||||
* Author: Markus Froeschle
|
||||
*/
|
||||
|
||||
#include <MCF5475.h>
|
||||
#include "pci.h"
|
||||
#include "stdint.h"
|
||||
|
||||
void init_eport(void)
|
||||
{
|
||||
/* concigure IRQ1-7 pins on EPORT falling edge triggered */
|
||||
MCF_EPORT_EPPAR = MCF_EPORT_EPPAR_EPPA7(MCF_EPORT_EPPAR_FALLING) +
|
||||
MCF_EPORT_EPPAR_EPPA6(MCF_EPORT_EPPAR_FALLING) +
|
||||
MCF_EPORT_EPPAR_EPPA5(MCF_EPORT_EPPAR_FALLING) +
|
||||
MCF_EPORT_EPPAR_EPPA4(MCF_EPORT_EPPAR_FALLING) +
|
||||
MCF_EPORT_EPPAR_EPPA3(MCF_EPORT_EPPAR_FALLING) +
|
||||
MCF_EPORT_EPPAR_EPPA2(MCF_EPORT_EPPAR_FALLING) +
|
||||
MCF_EPORT_EPPAR_EPPA1(MCF_EPORT_EPPAR_FALLING);
|
||||
MCF_EPORT_EPDDR = 0; /* clear data direction register. All pins as input */
|
||||
MCF_EPORT_EPFR = 0; /* clear all EPORT interrupt flags */
|
||||
MCF_EPORT_EPIER = 0; /* disable all EPORT interrupts (for now) */
|
||||
}
|
||||
|
||||
void init_xlbus_arbiter(void)
|
||||
{
|
||||
uint8_t clock_ratio;
|
||||
|
||||
/* setup XL bus arbiter */
|
||||
clock_ratio = (MCF_PCI_PCIGSCR >> 24) & 0x07;
|
||||
if (clock_ratio == 4)
|
||||
{
|
||||
/* device errata 26: Flexbus hang up in 4:1 clock ratio */
|
||||
MCF_PCI_PCIGSCR |= 0x80000000; /* disable pipeline */
|
||||
}
|
||||
/* FIXME: Firetos (boot2.S, l. 719) looks pretty strange at this place - is this a typo? */
|
||||
}
|
||||
|
||||
void init_pci(void)
|
||||
{
|
||||
/*
|
||||
* assert /PCIRESET (reset cards on bus). FIXME: According to documentation,
|
||||
* this should be done last during PCI initialization
|
||||
*/
|
||||
MCF_PCI_PCIGSCR = MCF_PCI_PCIGSCR_PR;
|
||||
|
||||
/*
|
||||
* setup the PCI arbiter.
|
||||
*/
|
||||
|
||||
/* PCI Arbiter Control Register (PACR) */
|
||||
MCF_PCIARB_PACR = MCF_PCIARB_PACR_INTMPRI /* internal master priority level high */
|
||||
+ MCF_PCIARB_PACR_EXTMPRI(0x1f) /* external master priority levels all high */
|
||||
+ MCF_PCIARB_PACR_INTMINTEN /* generate interrupt if internal master timeout */
|
||||
+ MCF_PCIARB_PACR_EXTMINTEN(0x1f); /* generate interrupt if external master timeout */
|
||||
/* configure all 5 PCI Bus Grant pins for PCI */
|
||||
MCF_PAD_PAR_PCIBG = 0x3ff;
|
||||
/* configure all 5 PCI Bus Request pins for PCI */
|
||||
MCF_PAD_PAR_PCIBR = 0x3ff;
|
||||
|
||||
/* PCI Status/Command Register PCISCR */
|
||||
MCF_PCI_PCISCR = MCF_PCI_PCISCR_M /* recognize memory accesses */
|
||||
+ MCF_PCI_PCISCR_B /* bus master enable for controller */
|
||||
+ MCF_PCI_PCISCR_MW; /* controller can generate memory write and invalidate command */
|
||||
|
||||
/* Configuration 1 Register PCICR1 */
|
||||
MCF_PCI_PCICR1 = MCF_PCI_PCICR1_CACHELINESIZE(8) /* cache line size in units of DWORDs */
|
||||
+ MCF_PCI_PCICR1_LATTIMER(32); /* 256 PCI clocks (?) latency */
|
||||
/* Configuration 2 Register PCICR2 */
|
||||
MCF_PCI_PCICR2 = MCF_PCI_PCICR2_MINGNT(1) /* specifies how long the Coldfire processor retains bus ownership as master */
|
||||
+ MCF_PCI_PCICR2_MAXLAT(1); /* specifies (in units of 1/4 microseconds) how often the Coldfire */
|
||||
/* processor needs access to the bus as PCI master */
|
||||
/* Initiator Control Register: turn on error signaling */
|
||||
MCF_PCI_PCIICR = MCF_PCI_PCIICR_TAE + /* target abort enable: CPU generates an interrupt if target terminates a transaction */
|
||||
MCF_PCI_PCIICR_IAE /* the same for the initiator */
|
||||
/* + MCF_PCI_PCIICR_REE */ ; /* the same for retry errors */
|
||||
/* Global Status/Control Register */
|
||||
MCF_PCI_PCIGSCR |= MCF_PCI_PCIGSCR_SEE; /* generate interrupt if /PCISERR is asserted (PCI system error) */
|
||||
|
||||
/* configure initiator windows */
|
||||
|
||||
|
||||
/* Initiator Window 0 Base / Translation Address Register */
|
||||
#ifdef SAME_CPU_PCI_MEM_ADDR
|
||||
MCF_PCI_PCIIW0BTAR = (PCI_MEMORY_OFFSET + ((PCI_MEMORY_SIZE - 1) >> 8) & 0xFFFF0000) | (PCI_MEMORY_OFFSET >> 16 & 0xFFFF)
|
||||
#else
|
||||
MCF_PCI_PCIIW0BTAR = PCI_MEMORY_OFFSET + ((PCI_MEMORY_SIZE - 1) >> 8) & 0xFFFF0000;
|
||||
#endif /* SAME_CPU_PCI_MEM_ADDR */
|
||||
|
||||
/* Initiator Window 1 Base / Translation Address Register */
|
||||
MCF_PCI_PCIIW1BTAR = (PCI_IO_OFFSET + ((PCI_IO_SIZE - 1) >> 8)) & 0xFFFF0000;
|
||||
|
||||
/* Initiator Window 2 Base / Translation Address Register */
|
||||
MCF_PCI_PCIIW2BTAR = 0L; /* not used */
|
||||
|
||||
MCF_PCI_PCIIWCR = MCF_PCI_PCIIWCR_WINCTRL0_MEMRDLINE
|
||||
+ MCF_PCI_PCIIWCR_WINCTRL1_IO;
|
||||
|
||||
/* target zones */
|
||||
}
|
||||
|
||||
void init(void)
|
||||
{
|
||||
init_eport();
|
||||
init_xlbus_arbiter();
|
||||
init_pci();
|
||||
}
|
||||
@@ -1,565 +0,0 @@
|
||||
/*
|
||||
* user/supervisor handler
|
||||
*/
|
||||
|
||||
#include "startcf.h"
|
||||
#define cf_stack
|
||||
|
||||
.extern _rt_cacr;
|
||||
.extern _rt_mod;
|
||||
.extern _rt_ssp;
|
||||
.extern _rt_usp;
|
||||
.extern ___MMUBAR
|
||||
.extern _flush_and_invalidate_caches
|
||||
|
||||
/* Register read/write macros */
|
||||
#define MCF_MMU_MMUCR __MMUBAR
|
||||
#define MCF_MMU_MMUOR __MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR __MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR __MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR __MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR __MMUBAR+0x18
|
||||
|
||||
.global _privileg_violation
|
||||
.global cpusha
|
||||
|
||||
.text
|
||||
_privileg_violation:
|
||||
move.w #0x2700,sr
|
||||
lea -12(a7),a7
|
||||
movem.l d0/a0/a5,(a7)
|
||||
#ifndef cf_stack
|
||||
lea 0x52f0,a0
|
||||
move.l #0x20,(a0) // set auf 68030
|
||||
#endif
|
||||
lea _rt_mod,a0 // zugriff setzen
|
||||
tst.b (a0) // vom rt_supervisormodus?
|
||||
bne pv_work // ja->
|
||||
// tats�chlich privileg violation
|
||||
mov3q.l #-1,(a0) // sr_mod setzen
|
||||
move.l usp,a5 // usp holen
|
||||
move.l a5,8(a0) // sichern
|
||||
move.l 4(a0),a5 // rt_ssp holen
|
||||
#ifdef cf_stack
|
||||
move.l 16(a7),-(a5) // pc verschieben
|
||||
move.l 12(a7),-(a5) // sr verschieben
|
||||
bset #5,2(a5) // auf super setzen
|
||||
#else
|
||||
move.w 12(a7),-(a5) // vector nr.
|
||||
move.l 16(a7),-(a5) // pc verschieben
|
||||
move.w 14(a7),-(a5) // sr verschieben
|
||||
bset #5,(a5) // auf super
|
||||
#endif
|
||||
move.l a5,usp
|
||||
move.l 12(a0),a5 // rt_vbr
|
||||
lea 0x18(a5),a5 // vector
|
||||
move.l (a5),16(a7) // vector privileg violation
|
||||
movem.l (a7),d0/a0/a5 // register zur�ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// privileg violation
|
||||
pv_work:
|
||||
move.l 16(a7),a5 // fault pc
|
||||
move.b (a5),d0 // fault code
|
||||
cmp.b #0x4e,d0 // 1.byt 0x4e
|
||||
beq pv_4e // ja->
|
||||
cmp.b #0x46,d0 // 1.byt 0x46
|
||||
beq pv_46 // ja->
|
||||
cmp.b #0x40,d0 // 1.byt 0x40
|
||||
beq pv_40 // ja->
|
||||
cmp.b #0xf4,d0 // 0xf4?
|
||||
beq pv_f4
|
||||
cmp.b #0xf3,d0 // 0xf3?
|
||||
beq pv_f3
|
||||
// hierher sollt man nicht kommen
|
||||
nop
|
||||
halt
|
||||
nop
|
||||
// code 0x4exx ********************************************
|
||||
pv_4e:
|
||||
move.b 1(a5),d0
|
||||
cmp.b #0x73,d0 //rte?
|
||||
beq pv_rte //ja->
|
||||
cmp.b #0x72,d0 //stop?
|
||||
beq pv_stop //ja->
|
||||
cmp.b #0x7B,d0 //movec?
|
||||
beq pv_movec //ja->
|
||||
// move usp
|
||||
btst #3,d0 // to or from
|
||||
bne pv_usp_to_ax // usp -> ax
|
||||
// move ax->usp
|
||||
cmp.b #0x60,d0 //movec?
|
||||
beq pv_a0_usp //ja->
|
||||
cmp.b #0x61,d0 //movec?
|
||||
beq pv_a1_usp //ja->
|
||||
cmp.b #0x62,d0 //movec?
|
||||
beq pv_a2_usp //ja->
|
||||
cmp.b #0x63,d0 //movec?
|
||||
beq pv_a3_usp //ja->
|
||||
cmp.b #0x64,d0 //movec?
|
||||
beq pv_a4_usp //ja->
|
||||
cmp.b #0x65,d0 //movec?
|
||||
beq pv_a5_usp //ja->
|
||||
cmp.b #0x66,d0 //movec?
|
||||
beq pv_a6_usp //ja->
|
||||
halt
|
||||
bra pv_a7_usp //ja->
|
||||
// move usp->ax
|
||||
pv_usp_to_ax:
|
||||
move.l 8(a0),a5 //rt_usp holen
|
||||
cmp.b #0x68,d0 //movec?
|
||||
beq pv_usp_a0 //ja->
|
||||
cmp.b #0x69,d0 //movec?
|
||||
beq pv_usp_a1 //ja->
|
||||
cmp.b #0x6a,d0 //movec?
|
||||
beq pv_usp_a2 //ja->
|
||||
cmp.b #0x6b,d0 //movec?
|
||||
beq pv_usp_a3 //ja->
|
||||
cmp.b #0x6c,d0 //movec?
|
||||
beq pv_usp_a4 //ja->
|
||||
cmp.b #0x6d,d0 //movec?
|
||||
beq pv_usp_a5 //ja->
|
||||
cmp.b #0x6e,d0 //movec?
|
||||
beq pv_usp_a6 //ja->
|
||||
// usp->a7
|
||||
move.l a5,4(a0) // rt usp -> rt ssp
|
||||
move.l a5,usp // und setzen
|
||||
bra pv_usp_ax
|
||||
// a0->usp
|
||||
pv_a0_usp: move.l 4(a7),a5
|
||||
bra pv_ax_usp
|
||||
// a1->usp
|
||||
pv_a1_usp: move.l a1,a5
|
||||
bra pv_ax_usp
|
||||
// a2->usp
|
||||
pv_a2_usp: move.l a2,a5
|
||||
bra pv_ax_usp
|
||||
// a3->usp
|
||||
pv_a3_usp: move.l a3,a5
|
||||
bra pv_ax_usp
|
||||
// a4->usp
|
||||
pv_a4_usp: move.l a4,a5
|
||||
bra pv_ax_usp
|
||||
// a5->usp
|
||||
pv_a5_usp: move.l 8(a7),a5
|
||||
bra pv_ax_usp
|
||||
// a6->usp
|
||||
pv_a6_usp: move.l a6,a5
|
||||
bra pv_ax_usp
|
||||
// a7->usp
|
||||
pv_a7_usp: move.l 4(a0),a5 // rt_ssp -> a5
|
||||
pv_ax_usp:
|
||||
move.l a5,8(a0) // usp -> rt_usp
|
||||
addq.l #2,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur�ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// usp->a0
|
||||
pv_usp_a0:
|
||||
move.l a5,4(a7)
|
||||
bra pv_usp_ax
|
||||
pv_usp_a1:
|
||||
move.l a5,a1
|
||||
bra pv_usp_ax
|
||||
pv_usp_a2:
|
||||
move.l a5,a2
|
||||
bra pv_usp_ax
|
||||
pv_usp_a3:
|
||||
move.l a5,a3
|
||||
bra pv_usp_ax
|
||||
pv_usp_a4:
|
||||
move.l a5,a4
|
||||
bra pv_usp_ax
|
||||
pv_usp_a5:
|
||||
move.l a5,8(a7)
|
||||
bra pv_usp_ax
|
||||
pv_usp_a6:
|
||||
move.l a5,a6
|
||||
pv_usp_ax:
|
||||
addq.l #2,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur�ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// rte
|
||||
pv_rte:
|
||||
move.l usp,a5
|
||||
#ifdef cf_stack
|
||||
move.l (a5)+,12(a7) // sr verschieben
|
||||
move.l (a5)+,16(a7) // pc verschieben
|
||||
#else
|
||||
move.w (a5)+,14(a7) // sr verschieben
|
||||
move.l (a5)+,16(a7) // pc verschieben
|
||||
move.w (a5)+,12(a7) // vector
|
||||
#endif
|
||||
bclr #5,14(a7) // war es von super?
|
||||
bne pv_rte_sup // ja->
|
||||
clr.l (a0) // rt_mod auf user
|
||||
move.l a5,4(a0) // rt_ssp sichern
|
||||
move.l 8(a0),a5 // rt_usp holen
|
||||
pv_rte_sup:
|
||||
move.l a5,usp // usp setzen
|
||||
movem.l (a7),d0/a0/a5 // register zur�ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// stop
|
||||
pv_stop:
|
||||
move.b 2(a5),d0 // sr wert
|
||||
and.l #0x0700,d0 // int mask
|
||||
cmp.w #0x700,d0
|
||||
beq stop7
|
||||
cmp.w #0x600,d0
|
||||
beq stop6
|
||||
cmp.w #0x500,d0
|
||||
beq stop5
|
||||
cmp.w #0x400,d0
|
||||
beq stop4
|
||||
cmp.w #0x300,d0
|
||||
beq stop3
|
||||
cmp.w #0x200,d0
|
||||
beq stop2
|
||||
cmp.w #0x100,d0
|
||||
beq stop1
|
||||
stop #0x2000
|
||||
bra stop_weiter
|
||||
stop1:
|
||||
stop #0x2100
|
||||
bra stop_weiter
|
||||
stop2:
|
||||
stop #0x2200
|
||||
bra stop_weiter
|
||||
stop3:
|
||||
stop #0x2300
|
||||
bra stop_weiter
|
||||
stop4:
|
||||
stop #0x2400
|
||||
bra stop_weiter
|
||||
stop5:
|
||||
stop #0x2500
|
||||
bra stop_weiter
|
||||
stop6:
|
||||
stop #0x2600
|
||||
bra stop_weiter
|
||||
stop7:
|
||||
stop #0x2700
|
||||
stop_weiter:
|
||||
addq.l #4,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur�ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// movec ???????
|
||||
pv_movec:
|
||||
move.w 2(a5),d0 // 2.word holen
|
||||
and.l #0xf000,d0
|
||||
btst #15,d0 // addressregister?
|
||||
bne pv_movec_ax // ja->
|
||||
tst.w d0 // d0?
|
||||
bne pvm_d1 // nein->
|
||||
move.l (a7),-(a7) // d0 holen und sichern
|
||||
bra pvm_me
|
||||
pvm_d1:
|
||||
cmp.w #0x1000,d0 // d1?
|
||||
bne pvm_d2 // nein->
|
||||
move.l d1,-(a7) // d1 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_d2:
|
||||
cmp.w #0x2000,d0 // d1?
|
||||
bne pvm_d3 // nein->
|
||||
move.l d2,-(a7) // d2 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_d3:
|
||||
cmp.w #0x3000,d0 // d1?
|
||||
bne pvm_d4 // nein->
|
||||
move.l d3,-(a7) // d3 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_d4:
|
||||
cmp.w #0x4000,d0 // d1?
|
||||
bne pvm_d5 // nein->
|
||||
move.l d4,-(a7) // d4 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_d5:
|
||||
cmp.w #0x5000,d0 // d1?
|
||||
bne pvm_d6 // nein->
|
||||
move.l d5,-(a7) // d5 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_d6:
|
||||
cmp.w #0x6000,d0 // d1?
|
||||
bne pvm_d7 // nein->
|
||||
move.l d6,-(a7) // d6 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_d7:
|
||||
move.l d7,-(a7) // d7 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pv_movec_ax:
|
||||
cmp.w #0x8000,d0 // a0?
|
||||
bne pvm_a1 // nein->
|
||||
move.l 4(a7),-(a7) // a0 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_a1:
|
||||
cmp.w #0x9000,d0 // a0?
|
||||
bne pvm_a2 // nein->
|
||||
move.l a1,-(a7) // a1 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_a2:
|
||||
cmp.w #0xa000,d0 // a0?
|
||||
bne pvm_a3 // nein->
|
||||
move.l a2,-(a7) // a2 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_a3:
|
||||
cmp.w #0xb000,d0 // a0?
|
||||
bne pvm_a4 // nein->
|
||||
move.l a3,-(a7) // a3 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_a4:
|
||||
cmp.w #0xc000,d0 // a0?
|
||||
bne pvm_a5 // nein->
|
||||
move.l a4,-(a7) // a4 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_a5:
|
||||
cmp.w #0xd000,d0 // a0?
|
||||
bne pvm_a6 // nein->
|
||||
move.l 8(a7),-(a7) // a5 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_a6:
|
||||
cmp.w #0xe000,d0 // a0?
|
||||
bne pvm_a7 // nein->
|
||||
move.l a6,-(a7) // a6 holen und sichern
|
||||
bra pvm_me // fertig machen
|
||||
pvm_a7:
|
||||
move.l 4(a7),-(a7) // a7 holen und sichern
|
||||
pvm_me:
|
||||
move.w 2(a5),d0 // 2.word holen
|
||||
andi.l #0xf,d0 // nur letzte 4 bits
|
||||
move.l (a7)+,8(a0,d0*4) // start bei +8, *4 weil long
|
||||
jsr cpusha // gesammten cache flushen
|
||||
rte
|
||||
// code 0x46xx *****************************************
|
||||
pv_46:
|
||||
move.b 1(a5),d0
|
||||
cmp.b #0xfc,d0 //#d16->sr
|
||||
beq im_sr //ja->
|
||||
//move dx->sr (sr und rt_mod ist supervisor sonst w�re es privileg violation
|
||||
cmp.b #0xc0,d0 //d0->sr?
|
||||
bne d1_sr //nein->
|
||||
move.w 2(a7),d0 //hier ist d0 gesichert
|
||||
bra d0_sr
|
||||
d1_sr:
|
||||
cmp.b #0xc1,d0 //d1->sr?
|
||||
bne d2_sr //nein->
|
||||
move.w d1,d0
|
||||
bra d0_sr
|
||||
d2_sr:
|
||||
cmp.b #0xc2,d0 //d2->sr?
|
||||
bne d3_sr
|
||||
move.w d2,d0
|
||||
bra d0_sr
|
||||
d3_sr:
|
||||
cmp.b #0xc3,d0 //d3->sr?
|
||||
bne d4_sr
|
||||
move.w d3,d0
|
||||
bra d0_sr
|
||||
d4_sr:
|
||||
cmp.b #0xc4,d0 //d4->sr?
|
||||
bne d5_sr
|
||||
move.w d4,d0
|
||||
bra d0_sr
|
||||
d5_sr:
|
||||
cmp.b #0xc5,d0 //d5->sr?
|
||||
bne d6_sr
|
||||
move.w d5,d0
|
||||
bra d0_sr
|
||||
d6_sr:
|
||||
cmp.b #0xc6,d0 //d6->sr?
|
||||
bne d7_sr
|
||||
move.w d6,d0
|
||||
bra d0_sr
|
||||
d7_sr:
|
||||
move.w d7,d0 // sonst d7->sr
|
||||
d0_sr:
|
||||
addq.l #2,16(a7) // next
|
||||
bra pv_set_sr_end // fertig machen
|
||||
// move #xxxx,sr
|
||||
im_sr:
|
||||
addq.l #4,16(a7) // next
|
||||
move.w 2(a5),d0 // data
|
||||
pv_set_sr_end:
|
||||
bclr #13,d0 // war super?
|
||||
bne pv_sre2 // ja ->
|
||||
clr.l (a0)
|
||||
move.l usp,a5 // usp
|
||||
move.l a5,4(a0) // rt_ssp speichern
|
||||
move.l 8(a0),a5 // rt_usp holen
|
||||
move.l a5,usp // setzen
|
||||
pv_sre2:
|
||||
move.w d0,14(a7) // sr setzen
|
||||
movem.l (a7),d0/a0/a5 // register zur�ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// code 0x40xx *****************************************
|
||||
pv_40:
|
||||
move.b 1(a5),d0 // 2.byt
|
||||
cmp.b #0xe7,d0
|
||||
beq pv_strldsr
|
||||
// move sr->dx
|
||||
move.l 12(a7),a5 // sr holen
|
||||
tst.b (a0) // super?
|
||||
beq pv_40_user // nein?
|
||||
lea 0x2000(a5),a5 // super zuaddieren
|
||||
pv_40_user:
|
||||
cmp.b #0xc0,d0
|
||||
bne nsr_d1
|
||||
move.w a5,2(a7)
|
||||
bra sr_dx_end
|
||||
nsr_d1:
|
||||
cmp.b #0xc1,d0
|
||||
bne nsr_d2
|
||||
move.w a5,d1
|
||||
bra sr_dx_end
|
||||
nsr_d2:
|
||||
cmp.b #0xc2,d0
|
||||
bne nsr_d3
|
||||
move.w a5,d2
|
||||
bra sr_dx_end
|
||||
nsr_d3:
|
||||
cmp.b #0xc3,d0
|
||||
bne nsr_d4
|
||||
move.w a5,d3
|
||||
bra sr_dx_end
|
||||
nsr_d4:
|
||||
cmp.b #0xc4,d0
|
||||
bne nsr_d5
|
||||
move.w a5,d4
|
||||
bra sr_dx_end
|
||||
nsr_d5:
|
||||
cmp.b #0xc5,d0
|
||||
bne nsr_d6
|
||||
move.w a5,d5
|
||||
bra sr_dx_end
|
||||
nsr_d6:
|
||||
cmp.b #0xc6,d0
|
||||
bne nsr_d7
|
||||
move.w a5,d6
|
||||
bra sr_dx_end
|
||||
nsr_d7:
|
||||
move.w a5,d7
|
||||
halt
|
||||
sr_dx_end:
|
||||
addq.l #2,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur�ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// strldsr
|
||||
pv_strldsr:
|
||||
nop
|
||||
halt
|
||||
nop
|
||||
// code 0xf4xx ***********************************
|
||||
pv_f4:
|
||||
addq.l #2,16(a7) // next instr
|
||||
move.b 1(a5),d0 // 2.byt
|
||||
bsr pv_ax_a0 // richtiges register
|
||||
move.b 1(a5),d0 // 2.byt
|
||||
cmp.b #0x30,d0 // >0xf430
|
||||
blo pv_intouch
|
||||
// cpushl
|
||||
cpushl bc,(a0)
|
||||
movem.l (a7),d0/a0/a5
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
pv_intouch:
|
||||
intouch a0
|
||||
movem.l (a7),d0/a0/a5
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// subroutine register ax->a0
|
||||
pv_ax_a0:
|
||||
and.l #0x7,d0 // nur register nummer
|
||||
subq.l #1,d0
|
||||
bmi pv_a0_a0
|
||||
subq.l #1,d0
|
||||
bmi pv_a1_a0
|
||||
subq.l #1,d0
|
||||
bmi pv_a2_a0
|
||||
subq.l #1,d0
|
||||
bmi pv_a3_a0
|
||||
subq.l #1,d0
|
||||
bmi pv_a4_a0
|
||||
subq.l #1,d0
|
||||
bmi pv_a5_a0
|
||||
subq.l #1,d0
|
||||
bmi pv_a6_a0
|
||||
move.l a7,a0
|
||||
rts
|
||||
pv_a0_a0:
|
||||
move.l 8(a7),a0
|
||||
rts
|
||||
pv_a1_a0:
|
||||
move.l a1,a0
|
||||
rts
|
||||
pv_a2_a0:
|
||||
move.l a2,a0
|
||||
rts
|
||||
pv_a3_a0:
|
||||
move.l a3,a0
|
||||
rts
|
||||
pv_a4_a0:
|
||||
move.l a4,a0
|
||||
rts
|
||||
pv_a5_a0:
|
||||
move.l 12(a7),a0
|
||||
rts
|
||||
pv_a6_a0:
|
||||
move.l a6,a0
|
||||
rts
|
||||
// code 0xf4xx ***********************************
|
||||
pv_f3:
|
||||
addq.l #2,16(a7) // next instr
|
||||
move.b 1(a5),d0 // 2. byt
|
||||
cmp.b #0x40,d0
|
||||
bgt pv_frestore
|
||||
//fsave (ax) oder d16(ax)
|
||||
jsr pv_ax_a0 // richtiges register holen
|
||||
move.b 1(a5),d0
|
||||
cmp.b #0x20,d0
|
||||
// +d16
|
||||
blt pv_f3_ax
|
||||
addq.l #2,16(a7) // next instr
|
||||
clr.l d0
|
||||
move.w 2(a0),d0 // d16
|
||||
add.l d0,a0
|
||||
pv_f3_ax:
|
||||
fsave (a0)
|
||||
movem.l (a7),d0/a0/a5
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
pv_frestore:
|
||||
cmp.b #0x7a,d0
|
||||
beq pv_f_d16pc
|
||||
// frestore (ax) oder d16(ax)
|
||||
jsr pv_ax_a0 // richtiges register holen
|
||||
move.b 1(a5),d0
|
||||
cmp.b #0x60,d0
|
||||
blt pv_frestore_ax
|
||||
pv_fend:
|
||||
addq.l #2,16(a7) // next instr
|
||||
clr.l d0
|
||||
move.w 2(a0),d0 // d16
|
||||
add.l d0,a0
|
||||
pv_frestore_ax:
|
||||
frestore (a0)
|
||||
movem.l (a7),d0/a0/a5
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// frestore d16(pc)
|
||||
pv_f_d16pc:
|
||||
move.l 16(a7),a0 // pc holen
|
||||
bra pv_fend
|
||||
//*****************************************************
|
||||
cpusha:
|
||||
lea -16(a7),a7
|
||||
movem.l d0-d1/a0-a1,(a7) // backup C trash registers
|
||||
jsr _flush_and_invalidate_caches
|
||||
movem.l (a7),d0-d1/a0-a1 // restore C trash registers
|
||||
lea 16(a7),a7
|
||||
rts
|
||||
//*******************************************************33
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// XHDI entry point
|
||||
//
|
||||
.extern _xhdi_call
|
||||
|
||||
.globl _xhdi_vec
|
||||
.globl _xhdi_sd_install
|
||||
|
||||
//
|
||||
// this is where the XHDI cookie points to:
|
||||
//
|
||||
|
||||
.text
|
||||
_xhdi_vec:
|
||||
lea -12(sp),sp // save all used registers according to XHDI spec
|
||||
movem.l d1/a0-a1,(sp)
|
||||
|
||||
pea 16(sp) // forward address of parameters on stack
|
||||
jsr _xhdi_call // to internal routine
|
||||
addq.l #4,sp // correct stack
|
||||
|
||||
movem.l (sp),d1/a0-a1 // restore registers
|
||||
lea 12(sp),sp
|
||||
rts
|
||||
|
||||
.data
|
||||
_old_vector:
|
||||
.ds.l 1
|
||||
|
||||
.text
|
||||
|
||||
//
|
||||
// trap #0 handler to bring the address of the disk routines into TOS
|
||||
//
|
||||
_xhdi_sd_install:
|
||||
move.l 4(sp),d0 // address of the old XHDI vector
|
||||
move.l d0,_old_vector // save it - just in case we need it later
|
||||
move.l #_xhdi_vec,d0 // return our BaS vector to TOS
|
||||
move.l d0,a0 //
|
||||
rte
|
||||
@@ -0,0 +1,300 @@
|
||||
# # Makefile for Firebee BaS
|
||||
#
|
||||
# This Makefile is meant for cross compiling the BaS with Vincent Riviere's cross compilers.
|
||||
# If you want to compile native on an Atari (you will need at least GCC 4.6.3), set
|
||||
# TCPREFIX to be empty.
|
||||
# If you want to compile with the m68k-elf- toolchain, set TCPREFIX accordingly. Requires an extra
|
||||
# installation, but allows source level debugging over BDM with a recent gdb (tested with 7.5),
|
||||
# the m68k BDM tools from sourceforge (http://bdm.sourceforge.net) and a BDM pod (TBLCF and P&E tested).
|
||||
|
||||
# can be either "Y" or "N" (without quotes). "Y" for using the m68k-elf-, "N" for using the m68k-atari-mint
|
||||
# toolchain
|
||||
COMPILE_ELF=Y
|
||||
|
||||
ifeq (Y,$(COMPILE_ELF))
|
||||
TCPREFIX=m68k-elf-
|
||||
EXE=elf
|
||||
FORMAT=elf32-m68k
|
||||
else
|
||||
TCPREFIX=m68k-atari-mint-
|
||||
EXE=s19
|
||||
FORMAT=srec
|
||||
endif
|
||||
|
||||
CC=$(TCPREFIX)gcc
|
||||
LD=$(TCPREFIX)ld
|
||||
CPP=$(TCPREFIX)cpp
|
||||
OBJCOPY=$(TCPREFIX)objcopy
|
||||
AR=$(TCPREFIX)ar
|
||||
RANLIB=$(TCPREFIX)ranlib
|
||||
NATIVECC=gcc
|
||||
|
||||
INCLUDE=-Iinclude
|
||||
CFLAGS=-mcpu=5474 \
|
||||
-Wall \
|
||||
-Os \
|
||||
-fomit-frame-pointer \
|
||||
-ffreestanding \
|
||||
-fleading-underscore \
|
||||
-Wa,--register-prefix-optional
|
||||
CFLAGS_OPTIMIZED = -mcpu=5474 \
|
||||
-Wall \
|
||||
-O2 \
|
||||
-fomit-frame-pointer \
|
||||
-ffreestanding \
|
||||
-fleading-underscore \
|
||||
-Wa,--register-prefix-optional
|
||||
|
||||
TRGTDIRS= ./firebee ./m5484lite
|
||||
OBJDIRS=$(patsubst %, %/objs,$(TRGTDIRS))
|
||||
TOOLDIR=util
|
||||
|
||||
VPATH=dma exe flash fs if kbd pci spi sys usb net util video radeon x86emu xhdi
|
||||
|
||||
# Linker control file. The final $(LDCFILE) is intermediate only (preprocessed version of $(LDCSRC)
|
||||
LDCFILE=bas.lk
|
||||
LDRFILE=ram.lk
|
||||
LDCSRC=bas.lk.in
|
||||
LDCBSRC=basflash.lk.in
|
||||
LDCBFS=bashflash.lk
|
||||
|
||||
# this Makefile can create the BaS to flash or an arbitrary ram address (for BDM debugging). See
|
||||
# below for the definition of TARGET_ADDRESS
|
||||
FLASH_EXEC=bas.$(EXE)
|
||||
RAM_EXEC=ram.$(EXE)
|
||||
BASFLASH_EXEC=basflash.$(EXE)
|
||||
|
||||
CSRCS= \
|
||||
sysinit.c \
|
||||
init_fpga.c \
|
||||
fault_vectors.c \
|
||||
interrupts.c \
|
||||
bas_printf.c \
|
||||
bas_string.c \
|
||||
BaS.c \
|
||||
cache.c \
|
||||
mmu.c \
|
||||
mmc.c \
|
||||
unicode.c \
|
||||
ff.c \
|
||||
sd_card.c \
|
||||
wait.c \
|
||||
s19reader.c \
|
||||
flash.c \
|
||||
dma.c \
|
||||
xhdi_sd.c \
|
||||
xhdi_interface.c \
|
||||
pci.c \
|
||||
dspi.c \
|
||||
driver_vec.c \
|
||||
driver_mem.c \
|
||||
MCD_dmaApi.c \
|
||||
MCD_tasks.c \
|
||||
MCD_tasksInit.c \
|
||||
usb.c \
|
||||
ohci-hcd.c \
|
||||
ehci-hcd.c \
|
||||
usb_mouse.c \
|
||||
ikbd.c \
|
||||
\
|
||||
nbuf.c \
|
||||
queue.c \
|
||||
net_timer.c \
|
||||
am79c874.c \
|
||||
bcm5222.c \
|
||||
nif.c \
|
||||
fecbd.c \
|
||||
fec.c \
|
||||
ip.c \
|
||||
udp.c \
|
||||
arp.c \
|
||||
bootp.c \
|
||||
tftp.c \
|
||||
\
|
||||
fbmem.c \
|
||||
fbmon.c \
|
||||
fbmodedb.c \
|
||||
offscreen.c \
|
||||
\
|
||||
videl.c \
|
||||
video.c \
|
||||
\
|
||||
radeon_base.c \
|
||||
radeon_accel.c \
|
||||
radeon_cursor.c \
|
||||
radeon_monitor.c \
|
||||
\
|
||||
x86decode.c \
|
||||
x86sys.c \
|
||||
x86debug.c \
|
||||
x86prim_ops.c \
|
||||
x86ops.c \
|
||||
x86ops2.c \
|
||||
x86fpu.c \
|
||||
x86biosemu.c \
|
||||
x86pcibios.c \
|
||||
\
|
||||
basflash.c \
|
||||
basflash_start.c
|
||||
|
||||
|
||||
ASRCS= \
|
||||
startcf.S \
|
||||
printf_helper.S \
|
||||
exceptions.S \
|
||||
xhdi_vec.S
|
||||
|
||||
SRCS=$(ASRCS) $(CSRCS)
|
||||
COBJS=$(patsubst %.c,%.o,$(CSRCS))
|
||||
AOBJS=$(patsubst %.S,%.o,$(ASRCS))
|
||||
|
||||
OBJS=$(COBJS) $(AOBJS)
|
||||
LIBBAS=libbas.a
|
||||
|
||||
LIBS=$(patsubst %,%/$(LIBBAS),$(TRGTDIRS))
|
||||
|
||||
all: fls ram bfl lib
|
||||
fls: $(patsubst %,%/$(FLASH_EXEC),$(TRGTDIRS))
|
||||
ram: $(patsubst %,%/$(RAM_EXEC),$(TRGTDIRS))
|
||||
bfl: $(patsubst %,%/$(BASFLASH_EXEC),$(TRGTDIRS))
|
||||
lib: $(LIBS)
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
for d in $(TRGTDIRS);\
|
||||
do rm -f $$d/*.map $$d/*.s19 $$d/*.elf $$d/*.lk $$d/*.a $$d/objs/* $$d/depend;\
|
||||
done
|
||||
rm -f tags
|
||||
|
||||
|
||||
# flags for targets
|
||||
m5484lite/bas.$(EXE): MACHINE=MACHINE_M5484LITE
|
||||
firebee/bas.$(EXE): MACHINE=MACHINE_FIREBEE
|
||||
m5484lite/ram.$(EXE): MACHINE=MACHINE_M5484LITE
|
||||
firebee/ram.$(EXE): MACHINE=MACHINE_FIREBEE
|
||||
m5484lite/basflash.$(EXE): MACHINE=MACHINE_M5484LITE
|
||||
firebee/basflash.$(EXE): MACHINE=MACHINE_FIREBEE
|
||||
|
||||
#
|
||||
# generate pattern rules for different object files
|
||||
#
|
||||
define CC_TEMPLATE
|
||||
ifeq (firebee,$(1))
|
||||
MACHINE=MACHINE_FIREBEE
|
||||
else
|
||||
MACHINE=MACHINE_M5484LITE
|
||||
endif
|
||||
|
||||
# always optimize x86 emulator objects
|
||||
$(1)/objs/x86decode.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86sys.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86debug.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86prim_ops.o:CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86ops.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86ops2.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86fpu.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86biosemu.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
$(1)/objs/x86pcibios.o: CFLAGS=$(CFLAGS_OPTIMIZED)
|
||||
|
||||
$(1)/objs/%.o:%.c
|
||||
$(CC) $$(CFLAGS) -D$$(MACHINE) $(INCLUDE) -c $$< -o $$@
|
||||
|
||||
$(1)/objs/%.o:%.S
|
||||
$(CC) $$(CFLAGS) -Wa,--bitwise-or -D$$(MACHINE) $(INCLUDE) -c $$< -o $$@
|
||||
endef
|
||||
$(foreach DIR,$(TRGTDIRS),$(eval $(call CC_TEMPLATE,$(DIR))))
|
||||
|
||||
# rules for depend
|
||||
define DEP_TEMPLATE
|
||||
ifneq (clean,$$(MAKECMDGOALS))
|
||||
include $(1)/depend
|
||||
endif
|
||||
|
||||
ifeq (firebee,$(1))
|
||||
MACHINE=MACHINE_FIREBEE
|
||||
else
|
||||
MACHINE=MACHINE_M5484LITE
|
||||
endif
|
||||
$(1)/depend:$(SRCS)
|
||||
$(CC) $$(CFLAGS) -D$$(MACHINE) $(INCLUDE) -M $$^ | sed -e "s#^\(.*\).o:#"$(1)"/objs/\1.o:#" > $$@
|
||||
endef
|
||||
$(foreach DIR,$(TRGTDIRS),$(eval $(call DEP_TEMPLATE,$(DIR))))
|
||||
|
||||
|
||||
#
|
||||
# generate pattern rules for libraries
|
||||
#
|
||||
define AR_TEMPLATE
|
||||
$(1)_OBJS=$(patsubst %,$(1)/objs/%,$(OBJS))
|
||||
$(1)/$(LIBBAS): $$($(1)_OBJS)
|
||||
$(AR) rv $$@ $$?
|
||||
$(RANLIB) $$@
|
||||
endef
|
||||
$(foreach DIR,$(TRGTDIRS),$(eval $(call AR_TEMPLATE,$(DIR))))
|
||||
|
||||
ifeq ($(COMPILE_ELF),Y)
|
||||
FORMAT_ELF=1
|
||||
else
|
||||
FORMAT_ELF=0
|
||||
endif
|
||||
#
|
||||
# define pattern rules for binaries
|
||||
#
|
||||
define EX_TEMPLATE
|
||||
# pattern rule for flash
|
||||
$(1)_MAPFILE=$(1)/$$(basename $$(FLASH_EXEC)).map
|
||||
$(1)/$$(FLASH_EXEC): $(1)/$(LIBBAS) $(LDCSRC)
|
||||
$(CPP) $(INCLUDE) -DOBJDIR=$(1)/objs -P -DFORMAT_ELF=$(FORMAT_ELF) -D$$(MACHINE) $(LDCSRC) -o $(1)/$$(LDCFILE)
|
||||
$(LD) --oformat $$(FORMAT) -Map $$($(1)_MAPFILE) --cref -T $(1)/$$(LDCFILE) -o $$@
|
||||
ifeq ($(COMPILE_ELF),Y)
|
||||
$(OBJCOPY) -O srec $$@ $$(basename $$@).s19
|
||||
else
|
||||
objcopy -I srec -O elf32-big --alt-machine-code 4 $$@ $$(basename $$@).elf
|
||||
endif
|
||||
|
||||
# pattern rule for RAM
|
||||
$(1)_MAPFILE_RAM=$(1)/$$(basename $$(RAM_EXEC)).map
|
||||
$(1)/$$(RAM_EXEC): $(1)/$(LIBBAS) $(LDCSRC)
|
||||
$(CPP) $(INCLUDE) -DCOMPILE_RAM -DOBJDIR=$(1)/objs -P -DFORMAT_ELF=$(FORMAT_ELF) -D$$(MACHINE) $(LDCSRC) -o $(1)/$$(LDRFILE)
|
||||
$(LD) --oformat $$(FORMAT) -Map $$($(1)_MAPFILE_RAM) --cref -T $(1)/$$(LDRFILE) -o $$@
|
||||
ifeq ($(COMPILE_ELF),Y)
|
||||
$(OBJCOPY) -O srec $$@ $$(basename $$@).s19
|
||||
else
|
||||
objcopy -I srec -O elf32-big --alt-machine-code 4 $$@ $$(basename $$@).elf
|
||||
endif
|
||||
|
||||
# pattern rule for basflash
|
||||
$(1)_MAPFILE_BFL=$(1)/$$(basename $$(BASFLASH_EXEC)).map
|
||||
$(1)/$$(BASFLASH_EXEC): $(1)/objs/basflash.o $(1)/objs/basflash_start.o $(1)/$(LIBBAS) $(LDCBFL)
|
||||
$(CPP) $(INCLUDE) -P -DOBJDIR=$(1)/objs -DFORMAT_ELF=$(FORMAT_ELF) -D$$(MACHINE) $(LDCBSRC) -o $(1)/$$(LDCBFS)
|
||||
$(LD) --oformat $$(FORMAT) -Map $$($(1)_MAPFILE_BFL) --cref -T $(1)/$$(LDCFILE) -L$(1) -lbas -o $$@
|
||||
ifeq ($(COMPILE_ELF),Y)
|
||||
$(OBJCOPY) -O srec $$@ $$(basename $$@).s19
|
||||
else
|
||||
objcopy -I srec -O elf32-big --alt-machine-code 4 $$@ $$(basename $$@).elf
|
||||
endif
|
||||
endef
|
||||
$(foreach DIR,$(TRGTDIRS),$(eval $(call EX_TEMPLATE,$(DIR))))
|
||||
|
||||
|
||||
indent: $(CSRCS)
|
||||
indent $<
|
||||
|
||||
.PHONY: tags
|
||||
tags:
|
||||
ctags $(patsubst %,%/*,$(VPATH))
|
||||
|
||||
.PHONY: printvars
|
||||
printvars:
|
||||
@$(foreach V,$(.VARIABLES), $(if $(filter-out environment% default automatic, $(origin $V)),$(warning $V=$($V))))
|
||||
ifeq (MACHINE_M5484LITE,$$(MACHINE))
|
||||
MNAME=m5484lite
|
||||
else ifeq (MACHINE_FIREBEE,$(MACHINE))
|
||||
MNAME=firebee
|
||||
endif
|
||||
|
||||
tools:
|
||||
$(NATIVECC) $(INCLUDE) -c $(TOOLDIR)/s19header.c -o $(TOOLDIR)/s19header.o
|
||||
$(NATIVECC) -o $(TOOLDIR)/s19header $(TOOLDIR)/s19header.o
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
#ifdef MACHINE_FIREBEE
|
||||
#include "firebee.h"
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
|
||||
#ifdef MACHINE_M5484LITE
|
||||
#include "m5484l.h"
|
||||
#endif /* MACHINE_M5484LITE */
|
||||
|
||||
/* make bas_rom access flags rx if compiling to RAM */
|
||||
#ifdef COMPILE_RAM
|
||||
#define ROMFLAGS WX
|
||||
#else
|
||||
#define ROMFLAGS RX
|
||||
#endif /* COMPILE_RAM */
|
||||
|
||||
MEMORY
|
||||
{
|
||||
bas_rom (ROMFLAGS) : ORIGIN = TARGET_ADDRESS, LENGTH = 0x00100000
|
||||
/*
|
||||
* target to copy BaS data segment to. 1M should be enough for now
|
||||
*/
|
||||
bas_ram (WX) : ORIGIN = SDRAM_START + SDRAM_SIZE - 0x00200000, LENGTH = 0x00100000
|
||||
/*
|
||||
* driver_ram is an uncached, reserved memory area for drivers (e.g. USB) that need this type of memory
|
||||
*/
|
||||
driver_ram (WX) : ORIGIN = SDRAM_START + SDRAM_SIZE - 0x00100000, LENGTH = 0x00100000
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* BaS in ROM */
|
||||
.text :
|
||||
{
|
||||
OBJDIR/startcf.o(.text) /* this one is the entry point so it must be the first */
|
||||
|
||||
OBJDIR/sysinit.o(.text)
|
||||
OBJDIR/fault_vectors.o(.text)
|
||||
#ifdef MACHINE_FIREBEE
|
||||
OBJDIR/init_fpga.o(.text)
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
OBJDIR/wait.o(.text)
|
||||
OBJDIR/exceptions.o(.text)
|
||||
OBJDIR/driver_vec.o(.text)
|
||||
OBJDIR/interrupts.o(.text)
|
||||
OBJDIR/mmu.o(.text)
|
||||
|
||||
OBJDIR/BaS.o(.text)
|
||||
OBJDIR/pci.o(.text)
|
||||
OBJDIR/usb.o(.text)
|
||||
OBJDIR/driver_mem.o(.text)
|
||||
OBJDIR/usb_mouse.o(.text)
|
||||
OBJDIR/ohci-hcd.o(.text)
|
||||
OBJDIR/ehci-hcd.o(.text)
|
||||
OBJDIR/wait.o(.text)
|
||||
|
||||
OBJDIR/nbuf.o(.text)
|
||||
OBJDIR/net_timer.o(.text)
|
||||
OBJDIR/queue.o(.text)
|
||||
OBJDIR/nif.o(.text)
|
||||
OBJDIR/fecbd.o(.text)
|
||||
OBJDIR/fec.o(.text)
|
||||
OBJDIR/am79c874.o(.text)
|
||||
OBJDIR/bcm5222.o(.text)
|
||||
OBJDIR/ip.o(.text)
|
||||
OBJDIR/udp.o(text)
|
||||
OBJDIR/bootp.o(text)
|
||||
OBJDIR/tftp.o(text)
|
||||
OBJDIR/arp.o(text)
|
||||
|
||||
OBJDIR/unicode.o(.text)
|
||||
OBJDIR/mmc.o(.text)
|
||||
OBJDIR/ff.o(.text)
|
||||
OBJDIR/sd_card.o(.text)
|
||||
OBJDIR/s19reader.o(.text)
|
||||
OBJDIR/bas_printf.o(.text)
|
||||
OBJDIR/bas_string.o(.text)
|
||||
OBJDIR/printf_helper.o(.text)
|
||||
OBJDIR/cache.o(.text)
|
||||
OBJDIR/dma.o(.text)
|
||||
OBJDIR/MCD_dmaApi.o(.text)
|
||||
OBJDIR/MCD_tasks.o(.text)
|
||||
OBJDIR/MCD_tasksInit.o(.text)
|
||||
|
||||
OBJDIR/video.o(.text)
|
||||
OBJDIR/videl.o(.text)
|
||||
OBJDIR/fbmem.o(.text)
|
||||
OBJDIR/fbmon.o(.text)
|
||||
OBJDIR/fbmodedb.o(.text)
|
||||
OBJDIR/offscreen.o(.text)
|
||||
|
||||
OBJDIR/x86decode.o(.text)
|
||||
OBJDIR/x86ops.o(.text)
|
||||
OBJDIR/x86ops2.o(.text)
|
||||
OBJDIR/x86fpu.o(.text)
|
||||
OBJDIR/x86sys.o(.text)
|
||||
OBJDIR/x86biosemu.o(.text)
|
||||
OBJDIR/x86debug.o(.text)
|
||||
OBJDIR/x86prim_ops.o(.text)
|
||||
OBJDIR/x86pcibios.o(.text)
|
||||
|
||||
OBJDIR/radeon_base.o(.text)
|
||||
OBJDIR/radeon_accel.o(.text)
|
||||
OBJDIR/radeon_cursor.o(.text)
|
||||
OBJDIR/radeon_monitor.o(.text)
|
||||
|
||||
OBJDIR/xhdi_sd.o(.text)
|
||||
OBJDIR/xhdi_interface.o(.text)
|
||||
OBJDIR/xhdi_vec.o(.text)
|
||||
|
||||
#ifdef COMPILE_RAM
|
||||
/*
|
||||
* if we compile to RAM anyway, there is no need to copy anything
|
||||
*/
|
||||
. = ALIGN(4);
|
||||
__BAS_DATA_START = .;
|
||||
*(.data)
|
||||
__BAS_DATA_END = .;
|
||||
__BAS_BSS_START = .;
|
||||
*(.bss)
|
||||
__BAS_BSS_END = .;
|
||||
#endif /* COMPILE_RAM */
|
||||
|
||||
#if (FORMAT_ELF == 1)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
#endif
|
||||
} > bas_rom
|
||||
|
||||
#if (TARGET_ADDRESS == BOOTFLASH_BASE_ADDRESS)
|
||||
/*
|
||||
* put BaS .data and .bss segments to flash, but relocate it to RAM after initialize_hardware() ran
|
||||
*/
|
||||
.bas :
|
||||
AT (ALIGN(ADDR(.text) + SIZEOF(.text), 4))
|
||||
{
|
||||
. = ALIGN(4); /* same alignment than AT() statement! */
|
||||
__BAS_DATA_START = .;
|
||||
*(.data)
|
||||
__BAS_DATA_END = .;
|
||||
__BAS_BSS_START = .;
|
||||
*(.bss)
|
||||
__BAS_BSS_END = .;
|
||||
|
||||
. = ALIGN(16);
|
||||
} > bas_ram
|
||||
#endif
|
||||
|
||||
.driver_memory :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_driver_mem_buffer = .;
|
||||
//. = . + DRIVER_MEM_BUFFER_SIZE;
|
||||
} > driver_ram
|
||||
|
||||
/*
|
||||
* Global memory map
|
||||
*/
|
||||
|
||||
/* SDRAM Initialization */
|
||||
___SDRAM = SDRAM_START;
|
||||
___SDRAM_SIZE = SDRAM_SIZE;
|
||||
_SDRAM_VECTOR_TABLE = ___SDRAM;
|
||||
|
||||
/* ST-RAM */
|
||||
__STRAM = ___SDRAM;
|
||||
__STRAM_END = __TOS;
|
||||
|
||||
/* TOS */
|
||||
__TOS = 0x00e00000;
|
||||
|
||||
/* FastRAM */
|
||||
__FASTRAM = 0x10000000;
|
||||
__TARGET_ADDRESS = TARGET_ADDRESS;
|
||||
|
||||
#if TARGET_ADDRESS == BOOTFLASH_BASE_ADDRESS
|
||||
__FASTRAM_END = __BAS_IN_RAM;
|
||||
#else
|
||||
__FASTRAM_END = TARGET_ADDRESS;
|
||||
#endif
|
||||
|
||||
/* Init CS0 (BootFLASH @ E000_0000 - E07F_FFFF 8Mbytes) */
|
||||
___BOOT_FLASH = BOOTFLASH_BASE_ADDRESS;
|
||||
___BOOT_FLASH_SIZE = BOOTFLASH_SIZE;
|
||||
|
||||
#if TARGET_ADDRESS == BOOTFLASH_BASE_ADDRESS
|
||||
/* BaS */
|
||||
__BAS_LMA = LOADADDR(.bas);
|
||||
__BAS_IN_RAM = ADDR(.bas);
|
||||
__BAS_SIZE = SIZEOF(.bas);
|
||||
#else
|
||||
/* BaS is already in RAM - no need to copy anything */
|
||||
__BAS_IN_RAM = __FASTRAM_END;
|
||||
__BAS_SIZE = 0;
|
||||
__BAS_LMA = __BAS_IN_RAM;
|
||||
#endif
|
||||
|
||||
/* Other flash components */
|
||||
__FIRETOS = 0xe0400000;
|
||||
__EMUTOS = EMUTOS_BASE_ADDRESS;
|
||||
__EMUTOS_SIZE = 0x00100000;
|
||||
|
||||
/* where FPGA data lives in flash */
|
||||
__FPGA_FLASH_DATA = 0xe0700000;
|
||||
__FPGA_FLASH_DATA_SIZE = 0x100000;
|
||||
|
||||
/* VIDEO RAM BASIS */
|
||||
__VRAM = 0x60000000;
|
||||
|
||||
/* Memory mapped registers */
|
||||
__MBAR = 0xFF000000;
|
||||
|
||||
/* 32KB on-chip System SRAM */
|
||||
__SYS_SRAM = __MBAR + 0x10000;
|
||||
__SYS_SRAM_SIZE = 0x00008000;
|
||||
|
||||
/* MMU memory mapped registers */
|
||||
__MMUBAR = 0xFF040000;
|
||||
|
||||
/*
|
||||
* 4KB on-chip Core SRAM0: -> exception table
|
||||
*/
|
||||
__RAMBAR0 = 0xFF100000;
|
||||
__RAMBAR0_SIZE = 0x00001000;
|
||||
|
||||
/* 4KB on-chip Core SRAM1 */
|
||||
__RAMBAR1 = 0xFF101000;
|
||||
__RAMBAR1_SIZE = 0x00001000;
|
||||
__SUP_SP = __RAMBAR0 + __RAMBAR0_SIZE - 4;
|
||||
|
||||
/* system variables */
|
||||
|
||||
/* RAMBAR0 0 to 0x7FF -> exception vectors */
|
||||
_rt_mod = __RAMBAR0 + 0x800;
|
||||
_rt_ssp = __RAMBAR0 + 0x804;
|
||||
_rt_usp = __RAMBAR0 + 0x808;
|
||||
_rt_vbr = __RAMBAR0 + 0x80C; /* (8)01 */
|
||||
_rt_cacr = __RAMBAR0 + 0x810; /* 002 */
|
||||
_rt_asid = __RAMBAR0 + 0x814; /* 003 */
|
||||
_rt_acr0 = __RAMBAR0 + 0x818; /* 004 */
|
||||
_rt_acr1 = __RAMBAR0 + 0x81c; /* 005 */
|
||||
_rt_acr2 = __RAMBAR0 + 0x820; /* 006 */
|
||||
_rt_acr3 = __RAMBAR0 + 0x824; /* 007 */
|
||||
_rt_mmubar = __RAMBAR0 + 0x828; /* 008 */
|
||||
_rt_sr = __RAMBAR0 + 0x82c;
|
||||
_d0_save = __RAMBAR0 + 0x830;
|
||||
_a7_save = __RAMBAR0 + 0x834;
|
||||
_video_tlb = __RAMBAR0 + 0x838;
|
||||
_video_sbt = __RAMBAR0 + 0x83C;
|
||||
_rt_mbar = __RAMBAR0 + 0x844; /* (c)0f */
|
||||
|
||||
}
|
||||
@@ -62,10 +62,11 @@ write 0xFF000100 0x008D0000 4 # SDMR (write to LMR)
|
||||
write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
|
||||
sleep 100
|
||||
|
||||
load -v ram.elf
|
||||
load -v firebee/ram.elf
|
||||
write-ctrl 0x80e 0x2700
|
||||
write-ctrl 0x2 0xa50c8120
|
||||
dump-register SR
|
||||
dump-register CACR
|
||||
dump-register MBAR
|
||||
execute
|
||||
wait
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
#!/usr/local/bin/bdmctrl -D2 -v9 -d9
|
||||
#
|
||||
# firebee board initialization for bdmctrl
|
||||
#
|
||||
open $1
|
||||
reset
|
||||
sleep 10
|
||||
|
||||
wait
|
||||
|
||||
# set VBR
|
||||
write-ctrl 0x0801 0x00000000
|
||||
dump-register VBR
|
||||
|
||||
# Turn on MBAR at 0xFF00_0000
|
||||
write-ctrl 0x0C0F 0xFF000000
|
||||
dump-register MBAR
|
||||
|
||||
# Turn on RAMBAR0 at address FF10_0000
|
||||
write-ctrl 0x0C04 0xFF100007
|
||||
|
||||
# Turn on RAMBAR1 at address FF10_1000 (disabled - not mapped by bdm currently)
|
||||
write-ctrl 0x0C05 0xFF101001
|
||||
|
||||
# Init CS0 (BootFLASH @ E000_0000 - E03F_FFFF 8Mbytes)
|
||||
write 0xFF000500 0xE0000000 4
|
||||
write 0xFF000508 0x00041180 4
|
||||
write 0xFF000504 0x003F0001 4
|
||||
wait
|
||||
|
||||
# SDRAM Initialization @ 0000_0000 - 0400_0000 64 MBytes
|
||||
write 0xFF000004 0x000002AA 4 # SDRAMDS configuration
|
||||
write 0xFF000020 0x00000019 4 # SDRAM CS0 configuration (64Mbytes 0000_0000 - 07FF_FFFF)
|
||||
write 0xFF000024 0x00000000 4 # SDRAM CS1 configuration
|
||||
write 0xFF000028 0x00000000 4 # SDRAM CS2 configuration
|
||||
write 0xFF00002C 0x00000000 4 # SDRAM CS3 configuration
|
||||
|
||||
write 0xFF000108 0x73711630 4 # SDCFG1
|
||||
write 0xFF00010C 0x46370000 4 # SDCFG2
|
||||
|
||||
write 0xFF000104 0xE10B0002 4 # SDCR + IPALL
|
||||
write 0xFF000100 0x40010000 4 # SDMR (write to LEMR)
|
||||
write 0xFF000100 0x058D0000 4 # SDMR (write to LMR)
|
||||
sleep 100
|
||||
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000100 0x018D0000 4 # SDMR (write to LMR)
|
||||
write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
|
||||
sleep 100
|
||||
|
||||
load -v m5484lite/ram.elf
|
||||
execute
|
||||
# wait is _needed_ here if using the P&E BDM interface. Otherwise
|
||||
# the Coldfire resets after some time!
|
||||
wait
|
||||
@@ -1,3 +1,11 @@
|
||||
#ifdef MACHINE_FIREBEE
|
||||
#include "firebee.h"
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
|
||||
#ifdef MACHINE_M5484LITE
|
||||
#include "m5484l.h"
|
||||
#endif /* MACHINE_M5484LITE */
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flasher (WX) : ORIGIN = TARGET_ADDRESS, LENGTH = 0x00100000 /* target to load basflash */
|
||||
@@ -7,8 +15,8 @@ SECTIONS
|
||||
{
|
||||
.text :
|
||||
{
|
||||
objs/basflash_start.o(.text)
|
||||
objs/basflash.o(.text)
|
||||
OBJDIR/basflash_start.o(.text)
|
||||
OBJDIR/basflash.o(.text)
|
||||
|
||||
*(.data)
|
||||
*(.bss)
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "MCD_dma.h"
|
||||
#include "MCD_tasksInit.h"
|
||||
#include "MCD_progCheck.h"
|
||||
#include "bas_types.h"
|
||||
|
||||
/********************************************************************/
|
||||
/*
|
||||
@@ -35,14 +36,17 @@ TaskTableEntry *MCD_modelTaskTable;
|
||||
* status, etc.
|
||||
*/
|
||||
static int MCD_chStatus[NCHANNELS] =
|
||||
{ MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA,
|
||||
MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA,
|
||||
MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA };
|
||||
{
|
||||
MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA,
|
||||
MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA,
|
||||
MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA,
|
||||
MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA, MCD_NO_DMA
|
||||
};
|
||||
|
||||
/*
|
||||
* Prototypes for local functions
|
||||
*/
|
||||
static void MCD_memcpy(int *dest, int *src, u32 size);
|
||||
static void MCD_memcpy(int *dest, int *src, uint32_t size);
|
||||
static void MCD_resmActions(int channel);
|
||||
|
||||
/*
|
||||
@@ -115,9 +119,9 @@ struct MCD_remVariants_struct
|
||||
{
|
||||
int remDestRsdIncr[NCHANNELS]; /* -1,0,1 */
|
||||
int remSrcRsdIncr[NCHANNELS]; /* -1,0,1 */
|
||||
s16 remDestIncr[NCHANNELS]; /* DestIncr */
|
||||
s16 remSrcIncr[NCHANNELS]; /* srcIncr */
|
||||
u32 remXferSize[NCHANNELS]; /* xferSize */
|
||||
int16_t remDestIncr[NCHANNELS]; /* DestIncr */
|
||||
int16_t remSrcIncr[NCHANNELS]; /* srcIncr */
|
||||
uint32_t remXferSize[NCHANNELS]; /* xferSize */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -138,9 +142,9 @@ MCD_remVariant MCD_remVariants;
|
||||
* MCD_TABLE_UNALIGNED if taskTableDest is not 512-byte aligned
|
||||
* MCD_OK otherwise
|
||||
*/
|
||||
extern u32 MCD_funcDescTab0[];
|
||||
extern uint32_t MCD_funcDescTab0[];
|
||||
|
||||
int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, uint32_t flags)
|
||||
{
|
||||
int i;
|
||||
TaskTableEntry *entryPtr;
|
||||
@@ -152,7 +156,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
if ((flags & MCD_RELOC_TASKS) != 0)
|
||||
{
|
||||
int fixedSize;
|
||||
u32 *fixedPtr;
|
||||
uint32_t *fixedPtr;
|
||||
/*int *tablePtr = taskTableDest;TBD*/
|
||||
int varTabsOffset, funcDescTabsOffset, contextSavesOffset;
|
||||
int taskDescTabsOffset;
|
||||
@@ -162,7 +166,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
int i;
|
||||
|
||||
/* check if physical address is aligned on 512 byte boundary */
|
||||
if (((u32) taskTableDest & 0x000001ff) != 0)
|
||||
if (((uint32_t) taskTableDest & 0x000001ff) != 0)
|
||||
return (MCD_TABLE_UNALIGNED);
|
||||
|
||||
MCD_taskTable = taskTableDest; /* set up local pointer to task Table */
|
||||
@@ -178,7 +182,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
|
||||
taskTableSize = NCHANNELS * sizeof(TaskTableEntry);
|
||||
/* align variable tables to size */
|
||||
varTabsOffset = taskTableSize + (u32) taskTableDest;
|
||||
varTabsOffset = taskTableSize + (uint32_t) taskTableDest;
|
||||
if ((varTabsOffset & (VAR_TAB_SIZE - 1)) != 0)
|
||||
varTabsOffset = (varTabsOffset + VAR_TAB_SIZE) & (~VAR_TAB_SIZE);
|
||||
/* align function descriptor tables */
|
||||
@@ -196,7 +200,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
+ contextSavesSize;
|
||||
|
||||
/* zero the thing out */
|
||||
fixedPtr = (u32 *) taskTableDest;
|
||||
fixedPtr = (uint32_t *) taskTableDest;
|
||||
for (i = 0; i < (fixedSize / 4); i++)
|
||||
fixedPtr[i] = 0;
|
||||
|
||||
@@ -204,10 +208,10 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
/* set up fixed pointers */
|
||||
for (i = 0; i < NCHANNELS; i++)
|
||||
{
|
||||
entryPtr[i].varTab = (u32) varTabsOffset; /* update ptr to local value */
|
||||
entryPtr[i].FDTandFlags = (u32) funcDescTabsOffset
|
||||
entryPtr[i].varTab = (uint32_t) varTabsOffset; /* update ptr to local value */
|
||||
entryPtr[i].FDTandFlags = (uint32_t) funcDescTabsOffset
|
||||
| MCD_TT_FLAGS_DEF;
|
||||
entryPtr[i].contextSaveSpace = (u32) contextSavesOffset;
|
||||
entryPtr[i].contextSaveSpace = (uint32_t) contextSavesOffset;
|
||||
varTabsOffset += VAR_TAB_SIZE;
|
||||
#ifdef MCD_INCLUDE_EU /* if not there is only one, just point to the same one */
|
||||
funcDescTabsOffset += FUNCDESC_TAB_SIZE;
|
||||
@@ -229,7 +233,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
|
||||
entryPtr = MCD_modelTaskTable; /* point to local version of
|
||||
model task table */
|
||||
taskDescTabsOffset = (u32) MCD_modelTaskTable
|
||||
taskDescTabsOffset = (uint32_t) MCD_modelTaskTable
|
||||
+ (NUMOFVARIANTS * sizeof(TaskTableEntry));
|
||||
|
||||
/* copy actual task code and update TDT ptrs in local model task table */
|
||||
@@ -238,9 +242,9 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
taskDescTabSize = entryPtr[i].TDTend - entryPtr[i].TDTstart + 4;
|
||||
MCD_memcpy((void*) taskDescTabsOffset, (void*) entryPtr[i].TDTstart,
|
||||
taskDescTabSize);
|
||||
entryPtr[i].TDTstart = (u32) taskDescTabsOffset;
|
||||
entryPtr[i].TDTstart = (uint32_t) taskDescTabsOffset;
|
||||
taskDescTabsOffset += taskDescTabSize;
|
||||
entryPtr[i].TDTend = (u32) taskDescTabsOffset - 4;
|
||||
entryPtr[i].TDTend = (uint32_t) taskDescTabsOffset - 4;
|
||||
}
|
||||
#ifdef MCD_INCLUDE_EU /* Tack single DMA BDs onto end of code so API controls
|
||||
where they are since DMA might write to them */
|
||||
@@ -255,7 +259,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
/* point the would-be relocated task tables and the
|
||||
buffer descriptors to the ones the linker generated */
|
||||
|
||||
if (((u32) MCD_realTaskTableSrc & 0x000001ff) != 0)
|
||||
if (((uint32_t) MCD_realTaskTableSrc & 0x000001ff) != 0)
|
||||
return (MCD_TABLE_UNALIGNED);
|
||||
|
||||
/* need to add code to make sure that every thing else is aligned properly TBD*/
|
||||
@@ -276,7 +280,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
|
||||
/* Make all channels as totally inactive, and remember them as such: */
|
||||
|
||||
MCD_dmaBar->taskbar = (u32) MCD_taskTable;
|
||||
MCD_dmaBar->taskbar = (uint32_t) MCD_taskTable;
|
||||
for (i = 0; i < NCHANNELS; i++)
|
||||
{
|
||||
MCD_dmaBar->taskControl[i] = 0x0;
|
||||
@@ -308,7 +312,7 @@ int MCD_initDma(dmaRegs *dmaBarAddr, void *taskTableDest, u32 flags)
|
||||
*/
|
||||
int MCD_dmaStatus(int channel)
|
||||
{
|
||||
u16 tcrValue;
|
||||
uint16_t tcrValue;
|
||||
|
||||
if ((channel < 0) || (channel >= NCHANNELS))
|
||||
return (MCD_CHANNEL_INVALID);
|
||||
@@ -348,19 +352,19 @@ int MCD_dmaStatus(int channel)
|
||||
* Returns: MCD_CHANNEL_INVALID if channel is invalid, else MCD_OK
|
||||
*/
|
||||
|
||||
int MCD_startDma(int channel, /* the channel on which to run the DMA */
|
||||
s8 *srcAddr, /* the address to move data from, or physical buffer-descriptor address */
|
||||
s16 srcIncr, /* the amount to increment the source address per transfer */
|
||||
s8 *destAddr, /* the address to move data to */
|
||||
s16 destIncr, /* the amount to increment the destination address per transfer */
|
||||
u32 dmaSize, /* the number of bytes to transfer independent of the transfer size */
|
||||
u32 xferSize, /* the number bytes in of each data movement (1, 2, or 4) */
|
||||
u32 initiator, /* what device initiates the DMA */
|
||||
int priority, /* priority of the DMA */
|
||||
u32 flags, /* flags describing the DMA */
|
||||
u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
int __attribute__((flatten)) MCD_startDma(int channel, /* the channel on which to run the DMA */
|
||||
int8_t *srcAddr, /* the address to move data from, or physical buffer-descriptor address */
|
||||
int16_t srcIncr, /* the amount to increment the source address per transfer */
|
||||
int8_t *destAddr, /* the address to move data to */
|
||||
int16_t destIncr, /* the amount to increment the destination address per transfer */
|
||||
uint32_t dmaSize, /* the number of bytes to transfer independent of the transfer size */
|
||||
uint32_t xferSize, /* the number bytes in of each data movement (1, 2, or 4) */
|
||||
uint32_t initiator, /* what device initiates the DMA */
|
||||
int priority, /* priority of the DMA */
|
||||
uint32_t flags, /* flags describing the DMA */
|
||||
uint32_t funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
#ifdef MCD_NEED_ADDR_TRANS
|
||||
s8 *srcAddrVirt /* virtual buffer descriptor address TBD*/
|
||||
int8_t *srcAddrVirt /* virtual buffer descriptor address TBD*/
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -369,7 +373,7 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
short xferSizeIncr;
|
||||
int tcrCount = 0;
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
u32 *realFuncArray;
|
||||
uint32_t *realFuncArray;
|
||||
#endif
|
||||
|
||||
if ((channel < 0) || (channel >= NCHANNELS))
|
||||
@@ -389,7 +393,7 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
since the register involved is in the same longword as other registers that users are in control
|
||||
of, setting it more than once is probably preferable. That since the documentation doesn't seem
|
||||
to be completely consistent about the nature of the PTD control register. */
|
||||
MCD_dmaBar->ptdControl |= (u16) 0x8000;
|
||||
MCD_dmaBar->ptdControl |= (uint16_t) 0x8000;
|
||||
#if 1 /* Not sure what we need to keep here rtm TBD */
|
||||
/* Calculate additional parameters to the regular DMA calls. */
|
||||
srcRsdIncr = srcIncr < 0 ? -1 : (srcIncr > 0 ? 1 : 0);
|
||||
@@ -409,17 +413,17 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
+ CURRBD;
|
||||
|
||||
#ifdef MCD_INCLUDE_EU /* may move this to EU specific calls */
|
||||
realFuncArray = (u32 *) (MCD_taskTable[channel].FDTandFlags & 0xffffff00);
|
||||
realFuncArray = (uint32_t *) (MCD_taskTable[channel].FDTandFlags & 0xffffff00);
|
||||
/* Modify the LURC's normal and byte-residue-loop functions according to parameter. */
|
||||
realFuncArray[(LURC*16)] = xferSize == 4 ?
|
||||
funcDesc : xferSize == 2 ?
|
||||
funcDesc & 0xfffff00f : funcDesc & 0xffff000f;
|
||||
realFuncArray[(LURC*16)] = xferSize == 4 ? funcDesc : xferSize == 2 ? funcDesc & 0xfffff00f : funcDesc & 0xffff000f;
|
||||
realFuncArray[(LURC*16+1)] = (funcDesc & MCD_BYTE_SWAP_KILLER) | MCD_NO_BYTE_SWAP_ATALL;
|
||||
#endif
|
||||
/* Write the initiator field in the TCR, and also set the initiator-hold
|
||||
bit. Note that,due to a hardware quirk, this could collide with an
|
||||
MDE access to the initiator-register file, so we have to verify that the write
|
||||
reads back correctly. */
|
||||
/*
|
||||
* Write the initiator field in the TCR, and also set the initiator-hold
|
||||
* bit. Note that,due to a hardware quirk, this could collide with an
|
||||
* MDE access to the initiator-register file, so we have to verify that the write
|
||||
* reads back correctly.
|
||||
*/
|
||||
|
||||
MCD_dmaBar->taskControl[channel] = (initiator << 8) | TASK_CTL_HIPRITSKEN
|
||||
| TASK_CTL_HLDINITNUM;
|
||||
@@ -434,7 +438,8 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
| TASK_CTL_HIPRITSKEN | TASK_CTL_HLDINITNUM;
|
||||
}
|
||||
|
||||
MCD_dmaBar->priority[channel] = (u8) priority & PRIORITY_PRI_MASK;
|
||||
MCD_dmaBar->priority[channel] = (uint8_t) priority & PRIORITY_PRI_MASK;
|
||||
|
||||
/* should be albe to handle this stuff with only one write to ts reg - tbd */
|
||||
if (channel < 8 && channel >= 0)
|
||||
{
|
||||
@@ -459,8 +464,7 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
MCD_taskTable[channel].TDTstart =
|
||||
MCD_modelTaskTable[TASK_FECTX].TDTstart;
|
||||
MCD_taskTable[channel].TDTend = MCD_modelTaskTable[TASK_FECTX].TDTend;
|
||||
MCD_startDmaENetXmit(srcAddr, srcAddr, destAddr, MCD_taskTable,
|
||||
channel);
|
||||
MCD_startDmaENetXmit(srcAddr, srcAddr, destAddr, MCD_taskTable, channel);
|
||||
}
|
||||
else if (flags & MCD_FECRX_DMA)
|
||||
{
|
||||
@@ -472,10 +476,12 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
}
|
||||
else if (flags & MCD_SINGLE_DMA)
|
||||
{
|
||||
/* this buffer descriptor is used for storing off initial parameters for later
|
||||
progress query calculation and for the DMA to write the resulting checksum
|
||||
The DMA does not use this to determine how to operate, that info is passed
|
||||
with the init routine*/
|
||||
/*
|
||||
* this buffer descriptor is used for storing off initial parameters for later
|
||||
* progress query calculation and for the DMA to write the resulting checksum
|
||||
* The DMA does not use this to determine how to operate, that info is passed
|
||||
* with the init routine
|
||||
*/
|
||||
MCD_relocBuffDesc[channel].srcAddr = srcAddr;
|
||||
MCD_relocBuffDesc[channel].destAddr = destAddr;
|
||||
MCD_relocBuffDesc[channel].lastDestAddr = destAddr; /* definitely not its final value */
|
||||
@@ -492,7 +498,7 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
((volatile int *) MCD_taskTable[channel].contextSaveSpace)[DCOUNT
|
||||
+ CSAVE_OFFSET] = 0;
|
||||
((volatile int *) MCD_taskTable[channel].contextSaveSpace)[CURRBD
|
||||
+ CSAVE_OFFSET] = (u32) &(MCD_relocBuffDesc[channel]);
|
||||
+ CSAVE_OFFSET] = (uint32_t) &(MCD_relocBuffDesc[channel]);
|
||||
/* tbd - need to keep the user from trying to call the EU routine
|
||||
when MCD_INCLUDE_EU is not defined */
|
||||
if (funcDesc == MCD_FUNC_NOEU1 || funcDesc == MCD_FUNC_NOEU2)
|
||||
@@ -528,6 +534,7 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
((volatile int *) MCD_taskTable[channel].contextSaveSpace)[DESTPTR
|
||||
+ CSAVE_OFFSET] = (int) ((MCD_bufDesc*) srcAddr)->destAddr;
|
||||
#else /* if using address translation, need the virtual addr of the first buffdesc */
|
||||
|
||||
((volatile int *)MCD_taskTable[channel].contextSaveSpace)[SRCPTR + CSAVE_OFFSET]
|
||||
= (int)((MCD_bufDesc*) srcAddrVirt)->srcAddr;
|
||||
((volatile int *)MCD_taskTable[channel].contextSaveSpace)[DESTPTR + CSAVE_OFFSET]
|
||||
@@ -536,7 +543,7 @@ u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
((volatile int *) MCD_taskTable[channel].contextSaveSpace)[DCOUNT
|
||||
+ CSAVE_OFFSET] = 0;
|
||||
((volatile int *) MCD_taskTable[channel].contextSaveSpace)[CURRBD
|
||||
+ CSAVE_OFFSET] = (u32) srcAddr;
|
||||
+ CSAVE_OFFSET] = (uint32_t) srcAddr;
|
||||
|
||||
if (funcDesc == MCD_FUNC_NOEU1 || funcDesc == MCD_FUNC_NOEU2)
|
||||
{
|
||||
@@ -605,7 +612,7 @@ int MCD_XferProgrQuery(int channel, MCD_XferProg *progRep)
|
||||
int destDiffBytes; /* Total number of bytes that we think actually got xfered. */
|
||||
int numIterations; /* number of iterations */
|
||||
int bytesNotXfered; /* bytes that did not get xfered. */
|
||||
s8 *LWAlignedInitDestAddr, *LWAlignedCurrDestAddr;
|
||||
int8_t *LWAlignedInitDestAddr, *LWAlignedCurrDestAddr;
|
||||
int subModVal, addModVal; /* Mode values to added and subtracted from the
|
||||
final destAddr */
|
||||
|
||||
@@ -614,10 +621,10 @@ int MCD_XferProgrQuery(int channel, MCD_XferProg *progRep)
|
||||
|
||||
/* Read a trial value for the progress-reporting values*/
|
||||
prevRep.lastSrcAddr =
|
||||
(s8 *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[SRCPTR
|
||||
(int8_t *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[SRCPTR
|
||||
+ CSAVE_OFFSET];
|
||||
prevRep.lastDestAddr =
|
||||
(s8 *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[DESTPTR
|
||||
(int8_t *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[DESTPTR
|
||||
+ CSAVE_OFFSET];
|
||||
prevRep.dmaSize =
|
||||
((volatile int*) MCD_taskTable[channel].contextSaveSpace)[DCOUNT
|
||||
@@ -633,10 +640,10 @@ int MCD_XferProgrQuery(int channel, MCD_XferProg *progRep)
|
||||
i += i >> 2; /* make sure this loop does something so that it doesn't get optimized out */
|
||||
/* Check them again: */
|
||||
progRep->lastSrcAddr =
|
||||
(s8 *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[SRCPTR
|
||||
(int8_t *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[SRCPTR
|
||||
+ CSAVE_OFFSET];
|
||||
progRep->lastDestAddr =
|
||||
(s8 *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[DESTPTR
|
||||
(int8_t *) ((volatile int*) MCD_taskTable[channel].contextSaveSpace)[DESTPTR
|
||||
+ CSAVE_OFFSET];
|
||||
progRep->dmaSize =
|
||||
((volatile int*) MCD_taskTable[channel].contextSaveSpace)[DCOUNT
|
||||
@@ -739,7 +746,7 @@ int MCD_XferProgrQuery(int channel, MCD_XferProg *progRep)
|
||||
*/
|
||||
static void MCD_resmActions(int channel)
|
||||
{
|
||||
u32 debugStatus;
|
||||
uint32_t debugStatus;
|
||||
|
||||
MCD_dmaBar->debugControl = DBG_CTL_DISABLE;
|
||||
debugStatus = MCD_dmaBar->debugStatus;
|
||||
@@ -907,7 +914,7 @@ int MCD_resumeDma(int channel)
|
||||
* Notes:
|
||||
*
|
||||
*/
|
||||
int MCD_csumQuery(int channel, u32 *csum)
|
||||
int MCD_csumQuery(int channel, uint32_t *csum)
|
||||
{
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
if((channel < 0) || (channel >= NCHANNELS))
|
||||
@@ -958,9 +965,9 @@ int MCD_getVersion(char **longVersion)
|
||||
/* Private version of memcpy()
|
||||
* Note that everything this is used for is longword-aligned.
|
||||
*/
|
||||
static void MCD_memcpy(int *dest, int *src, u32 size)
|
||||
static void MCD_memcpy(int *dest, int *src, uint32_t size)
|
||||
{
|
||||
u32 i;
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < size; i += sizeof(int), dest++, src++)
|
||||
*dest = *src;
|
||||
@@ -7,253 +7,253 @@
|
||||
|
||||
#include "MCD_dma.h"
|
||||
|
||||
u32 MCD_varTab0[];
|
||||
u32 MCD_varTab1[];
|
||||
u32 MCD_varTab2[];
|
||||
u32 MCD_varTab3[];
|
||||
u32 MCD_varTab4[];
|
||||
u32 MCD_varTab5[];
|
||||
u32 MCD_varTab6[];
|
||||
u32 MCD_varTab7[];
|
||||
u32 MCD_varTab8[];
|
||||
u32 MCD_varTab9[];
|
||||
u32 MCD_varTab10[];
|
||||
u32 MCD_varTab11[];
|
||||
u32 MCD_varTab12[];
|
||||
u32 MCD_varTab13[];
|
||||
u32 MCD_varTab14[];
|
||||
u32 MCD_varTab15[];
|
||||
uint32_t MCD_varTab0[];
|
||||
uint32_t MCD_varTab1[];
|
||||
uint32_t MCD_varTab2[];
|
||||
uint32_t MCD_varTab3[];
|
||||
uint32_t MCD_varTab4[];
|
||||
uint32_t MCD_varTab5[];
|
||||
uint32_t MCD_varTab6[];
|
||||
uint32_t MCD_varTab7[];
|
||||
uint32_t MCD_varTab8[];
|
||||
uint32_t MCD_varTab9[];
|
||||
uint32_t MCD_varTab10[];
|
||||
uint32_t MCD_varTab11[];
|
||||
uint32_t MCD_varTab12[];
|
||||
uint32_t MCD_varTab13[];
|
||||
uint32_t MCD_varTab14[];
|
||||
uint32_t MCD_varTab15[];
|
||||
|
||||
u32 MCD_funcDescTab0[];
|
||||
uint32_t MCD_funcDescTab0[];
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
u32 MCD_funcDescTab1[];
|
||||
u32 MCD_funcDescTab2[];
|
||||
u32 MCD_funcDescTab3[];
|
||||
u32 MCD_funcDescTab4[];
|
||||
u32 MCD_funcDescTab5[];
|
||||
u32 MCD_funcDescTab6[];
|
||||
u32 MCD_funcDescTab7[];
|
||||
u32 MCD_funcDescTab8[];
|
||||
u32 MCD_funcDescTab9[];
|
||||
u32 MCD_funcDescTab10[];
|
||||
u32 MCD_funcDescTab11[];
|
||||
u32 MCD_funcDescTab12[];
|
||||
u32 MCD_funcDescTab13[];
|
||||
u32 MCD_funcDescTab14[];
|
||||
u32 MCD_funcDescTab15[];
|
||||
uint32_t MCD_funcDescTab1[];
|
||||
uint32_t MCD_funcDescTab2[];
|
||||
uint32_t MCD_funcDescTab3[];
|
||||
uint32_t MCD_funcDescTab4[];
|
||||
uint32_t MCD_funcDescTab5[];
|
||||
uint32_t MCD_funcDescTab6[];
|
||||
uint32_t MCD_funcDescTab7[];
|
||||
uint32_t MCD_funcDescTab8[];
|
||||
uint32_t MCD_funcDescTab9[];
|
||||
uint32_t MCD_funcDescTab10[];
|
||||
uint32_t MCD_funcDescTab11[];
|
||||
uint32_t MCD_funcDescTab12[];
|
||||
uint32_t MCD_funcDescTab13[];
|
||||
uint32_t MCD_funcDescTab14[];
|
||||
uint32_t MCD_funcDescTab15[];
|
||||
#endif
|
||||
|
||||
u32 MCD_contextSave0[];
|
||||
u32 MCD_contextSave1[];
|
||||
u32 MCD_contextSave2[];
|
||||
u32 MCD_contextSave3[];
|
||||
u32 MCD_contextSave4[];
|
||||
u32 MCD_contextSave5[];
|
||||
u32 MCD_contextSave6[];
|
||||
u32 MCD_contextSave7[];
|
||||
u32 MCD_contextSave8[];
|
||||
u32 MCD_contextSave9[];
|
||||
u32 MCD_contextSave10[];
|
||||
u32 MCD_contextSave11[];
|
||||
u32 MCD_contextSave12[];
|
||||
u32 MCD_contextSave13[];
|
||||
u32 MCD_contextSave14[];
|
||||
u32 MCD_contextSave15[];
|
||||
uint32_t MCD_contextSave0[];
|
||||
uint32_t MCD_contextSave1[];
|
||||
uint32_t MCD_contextSave2[];
|
||||
uint32_t MCD_contextSave3[];
|
||||
uint32_t MCD_contextSave4[];
|
||||
uint32_t MCD_contextSave5[];
|
||||
uint32_t MCD_contextSave6[];
|
||||
uint32_t MCD_contextSave7[];
|
||||
uint32_t MCD_contextSave8[];
|
||||
uint32_t MCD_contextSave9[];
|
||||
uint32_t MCD_contextSave10[];
|
||||
uint32_t MCD_contextSave11[];
|
||||
uint32_t MCD_contextSave12[];
|
||||
uint32_t MCD_contextSave13[];
|
||||
uint32_t MCD_contextSave14[];
|
||||
uint32_t MCD_contextSave15[];
|
||||
|
||||
u32 MCD_realTaskTableSrc[] =
|
||||
uint32_t MCD_realTaskTableSrc[] =
|
||||
{
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab0, /* Task 0 Variable Table */
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_varTab0, /* Task 0 Variable Table */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave0, /* Task 0 context save space */
|
||||
(uint32_t)MCD_contextSave0, /* Task 0 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab1, /* Task 1 Variable Table */
|
||||
(uint32_t)MCD_varTab1, /* Task 1 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab1, /* Task 1 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab1, /* Task 1 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave1, /* Task 1 context save space */
|
||||
(uint32_t)MCD_contextSave1, /* Task 1 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab2, /* Task 2 Variable Table */
|
||||
(uint32_t)MCD_varTab2, /* Task 2 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab2, /* Task 2 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab2, /* Task 2 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave2, /* Task 2 context save space */
|
||||
(uint32_t)MCD_contextSave2, /* Task 2 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab3, /* Task 3 Variable Table */
|
||||
(uint32_t)MCD_varTab3, /* Task 3 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab3, /* Task 3 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab3, /* Task 3 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave3, /* Task 3 context save space */
|
||||
(uint32_t)MCD_contextSave3, /* Task 3 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab4, /* Task 4 Variable Table */
|
||||
(uint32_t)MCD_varTab4, /* Task 4 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab4, /* Task 4 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab4, /* Task 4 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave4, /* Task 4 context save space */
|
||||
(uint32_t)MCD_contextSave4, /* Task 4 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab5, /* Task 5 Variable Table */
|
||||
(uint32_t)MCD_varTab5, /* Task 5 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab5, /* Task 5 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab5, /* Task 5 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave5, /* Task 5 context save space */
|
||||
(uint32_t)MCD_contextSave5, /* Task 5 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab6, /* Task 6 Variable Table */
|
||||
(uint32_t)MCD_varTab6, /* Task 6 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab6, /* Task 6 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab6, /* Task 6 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave6, /* Task 6 context save space */
|
||||
(uint32_t)MCD_contextSave6, /* Task 6 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab7, /* Task 7 Variable Table */
|
||||
(uint32_t)MCD_varTab7, /* Task 7 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab7, /* Task 7 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab7, /* Task 7 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave7, /* Task 7 context save space */
|
||||
(uint32_t)MCD_contextSave7, /* Task 7 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab8, /* Task 8 Variable Table */
|
||||
(uint32_t)MCD_varTab8, /* Task 8 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab8, /* Task 8 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab8, /* Task 8 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave8, /* Task 8 context save space */
|
||||
(uint32_t)MCD_contextSave8, /* Task 8 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab9, /* Task 9 Variable Table */
|
||||
(uint32_t)MCD_varTab9, /* Task 9 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab9, /* Task 9 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab9, /* Task 9 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave9, /* Task 9 context save space */
|
||||
(uint32_t)MCD_contextSave9, /* Task 9 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab10, /* Task 10 Variable Table */
|
||||
(uint32_t)MCD_varTab10, /* Task 10 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab10, /* Task 10 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab10, /* Task 10 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave10, /* Task 10 context save space */
|
||||
(uint32_t)MCD_contextSave10, /* Task 10 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab11, /* Task 11 Variable Table */
|
||||
(uint32_t)MCD_varTab11, /* Task 11 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab11, /* Task 11 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab11, /* Task 11 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave11, /* Task 11 context save space */
|
||||
(uint32_t)MCD_contextSave11, /* Task 11 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab12, /* Task 12 Variable Table */
|
||||
(uint32_t)MCD_varTab12, /* Task 12 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab12, /* Task 12 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab12, /* Task 12 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave12, /* Task 12 context save space */
|
||||
(uint32_t)MCD_contextSave12, /* Task 12 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab13, /* Task 13 Variable Table */
|
||||
(uint32_t)MCD_varTab13, /* Task 13 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab13, /* Task 13 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab13, /* Task 13 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave13, /* Task 13 context save space */
|
||||
(uint32_t)MCD_contextSave13, /* Task 13 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab14, /* Task 14 Variable Table */
|
||||
(uint32_t)MCD_varTab14, /* Task 14 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab14, /* Task 14 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab14, /* Task 14 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave14, /* Task 14 context save space */
|
||||
(uint32_t)MCD_contextSave14, /* Task 14 context save space */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_varTab15, /* Task 15 Variable Table */
|
||||
(uint32_t)MCD_varTab15, /* Task 15 Variable Table */
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_funcDescTab15, /* Task 15 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab15, /* Task 15 Function Descriptor Table & Flags */
|
||||
#else
|
||||
(u32)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
(uint32_t)MCD_funcDescTab0, /* Task 0 Function Descriptor Table & Flags */
|
||||
#endif
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_contextSave15, /* Task 15 context save space */
|
||||
(uint32_t)MCD_contextSave15, /* Task 15 context save space */
|
||||
0x00000000,
|
||||
};
|
||||
|
||||
|
||||
u32 MCD_varTab0[] =
|
||||
uint32_t MCD_varTab0[] =
|
||||
{ /* Task 0 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -290,7 +290,7 @@ u32 MCD_varTab0[] =
|
||||
};
|
||||
|
||||
|
||||
u32 MCD_varTab1[] =
|
||||
uint32_t MCD_varTab1[] =
|
||||
{ /* Task 1 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -326,7 +326,7 @@ u32 MCD_varTab1[] =
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab2[]=
|
||||
uint32_t MCD_varTab2[]=
|
||||
{ /* Task 2 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -362,7 +362,7 @@ u32 MCD_varTab2[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab3[]=
|
||||
uint32_t MCD_varTab3[]=
|
||||
{ /* Task 3 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -398,7 +398,7 @@ u32 MCD_varTab3[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab4[]=
|
||||
uint32_t MCD_varTab4[]=
|
||||
{ /* Task 4 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -434,7 +434,7 @@ u32 MCD_varTab4[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab5[]=
|
||||
uint32_t MCD_varTab5[]=
|
||||
{ /* Task 5 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -470,7 +470,7 @@ u32 MCD_varTab5[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab6[]=
|
||||
uint32_t MCD_varTab6[]=
|
||||
{ /* Task 6 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -506,7 +506,7 @@ u32 MCD_varTab6[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab7[]=
|
||||
uint32_t MCD_varTab7[]=
|
||||
{ /* Task 7 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -542,7 +542,7 @@ u32 MCD_varTab7[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab8[]=
|
||||
uint32_t MCD_varTab8[]=
|
||||
{ /* Task 8 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -578,7 +578,7 @@ u32 MCD_varTab8[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab9[]=
|
||||
uint32_t MCD_varTab9[]=
|
||||
{ /* Task 9 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -614,7 +614,7 @@ u32 MCD_varTab9[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab10[]=
|
||||
uint32_t MCD_varTab10[]=
|
||||
{ /* Task 10 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -650,7 +650,7 @@ u32 MCD_varTab10[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab11[]=
|
||||
uint32_t MCD_varTab11[]=
|
||||
{ /* Task 11 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -686,7 +686,7 @@ u32 MCD_varTab11[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab12[]=
|
||||
uint32_t MCD_varTab12[]=
|
||||
{ /* Task 12 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -722,7 +722,7 @@ u32 MCD_varTab12[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab13[]=
|
||||
uint32_t MCD_varTab13[]=
|
||||
{ /* Task 13 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -758,7 +758,7 @@ u32 MCD_varTab13[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab14[]=
|
||||
uint32_t MCD_varTab14[]=
|
||||
{ /* Task 14 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -794,7 +794,7 @@ u32 MCD_varTab14[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_varTab15[]=
|
||||
uint32_t MCD_varTab15[]=
|
||||
{ /* Task 15 Variable Table */
|
||||
0x00000000, /* var[0] */
|
||||
0x00000000, /* var[1] */
|
||||
@@ -830,7 +830,7 @@ u32 MCD_varTab15[]=
|
||||
0x00000000, /* inc[7] */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab0[]=
|
||||
uint32_t MCD_funcDescTab0[]=
|
||||
{ /* Task 0 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -899,7 +899,7 @@ u32 MCD_funcDescTab0[]=
|
||||
};
|
||||
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
u32 MCD_funcDescTab1[]=
|
||||
uint32_t MCD_funcDescTab1[]=
|
||||
{ /* Task 1 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -967,7 +967,7 @@ u32 MCD_funcDescTab1[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab2[]=
|
||||
uint32_t MCD_funcDescTab2[]=
|
||||
{ /* Task 2 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1035,7 +1035,7 @@ u32 MCD_funcDescTab2[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab3[]=
|
||||
uint32_t MCD_funcDescTab3[]=
|
||||
{ /* Task 3 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1103,7 +1103,7 @@ u32 MCD_funcDescTab3[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab4[]=
|
||||
uint32_t MCD_funcDescTab4[]=
|
||||
{ /* Task 4 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1171,7 +1171,7 @@ u32 MCD_funcDescTab4[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab5[]=
|
||||
uint32_t MCD_funcDescTab5[]=
|
||||
{ /* Task 5 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1239,7 +1239,7 @@ u32 MCD_funcDescTab5[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab6[]=
|
||||
uint32_t MCD_funcDescTab6[]=
|
||||
{ /* Task 6 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1307,7 +1307,7 @@ u32 MCD_funcDescTab6[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab7[]=
|
||||
uint32_t MCD_funcDescTab7[]=
|
||||
{ /* Task 7 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1375,7 +1375,7 @@ u32 MCD_funcDescTab7[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab8[]=
|
||||
uint32_t MCD_funcDescTab8[]=
|
||||
{ /* Task 8 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1443,7 +1443,7 @@ u32 MCD_funcDescTab8[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab9[]=
|
||||
uint32_t MCD_funcDescTab9[]=
|
||||
{ /* Task 9 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1511,7 +1511,7 @@ u32 MCD_funcDescTab9[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab10[]=
|
||||
uint32_t MCD_funcDescTab10[]=
|
||||
{ /* Task 10 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1579,7 +1579,7 @@ u32 MCD_funcDescTab10[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab11[]=
|
||||
uint32_t MCD_funcDescTab11[]=
|
||||
{ /* Task 11 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1647,7 +1647,7 @@ u32 MCD_funcDescTab11[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab12[]=
|
||||
uint32_t MCD_funcDescTab12[]=
|
||||
{ /* Task 12 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1715,7 +1715,7 @@ u32 MCD_funcDescTab12[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab13[]=
|
||||
uint32_t MCD_funcDescTab13[]=
|
||||
{ /* Task 13 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1783,7 +1783,7 @@ u32 MCD_funcDescTab13[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab14[]=
|
||||
uint32_t MCD_funcDescTab14[]=
|
||||
{ /* Task 14 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1851,7 +1851,7 @@ u32 MCD_funcDescTab14[]=
|
||||
0x202f2000, /* andCrcRestartBit(), EU# 3 */
|
||||
};
|
||||
|
||||
u32 MCD_funcDescTab15[]=
|
||||
uint32_t MCD_funcDescTab15[]=
|
||||
{ /* Task 15 Function Descriptor Table */
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1920,45 +1920,45 @@ u32 MCD_funcDescTab15[]=
|
||||
};
|
||||
#endif /*MCD_INCLUDE_EU*/
|
||||
|
||||
u32 MCD_contextSave0[128]; /* Task 0 context save space */
|
||||
u32 MCD_contextSave1[128]; /* Task 1 context save space */
|
||||
u32 MCD_contextSave2[128]; /* Task 2 context save space */
|
||||
u32 MCD_contextSave3[128]; /* Task 3 context save space */
|
||||
u32 MCD_contextSave4[128]; /* Task 4 context save space */
|
||||
u32 MCD_contextSave5[128]; /* Task 5 context save space */
|
||||
u32 MCD_contextSave6[128]; /* Task 6 context save space */
|
||||
u32 MCD_contextSave7[128]; /* Task 7 context save space */
|
||||
u32 MCD_contextSave8[128]; /* Task 8 context save space */
|
||||
u32 MCD_contextSave9[128]; /* Task 9 context save space */
|
||||
u32 MCD_contextSave10[128]; /* Task 10 context save space */
|
||||
u32 MCD_contextSave11[128]; /* Task 11 context save space */
|
||||
u32 MCD_contextSave12[128]; /* Task 12 context save space */
|
||||
u32 MCD_contextSave13[128]; /* Task 13 context save space */
|
||||
u32 MCD_contextSave14[128]; /* Task 14 context save space */
|
||||
u32 MCD_contextSave15[128]; /* Task 15 context save space */
|
||||
uint32_t MCD_contextSave0[128]; /* Task 0 context save space */
|
||||
uint32_t MCD_contextSave1[128]; /* Task 1 context save space */
|
||||
uint32_t MCD_contextSave2[128]; /* Task 2 context save space */
|
||||
uint32_t MCD_contextSave3[128]; /* Task 3 context save space */
|
||||
uint32_t MCD_contextSave4[128]; /* Task 4 context save space */
|
||||
uint32_t MCD_contextSave5[128]; /* Task 5 context save space */
|
||||
uint32_t MCD_contextSave6[128]; /* Task 6 context save space */
|
||||
uint32_t MCD_contextSave7[128]; /* Task 7 context save space */
|
||||
uint32_t MCD_contextSave8[128]; /* Task 8 context save space */
|
||||
uint32_t MCD_contextSave9[128]; /* Task 9 context save space */
|
||||
uint32_t MCD_contextSave10[128]; /* Task 10 context save space */
|
||||
uint32_t MCD_contextSave11[128]; /* Task 11 context save space */
|
||||
uint32_t MCD_contextSave12[128]; /* Task 12 context save space */
|
||||
uint32_t MCD_contextSave13[128]; /* Task 13 context save space */
|
||||
uint32_t MCD_contextSave14[128]; /* Task 14 context save space */
|
||||
uint32_t MCD_contextSave15[128]; /* Task 15 context save space */
|
||||
|
||||
|
||||
u32 MCD_ChainNoEu_TDT[];
|
||||
u32 MCD_SingleNoEu_TDT[];
|
||||
uint32_t MCD_ChainNoEu_TDT[];
|
||||
uint32_t MCD_SingleNoEu_TDT[];
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
u32 MCD_ChainEu_TDT[];
|
||||
u32 MCD_SingleEu_TDT[];
|
||||
uint32_t MCD_ChainEu_TDT[];
|
||||
uint32_t MCD_SingleEu_TDT[];
|
||||
#endif
|
||||
u32 MCD_ENetRcv_TDT[];
|
||||
u32 MCD_ENetXmit_TDT[];
|
||||
uint32_t MCD_ENetRcv_TDT[];
|
||||
uint32_t MCD_ENetXmit_TDT[];
|
||||
|
||||
u32 MCD_modelTaskTableSrc[]=
|
||||
uint32_t MCD_modelTaskTableSrc[]=
|
||||
{
|
||||
(u32)MCD_ChainNoEu_TDT,
|
||||
(u32)&((u8*)MCD_ChainNoEu_TDT)[0x0000016c],
|
||||
(uint32_t)MCD_ChainNoEu_TDT,
|
||||
(uint32_t)&((uint8_t*)MCD_ChainNoEu_TDT)[0x0000016c],
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_SingleNoEu_TDT,
|
||||
(u32)&((u8*)MCD_SingleNoEu_TDT)[0x000000d4],
|
||||
(uint32_t)MCD_SingleNoEu_TDT,
|
||||
(uint32_t)&((uint8_t*)MCD_SingleNoEu_TDT)[0x000000d4],
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1966,16 +1966,16 @@ u32 MCD_modelTaskTableSrc[]=
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
(u32)MCD_ChainEu_TDT,
|
||||
(u32)&((u8*)MCD_ChainEu_TDT)[0x000001b4],
|
||||
(uint32_t)MCD_ChainEu_TDT,
|
||||
(uint32_t)&((uint8_t*)MCD_ChainEu_TDT)[0x000001b4],
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_SingleEu_TDT,
|
||||
(u32)&((u8*)MCD_SingleEu_TDT)[0x00000124],
|
||||
(uint32_t)MCD_SingleEu_TDT,
|
||||
(uint32_t)&((uint8_t*)MCD_SingleEu_TDT)[0x00000124],
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -1983,16 +1983,16 @@ u32 MCD_modelTaskTableSrc[]=
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
#endif
|
||||
(u32)MCD_ENetRcv_TDT,
|
||||
(u32)&((u8*)MCD_ENetRcv_TDT)[0x0000009c],
|
||||
(uint32_t)MCD_ENetRcv_TDT,
|
||||
(uint32_t)&((uint8_t*)MCD_ENetRcv_TDT)[0x0000009c],
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
(u32)MCD_ENetXmit_TDT,
|
||||
(u32)&((u8*)MCD_ENetXmit_TDT)[0x000000d0],
|
||||
(uint32_t)MCD_ENetXmit_TDT,
|
||||
(uint32_t)&((uint8_t*)MCD_ENetXmit_TDT)[0x000000d0],
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
@@ -2000,7 +2000,7 @@ u32 MCD_modelTaskTableSrc[]=
|
||||
0x00000000,
|
||||
0x00000000,
|
||||
};
|
||||
u32 MCD_ChainNoEu_TDT[]=
|
||||
uint32_t MCD_ChainNoEu_TDT[]=
|
||||
{
|
||||
0x80004000, /* 0000(:370): LCDEXT: idx0 = 0x00000000; ; */
|
||||
0x8118801b, /* 0004(:370): LCD: idx1 = var2; idx1 once var0; idx1 += inc3 */
|
||||
@@ -2095,7 +2095,7 @@ u32 MCD_ChainNoEu_TDT[]=
|
||||
0x000001f8, /* 0168(:0): NOP */
|
||||
0x000001f8, /* 016C(:0): NOP */
|
||||
};
|
||||
u32 MCD_SingleNoEu_TDT[]=
|
||||
uint32_t MCD_SingleNoEu_TDT[]=
|
||||
{
|
||||
0x8198001b, /* 0000(:657): LCD: idx0 = var3; idx0 once var0; idx0 += inc3 */
|
||||
0x7000000d, /* 0004(:658): DRD2A: EU0=0 EU1=0 EU2=0 EU3=13 EXT MORE init=0 WS=0 RS=0 */
|
||||
@@ -2153,7 +2153,7 @@ u32 MCD_SingleNoEu_TDT[]=
|
||||
0x040001f8, /* 00D4(:713): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
|
||||
};
|
||||
#ifdef MCD_INCLUDE_EU
|
||||
u32 MCD_ChainEu_TDT[]=
|
||||
uint32_t MCD_ChainEu_TDT[]=
|
||||
{
|
||||
0x80004000, /* 0000(:947): LCDEXT: idx0 = 0x00000000; ; */
|
||||
0x8198801b, /* 0004(:947): LCD: idx1 = var3; idx1 once var0; idx1 += inc3 */
|
||||
@@ -2266,7 +2266,7 @@ u32 MCD_ChainEu_TDT[]=
|
||||
0x000001f8, /* 01B0(:0): NOP */
|
||||
0x000001f8, /* 01B4(:0): NOP */
|
||||
};
|
||||
u32 MCD_SingleEu_TDT[]=
|
||||
uint32_t MCD_SingleEu_TDT[]=
|
||||
{
|
||||
0x8218001b, /* 0000(:1248): LCD: idx0 = var4; idx0 once var0; idx0 += inc3 */
|
||||
0x7000000d, /* 0004(:1249): DRD2A: EU0=0 EU1=0 EU2=0 EU3=13 EXT MORE init=0 WS=0 RS=0 */
|
||||
@@ -2344,7 +2344,7 @@ u32 MCD_SingleEu_TDT[]=
|
||||
0x040001f8, /* 0124(:1316): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
|
||||
};
|
||||
#endif
|
||||
u32 MCD_ENetRcv_TDT[]=
|
||||
uint32_t MCD_ENetRcv_TDT[]=
|
||||
{
|
||||
0x80004000, /* 0000(:1389): LCDEXT: idx0 = 0x00000000; ; */
|
||||
0x81988000, /* 0004(:1389): LCD: idx1 = var3; idx1 once var0; idx1 += inc0 */
|
||||
@@ -2387,7 +2387,7 @@ u32 MCD_ENetRcv_TDT[]=
|
||||
0x040001f8, /* 0098(:1441): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
|
||||
0x000001f8, /* 009C(:0): NOP */
|
||||
};
|
||||
u32 MCD_ENetXmit_TDT[]=
|
||||
uint32_t MCD_ENetXmit_TDT[]=
|
||||
{
|
||||
0x80004000, /* 0000(:1516): LCDEXT: idx0 = 0x00000000; ; */
|
||||
0x81988000, /* 0004(:1516): LCD: idx1 = var3; idx1 once var0; idx1 += inc0 */
|
||||
Executable
+225
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* File: MCD_tasksInit.c
|
||||
* Purpose: Functions for initializing variable tables of different
|
||||
* types of tasks.
|
||||
*
|
||||
* Notes:
|
||||
*/
|
||||
|
||||
/*
|
||||
* Do not edit!
|
||||
*/
|
||||
|
||||
#include "MCD_dma.h"
|
||||
#include "MCD_tasksInit.h"
|
||||
|
||||
extern dmaRegs *MCD_dmaBar;
|
||||
|
||||
|
||||
/*
|
||||
* Task 0
|
||||
*/
|
||||
|
||||
void MCD_startDmaChainNoEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 2, (uint32_t)currBD); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (uint32_t)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (uint32_t)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (uint32_t)xferSize); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (uint32_t)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (uint32_t)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (uint32_t)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (uint32_t)0x00000000); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (uint32_t)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (uint32_t)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (uint32_t)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (uint32_t)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (uint32_t)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (uint32_t)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (uint32_t)0x00000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (uint32_t)0x00000000); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 13, (uint32_t)0x80000000); /* var[13] */
|
||||
MCD_SET_VAR(taskTable+channel, 14, (uint32_t)0x00000010); /* var[14] */
|
||||
MCD_SET_VAR(taskTable+channel, 15, (uint32_t)0x00000004); /* var[15] */
|
||||
MCD_SET_VAR(taskTable+channel, 16, (uint32_t)0x08000000); /* var[16] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (uint32_t)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (uint32_t)0x80000000); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (uint32_t)0x80000001); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (uint32_t)0x40000000); /* inc[6] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (uint16_t)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 1
|
||||
*/
|
||||
|
||||
void MCD_startDmaSingleNoEu(int8_t *srcAddr, short srcIncr, int8_t *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 7, (uint32_t)srcAddr); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (uint32_t)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (uint32_t)destAddr); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (uint32_t)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (uint32_t)dmaSize); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (uint32_t)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (uint32_t)flags); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (uint32_t)currBD); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (uint32_t)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (uint32_t)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (uint32_t)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (uint32_t)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (uint32_t)0x00000004); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (uint32_t)0x08000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (uint32_t)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (uint32_t)0x80000001); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (uint32_t)0x40000000); /* inc[5] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (uint16_t)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 2
|
||||
*/
|
||||
|
||||
void MCD_startDmaChainEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 3, (uint32_t)currBD); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (uint32_t)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (uint32_t)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (uint32_t)xferSize); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (uint32_t)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (uint32_t)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (uint32_t)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (uint32_t)0x00000000); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (uint32_t)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (uint32_t)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (uint32_t)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (uint32_t)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (uint32_t)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (uint32_t)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (uint32_t)0x00000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (uint32_t)0x00000000); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 13, (uint32_t)0x00000000); /* var[13] */
|
||||
MCD_SET_VAR(taskTable+channel, 14, (uint32_t)0x80000000); /* var[14] */
|
||||
MCD_SET_VAR(taskTable+channel, 15, (uint32_t)0x00000010); /* var[15] */
|
||||
MCD_SET_VAR(taskTable+channel, 16, (uint32_t)0x00000001); /* var[16] */
|
||||
MCD_SET_VAR(taskTable+channel, 17, (uint32_t)0x00000004); /* var[17] */
|
||||
MCD_SET_VAR(taskTable+channel, 18, (uint32_t)0x08000000); /* var[18] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (uint32_t)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (uint32_t)0x80000000); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (uint32_t)0xc0000000); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (uint32_t)0x80000001); /* inc[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 31, (uint32_t)0x40000000); /* inc[7] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (uint16_t)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 3
|
||||
*/
|
||||
|
||||
void MCD_startDmaSingleEu(int8_t *srcAddr, short srcIncr, int8_t *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 8, (uint32_t)srcAddr); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (uint32_t)(0xe000 << 16) | (0xffff & srcIncr)); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (uint32_t)destAddr); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (uint32_t)(0xe000 << 16) | (0xffff & destIncr)); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (uint32_t)dmaSize); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (uint32_t)(0x2000 << 16) | (0xffff & xferSizeIncr)); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (uint32_t)flags); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (uint32_t)currBD); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 0, (uint32_t)cSave); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (uint32_t)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (uint32_t)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (uint32_t)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (uint32_t)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (uint32_t)0x00000001); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (uint32_t)0x00000004); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (uint32_t)0x08000000); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (uint32_t)0x00000000); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (uint32_t)0xc0000000); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (uint32_t)0x80000000); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (uint32_t)0x80000001); /* inc[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 31, (uint32_t)0x40000000); /* inc[7] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (uint16_t)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 4
|
||||
*/
|
||||
|
||||
void MCD_startDmaENetRcv(int8_t *bDBase, int8_t *currBD, int8_t *rcvFifoPtr, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 0, (uint32_t)bDBase); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (uint32_t)currBD); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (uint32_t)rcvFifoPtr); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (uint32_t)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (uint32_t)0x00000000); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (uint32_t)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (uint32_t)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (uint32_t)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (uint32_t)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (uint32_t)0x0000ffff); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (uint32_t)0x30000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (uint32_t)0x0fffffff); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (uint32_t)0x00000008); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (uint32_t)0x00000000); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (uint32_t)0x60000000); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (uint32_t)0x20000004); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (uint32_t)0x40000000); /* inc[3] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (uint16_t)0x8000;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Task 5
|
||||
*/
|
||||
|
||||
void MCD_startDmaENetXmit(int8_t *bDBase, int8_t *currBD, int8_t *xmitFifoPtr, volatile TaskTableEntry *taskTable, int channel)
|
||||
{
|
||||
|
||||
MCD_SET_VAR(taskTable+channel, 0, (uint32_t)bDBase); /* var[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 3, (uint32_t)currBD); /* var[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 11, (uint32_t)xmitFifoPtr); /* var[11] */
|
||||
MCD_SET_VAR(taskTable+channel, 1, (uint32_t)0x00000000); /* var[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 2, (uint32_t)0x00000000); /* var[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 4, (uint32_t)0x00000000); /* var[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 5, (uint32_t)0x00000000); /* var[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 6, (uint32_t)0x00000000); /* var[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 7, (uint32_t)0x00000000); /* var[7] */
|
||||
MCD_SET_VAR(taskTable+channel, 8, (uint32_t)0x00000000); /* var[8] */
|
||||
MCD_SET_VAR(taskTable+channel, 9, (uint32_t)0x00000000); /* var[9] */
|
||||
MCD_SET_VAR(taskTable+channel, 10, (uint32_t)0x00000000); /* var[10] */
|
||||
MCD_SET_VAR(taskTable+channel, 12, (uint32_t)0x00000000); /* var[12] */
|
||||
MCD_SET_VAR(taskTable+channel, 13, (uint32_t)0x0000ffff); /* var[13] */
|
||||
MCD_SET_VAR(taskTable+channel, 14, (uint32_t)0xffffffff); /* var[14] */
|
||||
MCD_SET_VAR(taskTable+channel, 15, (uint32_t)0x00000004); /* var[15] */
|
||||
MCD_SET_VAR(taskTable+channel, 16, (uint32_t)0x00000008); /* var[16] */
|
||||
MCD_SET_VAR(taskTable+channel, 24, (uint32_t)0x00000000); /* inc[0] */
|
||||
MCD_SET_VAR(taskTable+channel, 25, (uint32_t)0x60000000); /* inc[1] */
|
||||
MCD_SET_VAR(taskTable+channel, 26, (uint32_t)0x40000000); /* inc[2] */
|
||||
MCD_SET_VAR(taskTable+channel, 27, (uint32_t)0xc000fffc); /* inc[3] */
|
||||
MCD_SET_VAR(taskTable+channel, 28, (uint32_t)0xe0000004); /* inc[4] */
|
||||
MCD_SET_VAR(taskTable+channel, 29, (uint32_t)0x80000000); /* inc[5] */
|
||||
MCD_SET_VAR(taskTable+channel, 30, (uint32_t)0x4000ffff); /* inc[6] */
|
||||
MCD_SET_VAR(taskTable+channel, 31, (uint32_t)0xe0000001); /* inc[7] */
|
||||
|
||||
/* Set the task's Enable bit in its Task Control Register */
|
||||
MCD_dmaBar->taskControl[channel] |= (uint16_t)0x8000;
|
||||
}
|
||||
@@ -0,0 +1,667 @@
|
||||
/*
|
||||
* dma.c
|
||||
*
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc 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 BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: Markus Fröschle
|
||||
*/
|
||||
|
||||
#include "dma.h"
|
||||
#include <MCD_dma.h>
|
||||
#include "mcd_initiators.h"
|
||||
#include "bas_printf.h"
|
||||
#include "bas_string.h"
|
||||
#include "cache.h"
|
||||
#include "exceptions.h"
|
||||
|
||||
#if MACHINE_FIREBEE
|
||||
#include "firebee.h"
|
||||
#elif MACHINE_M5484LITE
|
||||
#include "m5484l.h"
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
|
||||
//#define DBG_DMA
|
||||
#ifdef DBG_DMA
|
||||
#define dbg(format, arg...) do { xprintf("DEBUG: " format, ##arg); } while (0)
|
||||
#else
|
||||
#define dbg(format, arg...) do { ; } while (0)
|
||||
#endif /* DBG_DMA */
|
||||
|
||||
extern char _SYS_SRAM[];
|
||||
#define SYS_SRAM &_SYS_SRAM[0]
|
||||
|
||||
struct dma_channel
|
||||
{
|
||||
int req;
|
||||
void (*handler)(void);
|
||||
};
|
||||
|
||||
static char used_reqs[32] =
|
||||
{
|
||||
DMA_ALWAYS, DMA_DSPI_RXFIFO, DMA_DSPI_TXFIFO, DMA_DREQ0,
|
||||
DMA_PSC0_RX, DMA_PSC0_TX, DMA_USB_EP0, DMA_USB_EP1,
|
||||
DMA_USB_EP2, DMA_USB_EP3, DMA_PCI_TX, DMA_PCI_RX,
|
||||
DMA_PSC1_RX, DMA_PSC1_TX, DMA_I2C_RX, DMA_I2C_TX,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static struct dma_channel dma_channel[NCHANNELS] =
|
||||
{
|
||||
{-1, NULL}, {-1, NULL}, {-1, NULL}, {-1, NULL},
|
||||
{-1, NULL}, {-1, NULL}, {-1, NULL}, {-1, NULL},
|
||||
{-1, NULL}, {-1, NULL}, {-1, NULL}, {-1, NULL},
|
||||
{-1, NULL}, {-1, NULL}, {-1, NULL}, {-1, NULL},
|
||||
};
|
||||
|
||||
/********************************************************************/
|
||||
/*
|
||||
* Enable all DMA interrupts
|
||||
*
|
||||
* Parameters:
|
||||
* pri Interrupt Priority
|
||||
* lvl Interrupt Level
|
||||
*/
|
||||
void dma_irq_enable(uint8_t lvl, uint8_t pri)
|
||||
{
|
||||
/* Setup the DMA ICR (#48) */
|
||||
MCF_INTC_ICR48 = 0
|
||||
| MCF_INTC_ICR_IP(pri)
|
||||
| MCF_INTC_ICR_IL(lvl);
|
||||
dbg("%s:DMA irq assigned level %d, priority %d\r\n", __FUNCTION__, lvl, pri);
|
||||
|
||||
/* Unmask all task interrupts */
|
||||
MCF_DMA_DIMR = 0;
|
||||
|
||||
/* Clear the interrupt pending register */
|
||||
MCF_DMA_DIPR = 0;
|
||||
|
||||
/* Unmask the DMA interrupt in the interrupt controller */
|
||||
MCF_INTC_IMRH &= ~MCF_INTC_IMRH_INT_MASK48;
|
||||
|
||||
dbg("%s: DMA task interrupts unmasked, pending interrupts cleared, interrupt controller active\r\n",
|
||||
__FUNCTION__);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
/*
|
||||
* Disable all DMA interrupts
|
||||
*/
|
||||
void dma_irq_disable(void)
|
||||
{
|
||||
/* Mask all task interrupts */
|
||||
MCF_DMA_DIMR = (uint32_t) ~0;
|
||||
|
||||
/* Clear any pending task interrupts */
|
||||
MCF_DMA_DIPR = (uint32_t) ~0;
|
||||
|
||||
/* Mask the DMA interrupt in the interrupt controller */
|
||||
MCF_INTC_IMRH |= MCF_INTC_IMRH_INT_MASK48;
|
||||
|
||||
dbg("%s: DMA interrupts masked and disabled\r\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
int dma_set_initiator(int initiator)
|
||||
{
|
||||
switch (initiator)
|
||||
{
|
||||
/* these initiators are always active */
|
||||
case DMA_ALWAYS:
|
||||
case DMA_DSPI_RXFIFO:
|
||||
case DMA_DSPI_TXFIFO:
|
||||
case DMA_DREQ0:
|
||||
case DMA_PSC0_RX:
|
||||
case DMA_PSC0_TX:
|
||||
case DMA_USB_EP0:
|
||||
case DMA_USB_EP1:
|
||||
case DMA_USB_EP2:
|
||||
case DMA_USB_EP3:
|
||||
case DMA_PCI_TX:
|
||||
case DMA_PCI_RX:
|
||||
case DMA_PSC1_RX:
|
||||
case DMA_I2C_RX:
|
||||
case DMA_I2C_TX:
|
||||
break;
|
||||
|
||||
case DMA_FEC0_RX:
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC16(3)) | MCF_DMA_IMCR_IMC16_FEC0RX;
|
||||
used_reqs[16] = DMA_FEC0_RX;
|
||||
break;
|
||||
|
||||
case DMA_FEC0_TX:
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC17(3)) | MCF_DMA_IMCR_IMC17_FEC0TX;
|
||||
used_reqs[17] = DMA_FEC0_TX;
|
||||
break;
|
||||
|
||||
case DMA_FEC1_RX:
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC20(3)) | MCF_DMA_IMCR_IMC20_FEC1RX;
|
||||
used_reqs[20] = DMA_FEC1_RX;
|
||||
break;
|
||||
|
||||
case DMA_FEC1_TX:
|
||||
if (used_reqs[21] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC21(3)) | MCF_DMA_IMCR_IMC21_FEC1TX;
|
||||
used_reqs[21] = DMA_FEC1_TX;
|
||||
}
|
||||
else if (used_reqs[25] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC25(3)) | MCF_DMA_IMCR_IMC25_FEC1TX;
|
||||
used_reqs[25] = DMA_FEC1_TX;
|
||||
}
|
||||
else if (used_reqs[31] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC31(3)) | MCF_DMA_IMCR_IMC31_FEC1TX;
|
||||
used_reqs[31] = DMA_FEC1_TX;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot found\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_DREQ1:
|
||||
if (used_reqs[29] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC29(3)) | MCF_DMA_IMCR_IMC29_DREQ1;
|
||||
used_reqs[29] = DMA_DREQ1;
|
||||
}
|
||||
else if (used_reqs[21] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC21(3)) | MCF_DMA_IMCR_IMC21_DREQ1;
|
||||
used_reqs[21] = DMA_DREQ1;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM0:
|
||||
if (used_reqs[24] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC24(3)) | MCF_DMA_IMCR_IMC24_CTM0;
|
||||
used_reqs[24] = DMA_CTM0;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM1:
|
||||
if (used_reqs[25] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC25(3)) | MCF_DMA_IMCR_IMC25_CTM1;
|
||||
used_reqs[25] = DMA_CTM1;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM2:
|
||||
if (used_reqs[26] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC26(3)) | MCF_DMA_IMCR_IMC26_CTM2;
|
||||
used_reqs[26] = DMA_CTM2;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM3:
|
||||
if (used_reqs[27] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC27(3)) | MCF_DMA_IMCR_IMC27_CTM3;
|
||||
used_reqs[27] = DMA_CTM3;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM4:
|
||||
if (used_reqs[28] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC28(3)) | MCF_DMA_IMCR_IMC28_CTM4;
|
||||
used_reqs[28] = DMA_CTM4;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM5:
|
||||
if (used_reqs[29] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC29(3)) | MCF_DMA_IMCR_IMC29_CTM5;
|
||||
used_reqs[29] = DMA_CTM5;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM6:
|
||||
if (used_reqs[30] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC30(3)) | MCF_DMA_IMCR_IMC30_CTM6;
|
||||
used_reqs[30] = DMA_CTM6;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_CTM7:
|
||||
if (used_reqs[31] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC31(3)) | MCF_DMA_IMCR_IMC31_CTM7;
|
||||
used_reqs[31] = DMA_CTM7;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_USBEP4:
|
||||
if (used_reqs[26] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC26(3)) | MCF_DMA_IMCR_IMC26_USBEP4;
|
||||
used_reqs[26] = DMA_USBEP4;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_USBEP5:
|
||||
if (used_reqs[27] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC27(3)) | MCF_DMA_IMCR_IMC27_USBEP5;
|
||||
used_reqs[27] = DMA_USBEP5;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_USBEP6:
|
||||
if (used_reqs[28] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC28(3)) | MCF_DMA_IMCR_IMC28_USBEP6;
|
||||
used_reqs[28] = DMA_USBEP6;
|
||||
}
|
||||
else /* No empty slots */
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case DMA_PSC2_RX:
|
||||
if (used_reqs[28] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC28(3)) | MCF_DMA_IMCR_IMC28_PSC2RX;
|
||||
used_reqs[28] = DMA_PSC2_RX; }
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_PSC2_TX:
|
||||
if (used_reqs[29] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC29(3)) | MCF_DMA_IMCR_IMC29_PSC2TX;
|
||||
used_reqs[29] = DMA_PSC2_TX;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_PSC3_RX:
|
||||
if (used_reqs[30] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC30(3)) | MCF_DMA_IMCR_IMC30_PSC3RX;
|
||||
used_reqs[30] = DMA_PSC3_RX;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case DMA_PSC3_TX:
|
||||
if (used_reqs[31] == 0)
|
||||
{
|
||||
MCF_DMA_IMCR = (MCF_DMA_IMCR & ~MCF_DMA_IMCR_IMC31(3)) | MCF_DMA_IMCR_IMC31_PSC3TX;
|
||||
used_reqs[31] = DMA_PSC3_TX;
|
||||
}
|
||||
else /* No empty slots */
|
||||
{
|
||||
dbg("%s: no free slot\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
dbg("%s: don't know what to do\r\n", __FUNCTION__);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the initiator number for the given requestor
|
||||
*
|
||||
* Parameters:
|
||||
* requestor Initiator/Requestor identifier
|
||||
*
|
||||
* Return Value:
|
||||
* The initiator number (0-31) if initiator has been assigned
|
||||
* 0 (always initiator) otherwise
|
||||
*/
|
||||
uint32_t dma_get_initiator(int requestor)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < sizeof(used_reqs); ++i)
|
||||
{
|
||||
if (used_reqs[i] == requestor)
|
||||
return i;
|
||||
}
|
||||
dbg("%s: no initiator found for requestor %d\r\n", __FUNCTION__, requestor);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the given initiator from the active list
|
||||
*
|
||||
* Parameters:
|
||||
* requestor Initiator/Requestor identifier
|
||||
*/
|
||||
void dma_free_initiator(int requestor)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
for (i = 16; i < sizeof(used_reqs); ++i)
|
||||
{
|
||||
if (used_reqs[i] == requestor)
|
||||
{
|
||||
used_reqs[i] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
dbg("%s: DMA requestor %d freed\r\n", __FUNCTION__, requestor);
|
||||
}
|
||||
|
||||
/*
|
||||
* Attempt to find an available channel and mark it as used
|
||||
*
|
||||
* Parameters:
|
||||
* requestor Initiator/Requestor identifier
|
||||
*
|
||||
* Return Value:
|
||||
* First available channel or -1 if they are all occupied
|
||||
*/
|
||||
int dma_set_channel(int requestor, void (*handler)(void))
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Check to see if this requestor is already assigned to a channel */
|
||||
dbg("%s: check if requestor %d is already assigned to a channel\r\n", __FUNCTION__, requestor);
|
||||
if ((i = dma_get_channel(requestor)) != -1)
|
||||
return i;
|
||||
|
||||
for (i = 0; i < NCHANNELS; ++i)
|
||||
{
|
||||
if (dma_channel[i].req == -1)
|
||||
{
|
||||
dma_channel[i].req = requestor;
|
||||
dma_channel[i].handler = handler;
|
||||
dbg("%s: assigned channel %d to requestor %d\r\n", __FUNCTION__, i, requestor);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
dbg("%s: no free DMA channel found for requestor %d\r\n", __FUNCTION__, requestor);
|
||||
|
||||
/* All channels taken */
|
||||
return -1;
|
||||
}
|
||||
|
||||
void dma_clear_channel(int channel)
|
||||
{
|
||||
if(channel >= 0 && channel < NCHANNELS)
|
||||
{
|
||||
dma_channel[channel].req = -1;
|
||||
dma_channel[channel].handler = NULL;
|
||||
dbg("%s: cleared DMA channel %d\r\n", __FUNCTION__, channel);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the channel being initiated by the given requestor
|
||||
*
|
||||
* Parameters:
|
||||
* requestor Initiator/Requestor identifier
|
||||
*
|
||||
* Return Value:
|
||||
* Channel that the requestor is controlling or -1 if hasn't been
|
||||
* activated
|
||||
*/
|
||||
int dma_get_channel(int requestor)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < NCHANNELS; ++i)
|
||||
{
|
||||
if (dma_channel[i].req == requestor)
|
||||
return i;
|
||||
}
|
||||
dbg("%s: no channel occupied by requestor %d\r\n", __FUNCTION__, requestor);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the channel being initiated by the given requestor from
|
||||
* the active list
|
||||
*
|
||||
* Parameters:
|
||||
* requestor Initiator/Requestor identifier
|
||||
*/
|
||||
void dma_free_channel(int requestor)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < NCHANNELS; ++i)
|
||||
{
|
||||
if (dma_channel[i].req == requestor)
|
||||
{
|
||||
dma_channel[i].req = -1;
|
||||
dma_channel[i].handler = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the catch-all interrupt handler for the mult-channel DMA
|
||||
*/
|
||||
int dma_interrupt_handler(void *arg1, void *arg2)
|
||||
{
|
||||
int i, interrupts;
|
||||
|
||||
(void) set_ipl(7);
|
||||
|
||||
/*
|
||||
* Determine which interrupt(s) triggered by AND'ing the
|
||||
* pending interrupts with those that aren't masked.
|
||||
*/
|
||||
interrupts = MCF_DMA_DIPR & ~MCF_DMA_DIMR;
|
||||
|
||||
/* Make sure we are here for a reason */
|
||||
if (interrupts == 0)
|
||||
{
|
||||
dbg("%s: not DMA interrupt! Spurious?\r\n", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Clear the interrupt in the pending register */
|
||||
MCF_DMA_DIPR = interrupts;
|
||||
|
||||
for (i = 0; i < 16; ++i, interrupts >>= 1)
|
||||
{
|
||||
if (interrupts & 0x1)
|
||||
{
|
||||
/* If there is a handler, call it */
|
||||
if (dma_channel[i].handler != NULL)
|
||||
{
|
||||
dbg("%s: call handler for DMA channel %d (%p)\r\n", __FUNCTION__, i, dma_channel[i].handler);
|
||||
dma_channel[i].handler();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1; /* handled */
|
||||
}
|
||||
/********************************************************************/
|
||||
|
||||
void *dma_memcpy(void *dst, void *src, size_t n)
|
||||
{
|
||||
int ret;
|
||||
volatile int32_t time;
|
||||
volatile int32_t start;
|
||||
volatile int32_t end;
|
||||
|
||||
start = MCF_SLT0_SCNT;
|
||||
ret = MCD_startDma(1, src, 4, dst, 4, n, 4, DMA_ALWAYS, 0, MCD_SINGLE_DMA, 0);
|
||||
if (ret == MCD_OK)
|
||||
{
|
||||
dbg("%s: DMA on channel 1 successfully started\r\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
ret = MCD_dmaStatus(1);
|
||||
#ifdef _NOT_USED_ /* suppress annoying printout for now */
|
||||
switch (ret)
|
||||
{
|
||||
case MCD_NO_DMA:
|
||||
xprintf("MCD_NO_DMA: no DMA active on this channel\r\n");
|
||||
return NULL;
|
||||
break;
|
||||
case MCD_IDLE:
|
||||
xprintf("MCD_IDLE: DMA defined but not active (initiator not ready)\r\n");
|
||||
break;
|
||||
case MCD_RUNNING:
|
||||
xprintf("MCD_RUNNING: DMA active and working on this channel\r\n");
|
||||
break;
|
||||
case MCD_PAUSED:
|
||||
xprintf("MCD_PAUSED: DMA defined and enabled, but currently paused\r\n");
|
||||
break;
|
||||
case MCD_HALTED:
|
||||
xprintf("MCD_HALTED: DMA killed\r\n");
|
||||
return NULL;
|
||||
break;
|
||||
case MCD_DONE:
|
||||
xprintf("MCD_DONE: DMA finished\r\n");
|
||||
break;
|
||||
case MCD_CHANNEL_INVALID:
|
||||
xprintf("MCD_CHANNEL_INVALID: invalid DMA channel\r\n");
|
||||
return NULL;
|
||||
break;
|
||||
default:
|
||||
xprintf("unknown DMA status %d\r\n", ret);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
} while (ret != MCD_DONE);
|
||||
|
||||
end = MCF_SLT0_SCNT;
|
||||
time = (start - end) / (SYSCLK / 1000) / 1000;
|
||||
dbg("%s: took %d ms (%f Mbytes/second)\r\n", __FUNCTION__, time, n / (float) time / 1000.0);
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
int dma_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
dbg("%s: MCD DMA API initialization: ", __FUNCTION__);
|
||||
res = MCD_initDma((dmaRegs *) &_MBAR[0x8000], SYS_SRAM, MCD_RELOC_TASKS | MCD_COMM_PREFETCH_EN);
|
||||
if (res != MCD_OK)
|
||||
{
|
||||
dbg("%s: DMA API initialization failed (0x%x)\r\n", __FUNCTION__, res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// test
|
||||
dma_memcpy((void *) 0x10000, (void *) 0x03e00000, 0x00100000); /* copy one megabyte of flash to RAM */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,24 @@
|
||||
/*
|
||||
* basflash.c
|
||||
*
|
||||
* Created on: 18.12.2012
|
||||
* Author: mfro
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc 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 BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: Markus Fröschle
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
@@ -13,6 +29,14 @@
|
||||
#include "ff.h"
|
||||
#include "s19reader.h"
|
||||
|
||||
#ifdef MACHINE_FIREBEE
|
||||
#include "firebee.h"
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
|
||||
#ifdef MACHINE_M5484LITE
|
||||
#include "m5484l.h"
|
||||
#endif /* MACHINE_M5484LITE */
|
||||
|
||||
#define AMD_FLASH_BUS_SHIFT 1
|
||||
#define AMD_FLASH_CELL volatile uint16_t
|
||||
#define AMD_FLASH_CELL_BYTES 2
|
||||
@@ -526,7 +550,7 @@ err_t srec_load(char *flash_filename)
|
||||
{
|
||||
/* next pass: copy data to destination */
|
||||
xprintf("OK.\r\ncopy/flash data: ");
|
||||
err = read_srecords(flash_filename, &start_address, &length, memcpy);
|
||||
err = read_srecords(flash_filename, &start_address, &length, flash);
|
||||
if (err == OK)
|
||||
{
|
||||
/* next pass: verify data */
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* basflash_start.c
|
||||
*
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc 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 BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: Markus Fröschle
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static uint32_t ownstack[4096];
|
||||
static uint32_t *stackptr = &ownstack[4095];
|
||||
|
||||
/*
|
||||
* setup our own stack in SDRAM to prevent clashing BaS's in SRAM (size limited).
|
||||
*/
|
||||
void startup(void)
|
||||
{
|
||||
static uint32_t oldstack;
|
||||
|
||||
void basflash(void);
|
||||
__asm__ __volatile__("move.l sp,%0\n\t" : "=g"(oldstack) : :);
|
||||
__asm__ __volatile__("move.l %0,sp\n\t" : : "g"(stackptr) : );
|
||||
basflash();
|
||||
__asm__ __volatile__("move.l %0,sp\n\t" : : "g"(oldstack) : "sp");
|
||||
(void) stackptr; /* make compiler happy about unused variables */
|
||||
}
|
||||
+382
@@ -0,0 +1,382 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bas_types.h"
|
||||
|
||||
#if MACHINE_FIREBEE
|
||||
#include "firebee.h"
|
||||
#elif MACHINE_M5484LITE
|
||||
#include "m5484l.h"
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
|
||||
#define AMD_FLASH_BUS_SHIFT 1
|
||||
#define AMD_FLASH_CELL volatile uint16_t
|
||||
#define AMD_FLASH_CELL_BYTES 2
|
||||
#define AMD_FLASH_CELL_MASK 0x1
|
||||
#define AMD_FLASH_CMD_DATA(x) ((uint16_t) x)
|
||||
|
||||
struct amd_flash_sector_info
|
||||
{
|
||||
uint32_t size; /* sector size in bytes */
|
||||
uint32_t offset; /* offset from base of device */
|
||||
};
|
||||
|
||||
/*
|
||||
* AM29LV640D flash layout (bottom boot as used in the Firebee )
|
||||
*/
|
||||
static struct amd_flash_sector_info sector[] =
|
||||
{
|
||||
{ 8 * 1024, 0x00000000 }, /* SA0 */
|
||||
{ 8 * 1024, 0x00008000 }, /* SA1 */
|
||||
{ 8 * 1024, 0x00010000 }, /* SA2 */
|
||||
{ 8 * 1024, 0x00018000 }, /* SA3 */
|
||||
{ 8 * 1024, 0x00020000 }, /* SA4 */
|
||||
{ 8 * 1024, 0x00028000 }, /* SA5 */
|
||||
{ 8 * 1024, 0x00030000 }, /* SA6 */
|
||||
{ 8 * 1024, 0x00038000 }, /* SA7 */
|
||||
{ 8 * 1024, 0x00040000 }, /* SA8 */
|
||||
{ 64 * 1024, 0x00048000 }, /* SA9 */
|
||||
{ 64 * 1024, 0x00050000 }, /* SA10 */
|
||||
{ 64 * 1024, 0x00058000 }, /* SA11 */
|
||||
{ 64 * 1024, 0x00060000 }, /* SA12 */
|
||||
{ 64 * 1024, 0x00068000 }, /* SA13 */
|
||||
{ 64 * 1024, 0x00070000 }, /* SA14 */
|
||||
{ 64 * 1024, 0x00078000 }, /* SA15 */
|
||||
{ 64 * 1024, 0x00080000 }, /* SA16 */
|
||||
{ 64 * 1024, 0x00088000 }, /* SA17 */
|
||||
{ 64 * 1024, 0x00090000 }, /* SA18 */
|
||||
{ 64 * 1024, 0x00098000 }, /* SA19 */
|
||||
{ 64 * 1024, 0x000a0000 }, /* SA20 */
|
||||
{ 64 * 1024, 0x000a8000 }, /* SA21 */
|
||||
{ 64 * 1024, 0x000b0000 }, /* SA22 */
|
||||
{ 64 * 1024, 0x000b8000 }, /* SA23 */
|
||||
{ 64 * 1024, 0x000c0000 }, /* SA24 */
|
||||
{ 64 * 1024, 0x000c8000 }, /* SA25 */
|
||||
{ 64 * 1024, 0x000d0000 }, /* SA26 */
|
||||
{ 64 * 1024, 0x000d8000 }, /* SA27 */
|
||||
{ 64 * 1024, 0x000e0000 }, /* SA28 */
|
||||
{ 64 * 1024, 0x000e8000 }, /* SA29 */
|
||||
{ 64 * 1024, 0x000f0000 }, /* SA30 */
|
||||
{ 64 * 1024, 0x000f8000 }, /* SA31 */
|
||||
{ 64 * 1024, 0x00100000 }, /* SA32 */
|
||||
{ 64 * 1024, 0x00108000 }, /* SA32 */
|
||||
{ 64 * 1024, 0x00110000 }, /* SA34 */
|
||||
{ 64 * 1024, 0x00118000 }, /* SA35 */
|
||||
{ 64 * 1024, 0x00120000 }, /* SA36 */
|
||||
{ 64 * 1024, 0x00128000 }, /* SA37 */
|
||||
{ 64 * 1024, 0x00130000 }, /* SA38 */
|
||||
{ 64 * 1024, 0x00138000 }, /* SA39 */
|
||||
{ 64 * 1024, 0x00140000 }, /* SA40 */
|
||||
{ 64 * 1024, 0x00148000 }, /* SA41 */
|
||||
{ 64 * 1024, 0x00150000 }, /* SA42 */
|
||||
{ 64 * 1024, 0x00158000 }, /* SA43 */
|
||||
{ 64 * 1024, 0x00160000 }, /* SA44 */
|
||||
{ 64 * 1024, 0x00168000 }, /* SA45 */
|
||||
{ 64 * 1024, 0x00170000 }, /* SA46 */
|
||||
{ 64 * 1024, 0x00178000 }, /* SA47 */
|
||||
{ 64 * 1024, 0x00180000 }, /* SA48 */
|
||||
{ 64 * 1024, 0x00188000 }, /* SA49 */
|
||||
{ 64 * 1024, 0x00190000 }, /* SA50 */
|
||||
{ 64 * 1024, 0x00198000 }, /* SA51 */
|
||||
{ 64 * 1024, 0x001a0000 }, /* SA52 */
|
||||
{ 64 * 1024, 0x001a8000 }, /* SA53 */
|
||||
{ 64 * 1024, 0x001b0000 }, /* SA54 */
|
||||
{ 64 * 1024, 0x001b8000 }, /* SA55 */
|
||||
{ 64 * 1024, 0x001c0000 }, /* SA56 */
|
||||
{ 64 * 1024, 0x001c8000 }, /* SA57 */
|
||||
{ 64 * 1024, 0x001d0000 }, /* SA58 */
|
||||
{ 64 * 1024, 0x001d8000 }, /* SA59 */
|
||||
{ 64 * 1024, 0x001e0000 }, /* SA60 */
|
||||
{ 64 * 1024, 0x001e8000 }, /* SA61 */
|
||||
{ 64 * 1024, 0x001f0000 }, /* SA62 */
|
||||
{ 64 * 1024, 0x001f8000 }, /* SA63 */
|
||||
{ 64 * 1024, 0x00200000 }, /* SA64 */
|
||||
{ 64 * 1024, 0x00208000 }, /* SA65 */
|
||||
{ 64 * 1024, 0x00210000 }, /* SA66 */
|
||||
{ 64 * 1024, 0x00218000 }, /* SA67 */
|
||||
{ 64 * 1024, 0x00220000 }, /* SA68 */
|
||||
{ 64 * 1024, 0x00228000 }, /* SA69 */
|
||||
{ 64 * 1024, 0x00230000 }, /* SA70 */
|
||||
{ 64 * 1024, 0x00238000 }, /* SA71 */
|
||||
{ 64 * 1024, 0x00240000 }, /* SA72 */
|
||||
{ 64 * 1024, 0x00248000 }, /* SA73 */
|
||||
{ 64 * 1024, 0x00250000 }, /* SA74 */
|
||||
{ 64 * 1024, 0x00258000 }, /* SA75 */
|
||||
{ 64 * 1024, 0x00260000 }, /* SA76 */
|
||||
{ 64 * 1024, 0x00268000 }, /* SA77 */
|
||||
{ 64 * 1024, 0x00270000 }, /* SA78 */
|
||||
{ 64 * 1024, 0x00278000 }, /* SA79 */
|
||||
{ 64 * 1024, 0x00280000 }, /* SA80 */
|
||||
{ 64 * 1024, 0x00288000 }, /* SA81 */
|
||||
{ 64 * 1024, 0x00290000 }, /* SA82 */
|
||||
{ 64 * 1024, 0x00298000 }, /* SA83 */
|
||||
{ 64 * 1024, 0x002a0000 }, /* SA84 */
|
||||
{ 64 * 1024, 0x002a8000 }, /* SA85 */
|
||||
{ 64 * 1024, 0x002b0000 }, /* SA86 */
|
||||
{ 64 * 1024, 0x002b8000 }, /* SA87 */
|
||||
{ 64 * 1024, 0x002c0000 }, /* SA88 */
|
||||
{ 64 * 1024, 0x002c8000 }, /* SA89 */
|
||||
{ 64 * 1024, 0x002d0000 }, /* SA90 */
|
||||
{ 64 * 1024, 0x002d8000 }, /* SA91 */
|
||||
{ 64 * 1024, 0x002e0000 }, /* SA92 */
|
||||
{ 64 * 1024, 0x002e8000 }, /* SA93 */
|
||||
{ 64 * 1024, 0x002f0000 }, /* SA94 */
|
||||
{ 64 * 1024, 0x002f8000 }, /* SA95 */
|
||||
{ 64 * 1024, 0x00300000 }, /* SA96 */
|
||||
{ 64 * 1024, 0x00308000 }, /* SA97 */
|
||||
{ 64 * 1024, 0x00310000 }, /* SA98 */
|
||||
{ 64 * 1024, 0x00318000 }, /* SA99 */
|
||||
{ 64 * 1024, 0x00320000 }, /* SA100 */
|
||||
{ 64 * 1024, 0x00328000 }, /* SA101 */
|
||||
{ 64 * 1024, 0x00330000 }, /* SA102 */
|
||||
{ 64 * 1024, 0x00338000 }, /* SA103 */
|
||||
{ 64 * 1024, 0x00340000 }, /* SA104 */
|
||||
{ 64 * 1024, 0x00348000 }, /* SA105 */
|
||||
{ 64 * 1024, 0x00350000 }, /* SA106 */
|
||||
{ 64 * 1024, 0x00358000 }, /* SA107 */
|
||||
{ 64 * 1024, 0x00360000 }, /* SA108 */
|
||||
{ 64 * 1024, 0x00368000 }, /* SA109 */
|
||||
{ 64 * 1024, 0x00370000 }, /* SA110 */
|
||||
{ 64 * 1024, 0x00378000 }, /* SA111 */
|
||||
{ 64 * 1024, 0x00380000 }, /* SA112 */
|
||||
{ 64 * 1024, 0x00388000 }, /* SA113 */
|
||||
{ 64 * 1024, 0x00390000 }, /* SA114 */
|
||||
{ 64 * 1024, 0x00398000 }, /* SA115 */
|
||||
{ 64 * 1024, 0x003a0000 }, /* SA116 */
|
||||
{ 64 * 1024, 0x003a8000 }, /* SA117 */
|
||||
{ 64 * 1024, 0x003b0000 }, /* SA118 */
|
||||
{ 64 * 1024, 0x003b8000 }, /* SA119 */
|
||||
{ 64 * 1024, 0x003c0000 }, /* SA120 */
|
||||
{ 64 * 1024, 0x003c8000 }, /* SA121 */
|
||||
{ 64 * 1024, 0x003d0000 }, /* SA122 */
|
||||
{ 64 * 1024, 0x003d8000 }, /* SA123 */
|
||||
{ 64 * 1024, 0x003e0000 }, /* SA124 */
|
||||
{ 64 * 1024, 0x003e8000 }, /* SA125 */
|
||||
{ 64 * 1024, 0x003f0000 }, /* SA126 */
|
||||
{ 64 * 1024, 0x003f8000 }, /* SA127 */
|
||||
};
|
||||
|
||||
static const int AMD_FLASH_SECTORS = sizeof(sector) / sizeof(struct amd_flash_sector_info);
|
||||
|
||||
#define SOFFSET(n) (sector[n].offset)
|
||||
#define SADDR(n) (SOFFSET(n) >> AMD_FLASH_BUS_SHIFT)
|
||||
#define SSIZE(n) (sector[n].size)
|
||||
|
||||
#define AMD_FLASH_DEVICES 1
|
||||
|
||||
static AMD_FLASH_CELL *pFlash;
|
||||
|
||||
typedef struct romram
|
||||
{
|
||||
uint32_t flash_address;
|
||||
uint32_t ram_address;
|
||||
char *name;
|
||||
} ROMRAM;
|
||||
|
||||
static const struct romram flash_areas[] =
|
||||
{
|
||||
{ 0xe0000000, 0x00e00000, "BaS" }, /* BaS */
|
||||
{ 0xe0600000, 0x00e00000, "EmuTOS" }, /* EmuTOS */
|
||||
{ 0xe0400000, 0x00e00000, "FireTOS" }, /* FireTOS */
|
||||
{ 0xe0700000, 0x00e00000, "FPGA" }, /* FPGA config */
|
||||
};
|
||||
static const int num_flash_areas = sizeof(flash_areas) / sizeof(struct romram);
|
||||
|
||||
#define FLASH_ADDRESS BOOTFLASH_BASE_ADDRESS
|
||||
|
||||
/*
|
||||
* erase a flash sector
|
||||
*
|
||||
* sector_num is the index into the sector table above.
|
||||
*
|
||||
* FIXME: need to disable data cache to ensure proper operation
|
||||
*/
|
||||
void amd_flash_sector_erase(int n)
|
||||
{
|
||||
volatile AMD_FLASH_CELL status;
|
||||
|
||||
pFlash[0x555] = AMD_FLASH_CMD_DATA(0xAA);
|
||||
pFlash[0x2AA] = AMD_FLASH_CMD_DATA(0x55);
|
||||
pFlash[0x555] = AMD_FLASH_CMD_DATA(0x80);
|
||||
pFlash[0x555] = AMD_FLASH_CMD_DATA(0xAA);
|
||||
pFlash[0x2AA] = AMD_FLASH_CMD_DATA(0x55);
|
||||
pFlash[SADDR(n)] = AMD_FLASH_CMD_DATA(0x30);
|
||||
|
||||
do
|
||||
status = pFlash[SADDR(n)];
|
||||
while ((status & AMD_FLASH_CMD_DATA(0x80)) != AMD_FLASH_CMD_DATA(0x80));
|
||||
|
||||
/*
|
||||
* Place device in read mode
|
||||
*/
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0xAA);
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0x55);
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0xF0);
|
||||
}
|
||||
|
||||
int amd_flash_erase(void *start, int bytes, void (*putchar)(int))
|
||||
{
|
||||
int i, ebytes = 0;
|
||||
|
||||
if (bytes == 0)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < AMD_FLASH_SECTORS; i++)
|
||||
{
|
||||
if (start >= (void *)((void *) pFlash + SOFFSET(i)) &&
|
||||
start <= (void *)((void *) pFlash + SOFFSET(i) + (SSIZE(i) - 1)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while (ebytes < bytes)
|
||||
{
|
||||
if (putchar != NULL)
|
||||
{
|
||||
putchar('.');
|
||||
}
|
||||
amd_flash_sector_erase(i);
|
||||
ebytes += SSIZE(i);
|
||||
i++;
|
||||
}
|
||||
|
||||
if (putchar != NULL)
|
||||
{
|
||||
putchar(10); /* LF */
|
||||
putchar(13); /* CR */
|
||||
}
|
||||
|
||||
return ebytes;
|
||||
}
|
||||
|
||||
void amd_flash_program_cell(AMD_FLASH_CELL *dst, AMD_FLASH_CELL data)
|
||||
{
|
||||
volatile AMD_FLASH_CELL status;
|
||||
int retry;
|
||||
|
||||
pFlash[0x555] = AMD_FLASH_CMD_DATA(0xAA);
|
||||
pFlash[0x2AA] = AMD_FLASH_CMD_DATA(0x55);
|
||||
pFlash[0x555] = AMD_FLASH_CMD_DATA(0xA0);
|
||||
*dst = data;
|
||||
|
||||
/*
|
||||
* Wait for program operation to finish
|
||||
* (Data# Polling Algorithm)
|
||||
*/
|
||||
retry = 0;
|
||||
while (1)
|
||||
{
|
||||
status = *dst;
|
||||
if ((status & AMD_FLASH_CMD_DATA(0x80)) ==
|
||||
(data & AMD_FLASH_CMD_DATA(0x80)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (status & AMD_FLASH_CMD_DATA(0x20))
|
||||
{
|
||||
status = *dst;
|
||||
if ((status & AMD_FLASH_CMD_DATA(0x80)) ==
|
||||
(data & AMD_FLASH_CMD_DATA(0x80)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (++retry > 1024)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int amd_flash_program(void *dest, void *source, int bytes, int erase, void (*func)(void), void (*putchar)(int))
|
||||
{
|
||||
AMD_FLASH_CELL *src;
|
||||
AMD_FLASH_CELL *dst;
|
||||
int hashi = 1;
|
||||
int hashj = 0;
|
||||
char hash[5];
|
||||
|
||||
hash[0] = 8; /* Backspace */
|
||||
hash[1] = 124;/* "|" */
|
||||
hash[2] = 47; /* "/" */
|
||||
hash[3] = 45; /* "-" */
|
||||
hash[4] = 92; /* "\" */
|
||||
|
||||
src = (AMD_FLASH_CELL *)source;
|
||||
dst = (AMD_FLASH_CELL *)dest;
|
||||
|
||||
/*
|
||||
* Place device in read mode
|
||||
*/
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0xAA);
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0x55);
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0xF0);
|
||||
|
||||
/*
|
||||
* Erase device if necessary
|
||||
*/
|
||||
if (erase)
|
||||
{
|
||||
amd_flash_erase(dest, bytes, putchar);
|
||||
}
|
||||
|
||||
/*
|
||||
* Program device
|
||||
*/
|
||||
while (bytes > 0)
|
||||
{
|
||||
amd_flash_program_cell(dst, *src);
|
||||
|
||||
/* Verify Write */
|
||||
if (*dst == *src)
|
||||
{
|
||||
bytes -= AMD_FLASH_CELL_BYTES;
|
||||
*dst++, *src++;
|
||||
|
||||
if ((putchar != NULL))
|
||||
{
|
||||
/* Hash marks to indicate progress */
|
||||
if (hashj == 0x1000)
|
||||
{
|
||||
hashj = -1;
|
||||
putchar(hash[0]);
|
||||
putchar(hash[hashi]);
|
||||
|
||||
hashi++;
|
||||
if (hashi == 5)
|
||||
{
|
||||
hashi = 1;
|
||||
}
|
||||
|
||||
}
|
||||
hashj++;
|
||||
}
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Place device in read mode
|
||||
*/
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0xAA);
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0x55);
|
||||
pFlash[0] = AMD_FLASH_CMD_DATA(0xF0);
|
||||
|
||||
if (putchar != NULL)
|
||||
{
|
||||
putchar(hash[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
* If a function was passed in, call it now
|
||||
*/
|
||||
if ((func != NULL))
|
||||
{
|
||||
func();
|
||||
}
|
||||
|
||||
return ((int)src - (int)source);
|
||||
}
|
||||
|
||||
@@ -317,6 +317,7 @@ static err_t flash(uint8_t *dst, uint8_t *src, uint32_t length)
|
||||
err_t ret = OK;
|
||||
|
||||
/* TODO: do the actual flash */
|
||||
amd_flash_program(dst, src, length, false, NULL, xputchar);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -55,26 +55,17 @@ flash 0xE0000000
|
||||
#
|
||||
# contrary to documentation, it seems we need to erase-wait after each sector
|
||||
|
||||
erase 0xE0000000 0x00000
|
||||
erase 0xE0000000 0
|
||||
erase 0xE0000000 1
|
||||
erase 0xE0000000 2
|
||||
erase 0xE0000000 3
|
||||
erase 0xE0000000 4
|
||||
erase 0xE0000000 5
|
||||
erase 0xE0000000 7
|
||||
erase 0xE0000000 8
|
||||
erase 0xE0000000 9
|
||||
erase 0xE0000000 10
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x01000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x02000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x03000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x04000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x05000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x06000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x07000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x08000
|
||||
erase-wait 0xE0000000
|
||||
erase 0xE0000000 0x10000
|
||||
erase-wait 0xE0000000
|
||||
blank-chk 0xE0000000 0x10000
|
||||
load -v bas.elf
|
||||
|
||||
load -v ../firebee/bas.elf
|
||||
wait
|
||||
@@ -78,4 +78,4 @@ erase-wait 0xe0000000
|
||||
erase 0xe0000000 0x378000
|
||||
erase-wait 0xe0000000
|
||||
|
||||
load -v emutos.elf
|
||||
load -v emutos-firebee.elf
|
||||
Executable
+92
@@ -0,0 +1,92 @@
|
||||
#!/usr/local/bin/bdmctrl
|
||||
#
|
||||
# m548x board initialization for bdmctrl
|
||||
#
|
||||
open $1
|
||||
reset
|
||||
wait
|
||||
|
||||
# set VBR
|
||||
write-ctrl 0x0801 0x00000000
|
||||
dump-register VBR
|
||||
|
||||
# Turn on MBAR at 0xFF00_0000
|
||||
write-ctrl 0x0C0F 0xFF000000
|
||||
dump-register MBAR
|
||||
|
||||
# Turn on RAMBAR0 at address FF10_0000
|
||||
write-ctrl 0x0C04 0xFF100007
|
||||
|
||||
# Turn on RAMBAR1 at address FF10_1000 (disabled - not mapped by bdm currently)
|
||||
write-ctrl 0x0C05 0xFF101001
|
||||
|
||||
#
|
||||
# Init CS0 (BootFLASH @ E000_0000 - E03F_FFFF 4Mbytes)
|
||||
write 0xFF000500 0xE0000000 4
|
||||
#write 0xFF000508 0x00041180 4
|
||||
write 0xFF000508 0x00100D80 4
|
||||
write 0xFF000504 0x003F0001 4
|
||||
|
||||
# SDRAM Initialization @ 0000_0000 - 03FF_FFFF 64 Mbytes
|
||||
write 0xFF000004 0x000002AA 4 # SDRAMDS configuration
|
||||
write 0xFF000020 0x00000019 4 # SDRAM CS0 configuration (128Mbytes 0000_0000 - 07FF_FFFF)
|
||||
write 0xFF000024 0x08000000 4 # SDRAM CS1 configuration (128Mbytes 0800_0000 - 0FFF_FFFF)
|
||||
write 0xFF000028 0x10000000 4 # SDRAM CS2 configuration (128Mbytes 1000_0000 - 17FF_FFFF)
|
||||
write 0xFF00002C 0x18000000 4 # SDRAM CS3 configuration (128Mbytes 1800_0000 - 1FFF_FFFF)
|
||||
write 0xFF000108 0x73711630 4 # SDCFG1
|
||||
write 0xFF00010C 0x46370000 4 # SDCFG2
|
||||
|
||||
write 0xFF000104 0xE10B0002 4 # SDCR + IPALL
|
||||
write 0xFF000100 0x40010000 4 # SDMR (write to LEMR)
|
||||
write 0xFF000100 0x058D0000 4 # SDMR (write to LMR)
|
||||
sleep 100
|
||||
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000100 0x018D0000 4 # SDMR (write to LMR)
|
||||
write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
|
||||
sleep 10
|
||||
|
||||
|
||||
# use system sdram as flashlib scratch area.
|
||||
# TODO: plugin flashing seems to work o.k. now for smaller binaries, while it doesn't for larger ones (EmuTOS) yet.
|
||||
# This seems to be related to large flash buffers and PC-relative adressing of the plugin
|
||||
#flash-plugin 0x1000 0xf000 flash29.plugin
|
||||
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
|
||||
flash 0xE0000000
|
||||
flash-plugin 0x1000 0xf000 flashintelc3.plugin
|
||||
|
||||
# Erase flash from 0xE0000000 to 0xE00FFFFF (reserved space for bas)
|
||||
#
|
||||
# Caution: sector offset numbers need to be the ones from the x16 address range
|
||||
# column and they vary in size - needs to be exactly as in the data sheet (p. 9)
|
||||
#
|
||||
# contrary to documentation, it seems we need to erase-wait after each sector
|
||||
|
||||
erase 0xE0000000 0
|
||||
erase 0xE0000000 1
|
||||
erase 0xE0000000 2
|
||||
erase 0xE0000000 3
|
||||
erase 0xE0000000 4
|
||||
erase 0xE0000000 5
|
||||
erase 0xE0000000 6
|
||||
erase 0xE0000000 7
|
||||
erase 0xE0000000 8
|
||||
erase 0xE0000000 9
|
||||
erase 0xE0000000 10
|
||||
erase 0xE0000000 11
|
||||
erase 0xE0000000 12
|
||||
erase 0xE0000000 13
|
||||
#erase 0xE0000000 0x2000
|
||||
#erase 0xE0000000 0x3000
|
||||
#erase 0xE0000000 0x4000
|
||||
#erase 0xE0000000 0x5000
|
||||
#erase 0xE0000000 0x00006000
|
||||
#erase 0xE0000000 0x00007000
|
||||
#erase 0xE0000000 0x00008000
|
||||
#erase 0xE0000000 0x00009000
|
||||
#erase 0xE0000000 0x0000a000
|
||||
#erase 0xE0000000 0x0000b000
|
||||
#erase-wait 0xe0000000
|
||||
load -v ../m5484lite/bas.elf
|
||||
wait
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
#!/usr/local/bin/bdmctrl
|
||||
#
|
||||
# m548x board initialization for bdmctrl
|
||||
#
|
||||
open $1
|
||||
reset
|
||||
wait
|
||||
|
||||
# set VBR
|
||||
write-ctrl 0x0801 0x00000000
|
||||
dump-register VBR
|
||||
|
||||
# Turn on MBAR at 0xFF00_0000
|
||||
write-ctrl 0x0C0F 0xFF000000
|
||||
dump-register MBAR
|
||||
|
||||
# Turn on RAMBAR0 at address FF10_0000
|
||||
write-ctrl 0x0C04 0xFF100007
|
||||
|
||||
# Turn on RAMBAR1 at address FF10_1000 (disabled - not mapped by bdm currently)
|
||||
write-ctrl 0x0C05 0xFF101001
|
||||
|
||||
#
|
||||
# Init CS0 (BootFLASH @ E000_0000 - E03F_FFFF 4Mbytes)
|
||||
write 0xFF000500 0xE0000000 4
|
||||
write 0xFF000508 0x00041180 4
|
||||
write 0xFF000504 0x003F0001 4
|
||||
|
||||
# SDRAM Initialization @ 0000_0000 - 03FF_FFFF 64 Mbytes
|
||||
write 0xFF000004 0x000002AA 4 # SDRAMDS configuration
|
||||
write 0xFF000020 0x00000019 4 # SDRAM CS0 configuration (128Mbytes 0000_0000 - 07FF_FFFF)
|
||||
write 0xFF000024 0x08000000 4 # SDRAM CS1 configuration (128Mbytes 0800_0000 - 0FFF_FFFF)
|
||||
write 0xFF000028 0x10000000 4 # SDRAM CS2 configuration (128Mbytes 1000_0000 - 17FF_FFFF)
|
||||
write 0xFF00002C 0x18000000 4 # SDRAM CS3 configuration (128Mbytes 1800_0000 - 1FFF_FFFF)
|
||||
write 0xFF000108 0x73711630 4 # SDCFG1
|
||||
write 0xFF00010C 0x46370000 4 # SDCFG2
|
||||
|
||||
write 0xFF000104 0xE10B0002 4 # SDCR + IPALL
|
||||
write 0xFF000100 0x40010000 4 # SDMR (write to LEMR)
|
||||
write 0xFF000100 0x058D0000 4 # SDMR (write to LMR)
|
||||
sleep 100
|
||||
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000100 0x018D0000 4 # SDMR (write to LMR)
|
||||
write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
|
||||
sleep 10
|
||||
|
||||
|
||||
# use system sdram as flashlib scratch area.
|
||||
# TODO: plugin flashing seems to work o.k. now for smaller binaries, while it doesn't for larger ones (EmuTOS) yet.
|
||||
# This seems to be related to large flash buffers and PC-relative adressing of the plugin
|
||||
#flash-plugin 0x1000 0xf000 flash29.plugin
|
||||
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
|
||||
flash 0xE0000000
|
||||
flash-plugin 0x1000 0xf000 flashintelc3.plugin
|
||||
|
||||
# Erase flash from 0xE0000000 to 0xE00FFFFF (reserved space for bas)
|
||||
#
|
||||
# Caution: sector offset numbers need to be the ones from the x16 address range
|
||||
# column and they vary in size - needs to be exactly as in the data sheet (p. 9)
|
||||
#
|
||||
# contrary to documentation, it seems we need to erase-wait after each sector
|
||||
|
||||
#erase 0xE0000000 0x0
|
||||
#erase 0xE0002000 0x0
|
||||
#erase 0xE0000000 0x00004000
|
||||
#erase 0xE0000000 0x00005000
|
||||
#erase 0xE0000000 0x00006000
|
||||
#erase 0xE0000000 0x00007000
|
||||
#erase 0xE0000000 0x00008000
|
||||
#erase 0xE0000000 0x00009000
|
||||
#erase 0xE0000000 0x0000a000
|
||||
#erase 0xE0000000 0x0000b000
|
||||
#erase-wait 0xe0000000
|
||||
#blank-chk 0xE0000000 0x0
|
||||
load -v m5484lite_dbug_flash.elf
|
||||
wait
|
||||
Executable
+66
@@ -0,0 +1,66 @@
|
||||
#!/usr/local/bin/bdmctrl -D2
|
||||
#
|
||||
# flash EmuTOS using bdmctrl
|
||||
#
|
||||
open $1
|
||||
reset
|
||||
|
||||
# Turn on RAMBAR0 at address FF10_0000
|
||||
write-ctrl 0x0C04 0xFF100007
|
||||
|
||||
# Init CS0 (BootFLASH @ E000_0000 - E07F_FFFF 8Mbytes)
|
||||
write 0xFF000500 0xE0000000 4
|
||||
write 0xFF000508 0x00001180 4
|
||||
write 0xFF000504 0x007F0001 4
|
||||
|
||||
# SDRAM Initialization @ 0000_0000 - 1FFF_FFFF 512Mbytes
|
||||
write 0xFF000004 0x000002AA 4 # SDRAMDS configuration
|
||||
write 0xFF000020 0x0000001A 4 # SDRAM CS0 configuration (128Mbytes 0000_0000 - 07FF_FFFF)
|
||||
write 0xFF000024 0x0800001A 4 # SDRAM CS1 configuration (128Mbytes 0800_0000 - 0FFF_FFFF)
|
||||
write 0xFF000028 0x1000001A 4 # SDRAM CS2 configuration (128Mbytes 1000_0000 - 17FF_FFFF)
|
||||
write 0xFF00002C 0x1800001A 4 # SDRAM CS3 configuration (128Mbytes 1800_0000 - 1FFF_FFFF)
|
||||
write 0xFF000108 0x73622830 4 # SDCFG1
|
||||
write 0xFF00010C 0x46770000 4 # SDCFG2
|
||||
|
||||
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||
write 0xFF000100 0x40010000 4 # SDMR (write to LEMR)
|
||||
write 0xFF000100 0x048D0000 4 # SDMR (write to LMR)
|
||||
sleep 100
|
||||
write 0xFF000104 0xE10D0002 4 # SDCR + IPALL
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000104 0xE10D0004 4 # SDCR + IREF (first refresh)
|
||||
write 0xFF000100 0x008D0000 4 # SDMR (write to LMR)
|
||||
write 0xFF000104 0x710D0F00 4 # SDCR (lock SDMR and enable refresh)
|
||||
sleep 10
|
||||
|
||||
|
||||
# use sram as flashlib scratch area
|
||||
# flashing EmuTOS with plugin does not work yet (at least not for 64bit hosts)
|
||||
#flash-plugin 0xFF101000 0xffff flashintelc3.plugin
|
||||
|
||||
# notify flashlib that we have flash at address 0xE0000000, length 0x7FFFFF, plugin is flash29
|
||||
flash 0xe0000000
|
||||
|
||||
# Erase flash from 0xE0100000 to 0xE01FFFFF (reserved space for EmuTOS on the m5484lite)
|
||||
|
||||
erase 0xe0000000 21
|
||||
erase 0xe0000000 22
|
||||
erase 0xe0000000 23
|
||||
erase 0xe0000000 24
|
||||
erase 0xe0000000 25
|
||||
erase 0xe0000000 26
|
||||
erase 0xe0000000 27
|
||||
erase 0xe0000000 28
|
||||
erase 0xe0000000 29
|
||||
erase 0xe0000000 30
|
||||
erase 0xe0000000 31
|
||||
erase 0xe0000000 32
|
||||
erase 0xe0000000 33
|
||||
erase 0xe0000000 34
|
||||
erase 0xe0000000 35
|
||||
erase 0xe0000000 36
|
||||
erase 0xe0000000 37
|
||||
erase 0xe0000000 38
|
||||
erase 0xe0000000 39
|
||||
|
||||
load ../../emutos/emutos-m548x_bas.elf
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* driver_vec.c
|
||||
*
|
||||
* Expose BaS drivers to OS
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc 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 BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* Created on: 24.10.2013
|
||||
* Author: Markus Fröschle
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "version.h"
|
||||
#include "xhdi_sd.h"
|
||||
#include "dma.h"
|
||||
#include "driver_vec.h"
|
||||
#include "driver_mem.h"
|
||||
|
||||
/*
|
||||
* driver interface struct for the SD card BaS driver
|
||||
*/
|
||||
static struct xhdi_driver_interface xhdi_call_interface =
|
||||
{
|
||||
xhdi_call
|
||||
};
|
||||
|
||||
/*
|
||||
* driver interface struct for the BaS multichannel DMA driver
|
||||
* This is exactly the same thing FireTOS provides and the MiNT FEC drivers expect.
|
||||
* It can be directly used in TOS to register the corresponding cookie ("DMAC").
|
||||
*/
|
||||
static struct dma_driver_interface dma_interface =
|
||||
{
|
||||
.version = 0x0101,
|
||||
.magic = 'DMAC',
|
||||
.dma_set_initiator = &dma_set_initiator,
|
||||
.dma_get_initiator = dma_get_initiator,
|
||||
.dma_free_initiator = dma_free_initiator,
|
||||
.dma_set_channel = dma_set_channel,
|
||||
.dma_get_channel = dma_get_channel,
|
||||
.dma_free_channel = dma_free_channel,
|
||||
.dma_clear_channel = dma_clear_channel,
|
||||
.MCD_startDma = MCD_startDma,
|
||||
.MCD_dmaStatus = MCD_dmaStatus,
|
||||
.MCD_XferProgrQuery = MCD_XferProgrQuery,
|
||||
.MCD_killDma = MCD_killDma,
|
||||
.MCD_continDma = MCD_continDma,
|
||||
.MCD_pauseDma = MCD_pauseDma,
|
||||
.MCD_resumeDma = MCD_resumeDma,
|
||||
.MCD_csumQuery = MCD_csumQuery,
|
||||
.dma_malloc = driver_mem_alloc,
|
||||
.dma_free = driver_mem_free
|
||||
};
|
||||
|
||||
extern const struct fb_info *info_fb;
|
||||
|
||||
/*
|
||||
* driver interface struct for the BaS framebuffer video driver
|
||||
*/
|
||||
static struct framebuffer_driver_interface framebuffer_interface =
|
||||
{
|
||||
.framebuffer_info = &info_fb
|
||||
};
|
||||
|
||||
static struct generic_interface interfaces[] =
|
||||
{
|
||||
{
|
||||
/* BaS SD-card driver interface */
|
||||
|
||||
.type = XHDI_DRIVER,
|
||||
.name = "SDCARD",
|
||||
.description = "BaS SD Card driver",
|
||||
.version = 0,
|
||||
.revision = 1,
|
||||
.interface.xhdi = &xhdi_call_interface
|
||||
},
|
||||
{
|
||||
.type = MCD_DRIVER,
|
||||
.name = "MCDDMA",
|
||||
.description = "BaS Multichannel DMA driver",
|
||||
.version = 0,
|
||||
.revision = 1,
|
||||
.interface.dma = &dma_interface,
|
||||
},
|
||||
{
|
||||
.type = VIDEO_DRIVER,
|
||||
.name = "RADEON",
|
||||
.description = "BaS RADEON framebuffer driver",
|
||||
.version = 0,
|
||||
.revision = 1,
|
||||
.interface.fb = &framebuffer_interface,
|
||||
},
|
||||
|
||||
/* insert new drivers here */
|
||||
|
||||
{
|
||||
.type = END_OF_DRIVERS
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* this is the driver table we expose to the OS
|
||||
*/
|
||||
static struct driver_table bas_drivers =
|
||||
{
|
||||
.bas_version = MAJOR_VERSION,
|
||||
.bas_revision = MINOR_VERSION,
|
||||
.remove_handler = NULL,
|
||||
.interfaces = { interfaces }
|
||||
};
|
||||
|
||||
void __attribute__((interrupt)) get_bas_drivers(void)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
"move.l #%[drivers],d0\n\t"
|
||||
: /* no output */
|
||||
: [drivers] "o" (bas_drivers) /* input */
|
||||
: /* clobber */
|
||||
);
|
||||
}
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef _MCD_API_H
|
||||
#define _MCD_API_H
|
||||
|
||||
#include "bas_types.h"
|
||||
|
||||
/*
|
||||
* Turn Execution Unit tasks ON (#define) or OFF (#undef)
|
||||
*/
|
||||
@@ -47,39 +49,33 @@
|
||||
/*
|
||||
* Portability typedefs
|
||||
*/
|
||||
typedef int s32;
|
||||
typedef unsigned int u32;
|
||||
typedef short s16;
|
||||
typedef unsigned short u16;
|
||||
typedef char s8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
/*
|
||||
* These structures represent the internal registers of the
|
||||
* multi-channel DMA
|
||||
*/
|
||||
struct dmaRegs_s {
|
||||
u32 taskbar; /* task table base address register */
|
||||
u32 currPtr;
|
||||
u32 endPtr;
|
||||
u32 varTablePtr;
|
||||
u16 dma_rsvd0;
|
||||
u16 ptdControl; /* ptd control */
|
||||
u32 intPending; /* interrupt pending register */
|
||||
u32 intMask; /* interrupt mask register */
|
||||
u16 taskControl[16]; /* task control registers */
|
||||
u8 priority[32]; /* priority registers */
|
||||
u32 initiatorMux; /* initiator mux control */
|
||||
u32 taskSize0; /* task size control register 0. */
|
||||
u32 taskSize1; /* task size control register 1. */
|
||||
u32 dma_rsvd1; /* reserved */
|
||||
u32 dma_rsvd2; /* reserved */
|
||||
u32 debugComp1; /* debug comparator 1 */
|
||||
u32 debugComp2; /* debug comparator 2 */
|
||||
u32 debugControl; /* debug control */
|
||||
u32 debugStatus; /* debug status */
|
||||
u32 ptdDebug; /* priority task decode debug */
|
||||
u32 dma_rsvd3[31]; /* reserved */
|
||||
uint32_t taskbar; /* task table base address register */
|
||||
uint32_t currPtr;
|
||||
uint32_t endPtr;
|
||||
uint32_t varTablePtr;
|
||||
uint16_t dma_rsvd0;
|
||||
uint16_t ptdControl; /* ptd control */
|
||||
uint32_t intPending; /* interrupt pending register */
|
||||
uint32_t intMask; /* interrupt mask register */
|
||||
uint16_t taskControl[16]; /* task control registers */
|
||||
uint8_t priority[32]; /* priority registers */
|
||||
uint32_t initiatorMux; /* initiator mux control */
|
||||
uint32_t taskSize0; /* task size control register 0. */
|
||||
uint32_t taskSize1; /* task size control register 1. */
|
||||
uint32_t dma_rsvd1; /* reserved */
|
||||
uint32_t dma_rsvd2; /* reserved */
|
||||
uint32_t debugComp1; /* debug comparator 1 */
|
||||
uint32_t debugComp2; /* debug comparator 2 */
|
||||
uint32_t debugControl; /* debug control */
|
||||
uint32_t debugStatus; /* debug status */
|
||||
uint32_t ptdDebug; /* priority task decode debug */
|
||||
uint32_t dma_rsvd3[31]; /* reserved */
|
||||
};
|
||||
typedef volatile struct dmaRegs_s dmaRegs;
|
||||
|
||||
@@ -165,7 +161,7 @@ typedef volatile struct dmaRegs_s dmaRegs;
|
||||
*/
|
||||
/* Byte swapping: */
|
||||
#define MCD_NO_BYTE_SWAP 0x00045670 /* to disable byte swapping. */
|
||||
#define MCD_BYTE_REVERSE 0x00076540 /* to reverse the bytes of each u32 of the DMAed data. */
|
||||
#define MCD_BYTE_REVERSE 0x00076540 /* to reverse the bytes of each uint32_t of the DMAed data. */
|
||||
#define MCD_U16_REVERSE 0x00067450 /* to reverse the 16-bit halves of
|
||||
each 32-bit data value being DMAed.*/
|
||||
#define MCD_U16_BYTE_REVERSE 0x00054760 /* to reverse the byte halves of each
|
||||
@@ -232,44 +228,44 @@ typedef volatile struct dmaRegs_s dmaRegs;
|
||||
|
||||
/* Task Table Entry struct*/
|
||||
typedef struct {
|
||||
u32 TDTstart; /* task descriptor table start */
|
||||
u32 TDTend; /* task descriptor table end */
|
||||
u32 varTab; /* variable table start */
|
||||
u32 FDTandFlags; /* function descriptor table start and flags */
|
||||
volatile u32 descAddrAndStatus;
|
||||
volatile u32 modifiedVarTab;
|
||||
u32 contextSaveSpace; /* context save space start */
|
||||
u32 literalBases;
|
||||
uint32_t TDTstart; /* task descriptor table start */
|
||||
uint32_t TDTend; /* task descriptor table end */
|
||||
uint32_t varTab; /* variable table start */
|
||||
uint32_t FDTandFlags; /* function descriptor table start and flags */
|
||||
volatile uint32_t descAddrAndStatus;
|
||||
volatile uint32_t modifiedVarTab;
|
||||
uint32_t contextSaveSpace; /* context save space start */
|
||||
uint32_t literalBases;
|
||||
} TaskTableEntry;
|
||||
|
||||
|
||||
/* Chained buffer descriptor */
|
||||
typedef volatile struct MCD_bufDesc_struct MCD_bufDesc;
|
||||
struct MCD_bufDesc_struct {
|
||||
u32 flags; /* flags describing the DMA */
|
||||
u32 csumResult; /* checksum from checksumming performed since last checksum reset */
|
||||
s8 *srcAddr; /* the address to move data from */
|
||||
s8 *destAddr; /* the address to move data to */
|
||||
s8 *lastDestAddr; /* the last address written to */
|
||||
u32 dmaSize; /* the number of bytes to transfer independent of the transfer size */
|
||||
uint32_t flags; /* flags describing the DMA */
|
||||
uint32_t csumResult; /* checksum from checksumming performed since last checksum reset */
|
||||
int8_t *srcAddr; /* the address to move data from */
|
||||
int8_t *destAddr; /* the address to move data to */
|
||||
int8_t *lastDestAddr; /* the last address written to */
|
||||
uint32_t dmaSize; /* the number of bytes to transfer independent of the transfer size */
|
||||
MCD_bufDesc *next; /* next buffer descriptor in chain */
|
||||
u32 info; /* private information about this descriptor; DMA does not affect it */
|
||||
uint32_t info; /* private information about this descriptor; DMA does not affect it */
|
||||
};
|
||||
|
||||
/* Progress Query struct */
|
||||
typedef volatile struct MCD_XferProg_struct {
|
||||
s8 *lastSrcAddr; /* the most-recent or last, post-increment source address */
|
||||
s8 *lastDestAddr; /* the most-recent or last, post-increment destination address */
|
||||
u32 dmaSize; /* the amount of data transferred for the current buffer */
|
||||
int8_t *lastSrcAddr; /* the most-recent or last, post-increment source address */
|
||||
int8_t *lastDestAddr; /* the most-recent or last, post-increment destination address */
|
||||
uint32_t dmaSize; /* the amount of data transferred for the current buffer */
|
||||
MCD_bufDesc *currBufDesc;/* pointer to the current buffer descriptor being DMAed */
|
||||
} MCD_XferProg;
|
||||
|
||||
|
||||
/* FEC buffer descriptor */
|
||||
typedef volatile struct MCD_bufDescFec_struct {
|
||||
u16 statCtrl;
|
||||
u16 length;
|
||||
u32 dataPointer;
|
||||
uint16_t statCtrl;
|
||||
uint16_t length;
|
||||
uint32_t dataPointer;
|
||||
} MCD_bufDescFec;
|
||||
|
||||
|
||||
@@ -283,16 +279,16 @@ typedef volatile struct MCD_bufDescFec_struct {
|
||||
*/
|
||||
int MCD_startDma (
|
||||
int channel, /* the channel on which to run the DMA */
|
||||
s8 *srcAddr, /* the address to move data from, or buffer-descriptor address */
|
||||
s16 srcIncr, /* the amount to increment the source address per transfer */
|
||||
s8 *destAddr, /* the address to move data to */
|
||||
s16 destIncr, /* the amount to increment the destination address per transfer */
|
||||
u32 dmaSize, /* the number of bytes to transfer independent of the transfer size */
|
||||
u32 xferSize, /* the number bytes in of each data movement (1, 2, or 4) */
|
||||
u32 initiator, /* what device initiates the DMA */
|
||||
int8_t *srcAddr, /* the address to move data from, or buffer-descriptor address */
|
||||
int16_t srcIncr, /* the amount to increment the source address per transfer */
|
||||
int8_t *destAddr, /* the address to move data to */
|
||||
int16_t destIncr, /* the amount to increment the destination address per transfer */
|
||||
uint32_t dmaSize, /* the number of bytes to transfer independent of the transfer size */
|
||||
uint32_t xferSize, /* the number bytes in of each data movement (1, 2, or 4) */
|
||||
uint32_t initiator, /* what device initiates the DMA */
|
||||
int priority, /* priority of the DMA */
|
||||
u32 flags, /* flags describing the DMA */
|
||||
u32 funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
uint32_t flags, /* flags describing the DMA */
|
||||
uint32_t funcDesc /* a description of byte swapping, bit swapping, and CRC actions */
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -300,7 +296,7 @@ int MCD_startDma (
|
||||
* registers, relocating and creating the appropriate task structures, and
|
||||
* setting up some global settings
|
||||
*/
|
||||
int MCD_initDma (dmaRegs *sDmaBarAddr, void *taskTableDest, u32 flags);
|
||||
int MCD_initDma (dmaRegs *sDmaBarAddr, void *taskTableDest, uint32_t flags);
|
||||
|
||||
/*
|
||||
* MCD_dmaStatus() returns the status of the DMA on the requested channel.
|
||||
@@ -339,7 +335,7 @@ int MCD_resumeDma (int channel);
|
||||
/*
|
||||
* MCD_csumQuery provides the checksum/CRC after performing a non-chained DMA
|
||||
*/
|
||||
int MCD_csumQuery (int channel, u32 *csum);
|
||||
int MCD_csumQuery (int channel, uint32_t *csum);
|
||||
|
||||
/*
|
||||
* MCD_getCodeSize provides the packed size required by the microcoded task
|
||||
@@ -354,7 +350,7 @@ int MCD_getCodeSize(void);
|
||||
int MCD_getVersion(char **longVersion);
|
||||
|
||||
/* macro for setting a location in the variable table */
|
||||
#define MCD_SET_VAR(taskTab,idx,value) ((u32 *)(taskTab)->varTab)[idx] = value
|
||||
#define MCD_SET_VAR(taskTab,idx,value) ((uint32_t *)(taskTab)->varTab)[idx] = value
|
||||
/* Note that MCD_SET_VAR() is invoked many times in firing up a DMA function,
|
||||
so I'm avoiding surrounding it with "do {} while(0)" */
|
||||
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#ifndef MCD_TSK_INIT_H
|
||||
#define MCD_TSK_INIT_H 1
|
||||
|
||||
/*
|
||||
* Do not edit!
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Task 0
|
||||
*/
|
||||
void MCD_startDmaChainNoEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 1
|
||||
*/
|
||||
void MCD_startDmaSingleNoEu(int8_t *srcAddr, short srcIncr, int8_t *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 2
|
||||
*/
|
||||
void MCD_startDmaChainEu(int *currBD, short srcIncr, short destIncr, int xferSize, short xferSizeIncr, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 3
|
||||
*/
|
||||
void MCD_startDmaSingleEu(int8_t *srcAddr, short srcIncr, int8_t *destAddr, short destIncr, int dmaSize, short xferSizeIncr, int flags, int *currBD, int *cSave, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 4
|
||||
*/
|
||||
void MCD_startDmaENetRcv(int8_t *bDBase, int8_t *currBD, int8_t *rcvFifoPtr, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
|
||||
/*
|
||||
* Task 5
|
||||
*/
|
||||
void MCD_startDmaENetXmit(int8_t *bDBase, int8_t *currBD, int8_t *xmitFifoPtr, volatile TaskTableEntry *taskTable, int channel);
|
||||
|
||||
#endif /* MCD_TSK_INIT_H */
|
||||
@@ -129,22 +129,54 @@
|
||||
#define MCF_DMA_PRIOR_HLD (0x80)
|
||||
|
||||
/* Bit definitions and macros for MCF_DMA_IMCR */
|
||||
#define MCF_DMA_IMCR_IMC0(x) (((x)&0x3)<<0)
|
||||
#define MCF_DMA_IMCR_IMC1(x) (((x)&0x3)<<0x2)
|
||||
#define MCF_DMA_IMCR_IMC2(x) (((x)&0x3)<<0x4)
|
||||
#define MCF_DMA_IMCR_IMC3(x) (((x)&0x3)<<0x6)
|
||||
#define MCF_DMA_IMCR_IMC4(x) (((x)&0x3)<<0x8)
|
||||
#define MCF_DMA_IMCR_IMC5(x) (((x)&0x3)<<0xA)
|
||||
#define MCF_DMA_IMCR_IMC6(x) (((x)&0x3)<<0xC)
|
||||
#define MCF_DMA_IMCR_IMC7(x) (((x)&0x3)<<0xE)
|
||||
#define MCF_DMA_IMCR_IMC8(x) (((x)&0x3)<<0x10)
|
||||
#define MCF_DMA_IMCR_IMC9(x) (((x)&0x3)<<0x12)
|
||||
#define MCF_DMA_IMCR_IMC10(x) (((x)&0x3)<<0x14)
|
||||
#define MCF_DMA_IMCR_IMC11(x) (((x)&0x3)<<0x16)
|
||||
#define MCF_DMA_IMCR_IMC12(x) (((x)&0x3)<<0x18)
|
||||
#define MCF_DMA_IMCR_IMC13(x) (((x)&0x3)<<0x1A)
|
||||
#define MCF_DMA_IMCR_IMC14(x) (((x)&0x3)<<0x1C)
|
||||
#define MCF_DMA_IMCR_IMC15(x) (((x)&0x3)<<0x1E)
|
||||
#define MCF_DMA_IMCR_IMC16(x) (((x)&0x3)<<0)
|
||||
#define MCF_DMA_IMCR_IMC17(x) (((x)&0x3)<<0x2)
|
||||
#define MCF_DMA_IMCR_IMC18(x) (((x)&0x3)<<0x4)
|
||||
#define MCF_DMA_IMCR_IMC19(x) (((x)&0x3)<<0x6)
|
||||
#define MCF_DMA_IMCR_IMC20(x) (((x)&0x3)<<0x8)
|
||||
#define MCF_DMA_IMCR_IMC21(x) (((x)&0x3)<<0xA)
|
||||
#define MCF_DMA_IMCR_IMC22(x) (((x)&0x3)<<0xC)
|
||||
#define MCF_DMA_IMCR_IMC23(x) (((x)&0x3)<<0xE)
|
||||
#define MCF_DMA_IMCR_IMC24(x) (((x)&0x3)<<0x10)
|
||||
#define MCF_DMA_IMCR_IMC25(x) (((x)&0x3)<<0x12)
|
||||
#define MCF_DMA_IMCR_IMC26(x) (((x)&0x3)<<0x14)
|
||||
#define MCF_DMA_IMCR_IMC27(x) (((x)&0x3)<<0x16)
|
||||
#define MCF_DMA_IMCR_IMC28(x) (((x)&0x3)<<0x18)
|
||||
#define MCF_DMA_IMCR_IMC29(x) (((x)&0x3)<<0x1A)
|
||||
#define MCF_DMA_IMCR_IMC30(x) (((x)&0x3)<<0x1C)
|
||||
#define MCF_DMA_IMCR_IMC31(x) (((x)&0x3)<<0x1E)
|
||||
|
||||
|
||||
#define MCF_DMA_IMCR_IMC16_FEC0RX (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC17_FEC0TX (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC18_FEC0RX (0x00000020)
|
||||
#define MCF_DMA_IMCR_IMC19_FEC0TX (0x00000080)
|
||||
#define MCF_DMA_IMCR_IMC20_FEC1RX (0x00000100)
|
||||
#define MCF_DMA_IMCR_IMC21_DREQ1 (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC21_FEC1TX (0x00000400)
|
||||
#define MCF_DMA_IMCR_IMC22_FEC0RX (0x00001000)
|
||||
#define MCF_DMA_IMCR_IMC23_FEC0TX (0x00004000)
|
||||
#define MCF_DMA_IMCR_IMC24_CTM0 (0x00010000)
|
||||
#define MCF_DMA_IMCR_IMC24_FEC1RX (0x00020000)
|
||||
#define MCF_DMA_IMCR_IMC25_CTM1 (0x00040000)
|
||||
#define MCF_DMA_IMCR_IMC25_FEC1TX (0x00080000)
|
||||
#define MCF_DMA_IMCR_IMC26_USBEP4 (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC26_CTM2 (0x00200000)
|
||||
#define MCF_DMA_IMCR_IMC27_USBEP5 (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC27_CTM3 (0x00800000)
|
||||
#define MCF_DMA_IMCR_IMC28_USBEP6 (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC28_CTM4 (0x01000000)
|
||||
#define MCF_DMA_IMCR_IMC28_DREQ1 (0x02000000)
|
||||
#define MCF_DMA_IMCR_IMC28_PSC2RX (0x03000000)
|
||||
#define MCF_DMA_IMCR_IMC29_DREQ1 (0x04000000)
|
||||
#define MCF_DMA_IMCR_IMC29_CTM5 (0x08000000)
|
||||
#define MCF_DMA_IMCR_IMC29_PSC2TX (0x0C000000)
|
||||
#define MCF_DMA_IMCR_IMC30_FEC1RX (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC30_CTM6 (0x10000000)
|
||||
#define MCF_DMA_IMCR_IMC30_PSC3RX (0x30000000)
|
||||
#define MCF_DMA_IMCR_IMC31_FEC1TX (0x00000000)
|
||||
#define MCF_DMA_IMCR_IMC31_CTM7 (0x80000000)
|
||||
#define MCF_DMA_IMCR_IMC31_PSC3TX (0xC0000000)
|
||||
|
||||
/* Bit definitions and macros for MCF_DMA_TSKSZ0 */
|
||||
#define MCF_DMA_TSKSZ0_DSTSZ7(x) (((x)&0x3)<<0)
|
||||
@@ -1,79 +1,79 @@
|
||||
/* Coldfire C Header File
|
||||
* Copyright Freescale Semiconductor Inc
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2008/05/23 Revision: 0.81
|
||||
*
|
||||
* (c) Copyright UNIS, a.s. 1997-2008
|
||||
* UNIS, a.s.
|
||||
* Jundrovska 33
|
||||
* 624 00 Brno
|
||||
* Czech Republic
|
||||
* http : www.processorexpert.com
|
||||
* mail : info@processorexpert.com
|
||||
*/
|
||||
|
||||
#ifndef __MCF5475_MMU_H__
|
||||
#define __MCF5475_MMU_H__
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Memory Management Unit (MMU)
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
/* Register read/write macros */
|
||||
|
||||
/* note the uint32_t_a - this is to avoid gcc warnings about pointer aliasing */
|
||||
#define MCF_MMU_MMUCR (*(volatile uint32_t_a*)(&_MMUBAR[0]))
|
||||
#define MCF_MMU_MMUOR (*(volatile uint32_t*)(&_MMUBAR[0x4]))
|
||||
#define MCF_MMU_MMUSR (*(volatile uint32_t*)(&_MMUBAR[0x8]))
|
||||
#define MCF_MMU_MMUAR (*(volatile uint32_t*)(&_MMUBAR[0x10]))
|
||||
#define MCF_MMU_MMUTR (*(volatile uint32_t*)(&_MMUBAR[0x14]))
|
||||
#define MCF_MMU_MMUDR (*(volatile uint32_t*)(&_MMUBAR[0x18]))
|
||||
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUCR */
|
||||
#define MCF_MMU_MMUCR_EN (0x1)
|
||||
#define MCF_MMU_MMUCR_ASM (0x2)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUOR */
|
||||
#define MCF_MMU_MMUOR_UAA (0x1)
|
||||
#define MCF_MMU_MMUOR_ACC (0x2)
|
||||
#define MCF_MMU_MMUOR_RW (0x4)
|
||||
#define MCF_MMU_MMUOR_ADR (0x8)
|
||||
#define MCF_MMU_MMUOR_ITLB (0x10)
|
||||
#define MCF_MMU_MMUOR_CAS (0x20)
|
||||
#define MCF_MMU_MMUOR_CNL (0x40)
|
||||
#define MCF_MMU_MMUOR_CA (0x80)
|
||||
#define MCF_MMU_MMUOR_STLB (0x100)
|
||||
#define MCF_MMU_MMUOR_AA(x) (((x)&0xFFFF)<<0x10)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUSR */
|
||||
#define MCF_MMU_MMUSR_HIT (0x2)
|
||||
#define MCF_MMU_MMUSR_WF (0x8)
|
||||
#define MCF_MMU_MMUSR_RF (0x10)
|
||||
#define MCF_MMU_MMUSR_SPF (0x20)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUAR */
|
||||
#define MCF_MMU_MMUAR_FA(x) (((x)&0xFFFFFFFF)<<0)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUTR */
|
||||
#define MCF_MMU_MMUTR_V (0x1)
|
||||
#define MCF_MMU_MMUTR_SG (0x2)
|
||||
#define MCF_MMU_MMUTR_ID(x) (((x)&0xFF)<<0x2)
|
||||
#define MCF_MMU_MMUTR_VA(x) (((x)&0x3FFFFF)<<0xA)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUDR */
|
||||
#define MCF_MMU_MMUDR_LK (0x2)
|
||||
#define MCF_MMU_MMUDR_X (0x4)
|
||||
#define MCF_MMU_MMUDR_W (0x8)
|
||||
#define MCF_MMU_MMUDR_R (0x10)
|
||||
#define MCF_MMU_MMUDR_SP (0x20)
|
||||
#define MCF_MMU_MMUDR_CM(x) (((x)&0x3)<<0x6)
|
||||
#define MCF_MMU_MMUDR_SZ(x) (((x)&0x3)<<0x8)
|
||||
#define MCF_MMU_MMUDR_PA(x) (((x)&0x3FFFFF)<<0xA)
|
||||
|
||||
|
||||
#endif /* __MCF5475_MMU_H__ */
|
||||
/* Coldfire C Header File
|
||||
* Copyright Freescale Semiconductor Inc
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2008/05/23 Revision: 0.81
|
||||
*
|
||||
* (c) Copyright UNIS, a.s. 1997-2008
|
||||
* UNIS, a.s.
|
||||
* Jundrovska 33
|
||||
* 624 00 Brno
|
||||
* Czech Republic
|
||||
* http : www.processorexpert.com
|
||||
* mail : info@processorexpert.com
|
||||
*/
|
||||
|
||||
#ifndef __MCF5475_MMU_H__
|
||||
#define __MCF5475_MMU_H__
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Memory Management Unit (MMU)
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
/* Register read/write macros */
|
||||
|
||||
/* note the uint32_t_a - this is to avoid gcc warnings about pointer aliasing */
|
||||
#define MCF_MMU_MMUCR (*(volatile uint32_t_a*)(&_MMUBAR[0]))
|
||||
#define MCF_MMU_MMUOR (*(volatile uint32_t_a*)(&_MMUBAR[0x4]))
|
||||
#define MCF_MMU_MMUSR (*(volatile uint32_t_a*)(&_MMUBAR[0x8]))
|
||||
#define MCF_MMU_MMUAR (*(volatile uint32_t_a*)(&_MMUBAR[0x10]))
|
||||
#define MCF_MMU_MMUTR (*(volatile uint32_t_a*)(&_MMUBAR[0x14]))
|
||||
#define MCF_MMU_MMUDR (*(volatile uint32_t_a*)(&_MMUBAR[0x18]))
|
||||
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUCR */
|
||||
#define MCF_MMU_MMUCR_EN (0x1)
|
||||
#define MCF_MMU_MMUCR_ASM (0x2)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUOR */
|
||||
#define MCF_MMU_MMUOR_UAA (0x1)
|
||||
#define MCF_MMU_MMUOR_ACC (0x2)
|
||||
#define MCF_MMU_MMUOR_RW (0x4)
|
||||
#define MCF_MMU_MMUOR_ADR (0x8)
|
||||
#define MCF_MMU_MMUOR_ITLB (0x10)
|
||||
#define MCF_MMU_MMUOR_CAS (0x20)
|
||||
#define MCF_MMU_MMUOR_CNL (0x40)
|
||||
#define MCF_MMU_MMUOR_CA (0x80)
|
||||
#define MCF_MMU_MMUOR_STLB (0x100)
|
||||
#define MCF_MMU_MMUOR_AA(x) (((x)&0xFFFF)<<0x10)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUSR */
|
||||
#define MCF_MMU_MMUSR_HIT (0x2)
|
||||
#define MCF_MMU_MMUSR_WF (0x8)
|
||||
#define MCF_MMU_MMUSR_RF (0x10)
|
||||
#define MCF_MMU_MMUSR_SPF (0x20)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUAR */
|
||||
#define MCF_MMU_MMUAR_FA(x) (((x)&0xFFFFFFFF)<<0)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUTR */
|
||||
#define MCF_MMU_MMUTR_V (0x1)
|
||||
#define MCF_MMU_MMUTR_SG (0x2)
|
||||
#define MCF_MMU_MMUTR_ID(x) (((x)&0xFF)<<0x2)
|
||||
#define MCF_MMU_MMUTR_VA(x) (((x)&0x3FFFFF)<<0xA)
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUDR */
|
||||
#define MCF_MMU_MMUDR_LK (0x2)
|
||||
#define MCF_MMU_MMUDR_X (0x4)
|
||||
#define MCF_MMU_MMUDR_W (0x8)
|
||||
#define MCF_MMU_MMUDR_R (0x10)
|
||||
#define MCF_MMU_MMUDR_SP (0x20)
|
||||
#define MCF_MMU_MMUDR_CM(x) (((x)&0x3)<<0x6)
|
||||
#define MCF_MMU_MMUDR_SZ(x) (((x)&0x3)<<0x8)
|
||||
#define MCF_MMU_MMUDR_PA(x) (((x)&0x3FFFFF)<<0xA)
|
||||
|
||||
|
||||
#endif /* __MCF5475_MMU_H__ */
|
||||
@@ -24,17 +24,17 @@
|
||||
*********************************************************************/
|
||||
|
||||
/* Register read/write macros */
|
||||
#define MCF_XLB_XARB_CFG (*(volatile uint32_t*)(&__MBAR[0x240]))
|
||||
#define MCF_XLB_XARB_VER (*(volatile uint32_t*)(&__MBAR[0x244]))
|
||||
#define MCF_XLB_XARB_SR (*(volatile uint32_t*)(&__MBAR[0x248]))
|
||||
#define MCF_XLB_XARB_IMR (*(volatile uint32_t*)(&__MBAR[0x24C]))
|
||||
#define MCF_XLB_XARB_ADRCAP (*(volatile uint32_t*)(&__MBAR[0x250]))
|
||||
#define MCF_XLB_XARB_SIGCAP (*(volatile uint32_t*)(&__MBAR[0x254]))
|
||||
#define MCF_XLB_XARB_ADRTO (*(volatile uint32_t*)(&__MBAR[0x258]))
|
||||
#define MCF_XLB_XARB_DATTO (*(volatile uint32_t*)(&__MBAR[0x25C]))
|
||||
#define MCF_XLB_XARB_BUSTO (*(volatile uint32_t*)(&__MBAR[0x260]))
|
||||
#define MCF_XLB_XARB_PRIEN (*(volatile uint32_t*)(&__MBAR[0x264]))
|
||||
#define MCF_XLB_XARB_PRI (*(volatile uint32_t*)(&__MBAR[0x268]))
|
||||
#define MCF_XLB_XARB_CFG (*(volatile uint32_t*)(&_MBAR[0x240]))
|
||||
#define MCF_XLB_XARB_VER (*(volatile uint32_t*)(&_MBAR[0x244]))
|
||||
#define MCF_XLB_XARB_SR (*(volatile uint32_t*)(&_MBAR[0x248]))
|
||||
#define MCF_XLB_XARB_IMR (*(volatile uint32_t*)(&_MBAR[0x24C]))
|
||||
#define MCF_XLB_XARB_ADRCAP (*(volatile uint32_t*)(&_MBAR[0x250]))
|
||||
#define MCF_XLB_XARB_SIGCAP (*(volatile uint32_t*)(&_MBAR[0x254]))
|
||||
#define MCF_XLB_XARB_ADRTO (*(volatile uint32_t*)(&_MBAR[0x258]))
|
||||
#define MCF_XLB_XARB_DATTO (*(volatile uint32_t*)(&_MBAR[0x25C]))
|
||||
#define MCF_XLB_XARB_BUSTO (*(volatile uint32_t*)(&_MBAR[0x260]))
|
||||
#define MCF_XLB_XARB_PRIEN (*(volatile uint32_t*)(&_MBAR[0x264]))
|
||||
#define MCF_XLB_XARB_PRI (*(volatile uint32_t*)(&_MBAR[0x268]))
|
||||
|
||||
|
||||
/* Bit definitions and macros for MCF_XLB_XARB_CFG */
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef _ACIA_H_
|
||||
#define _ACIA_H_
|
||||
|
||||
/*
|
||||
* ACIA registers
|
||||
*/
|
||||
#define keyctl 0xfffc00
|
||||
#define keybd 0xfffc02
|
||||
#define midictl 0xfffc04
|
||||
#define midi 0xfffc06
|
||||
|
||||
#endif /* _ACIA_H_ */
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* File: am79c874.h
|
||||
* Purpose: Driver for the AM79C874 10/100 Ethernet PHY
|
||||
*
|
||||
* Notes:
|
||||
*/
|
||||
|
||||
#ifndef _AM79C874_H_
|
||||
#define _AM79C874_H_
|
||||
|
||||
|
||||
extern int am79c874_init(uint8_t fec_ch, uint8_t phy_addr, uint8_t speed, uint8_t duplex);
|
||||
|
||||
|
||||
/* MII Register Addresses */
|
||||
#define MII_AM79C874_CR 0 /* MII Management Control Register */
|
||||
#define MII_AM79C874_SR 1 /* MII Management Status Register */
|
||||
#define MII_AM79C874_PHYIDR1 2 /* PHY Identifier 1 Register */
|
||||
#define MII_AM79C874_PHYIDR2 3 /* PHY Identifier 2 Register */
|
||||
#define MII_AM79C874_ANAR 4 /* Auto-Negociation Advertissement Register */
|
||||
#define MII_AM79C874_ANLPAR 5 /* Auto-Negociation Link Partner Register */
|
||||
#define MII_AM79C874_ANER 6 /* Auto-Negociation Expansion Register */
|
||||
#define MII_AM79C874_ANNPTR 7 /* Next Page Advertisement Register */
|
||||
#define MII_AM79C874_MFR 16 /* Miscellaneous Feature Register */
|
||||
#define MII_AM79C874_ICSR 17 /* Interrupt/Status Register */
|
||||
#define MII_AM79C874_DR 18 /* Diagnostic Register */
|
||||
#define MII_AM79C874_PMLR 19 /* Power and Loopback Register */
|
||||
#define MII_AM79C874_MCR 21 /* ModeControl Register */
|
||||
#define MII_AM79C874_DC 23 /* Disconnect Counter */
|
||||
#define MII_AM79C874_REC 24 /* Recieve Error Counter */
|
||||
|
||||
/* Bit definitions and macros for MII_AM79C874_CR */
|
||||
#define MII_AM79C874_CR_RESET (0x8000)
|
||||
#define MII_AM79C874_CR_LOOP (0x4000)
|
||||
#define MII_AM79C874_CR_100MB (0x2000)
|
||||
#define MII_AM79C874_CR_AUTON (0x1000)
|
||||
#define MII_AM79C874_CR_POWD (0x0800)
|
||||
#define MII_AM79C874_CR_ISO (0x0400)
|
||||
#define MII_AM79C874_CR_RST_NEG (0x0200)
|
||||
#define MII_AM79C874_CR_DPLX (0x0100)
|
||||
#define MII_AM79C874_CR_COL_TST (0x0080)
|
||||
#define MII_AM79C874_CR_SPEED_MASK (0x2040)
|
||||
#define MII_AM79C874_CR_1000_MPS (0x0040)
|
||||
#define MII_AM79C874_CR_100_MPS (0x2000)
|
||||
#define MII_AM79C874_CR_10_MPS (0x0000)
|
||||
|
||||
/* Bit definitions and macros for MII_AM79C874_SR */
|
||||
#define MII_AM79C874_SR_100T4 (0x8000)
|
||||
#define MII_AM79C874_SR_100TXF (0x4000)
|
||||
#define MII_AM79C874_SR_100TXH (0x2000)
|
||||
#define MII_AM79C874_SR_10TF (0x1000)
|
||||
#define MII_AM79C874_SR_10TH (0x0800)
|
||||
#define MII_AM79C874_SR_PRE_SUP (0x0040)
|
||||
#define MII_AM79C874_SR_AUTN_COMP (0x0020)
|
||||
#define MII_AM79C874_SR_RF (0x0010)
|
||||
#define MII_AM79C874_SR_AUTN_ABLE (0x0008)
|
||||
#define MII_AM79C874_SR_LS (0x0004)
|
||||
#define MII_AM79C874_SR_JD (0x0002)
|
||||
#define MII_AM79C874_SR_EXT (0x0001)
|
||||
|
||||
/* Bit definitions and macros for MII_AM79C874_ANLPAR */
|
||||
#define MII_AM79C874_ANLPAR_NP (0x8000)
|
||||
#define MII_AM79C874_ANLPAR_ACK (0x4000)
|
||||
#define MII_AM79C874_ANLPAR_RF (0x2000)
|
||||
#define MII_AM79C874_ANLPAR_T4 (0x0200)
|
||||
#define MII_AM79C874_ANLPAR_TXFD (0x0100)
|
||||
#define MII_AM79C874_ANLPAR_TX (0x0080)
|
||||
#define MII_AM79C874_ANLPAR_10FD (0x0040)
|
||||
#define MII_AM79C874_ANLPAR_10 (0x0020)
|
||||
#define MII_AM79C874_ANLPAR_100 (0x0380)
|
||||
#define MII_AM79C874_ANLPAR_PSB_MASK (0x001F)
|
||||
#define MII_AM79C874_ANLPAR_PSB_802_3 (0x0001)
|
||||
#define MII_AM79C874_ANLPAR_PSB_802_9 (0x0002)
|
||||
|
||||
/* Bit definitions and macros for MII_AM79C874_DR */
|
||||
#define MII_AM79C874_DR_DPLX (0x0800)
|
||||
#define MII_AM79C874_DR_DATA_RATE (0x0400)
|
||||
#define MII_AM79C874_DR_RX_PASS (0x0200)
|
||||
#define MII_AM79C874_DR_RX_LOCK (0x0100)
|
||||
|
||||
#define AUTONEGLINK (MII_AM79C874_SR_AUTN_COMP | MII_AM79C874_SR_LS)
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
#endif /* _AM79C874_H_ */
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* File: arp.h
|
||||
* Purpose: ARP definitions.
|
||||
*
|
||||
* Notes:
|
||||
*/
|
||||
|
||||
#ifndef _ARP_H
|
||||
#define _ARP_H
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
/*
|
||||
* This data definition is defined for Ethernet only!
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint16_t ar_hrd;
|
||||
uint16_t ar_pro;
|
||||
uint8_t ar_hln;
|
||||
uint8_t ar_pln;
|
||||
uint16_t opcode;
|
||||
uint8_t ar_sha[6]; /* ethernet hw address */
|
||||
uint8_t ar_spa[4]; /* ip address */
|
||||
uint8_t ar_tha[6]; /* ethernet hw address */
|
||||
uint8_t ar_tpa[4]; /* ip address */
|
||||
} arp_frame_hdr;
|
||||
|
||||
#define ARP_HDR_LEN sizeof(arp_frame_hdr)
|
||||
|
||||
/*
|
||||
* ARP table entry definition. Note that this table only designed
|
||||
* with Ethernet and IP in mind.
|
||||
*/
|
||||
#define MAX_HWA_SIZE (6) /* 6 is enough for Ethernet address */
|
||||
#define MAX_PA_SIZE (4) /* 4 is enough for Protocol address */
|
||||
typedef struct
|
||||
{
|
||||
uint16_t protocol;
|
||||
uint8_t hwa_size;
|
||||
uint8_t hwa[MAX_HWA_SIZE];
|
||||
uint8_t pa_size;
|
||||
uint8_t pa[MAX_PA_SIZE];
|
||||
int longevity;
|
||||
} ARPENTRY;
|
||||
#define MAX_ARP_ENTRY (10)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int tab_size;
|
||||
ARPENTRY table[MAX_ARP_ENTRY];
|
||||
} ARP_INFO;
|
||||
|
||||
#define ARP_ENTRY_EMPTY (0)
|
||||
#define ARP_ENTRY_PERM (1)
|
||||
#define ARP_ENTRY_TEMP (2)
|
||||
|
||||
|
||||
#define ETHERNET (1)
|
||||
#define ARP_REQUEST (1)
|
||||
#define ARP_REPLY (2)
|
||||
|
||||
#define ARP_TIMEOUT (1) /* Timeout in seconds */
|
||||
|
||||
/* Protocol Header information */
|
||||
#define ARP_HDR_OFFSET ETH_HDR_LEN
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
uint8_t *
|
||||
arp_get_mypa (void);
|
||||
|
||||
uint8_t *
|
||||
arp_get_myha (void);
|
||||
|
||||
uint8_t *
|
||||
arp_get_broadcast (void);
|
||||
|
||||
void
|
||||
arp_merge (ARP_INFO *, uint16_t, int, uint8_t *, int, uint8_t *, int);
|
||||
|
||||
void
|
||||
arp_remove (ARP_INFO *, uint16_t, uint8_t *, uint8_t *);
|
||||
|
||||
void
|
||||
arp_request (NIF *, uint8_t *);
|
||||
|
||||
void
|
||||
arp_handler (NIF *, NBUF *);
|
||||
|
||||
uint8_t *
|
||||
arp_resolve (NIF *, uint16_t, uint8_t *);
|
||||
|
||||
void
|
||||
arp_init (ARP_INFO *);
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
#endif /* _ARP_H */
|
||||
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* ATI PCI IDs from XFree86, kept here to make sync'ing with
|
||||
* XFree much simpler. Currently, this list is only used by
|
||||
* radeonfb
|
||||
*/
|
||||
|
||||
#define PCI_CHIP_RV380_3150 0x3150
|
||||
#define PCI_CHIP_RV380_3151 0x3151
|
||||
#define PCI_CHIP_RV380_3152 0x3152
|
||||
#define PCI_CHIP_RV380_3153 0x3153
|
||||
#define PCI_CHIP_RV380_3154 0x3154
|
||||
#define PCI_CHIP_RV380_3156 0x3156
|
||||
#define PCI_CHIP_RV380_3E50 0x3E50
|
||||
#define PCI_CHIP_RV380_3E51 0x3E51
|
||||
#define PCI_CHIP_RV380_3E52 0x3E52
|
||||
#define PCI_CHIP_RV380_3E53 0x3E53
|
||||
#define PCI_CHIP_RV380_3E54 0x3E54
|
||||
#define PCI_CHIP_RV380_3E56 0x3E56
|
||||
#define PCI_CHIP_RS100_4136 0x4136
|
||||
#define PCI_CHIP_RS200_4137 0x4137
|
||||
#define PCI_CHIP_R300_AD 0x4144
|
||||
#define PCI_CHIP_R300_AE 0x4145
|
||||
#define PCI_CHIP_R300_AF 0x4146
|
||||
#define PCI_CHIP_R300_AG 0x4147
|
||||
#define PCI_CHIP_R350_AH 0x4148
|
||||
#define PCI_CHIP_R350_AI 0x4149
|
||||
#define PCI_CHIP_R350_AJ 0x414A
|
||||
#define PCI_CHIP_R350_AK 0x414B
|
||||
#define PCI_CHIP_RV350_AP 0x4150
|
||||
#define PCI_CHIP_RV350_AQ 0x4151
|
||||
#define PCI_CHIP_RV360_AR 0x4152
|
||||
#define PCI_CHIP_RV350_AS 0x4153
|
||||
#define PCI_CHIP_RV350_AT 0x4154
|
||||
#define PCI_CHIP_RV350_AV 0x4156
|
||||
#define PCI_CHIP_MACH32 0x4158
|
||||
#define PCI_CHIP_RS250_4237 0x4237
|
||||
#define PCI_CHIP_R200_BB 0x4242
|
||||
#define PCI_CHIP_R200_BC 0x4243
|
||||
#define PCI_CHIP_RS100_4336 0x4336
|
||||
#define PCI_CHIP_RS200_4337 0x4337
|
||||
#define PCI_CHIP_MACH64CT 0x4354
|
||||
#define PCI_CHIP_MACH64CX 0x4358
|
||||
#define PCI_CHIP_RS250_4437 0x4437
|
||||
#define PCI_CHIP_MACH64ET 0x4554
|
||||
#define PCI_CHIP_MACH64GB 0x4742
|
||||
#define PCI_CHIP_MACH64GD 0x4744
|
||||
#define PCI_CHIP_MACH64GI 0x4749
|
||||
#define PCI_CHIP_MACH64GL 0x474C
|
||||
#define PCI_CHIP_MACH64GM 0x474D
|
||||
#define PCI_CHIP_MACH64GN 0x474E
|
||||
#define PCI_CHIP_MACH64GO 0x474F
|
||||
#define PCI_CHIP_MACH64GP 0x4750
|
||||
#define PCI_CHIP_MACH64GQ 0x4751
|
||||
#define PCI_CHIP_MACH64GR 0x4752
|
||||
#define PCI_CHIP_MACH64GS 0x4753
|
||||
#define PCI_CHIP_MACH64GT 0x4754
|
||||
#define PCI_CHIP_MACH64GU 0x4755
|
||||
#define PCI_CHIP_MACH64GV 0x4756
|
||||
#define PCI_CHIP_MACH64GW 0x4757
|
||||
#define PCI_CHIP_MACH64GX 0x4758
|
||||
#define PCI_CHIP_MACH64GY 0x4759
|
||||
#define PCI_CHIP_MACH64GZ 0x475A
|
||||
#define PCI_CHIP_RV250_Id 0x4964
|
||||
#define PCI_CHIP_RV250_Ie 0x4965
|
||||
#define PCI_CHIP_RV250_If 0x4966
|
||||
#define PCI_CHIP_RV250_Ig 0x4967
|
||||
#define PCI_CHIP_R420_JH 0x4A48
|
||||
#define PCI_CHIP_R420_JI 0x4A49
|
||||
#define PCI_CHIP_R420_JJ 0x4A4A
|
||||
#define PCI_CHIP_R420_JK 0x4A4B
|
||||
#define PCI_CHIP_R420_JL 0x4A4C
|
||||
#define PCI_CHIP_R420_JM 0x4A4D
|
||||
#define PCI_CHIP_R420_JN 0x4A4E
|
||||
#define PCI_CHIP_R420_JP 0x4A50
|
||||
#define PCI_CHIP_MACH64LB 0x4C42
|
||||
#define PCI_CHIP_MACH64LD 0x4C44
|
||||
#define PCI_CHIP_RAGE128LE 0x4C45
|
||||
#define PCI_CHIP_RAGE128LF 0x4C46
|
||||
#define PCI_CHIP_MACH64LG 0x4C47
|
||||
#define PCI_CHIP_MACH64LI 0x4C49
|
||||
#define PCI_CHIP_MACH64LM 0x4C4D
|
||||
#define PCI_CHIP_MACH64LN 0x4C4E
|
||||
#define PCI_CHIP_MACH64LP 0x4C50
|
||||
#define PCI_CHIP_MACH64LQ 0x4C51
|
||||
#define PCI_CHIP_MACH64LR 0x4C52
|
||||
#define PCI_CHIP_MACH64LS 0x4C53
|
||||
#define PCI_CHIP_MACH64LT 0x4C54
|
||||
#define PCI_CHIP_RADEON_LW 0x4C57
|
||||
#define PCI_CHIP_RADEON_LX 0x4C58
|
||||
#define PCI_CHIP_RADEON_LY 0x4C59
|
||||
#define PCI_CHIP_RADEON_LZ 0x4C5A
|
||||
#define PCI_CHIP_RV250_Ld 0x4C64
|
||||
#define PCI_CHIP_RV250_Le 0x4C65
|
||||
#define PCI_CHIP_RV250_Lf 0x4C66
|
||||
#define PCI_CHIP_RV250_Lg 0x4C67
|
||||
#define PCI_CHIP_RV250_Ln 0x4C6E
|
||||
#define PCI_CHIP_RAGE128MF 0x4D46
|
||||
#define PCI_CHIP_RAGE128ML 0x4D4C
|
||||
#define PCI_CHIP_R300_ND 0x4E44
|
||||
#define PCI_CHIP_R300_NE 0x4E45
|
||||
#define PCI_CHIP_R300_NF 0x4E46
|
||||
#define PCI_CHIP_R300_NG 0x4E47
|
||||
#define PCI_CHIP_R350_NH 0x4E48
|
||||
#define PCI_CHIP_R350_NI 0x4E49
|
||||
#define PCI_CHIP_R360_NJ 0x4E4A
|
||||
#define PCI_CHIP_R350_NK 0x4E4B
|
||||
#define PCI_CHIP_RV350_NP 0x4E50
|
||||
#define PCI_CHIP_RV350_NQ 0x4E51
|
||||
#define PCI_CHIP_RV350_NR 0x4E52
|
||||
#define PCI_CHIP_RV350_NS 0x4E53
|
||||
#define PCI_CHIP_RV350_NT 0x4E54
|
||||
#define PCI_CHIP_RV350_NV 0x4E56
|
||||
#define PCI_CHIP_RAGE128PA 0x5041
|
||||
#define PCI_CHIP_RAGE128PB 0x5042
|
||||
#define PCI_CHIP_RAGE128PC 0x5043
|
||||
#define PCI_CHIP_RAGE128PD 0x5044
|
||||
#define PCI_CHIP_RAGE128PE 0x5045
|
||||
#define PCI_CHIP_RAGE128PF 0x5046
|
||||
#define PCI_CHIP_RAGE128PG 0x5047
|
||||
#define PCI_CHIP_RAGE128PH 0x5048
|
||||
#define PCI_CHIP_RAGE128PI 0x5049
|
||||
#define PCI_CHIP_RAGE128PJ 0x504A
|
||||
#define PCI_CHIP_RAGE128PK 0x504B
|
||||
#define PCI_CHIP_RAGE128PL 0x504C
|
||||
#define PCI_CHIP_RAGE128PM 0x504D
|
||||
#define PCI_CHIP_RAGE128PN 0x504E
|
||||
#define PCI_CHIP_RAGE128PO 0x504F
|
||||
#define PCI_CHIP_RAGE128PP 0x5050
|
||||
#define PCI_CHIP_RAGE128PQ 0x5051
|
||||
#define PCI_CHIP_RAGE128PR 0x5052
|
||||
#define PCI_CHIP_RAGE128PS 0x5053
|
||||
#define PCI_CHIP_RAGE128PT 0x5054
|
||||
#define PCI_CHIP_RAGE128PU 0x5055
|
||||
#define PCI_CHIP_RAGE128PV 0x5056
|
||||
#define PCI_CHIP_RAGE128PW 0x5057
|
||||
#define PCI_CHIP_RAGE128PX 0x5058
|
||||
#define PCI_CHIP_RADEON_QD 0x5144
|
||||
#define PCI_CHIP_RADEON_QE 0x5145
|
||||
#define PCI_CHIP_RADEON_QF 0x5146
|
||||
#define PCI_CHIP_RADEON_QG 0x5147
|
||||
#define PCI_CHIP_R200_QH 0x5148
|
||||
#define PCI_CHIP_R200_QI 0x5149
|
||||
#define PCI_CHIP_R200_QJ 0x514A
|
||||
#define PCI_CHIP_R200_QK 0x514B
|
||||
#define PCI_CHIP_R200_QL 0x514C
|
||||
#define PCI_CHIP_R200_QM 0x514D
|
||||
#define PCI_CHIP_R200_QN 0x514E
|
||||
#define PCI_CHIP_R200_QO 0x514F
|
||||
#define PCI_CHIP_RV200_QW 0x5157
|
||||
#define PCI_CHIP_RV200_QX 0x5158
|
||||
#define PCI_CHIP_RV100_QY 0x5159
|
||||
#define PCI_CHIP_RV100_QZ 0x515A
|
||||
#define PCI_CHIP_RAGE128RE 0x5245
|
||||
#define PCI_CHIP_RAGE128RF 0x5246
|
||||
#define PCI_CHIP_RAGE128RG 0x5247
|
||||
#define PCI_CHIP_RAGE128RK 0x524B
|
||||
#define PCI_CHIP_RAGE128RL 0x524C
|
||||
#define PCI_CHIP_RAGE128SE 0x5345
|
||||
#define PCI_CHIP_RAGE128SF 0x5346
|
||||
#define PCI_CHIP_RAGE128SG 0x5347
|
||||
#define PCI_CHIP_RAGE128SH 0x5348
|
||||
#define PCI_CHIP_RAGE128SK 0x534B
|
||||
#define PCI_CHIP_RAGE128SL 0x534C
|
||||
#define PCI_CHIP_RAGE128SM 0x534D
|
||||
#define PCI_CHIP_RAGE128SN 0x534E
|
||||
#define PCI_CHIP_RAGE128TF 0x5446
|
||||
#define PCI_CHIP_RAGE128TL 0x544C
|
||||
#define PCI_CHIP_RAGE128TR 0x5452
|
||||
#define PCI_CHIP_RAGE128TS 0x5453
|
||||
#define PCI_CHIP_RAGE128TT 0x5454
|
||||
#define PCI_CHIP_RAGE128TU 0x5455
|
||||
#define PCI_CHIP_RV370_5460 0x5460
|
||||
#define PCI_CHIP_RV370_5461 0x5461
|
||||
#define PCI_CHIP_RV370_5462 0x5462
|
||||
#define PCI_CHIP_RV370_5463 0x5463
|
||||
#define PCI_CHIP_RV370_5464 0x5464
|
||||
#define PCI_CHIP_RV370_5465 0x5465
|
||||
#define PCI_CHIP_RV370_5466 0x5466
|
||||
#define PCI_CHIP_RV370_5467 0x5467
|
||||
#define PCI_CHIP_R423_UH 0x5548
|
||||
#define PCI_CHIP_R423_UI 0x5549
|
||||
#define PCI_CHIP_R423_UJ 0x554A
|
||||
#define PCI_CHIP_R423_UK 0x554B
|
||||
#define PCI_CHIP_R423_UQ 0x5551
|
||||
#define PCI_CHIP_R423_UR 0x5552
|
||||
#define PCI_CHIP_R423_UT 0x5554
|
||||
#define PCI_CHIP_MACH64VT 0x5654
|
||||
#define PCI_CHIP_MACH64VU 0x5655
|
||||
#define PCI_CHIP_MACH64VV 0x5656
|
||||
#define PCI_CHIP_RS300_5834 0x5834
|
||||
#define PCI_CHIP_RS300_5835 0x5835
|
||||
#define PCI_CHIP_RS300_5836 0x5836
|
||||
#define PCI_CHIP_RS300_5837 0x5837
|
||||
#define PCI_CHIP_RV370_5B60 0x5B60
|
||||
#define PCI_CHIP_RV370_5B61 0x5B61
|
||||
#define PCI_CHIP_RV370_5B62 0x5B62
|
||||
#define PCI_CHIP_RV370_5B63 0x5B63
|
||||
#define PCI_CHIP_RV370_5B64 0x5B64
|
||||
#define PCI_CHIP_RV370_5B65 0x5B65
|
||||
#define PCI_CHIP_RV370_5B66 0x5B66
|
||||
#define PCI_CHIP_RV370_5B67 0x5B67
|
||||
#define PCI_CHIP_RV280_5960 0x5960
|
||||
#define PCI_CHIP_RV280_5961 0x5961
|
||||
#define PCI_CHIP_RV280_5962 0x5962
|
||||
#define PCI_CHIP_RV280_5964 0x5964
|
||||
#define PCI_CHIP_RV280_5C61 0x5C61
|
||||
#define PCI_CHIP_RV280_5C63 0x5C63
|
||||
#define PCI_CHIP_R423_5D57 0x5D57
|
||||
#define PCI_CHIP_RS350_7834 0x7834
|
||||
#define PCI_CHIP_RS350_7835 0x7835
|
||||
|
||||
@@ -27,6 +27,8 @@ extern void xvprintf(const char *fmt, va_list va);
|
||||
extern void xprintf(const char *fmt, ...);
|
||||
extern void xsnprintf(char *str, size_t size, const char *fmt, ...);
|
||||
extern void xputchar(int c);
|
||||
extern int sprintf(char *str, const char *format, ...);
|
||||
|
||||
|
||||
extern void display_progress(void);
|
||||
extern void hexdump(uint8_t buffer[], int size);
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* bas_string.h
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc 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 BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: Markus Fröschle
|
||||
*/
|
||||
|
||||
#ifndef BAS_STRING_H_
|
||||
#define BAS_STRING_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
extern int strncmp(const char *s1, const char *s2, size_t max);
|
||||
extern char *strcpy(char *dst, const char *src);
|
||||
char *strncpy(char *dst, const char *src, size_t max);
|
||||
extern int strcmp(const char *s1, const char *s2);
|
||||
extern size_t strlen(const char *str);
|
||||
extern char *strcat(char *dst, const char *src);
|
||||
extern char *strncat(char *dst, const char *src, size_t max);
|
||||
extern int atoi(const char *c);
|
||||
extern void *memcpy(void *dst, const void *src, size_t n);
|
||||
extern void *memset(void *s, int c, size_t n);
|
||||
extern void bzero(void *s, size_t n);
|
||||
|
||||
#define isdigit(c) (((c) >= '0') && ((c) <= '9'))
|
||||
#define isupper(c) ((c) >= 'A' && ((c) <= 'Z'))
|
||||
#define islower(c) ((c) >= 'a' && ((c) <= 'z'))
|
||||
#define isalpha(c) (isupper((c)) || islower(c))
|
||||
#define tolower(c) (isupper(c) ? ((c) + 'a' - 'A') : (c))
|
||||
|
||||
#endif /* BAS_STRING_H_ */
|
||||
@@ -28,10 +28,7 @@
|
||||
#ifndef BAS_TYPES_H_
|
||||
#define BAS_TYPES_H_
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
|
||||
#endif /* BAS_TYPES_H_ */
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* bas_utils.h
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc 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 BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: Markus Fröschle
|
||||
*/
|
||||
|
||||
#ifndef _BAS_UTILS_H_
|
||||
#define _BAS_UTILS_H_
|
||||
|
||||
#define CLEAR_BIT(p,bit) p &= ~(bit)
|
||||
#define CLEAR_BIT_NO(p,nr) CLEAR_BIT(p, (1 << (nr)))
|
||||
|
||||
#endif /* _BAS_UTILS_H_ */
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* File: bcm5222.h
|
||||
* Purpose: Driver for the BCM5222 10/100 Ethernet PHY
|
||||
*
|
||||
* Notes:
|
||||
*/
|
||||
|
||||
#ifndef _BCM5222_H_
|
||||
#define _BCM5222_H_
|
||||
|
||||
extern int bcm5222_init(uint8_t, uint8_t, uint8_t, uint8_t);
|
||||
extern void bcm5222_get_reg(uint16_t*, uint16_t*);
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
/* MII Register Addresses */
|
||||
#define BCM5222_CTRL (0x00)
|
||||
#define BCM5222_STAT (0x01)
|
||||
#define BCM5222_PHY_ID1 (0x02)
|
||||
#define BCM5222_PHY_ID2 (0x03)
|
||||
#define BCM5222_AN_ADV (0x04)
|
||||
#define BCM5222_AN_LINK_PAR (0x05)
|
||||
#define BCM5222_AN_EXP (0x06)
|
||||
#define BCM5222_AN_NPR (0x07)
|
||||
#define BCM5222_LINK_NPA (0x08)
|
||||
#define BCM5222_ACSR (0x18)
|
||||
|
||||
/* Bit definitions and macros for BCM5222_CTRL */
|
||||
#define BCM5222_CTRL_RESET (0x8000)
|
||||
#define BCM5222_CTRL_LOOP (0x4000)
|
||||
#define BCM5222_CTRL_SPEED (0x2000)
|
||||
#define BCM5222_CTRL_ANE (0x1000)
|
||||
#define BCM5222_CTRL_PD (0x0800)
|
||||
#define BCM5222_CTRL_ISOLATE (0x0400)
|
||||
#define BCM5222_CTRL_RESTART_AN (0x0200)
|
||||
#define BCM5222_CTRL_FDX (0x0100)
|
||||
#define BCM5222_CTRL_COL_TEST (0x0080)
|
||||
|
||||
|
||||
/* Bit definitions and macros for BCM5222_STAT */
|
||||
#define BCM5222_STAT_100BT4 (0x8000)
|
||||
#define BCM5222_STAT_100BTX_FDX (0x4000)
|
||||
#define BCM5222_STAT_100BTX (0x2000)
|
||||
#define BCM5222_STAT_10BT_FDX (0x1000)
|
||||
#define BCM5222_STAT_10BT (0x0800)
|
||||
#define BCM5222_STAT_NO_PREAMBLE (0x0040)
|
||||
#define BCM5222_STAT_AN_COMPLETE (0x0020)
|
||||
#define BCM5222_STAT_REMOTE_FAULT (0x0010)
|
||||
#define BCM5222_STAT_AN_ABILITY (0x0008)
|
||||
#define BCM5222_STAT_LINK (0x0004)
|
||||
#define BCM5222_STAT_JABBER (0x0002)
|
||||
#define BCM5222_STAT_EXTENDED (0x0001)
|
||||
|
||||
/* Bit definitions and macros for BCM5222_AN_ADV */
|
||||
#define BCM5222_AN_ADV_NEXT_PAGE (0x8001)
|
||||
#define BCM5222_AN_ADV_REM_FAULT (0x2001)
|
||||
#define BCM5222_AN_ADV_PAUSE (0x0401)
|
||||
#define BCM5222_AN_ADV_100BT4 (0x0201)
|
||||
#define BCM5222_AN_ADV_100BTX_FDX (0x0101)
|
||||
#define BCM5222_AN_ADV_100BTX (0x0081)
|
||||
#define BCM5222_AN_ADV_10BT_FDX (0x0041)
|
||||
#define BCM5222_AN_ADV_10BT (0x0021)
|
||||
#define BCM5222_AN_ADV_802_3 (0x0001)
|
||||
|
||||
/* Bit definitions and macros for BCM5222_ACSR */
|
||||
#define BCM5222_ACSR_100BTX (0x0002)
|
||||
#define BCM5222_ACSR_FDX (0x0001)
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
#endif /* _BCM5222_H_ */
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* File: bootp.h
|
||||
* Purpose: BOOTP definitions.
|
||||
*
|
||||
* Notes:
|
||||
*/
|
||||
|
||||
#ifndef _BOOTP_H_
|
||||
#define _BOOTP_H_
|
||||
|
||||
#define BOOTP_SERVER_PORT 67
|
||||
#define BOOTP_CLIENT_PORT 68
|
||||
|
||||
/* protocol header information */
|
||||
#define BOOTP_HDR_OFFSET (ETH_HDR_LEN + IP_HDR_SIZE + UDP_HDR_SIZE)
|
||||
|
||||
/* timeout in seconds */
|
||||
#define BOOTP_TIMEOUT 2
|
||||
|
||||
/* BOOTP connection status */
|
||||
|
||||
struct bootp_connection
|
||||
{
|
||||
bool open; /* connection established flag */
|
||||
NIF *nif; /* pointer to network interface */
|
||||
IP_ADDR server_ip; /* server IP address */
|
||||
};
|
||||
|
||||
/*
|
||||
* This data definition is defined for Ethernet only!
|
||||
*/
|
||||
struct bootp_packet
|
||||
{
|
||||
uint8_t type; /* bootp operation type */
|
||||
uint8_t htype; /* hardware type */
|
||||
uint8_t hlen; /* hardware address length */
|
||||
uint8_t hops; /* hops */
|
||||
uint32_t xid; /* transaction identifier */
|
||||
uint16_t secs; /* seconds since trying to boot */
|
||||
uint16_t flags; /* only broadcast flag in use */
|
||||
uint32_t cl_addr; /* client ip address. Set to all 0 on request */
|
||||
uint32_t yi_addr; /* this field contains the new IP */
|
||||
uint32_t gi_addr; /* gateway address */
|
||||
uint8_t ch_addr[16]; /* client hw address */
|
||||
uint8_t sname[64]; /* server name */
|
||||
uint8_t file[128]; /* name of bootfile */
|
||||
uint8_t vend[64]; /* vendor specific (see below) */
|
||||
};
|
||||
|
||||
#define BOOTP_PACKET_LEN (BOOTP_HDR_OFFSET + sizeof(struct bootp_packet))
|
||||
|
||||
/* possible values for type field */
|
||||
#define BOOTP_TYPE_BOOTREQUEST 1
|
||||
#define BOOTP_TYPE_BOOTREPLY 2
|
||||
|
||||
/* values for hardware type - we only use ethernet */
|
||||
#define BOOTP_HTYPE_ETHERNET 1
|
||||
|
||||
/* values for hlen - again only ethernet defined */
|
||||
#define BOOTP_HLEN_ETHERNET 6
|
||||
|
||||
/* values for flags - only broadcast flag in use */
|
||||
#define BOOTP_FLAGS_BROADCAST 1
|
||||
|
||||
extern void bootp_request(NIF *, uint8_t *);
|
||||
extern void bootp_handler(NIF *, NBUF *);
|
||||
//extern void bootp_init(BOOTP_INFO *);
|
||||
|
||||
#endif /* _BOOTP_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user