-
Notifications
You must be signed in to change notification settings - Fork 9
/
mkurboots
executable file
·1239 lines (1183 loc) · 69.1 KB
/
mkurboots
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# published under GNU General Public License, version 3 (GPL-3.0)
# author Stefan Rueger <stefan.rueger@urclocks.com>
# 01.01.2023
# Compile bootloaders for one MCU
progname=$(basename $0)
Usage() {
cat <<END
Syntax: $progname [<opt>] <mcu>
Function: create bootloaders for the 8-bit AVR MCU <mcu> (all lower case)
Option:
-m <dir> directory in which mcu bootloaders are created (default mcus)
-b <dir> directory in which board bootloaders are created (default boards)
-c <dir> directory in which core bootloaders are created (default cores)
-f <fcpu> only create bootloaders for certain F_CPU values, eg, -f auto,16000000,8000000
-B <baud> only create bootloaders for certain baud rates, eg, -B auto,115200,38400
-d dry run: show which bootloaders would be created
END
}
run=1
mcu_bls=mcus
board_bls=boards
core_bls=cores
fcpulist=""
baudlist=""
here=$(pwd)
while getopts ":dm:b:c:f:B:" opt; do
case ${opt} in
m) mcu_bls=$OPTARG
;;
b) board_bls=$OPTARG
;;
c) core_bls=$OPTARG
;;
f) fcpulist=$OPTARG
;;
B) baudlist=$OPTARG
;;
d) run=0
;;
--) shift;
break
;;
\?) echo "Invalid option: $OPTARG" 1>&2
Usage 1>&2; exit 1
;;
: ) echo "Invalid option: $OPTARG requires an argument" 1>&2
Usage 1>&2; exit 1
;;
esac
done
shift $((OPTIND -1))
if [ $# != 1 ]; then Usage 1>&2; exit 1; fi
mcu="$1"
####
# Set out for which targets, F_CPUs, baud rates and I/O lines (for SW I/O) to compile
#
####
# Baud rate and F_CPU combinations
#
# Map F_CPU to baud rates: compile for these combinations
# Some are redundant: eg, 16 MHz @ 115200 baud is the same as 8 MHz @ 57600 baud
declare -A baud
baud[auto]=auto
baud[24000000]=1000000/500000/250000/230400/115200/57600/38400/19200/9600/4800/2400
baud[22118400]=460800/230400/115200/57600/38400/19200/9600/4800/2400
baud[20000000]=500000/250000/230400/115200/57600/38400/19200/9600/4800/2400
baud[18432000]=460800/230400/115200/57600/38400/19200/9600/4800/2400
baud[16000000]=1000000/500000/250000/230400/115200/57600/38400/19200/9600/4800/2400
baud[14745600]=460800/230400/115200/57600/38400/19200/9600/4800/2400
baud[12000000]=500000/250000/230400/115200/57600/19200/9600/4800/2400
baud[11059200]=460800/230400/115200/57600/38400/19200/9600/4800/2400
baud[8000000]=1000000/500000/250000/230400/115200/57600/38400/19200/9600/4800/2400
baud[7372800]=460800/230400/115200/57600/38400/19200/9600/4800/2400
baud[4000000]=500000/250000/115200/57600/38400/19200/9600/4800/2400
baud[3686400]=460800/230400/115200/57600/38400/19200/9600/4800/2400
baud[2000000]=250000/115200/57600/38400/19200/9600/4800/2400
baud[1843200]=230400/115200/57600/38400/19200/9600/4800/2400
baud[1000000]=57600/38400/19200/9600/4800/2400
if [[ /attiny13/attiny13a/ =~ /$mcu/ ]]; then
baud[9600000]=250000/230400/115200/57600/38400/19200/9600/4800/2400
baud[4800000]=115200/57600/38400/19200/9600/4800/2400
baud[1200000]=38400/19200/9600/4800/2400
baud[600000]=19200/9600/4800/2400
fi
# Remove computation for F_CPU values not mentioned in -f
if [[ -n $fcpulist ]]; then
readarray -d , -t flist <<<$fcpulist
declare -A fcpuok
for ff in ${flist[@]}; do
fcpuok[$ff]=1;
done
for fcpu in ${!baud[@]}; do
if [[ -z ${fcpuok[$fcpu]} ]]; then
unset baud[$fcpu]
fi
done
fi
# Create list of -B baud rates
declare -A baudok
if [[ -n $baudlist ]]; then
readarray -d , -t blist <<<$baudlist
for bb in ${blist[@]}; do
baudok[$bb]=1
done
fi
# Problematic combinations for classic or LIN UART (high baud rate error)
declare -A nouart
for cc in 1/24000000/460800 1/22118400/1000000 1/22118400/500000 1/20000000/1000000 \
1/20000000/460800 1/18432000/1000000 1/18432000/500000 1/18432000/250000 1/16000000/460800 \
1/16000000/230400 1/14745600/1000000 1/14745600/500000 1/14745600/250000 1/12000000/1000000 \
1/12000000/460800 1/12000000/230400 1/12000000/76800 1/11059200/1000000 1/11059200/500000 \
1/11059200/250000 1/9600000/76800 1/9600000/500000 1/9600000/460800 1/9600000/250000 \
1/9600000/230400 1/9600000/115200 1/9600000/1000000 1/8000000/460800 1/8000000/230400 \
1/8000000/115200 1/7372800/500000 1/7372800/250000 1/7372800/1000000 1/4800000/76800 \
1/4800000/57600 1/4800000/500000 1/4800000/460800 1/4800000/38400 1/4800000/250000 \
1/4800000/230400 1/4800000/115200 1/4000000/76800 1/4000000/57600 1/4000000/460800 \
1/4000000/230400 1/4000000/115200 1/3686400/500000 1/3686400/250000 1/2000000/76800 \
1/2000000/57600 1/2000000/38400 1/2000000/28800 1/2000000/230400 1/2000000/115200 \
1/1843200/250000 1/1200000/9600 1/1200000/76800 1/1200000/57600 1/1200000/38400 \
1/1200000/28800 1/1200000/19200 1/1200000/14400 1/1200000/115200 1/1000000/76800 \
1/1000000/57600 1/1000000/38400 1/1000000/28800 1/1000000/19200 1/1000000/14400 \
1/1000000/115200 \
2/18432000/1000000 2/9600000/1000000 2/4800000/500000 2/4800000/460800 2/4000000/460800 \
2/2000000/230400 2/1200000/76800 2/1200000/115200 2/1000000/115200; do
nouart[$cc]=1
done
####
# Known boards
#
# At least generate a template bootloader (with placeholder nops)
board=none:TEMPLATE=1
# Various boards have the LED on different pins, some low active
if [[ $mcu == atmega328p ]]; then
board+=/urclock,timeduino,jeenode:LEDPOLARITY=-1_LED=AtmelPB1
board+=/anarduino,moteino:LED=AtmelPB1
board+=/urclockusb:LED=AtmelPD5
board+=/ursense:LEDPOLARITY=-1_LED=AtmelPD5
board+=/uno,rbbb,promini,minicore:LED=AtmelPB5
board+=/dual:TEMPLATE=1_DUAL=1
board+=/urclock,timeduino:LEDPOLARITY=-1_LED=AtmelPB1_SFMCS=AtmelPB0_DUAL=1
board+=/anarduino:LED=AtmelPB1_SFMCS=AtmelPD5_DUAL=1
board+=/moteino:LED=AtmelPB1_SFMCS=AtmelPB0_DUAL=1
board+=/urclockusb:LED=AtmelPD5_SFMCS=AtmelPB0_DUAL=1
board+=/ursense:LEDPOLARITY=-1_LED=AtmelPD5_SFMCS=AtmelPB0_DUAL=1
fi
if [[ $mcu == attiny85 ]]; then
board+=/digispark:LED=AtmelPB1
fi
if [[ $mcu == attiny88 ]]; then
board+=/mh-tiny:LED=AtmelPD0
fi
if [[ $mcu == attiny167 ]]; then
board+=/digispark-pro:LED=AtmelPB1
fi
if [[ $mcu == attiny84 ]]; then
board+=/luminet:LED=AtmelPA4
fi
if [[ $mcu == atmega1284p ]]; then
board+=/bobuino,mighty1284,wildfire-v2,mightycore:LED=AtmelPB7
board+=/mightycore:LED=AtmelPB0
board+=/wildfire:LED=AtmelPB5
board+=/moteinomega:LED=AtmelPD7
board+=/urclockmega:LED=AtmelPC7
board+=/dual:TEMPLATE=1_DUAL=1
board+=/moteinomega:LED=AtmelPD7_SFMCS=AtmelPC7_DUAL=1
board+=/urclockmega:LED=AtmelPC7_SFMCS=AtmelPB3_DUAL=1
fi
if [[ $mcu == atmega644p ]]; then
board+=/sanguino,mightycore:LED=AtmelPB0
board+=/mightycore:LED=AtmelPB7
fi
if [[ $mcu == atmega2560 ]]; then
board+=/mega-r3,megacore:LED=AtmelPB7
fi
if [[ $mcu == atmega1280 ]]; then
board+=/mega1280,megacore:LED=AtmelPB7
fi
# Treat MightyCore, MiniCore, MegaCore and MajorCore initially as boards (note some are already subsumed above)
if [[ /atmega1284/atmega644a/atmega324pb/atmega324pa/atmega324p/atmega324a/atmega164p/atmega164a/atmega32/atmega16/atmega8535/ =~ /$mcu/ ]]; then
board+=/mightycore:LED=AtmelPB0
board+=/mightycore:LED=AtmelPB7
elif [[ /atmega328pb/atmega328/atmega168pb/atmega168p/atmega168/atmega88pb/atmega88p/atmega88/atmega48pb/atmega48p/atmega48/atmega8/ =~ /$mcu/ ]]; then
board+=/minicore:LED=AtmelPB5
elif [[ /atmega6490p/atmega6490/atmega6450p/atmega6450/atmega3290p/atmega3290/atmega3250p/atmega3250/atmega640/ =~ /$mcu/ ]]; then
board+=/megacore:LED=AtmelPB7
elif [[ /atmega2561/atmega1281/atmega649p/atmega649/atmega645p/atmega645/atmega329p/atmega329/atmega325p/atmega325/atmega169p/atmega169a/atmega165p/atmega165a/atmega128/atmega64/at90can128/at90can64/at90can32/ =~ /$mcu/ ]]; then
board+=/megacore:LED=AtmelPB5
elif [[ /atmega162/atmega8515/ =~ /$mcu/ ]]; then
board+=/majorcore:LED=AtmelPB0
fi
####
# Some intell about parts in general
#
####
# MCUs with known HW bootloader support
#
blmcus=(at90can128 at90can32 at90can64 at90pwm1 at90pwm161 at90pwm2 at90pwm216 at90pwm2b \
at90pwm3 at90pwm316 at90pwm3b at90pwm81 at90scr100 at90usb1286 at90usb1287 at90usb162 \
at90usb646 at90usb647 at90usb82 ata5782 ata5790 ata5790n ata5791 ata5795 ata5831 ata6285 \
ata6286 ata6289 ata6612c ata6613c ata6614q ata8210 ata8510 atmega128 atmega1280 atmega1281 \
atmega1284 atmega1284p atmega1284rfr2 atmega128a atmega128rfa1 atmega128rfr2 atmega16 \
atmega1608 atmega1609 atmega161 atmega162 atmega163 atmega164a atmega164p atmega164pa atmega165 \
atmega165a atmega165p atmega165pa atmega168 atmega168a atmega168p atmega168pa atmega168pb \
atmega169 atmega169a atmega169p atmega169pa atmega16a atmega16hvb atmega16hvbrevb atmega16m1 \
atmega16u2 atmega16u4 atmega2560 atmega2561 atmega2564rfr2 atmega256rfr2 atmega32 atmega3208 \
atmega3209 atmega323 atmega324a atmega324p atmega324pa atmega324pb atmega325 atmega3250 atmega3250a \
atmega3250p atmega3250pa atmega325a atmega325p atmega325pa atmega328 atmega328p atmega328pb \
atmega329 atmega3290 atmega3290a atmega3290p atmega3290pa atmega329a atmega329p atmega329pa \
atmega32a atmega32c1 atmega32hvb atmega32hvbrevb atmega32m1 atmega32u2 atmega32u4 atmega32u6 \
atmega406 atmega4808 atmega4809 atmega64 atmega640 atmega644 atmega644a atmega644p atmega644pa \
atmega644rfr2 atmega645 atmega6450 atmega6450a atmega6450p atmega645a atmega645p atmega649 \
atmega6490 atmega6490a atmega6490p atmega649a atmega649p atmega64a atmega64c1 atmega64hve \
atmega64hve2 atmega64m1 atmega64rfr2 atmega8 atmega808 atmega809 atmega8515 atmega8535 atmega88 \
atmega88a atmega88p atmega88pa atmega88pb atmega8a atmega8u2 attiny1604 attiny1606 attiny1607 \
attiny1614 attiny1616 attiny1617 attiny202 attiny204 attiny212 attiny214 attiny3214 attiny3216 \
attiny3217 attiny402 attiny404 attiny406 attiny412 attiny414 attiny416 attiny417 attiny804 \
attiny806 attiny807 attiny814 attiny816 attiny817 attiny828 atxmega128a1 atxmega128a1u \
atxmega128a3 atxmega128a3u atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega128d3 \
atxmega128d4 atxmega16a4 atxmega16a4u atxmega16c4 atxmega16d4 atxmega16e5 atxmega192a3 \
atxmega192a3u atxmega192c3 atxmega192d3 atxmega256a3 atxmega256a3b atxmega256a3bu atxmega256a3u \
atxmega256c3 atxmega256d3 atxmega32a4 atxmega32a4u atxmega32c3 atxmega32c4 atxmega32d3 \
atxmega32d4 atxmega32e5 atxmega384c3 atxmega384d3 atxmega64a1 atxmega64a1u atxmega64a3 \
atxmega64a3u atxmega64a4u atxmega64b1 atxmega64b3 atxmega64c3 atxmega64d3 atxmega64d4 \
atxmega8e5)
# Set ${hwboot[$part]} iff $part is known to have HW bootloader support
declare -A hwboot
for part in ${blmcus[@]}; do hwboot[$part]=1; done
####
# UART type (Classic = 1, LIN = 2, XMEGA = 4, AVR8X = 8)
#
declare -A uarttype
uarttype[attiny102]=1
uarttype[attiny104]=1
uarttype[attiny87]=2
uarttype[attiny167]=2
uarttype[attiny441]=1
uarttype[attiny828]=1
uarttype[attiny828r]=1
uarttype[attiny841]=1
uarttype[attiny1634]=1
uarttype[attiny1634r]=1
uarttype[attiny2313]=1
uarttype[attiny2313a]=1
uarttype[attiny4313]=1
uarttype[atmega8]=1
uarttype[atmega8a]=1
uarttype[atmega8u2]=1
uarttype[atmega16]=1
uarttype[atmega16a]=1
uarttype[atmega16m1]=2
uarttype[atmega16u2]=1
uarttype[atmega16u4]=1
uarttype[atmega32]=1
uarttype[atmega32a]=1
uarttype[atmega32c1]=2
uarttype[atmega32m1]=2
uarttype[atmega32u2]=1
uarttype[atmega32u4]=1
uarttype[atmega32u6]=1
uarttype[atmega48]=1
uarttype[atmega48a]=1
uarttype[atmega48p]=1
uarttype[atmega48pa]=1
uarttype[atmega48pb]=1
uarttype[atmega64]=1
uarttype[atmega64a]=1
uarttype[atmega64hve]=2
uarttype[atmega64c1]=2
uarttype[atmega64m1]=2
uarttype[atmega64hve2]=2
uarttype[atmega64rfr2]=1
uarttype[atmega88]=1
uarttype[atmega88a]=1
uarttype[atmega88p]=1
uarttype[atmega88pa]=1
uarttype[atmega88pb]=1
uarttype[atmega103]=1
uarttype[atmega128]=1
uarttype[atmega128a]=1
uarttype[atmega128rfa1]=1
uarttype[atmega128rfr2]=1
uarttype[atmega161]=1
uarttype[atmega162]=1
uarttype[atmega163]=1
uarttype[atmega164a]=1
uarttype[atmega164p]=1
uarttype[atmega164pa]=1
uarttype[atmega165]=1
uarttype[atmega165a]=1
uarttype[atmega165p]=1
uarttype[atmega165pa]=1
uarttype[atmega168]=1
uarttype[atmega168a]=1
uarttype[atmega168p]=1
uarttype[atmega168pa]=1
uarttype[atmega168pb]=1
uarttype[atmega169]=1
uarttype[atmega169a]=1
uarttype[atmega169p]=1
uarttype[atmega169pa]=1
uarttype[atmega256rfr2]=1
uarttype[atmega323]=1
uarttype[atmega324a]=1
uarttype[atmega324p]=1
uarttype[atmega324pa]=1
uarttype[atmega324pb]=1
uarttype[atmega325]=1
uarttype[atmega325a]=1
uarttype[atmega325p]=1
uarttype[atmega325pa]=1
uarttype[atmega328]=1
uarttype[atmega328p]=1
uarttype[atmega328pb]=1
uarttype[atmega329]=1
uarttype[atmega329a]=1
uarttype[atmega329p]=1
uarttype[atmega329pa]=1
uarttype[atmega640]=1
uarttype[atmega644]=1
uarttype[atmega644a]=1
uarttype[atmega644p]=1
uarttype[atmega644pa]=1
uarttype[atmega644rfr2]=1
uarttype[atmega645]=1
uarttype[atmega645a]=1
uarttype[atmega645p]=1
uarttype[atmega649]=1
uarttype[atmega649a]=1
uarttype[atmega649p]=1
uarttype[atmega1280]=1
uarttype[atmega1281]=1
uarttype[atmega1284]=1
uarttype[atmega1284p]=1
uarttype[atmega1284rfr2]=1
uarttype[atmega2560]=1
uarttype[atmega2561]=1
uarttype[atmega2564rfr2]=1
uarttype[atmega3250]=1
uarttype[atmega3250a]=1
uarttype[atmega3250p]=1
uarttype[atmega3250pa]=1
uarttype[atmega3290]=1
uarttype[atmega3290a]=1
uarttype[atmega3290p]=1
uarttype[atmega3290pa]=1
uarttype[atmega6450]=1
uarttype[atmega6450a]=1
uarttype[atmega6450p]=1
uarttype[atmega6490]=1
uarttype[atmega6490a]=1
uarttype[atmega6490p]=1
uarttype[atmega8515]=1
uarttype[atmega8535]=1
uarttype[at43usb320]=1
uarttype[at90pwm2]=1
uarttype[at90pwm2b]=1
uarttype[at90pwm3]=1
uarttype[at90pwm3b]=1
uarttype[at90can32]=1
uarttype[at90can64]=1
uarttype[at90usb82]=1
uarttype[at90scr100]=1
uarttype[at90can128]=1
uarttype[at90usb162]=1
uarttype[at90pwm216]=1
uarttype[at90pwm316]=1
uarttype[at90usb646]=1
uarttype[at90usb647]=1
uarttype[at90usb1286]=1
uarttype[at90usb1287]=1
uarttype[at90s2313]=1
uarttype[at90s2333]=1
uarttype[at90s4414]=1
uarttype[at90s4433]=1
uarttype[at90s4434]=1
uarttype[at90s8515]=1
uarttype[at90s8535]=1
uarttype[at94k]=1
uarttype[ata5272]=2
uarttype[ata5505]=2
uarttype[ata5787]=2
uarttype[ata5835]=2
uarttype[ata6612c]=1
uarttype[ata6613c]=1
uarttype[ata6614q]=1
uarttype[ata6616c]=2
uarttype[ata6617c]=2
uarttype[ata664251]=2
uarttype[m3000]=1
uarttype[lgt8f88p]=1
uarttype[lgt8f168p]=1
uarttype[lgt8f328p]=1
uarttype[atxmega8e5]=4
uarttype[atxmega16a4]=4
uarttype[atxmega16a4u]=4
uarttype[atxmega16c4]=4
uarttype[atxmega16d4]=4
uarttype[atxmega16e5]=4
uarttype[atxmega32c3]=4
uarttype[atxmega32d3]=4
uarttype[atxmega32a4]=4
uarttype[atxmega32a4u]=4
uarttype[atxmega32c4]=4
uarttype[atxmega32d4]=4
uarttype[atxmega32e5]=4
uarttype[atxmega64a1]=4
uarttype[atxmega64a1u]=4
uarttype[atxmega64b1]=4
uarttype[atxmega64a3]=4
uarttype[atxmega64a3u]=4
uarttype[atxmega64b3]=4
uarttype[atxmega64c3]=4
uarttype[atxmega64d3]=4
uarttype[atxmega64a4]=4
uarttype[atxmega64a4u]=4
uarttype[atxmega64d4]=4
uarttype[atxmega128a1]=4
uarttype[atxmega128a1revd]=4
uarttype[atxmega128a1u]=4
uarttype[atxmega128b1]=4
uarttype[atxmega128a3]=4
uarttype[atxmega128a3u]=4
uarttype[atxmega128b3]=4
uarttype[atxmega128c3]=4
uarttype[atxmega128d3]=4
uarttype[atxmega128a4]=4
uarttype[atxmega128a4u]=4
uarttype[atxmega128d4]=4
uarttype[atxmega192a1]=4
uarttype[atxmega192a3]=4
uarttype[atxmega192a3u]=4
uarttype[atxmega192c3]=4
uarttype[atxmega192d3]=4
uarttype[atxmega256a1]=4
uarttype[atxmega256a3]=4
uarttype[atxmega256a3b]=4
uarttype[atxmega256a3bu]=4
uarttype[atxmega256a3u]=4
uarttype[atxmega256c3]=4
uarttype[atxmega256d3]=4
uarttype[atxmega384c3]=4
uarttype[atxmega384d3]=4
uarttype[attiny202]=8
uarttype[attiny204]=8
uarttype[attiny212]=8
uarttype[attiny214]=8
uarttype[attiny402]=8
uarttype[attiny404]=8
uarttype[attiny406]=8
uarttype[attiny412]=8
uarttype[attiny414]=8
uarttype[attiny416]=8
uarttype[attiny416auto]=8
uarttype[attiny417]=8
uarttype[attiny424]=8
uarttype[attiny426]=8
uarttype[attiny427]=8
uarttype[attiny804]=8
uarttype[attiny806]=8
uarttype[attiny807]=8
uarttype[attiny814]=8
uarttype[attiny816]=8
uarttype[attiny817]=8
uarttype[attiny824]=8
uarttype[attiny826]=8
uarttype[attiny827]=8
uarttype[attiny1604]=8
uarttype[attiny1606]=8
uarttype[attiny1607]=8
uarttype[attiny1614]=8
uarttype[attiny1616]=8
uarttype[attiny1617]=8
uarttype[attiny1624]=8
uarttype[attiny1626]=8
uarttype[attiny1627]=8
uarttype[attiny3214]=8
uarttype[attiny3216]=8
uarttype[attiny3217]=8
uarttype[attiny3224]=8
uarttype[attiny3226]=8
uarttype[attiny3227]=8
uarttype[atmega808]=8
uarttype[atmega809]=8
uarttype[atmega1608]=8
uarttype[atmega1609]=8
uarttype[atmega3208]=8
uarttype[atmega3209]=8
uarttype[atmega4808]=8
uarttype[atmega4809]=8
uarttype[avr8ea28]=8
uarttype[avr8ea32]=8
uarttype[avr16dd14]=8
uarttype[avr16dd20]=8
uarttype[avr16dd28]=8
uarttype[avr16ea28]=8
uarttype[avr16dd32]=8
uarttype[avr16ea32]=8
uarttype[avr16ea48]=8
uarttype[avr32dd14]=8
uarttype[avr32dd20]=8
uarttype[avr32da28]=8
uarttype[avr32db28]=8
uarttype[avr32dd28]=8
uarttype[avr32ea28]=8
uarttype[avr32da32]=8
uarttype[avr32db32]=8
uarttype[avr32dd32]=8
uarttype[avr32ea32]=8
uarttype[avr32da48]=8
uarttype[avr32db48]=8
uarttype[avr32ea48]=8
uarttype[avr64dd14]=8
uarttype[avr64dd20]=8
uarttype[avr64da28]=8
uarttype[avr64db28]=8
uarttype[avr64dd28]=8
uarttype[avr64ea28]=8
uarttype[avr64da32]=8
uarttype[avr64db32]=8
uarttype[avr64dd32]=8
uarttype[avr64ea32]=8
uarttype[avr64da48]=8
uarttype[avr64db48]=8
uarttype[avr64ea48]=8
uarttype[avr64da64]=8
uarttype[avr64db64]=8
uarttype[avr128da28]=8
uarttype[avr128db28]=8
uarttype[avr128da32]=8
uarttype[avr128db32]=8
uarttype[avr128da48]=8
uarttype[avr128db48]=8
uarttype[avr128da64]=8
uarttype[avr128db64]=8
####
# IO pins of UART
# Format: [SWIO=1|UARTNUM=<n> [UARTALT=<n>]] RX=Atmel<Pin> TX=Atmel<Pin>|...
# Note: mcuio assignments below were automatically generated by mkavrintel.pl
#
declare -A mcuio
mcuio[attiny4]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny5]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny9]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny10]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny20]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny40]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny102]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2"
mcuio[attiny104]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2"
mcuio[attiny11]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny12]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny13]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny13a]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny15]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny22]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny24]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny24a]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny25]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny26]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny28]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny43u]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny44]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny44a]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny45]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny48]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny84]="SWIO=1 RX=AtmelPA3 TX=AtmelPA2"
mcuio[attiny84a]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny85]="SWIO=1 RX=AtmelPB4 TX=AtmelPB3"
mcuio[attiny87]="UARTNUM=0 RX=AtmelPA0 TX=AtmelPA1"
mcuio[attiny88]="SWIO=1 RX=AtmelPD7 TX=AtmelPD6"
mcuio[attiny167]="UARTNUM=0 RX=AtmelPA0 TX=AtmelPA1"
mcuio[attiny261]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny261a]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny441]="UARTNUM=0 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=0 UARTALT=1 RX=AtmelPB2 TX=AtmelPA7|UARTNUM=1 RX=AtmelPA4 TX=AtmelPA5"
mcuio[attiny461]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny461a]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny828]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3"
mcuio[attiny828r]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3"
mcuio[attiny841]="UARTNUM=0 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=0 UARTALT=1 RX=AtmelPB2 TX=AtmelPA7|UARTNUM=1 RX=AtmelPA4 TX=AtmelPA5"
mcuio[attiny861]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny861a]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny1634]="UARTNUM=0 RX=AtmelPA7 TX=AtmelPB0|UARTNUM=1 RX=AtmelPB1 TX=AtmelPB2"
mcuio[attiny1634r]="UARTNUM=0 RX=AtmelPA7 TX=AtmelPB0|UARTNUM=1 RX=AtmelPB1 TX=AtmelPB2"
mcuio[attiny2313]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[attiny2313a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[attiny4313]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega8]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega8a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega8hva]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega8u2]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega16]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega16a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega16hva]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega16hvb]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega16hvbrevb]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega16m1]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[atmega16hva2]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega16u2]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega16u4]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega32]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega32a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega32hvb]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega32hvbrevb]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega32c1]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[atmega32m1]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[atmega32u2]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega32u4]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega32u6]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega48]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega48a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega48p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega48pa]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega48pb]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega64]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega64a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega64hve]="UARTNUM=0 RX=AtmelPB1 TX=AtmelPB3"
mcuio[atmega64c1]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[atmega64m1]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[atmega64hve2]="UARTNUM=0 RX=AtmelPB1 TX=AtmelPB3"
mcuio[atmega64rfr2]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega88]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega88a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega88p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega88pa]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega88pb]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega103]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega128]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega128a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega128rfa1]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega128rfr2]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega161]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPB2 TX=AtmelPB3"
mcuio[atmega162]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPB2 TX=AtmelPB3"
mcuio[atmega163]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega164a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega164p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega164pa]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega165]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega165a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega165p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega165pa]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega168]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega168a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega168p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega168pa]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega168pb]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega169]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega169a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega169p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega169pa]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega256rfr2]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega323]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega324a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega324p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega324pa]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega324pb]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atmega325]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega325a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega325p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega325pa]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega328]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega328p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega328pb]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPB4 TX=AtmelPB3"
mcuio[atmega329]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega329a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega329p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega329pa]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega406]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atmega640]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPH0 TX=AtmelPH1|UARTNUM=3 RX=AtmelPJ0 TX=AtmelPJ1"
mcuio[atmega644]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega644a]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega644p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega644pa]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega644rfr2]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega645]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega645a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega645p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega649]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega649a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega649p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega1280]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPH0 TX=AtmelPH1|UARTNUM=3 RX=AtmelPJ0 TX=AtmelPJ1"
mcuio[atmega1281]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega1284]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega1284p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega1284rfr2]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega2560]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPH0 TX=AtmelPH1|UARTNUM=3 RX=AtmelPJ0 TX=AtmelPJ1"
mcuio[atmega2561]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega2564rfr2]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atmega3250]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega3250a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega3250p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega3250pa]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega3290]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega3290a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega3290p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega3290pa]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega6450]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega6450a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega6450p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega6490]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega6490a]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega6490p]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1"
mcuio[atmega8515]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atmega8535]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at43usb320]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at43usb355]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at76c711]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at86rf401]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90pwm1]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90pwm2]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[at90pwm2b]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[at90pwm3]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[at90pwm3b]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[at90can32]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90can64]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90pwm81]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90usb82]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90scr100]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at90can128]="UARTNUM=0 RX=AtmelPE0 TX=AtmelPE1|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90pwm161]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90usb162]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90pwm216]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[at90pwm316]="UARTNUM=0 RX=AtmelPD4 TX=AtmelPD3"
mcuio[at90usb646]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90usb647]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90s1200]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90usb1286]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90usb1287]="UARTNUM=0 RX=AtmelPD2 TX=AtmelPD3"
mcuio[at90s2313]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at90s2323]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90s2333]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at90s2343]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90s4414]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at90s4433]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at90s4434]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at90s8515]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at90c8534]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[at90s8535]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[at94k]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5272]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5505]="UARTNUM=0 RX=AtmelPA0 TX=AtmelPA1"
mcuio[ata5700m322]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5702m322]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5781]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5782]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5783]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5787]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5790]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5790n]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5791]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5795]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5831]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5832]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5833]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata5835]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata6285]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata6286]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata6289]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata6612c]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[ata6613c]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[ata6614q]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[ata6616c]="UARTNUM=0 RX=AtmelPA0 TX=AtmelPA1"
mcuio[ata6617c]="UARTNUM=0 RX=AtmelPA0 TX=AtmelPA1"
mcuio[ata8210]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata8215]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata8510]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata8515]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[ata664251]="UARTNUM=0 RX=AtmelPA0 TX=AtmelPA1"
mcuio[m3000]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[lgt8f88p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[lgt8f168p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[lgt8f328p]="UARTNUM=0 RX=AtmelPD0 TX=AtmelPD1"
mcuio[atxmega8e5]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=1 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7"
mcuio[atxmega16a4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega16a4u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega16c4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atxmega16d4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atxmega16e5]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=1 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7"
mcuio[atxmega32c3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega32d3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega32a4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega32a4u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega32c4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atxmega32d4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atxmega32e5]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=1 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7"
mcuio[atxmega64a1]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=7 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega64a1u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=7 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega64b1]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=1 UARTALT=1 RX=AtmelPE6 TX=AtmelPE7"
mcuio[atxmega64a3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3"
mcuio[atxmega64a3u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=4 UARTALT=1 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=6 UARTALT=1 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega64b3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7"
mcuio[atxmega64c3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega64d3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega64a4]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atxmega64a4u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega64d4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atxmega128a1]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=7 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega128a1revd]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=7 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega128a1u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=7 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega128b1]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=1 UARTALT=1 RX=AtmelPE6 TX=AtmelPE7"
mcuio[atxmega128a3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3"
mcuio[atxmega128a3u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=4 UARTALT=1 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=6 UARTALT=1 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega128b3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7"
mcuio[atxmega128c3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega128d3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega128a4]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atxmega128a4u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega128d4]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3"
mcuio[atxmega192a1]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atxmega192a3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3"
mcuio[atxmega192a3u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=4 UARTALT=1 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=6 UARTALT=1 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega192c3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega192d3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega256a1]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[atxmega256a3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3"
mcuio[atxmega256a3b]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPF2 TX=AtmelPF3"
mcuio[atxmega256a3bu]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=5 RX=AtmelPF2 TX=AtmelPF3"
mcuio[atxmega256a3u]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=2 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 UARTALT=1 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=3 RX=AtmelPD6 TX=AtmelPD7|UARTNUM=4 RX=AtmelPE2 TX=AtmelPE3|UARTNUM=4 UARTALT=1 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=5 RX=AtmelPE6 TX=AtmelPE7|UARTNUM=6 RX=AtmelPF2 TX=AtmelPF3|UARTNUM=6 UARTALT=1 RX=AtmelPF6 TX=AtmelPF7"
mcuio[atxmega256c3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega256d3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega384c3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[atxmega384d3]="UARTNUM=0 RX=AtmelPC2 TX=AtmelPC3|UARTNUM=0 UARTALT=1 RX=AtmelPC6 TX=AtmelPC7|UARTNUM=1 RX=AtmelPD2 TX=AtmelPD3|UARTNUM=2 RX=AtmelPE2 TX=AtmelPE3"
mcuio[attiny202]="UARTNUM=0 RX=AtmelPA7 TX=AtmelPA6|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny204]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny212]="UARTNUM=0 RX=AtmelPA7 TX=AtmelPA6|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny214]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny402]="UARTNUM=0 RX=AtmelPA7 TX=AtmelPA6|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny404]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny406]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny412]="UARTNUM=0 RX=AtmelPA7 TX=AtmelPA6|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny414]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny416]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny416auto]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny417]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny424]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny426]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[attiny427]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[attiny804]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny806]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny807]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny814]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny816]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny817]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny824]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny826]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[attiny827]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[attiny1604]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny1606]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny1607]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny1614]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny1616]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny1617]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny1624]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny1626]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[attiny1627]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[attiny3214]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[attiny3216]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny3217]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny3224]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1"
mcuio[attiny3226]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[attiny3227]="UARTNUM=0 RX=AtmelPB3 TX=AtmelPB2|UARTNUM=0 UARTALT=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 RX=AtmelPA2 TX=AtmelPA1|UARTNUM=1 UARTALT=1 RX=AtmelPC1 TX=AtmelPC2"
mcuio[atmega808]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[atmega809]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4"
mcuio[atmega1608]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[atmega1609]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4"
mcuio[atmega3208]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[atmega3209]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4"
mcuio[atmega4808]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[atmega4809]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4"
mcuio[avr8ea28]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr8ea32]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr16dd14]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr16dd20]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr16dd28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr16ea28]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr16dd32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr16ea32]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr16ea48]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr32dd14]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr32dd20]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr32da28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0"
mcuio[avr32db28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0"
mcuio[avr32dd28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr32ea28]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr32da32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr32db32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr32dd32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr32ea32]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr32da48]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0"
mcuio[avr32db48]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0"
mcuio[avr32ea48]="SWIO=1 RX=AtmelPB0 TX=AtmelPB1"
mcuio[avr64dd14]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr64dd20]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr64da28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0"
mcuio[avr64db28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0"
mcuio[avr64dd28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr64ea28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0"
mcuio[avr64da32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr64db32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr64dd32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6"
mcuio[avr64ea32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr64da48]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0"
mcuio[avr64db48]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0"
mcuio[avr64ea48]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=0 UARTALT=2 RX=AtmelPA3 TX=AtmelPA2|UARTNUM=0 UARTALT=3 RX=AtmelPD5 TX=AtmelPD4|UARTNUM=0 UARTALT=4 RX=AtmelPC2 TX=AtmelPC1|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=1 UARTALT=2 RX=AtmelPD7 TX=AtmelPD6|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr64da64]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0|UARTNUM=4 UARTALT=1 RX=AtmelPE5 TX=AtmelPE4|UARTNUM=5 RX=AtmelPG1 TX=AtmelPG0|UARTNUM=5 UARTALT=1 RX=AtmelPG5 TX=AtmelPG4"
mcuio[avr64db64]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0|UARTNUM=4 UARTALT=1 RX=AtmelPE5 TX=AtmelPE4|UARTNUM=5 RX=AtmelPG1 TX=AtmelPG0|UARTNUM=5 UARTALT=1 RX=AtmelPG5 TX=AtmelPG4"
mcuio[avr128da28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0"
mcuio[avr128db28]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0"
mcuio[avr128da32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr128db32]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4"
mcuio[avr128da48]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0"
mcuio[avr128db48]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0"
mcuio[avr128da64]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0|UARTNUM=4 UARTALT=1 RX=AtmelPE5 TX=AtmelPE4|UARTNUM=5 RX=AtmelPG1 TX=AtmelPG0|UARTNUM=5 UARTALT=1 RX=AtmelPG5 TX=AtmelPG4"
mcuio[avr128db64]="UARTNUM=0 RX=AtmelPA1 TX=AtmelPA0|UARTNUM=0 UARTALT=1 RX=AtmelPA5 TX=AtmelPA4|UARTNUM=1 RX=AtmelPC1 TX=AtmelPC0|UARTNUM=1 UARTALT=1 RX=AtmelPC5 TX=AtmelPC4|UARTNUM=2 RX=AtmelPF1 TX=AtmelPF0|UARTNUM=2 UARTALT=1 RX=AtmelPF5 TX=AtmelPF4|UARTNUM=3 RX=AtmelPB1 TX=AtmelPB0|UARTNUM=3 UARTALT=1 RX=AtmelPB5 TX=AtmelPB4|UARTNUM=4 RX=AtmelPE1 TX=AtmelPE0|UARTNUM=4 UARTALT=1 RX=AtmelPE5 TX=AtmelPE4|UARTNUM=5 RX=AtmelPG1 TX=AtmelPG0|UARTNUM=5 UARTALT=1 RX=AtmelPG5 TX=AtmelPG4"
# SWIO: range of F_CPU/baud rate depends on architecture and whether 22-bit PC (flash > 128k) or 16-bit PC
minbval=29; [[ /$mcu =~ /atxmega ]] && minbval=28
if [[ /atmega256rfr2/atmega2560/atmega2561/atmega2564rfr2/atxmega128a1/atxmega128a1revd/atxmega128a1u/atxmega128b1/atxmega128a3/atxmega128a3u/atxmega128b3/atxmega128c3/atxmega128d3/atxmega128a4/atxmega128a4u/atxmega128d4/atxmega192a1/atxmega192a3/atxmega192a3u/atxmega192c3/atxmega192d3/atxmega256a1/atxmega256a3/atxmega256a3b/atxmega256a3bu/atxmega256a3u/atxmega256c3/atxmega256d3/atxmega384c3/atxmega384d3/ =~ /$mcu/ ]]; then
minbval=$((minbval+4))
fi
maxbval=$((255*6+$minbval+2))
# UART: range of F_CPU/baud rate depends on UART type and variants
# 8-bit or 12-bit BRR? Technically, LIN/UART has 12-bit BRR but urboot.c only uses lower byte (can go as low as 1200 baud @ 20 MHz)
brrrange=4095; [[ ${uarttype[$mcu]} -eq 2 || /at43usb320/at90s2313/at90s4414/at90s4434/at90s8515/at90s8535/atmega103/atmega163/ =~ /$mcu/ ]] && brrrange=255
# Range of possible samples
maxsamples=16; [[ ${uarttype[$mcu]} -eq 2 ]] && maxsamples=63
minsamples=8; [[ /atmega103/at43usb320/at90s2313/at90s2333/at90s4433/at90s4414/at90s8515/at90s4434/at90s8535/ =~ /$mcu/ ]] && minsamples=16
####
# Put human readable F_CPU into variable fcpunm
#
mkfcpunm() {
local frq=$1;
if [[ "$frq" == auto ]]; then
:
elif [[ ${#1} > 6 ]]; then
frq=${1%??????}mhz${1:${#1}-6:6}
frq=${frq%000}; frq=${frq%00}; frq=${frq%0}
elif [[ ${#1} > 3 ]]; then
frq=${1%???}khz${1:${#1}-3:3}
frq=${frq%00}; frq=${frq%0}
fi
fcpunm=$frq
}
####
# Construct a global variable filename for the basename of the bootloader
#
mkfilename() {
local cfg=$8
[[ "$cfg" == TEMPLATE=1 ]] && cfg=_lednop
[[ "$cfg" == TEMPLATE=1_DUAL=1 ]] && cfg=_template_dual
cfg=${cfg/LEDPOLARITY=-1_LED=AtmelP/_led-}
cfg=${cfg/LED=AtmelP/_led+}
cfg=${cfg/_SFMCS=AtmelP/_cs}
cfg=${cfg/_DUAL=1/_dual}
cfg=${cfg,,}
local swio=$9
swio=${swio/SWIO=1/_swio}
swio=${swio/UARTNUM=/_uart}
swio=${swio/UARTALT=0/}
swio=${swio/UARTALT=/_alt}
swio=${swio/RX=AtmelP/_rx}
swio=${swio/TX=AtmelP/_tx}
swio=${swio// /}
swio="${swio%"${swio##*[![:space:]]}"}" # Remove trailing whitespace