forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boards.txt.py
executable file
·1596 lines (1448 loc) · 62.7 KB
/
boards.txt.py
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
#!/usr/bin/env python
# boards.txt python builder for esp8266/Arduino
# Copyright (C) 2017 community
# Permission is hereby granted, free of charge, to any person who buy it,
# use it, break it, fix it, trash it, change it, mail - upgrade it, charge
# it, point it, zoom it, press it, snap it, work it, quick - erase it, write
# it, cut it, paste it, save it, load it, check it, quick - rewrite it, plug
# it, play it, burn it, rip it, drag and drop it, zip - unzip it, lock it,
# fill it, call it, find it, view it, code it, jam - unlock it, surf it,
# scroll it, pause it, click it, cross it, crack it, switch - update it,
# name it, rate it, tune it, print it, scan it, send it, fax - rename it,
# touch it, bring it, pay it, watch it, turn it, leave it, start - format
# it.
# diff ldscripts after regeneration:
# (cd tools/sdk/ld/backup/; for i in *; do diff -u $i ../$i|less; done)
# board descriptor:
# name display name
# opts: specific entries dicts (overrides same entry in macros)
# macro: common entries
# unmodifiable parameters:
# resetmethod_ck/_nodemcu/_none/_dtrset: fixed reset method
# flashmode_qio/_dio/_qout/_dout: fixed flash mode
# flashfreq_40/_80: fixed flash frequency
# selection menu:
# resetmethod_menu menus for reset method
# resetmethod_menu_extra menus for additional reset methods
# crystalfreq/flashfreq_menu: menus for crystal/flash frequency selection
# flashmode_menu: menus for flashmode selection (dio/dout/qio/qout)
# 512K/1M/2M/4M/8M/16M: menus for flash & SPIFFS size
# lwip/lwip2 menus for available lwip versions
import os
import sys
import collections
import getopt
import re
# serial upload speed order in menu
# default is 115 for every board unless specified with 'serial' in board
# or by user command line
speeds = collections.OrderedDict([
( '9', [ 's9', 's57', 's115', 's230', 's256', 's460', 's512', 's921' ]),
( '57', [ 's57', 's9', 's115', 's230', 's256', 's460', 's512', 's921' ]),
( '115', [ 's115', 's9', 's57', 's230', 's256', 's460', 's512', 's921' ]),
( '230', [ 's230', 's9', 's57', 's115', 's256', 's460', 's512', 's921' ]),
( '256', [ 's256', 's9', 's57', 's115', 's230', 's460', 's512', 's921' ]),
( '460', [ 's460', 's9', 's57', 's115', 's230', 's256', 's512', 's921' ]),
( '512', [ 's512', 's9', 's57', 's115', 's230', 's256', 's460', 's921' ]),
( '921', [ 's921', 's9', 's57', 's115', 's230', 's256', 's460', 's512' ]),
])
# boards list
boards = collections.OrderedDict([
( 'generic', {
'name': 'Generic ESP8266 Module',
'opts': {
'.build.board': 'ESP8266_GENERIC',
},
'macro': [
'resetmethod_menu',
'resetmethod_menu_extra',
'crystalfreq_menu',
'flashfreq_menu',
'flashmode_menu',
'512K', '1M', '2M', '4M', '8M', '16M',
'led',
],
'desc': [ 'These modules come in different form factors and pinouts. See the page at ESP8266 community wiki for more info: `ESP8266 Module Family <http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family>`__.',
'',
'Usually these modules have no bootstapping resistors on board, insufficient decoupling capacitors, no voltage regulator, no reset circuit, and no USB-serial adapter. This makes using them somewhat tricky, compared to development boards which add these features.',
'',
'In order to use these modules, make sure to observe the following:',
'',
'- **Provide sufficient power to the module.** For stable use of the ESP8266 a power supply with 3.3V and >= 250mA is required. Using the power available from USB to Serial adapter is not recommended, these adapters typically do not supply enough current to run ESP8266 reliably in every situation. An external supply or regulator alongwith filtering capacitors is preferred.',
'',
'- **Connect bootstapping resistors** to GPIO0, GPIO2, GPIO15 according to the schematics below.',
'',
'- **Put ESP8266 into bootloader mode** before uploading code.',
'',
'Serial Adapter',
'--------------',
'',
'There are many different USB to Serial adapters / boards. To be able to put ESP8266 into bootloader mode using serial handshaking lines, you need the adapter which breaks out RTS and DTR outputs. CTS and DSR are not useful for upload (they are inputs). Make sure the adapter can work with 3.3V IO voltage: it should have a jumper or a switch to select between 5V and 3.3V, or be marked as 3.3V only.',
'',
'Adapters based around the following ICs should work:',
'',
'- FT232RL',
'- CP2102',
'- CH340G',
'',
'PL2303-based adapters are known not to work on Mac OS X. See https://github.com/igrr/esptool-ck/issues/9 for more info.',
'',
'Minimal Hardware Setup for Bootloading and Usage',
'------------------------------------------------',
'',
'+-----------------+------------+------------------+',
'| PIN | Resistor | Serial Adapter |',
'+=================+============+==================+',
'| VCC | | VCC (3.3V) |',
'+-----------------+------------+------------------+',
'| GND | | GND |',
'+-----------------+------------+------------------+',
'| TX or GPIO2\* | | RX |',
'+-----------------+------------+------------------+',
'| RX | | TX |',
'+-----------------+------------+------------------+',
'| GPIO0 | PullUp | DTR |',
'+-----------------+------------+------------------+',
'| Reset\* | PullUp | RTS |',
'+-----------------+------------+------------------+',
'| GPIO15\* | PullDown | |',
'+-----------------+------------+------------------+',
'| CH\_PD | PullUp | |',
'+-----------------+------------+------------------+',
'',
'- Note',
'- GPIO15 is also named MTDO',
'- Reset is also named RSBT or REST (adding PullUp improves the',
' stability of the module)',
'- GPIO2 is alternative TX for the boot loader mode',
'- **Directly connecting a pin to VCC or GND is not a substitute for a',
' PullUp or PullDown resistor, doing this can break upload management',
' and the serial console, instability has also been noted in some',
' cases.**',
'',
'ESP to Serial',
'-------------',
'',
'.. figure:: ESP_to_serial.png',
' :alt: ESP to Serial',
'',
' ESP to Serial',
'',
'Minimal Hardware Setup for Bootloading only',
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~',
'',
'ESPxx Hardware',
'',
'+---------------+------------+------------------+',
'| PIN | Resistor | Serial Adapter |',
'+===============+============+==================+',
'| VCC | | VCC (3.3V) |',
'+---------------+------------+------------------+',
'| GND | | GND |',
'+---------------+------------+------------------+',
'| TX or GPIO2 | | RX |',
'+---------------+------------+------------------+',
'| RX | | TX |',
'+---------------+------------+------------------+',
'| GPIO0 | | GND |',
'+---------------+------------+------------------+',
'| Reset | | RTS\* |',
'+---------------+------------+------------------+',
'| GPIO15 | PullDown | |',
'+---------------+------------+------------------+',
'| CH\_PD | PullUp | |',
'+---------------+------------+------------------+',
'',
'- Note',
'- if no RTS is used a manual power toggle is needed',
'',
'Minimal Hardware Setup for Running only',
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~',
'',
'ESPxx Hardware',
'',
'+----------+------------+----------------+',
'| PIN | Resistor | Power supply |',
'+==========+============+================+',
'| VCC | | VCC (3.3V) |',
'+----------+------------+----------------+',
'| GND | | GND |',
'+----------+------------+----------------+',
'| GPIO0 | PullUp | |',
'+----------+------------+----------------+',
'| GPIO15 | PullDown | |',
'+----------+------------+----------------+',
'| CH\_PD | PullUp | |',
'+----------+------------+----------------+',
'',
'Minimal',
'-------',
'',
'.. figure:: ESP_min.png',
' :alt: ESP min',
'',
' ESP min',
'',
'Improved Stability',
'------------------',
'',
'.. figure:: ESP_improved_stability.png',
' :alt: ESP improved stability',
'',
' ESP improved stability',
'',
'Boot Messages and Modes',
'-----------------------',
'',
'The ESP module checks at every boot the Pins 0, 2 and 15. based on them its boots in different modes:',
'',
'+----------+---------+---------+------------------------------------+',
'| GPIO15 | GPIO0 | GPIO2 | Mode |',
'+==========+=========+=========+====================================+',
'| 0V | 0V | 3.3V | Uart Bootloader |',
'+----------+---------+---------+------------------------------------+',
'| 0V | 3.3V | 3.3V | Boot sketch (SPI flash) |',
'+----------+---------+---------+------------------------------------+',
'| 3.3V | x | x | SDIO mode (not used for Arduino) |',
'+----------+---------+---------+------------------------------------+',
'',
'at startup the ESP prints out the current boot mode example:',
'',
'::',
'',
' rst cause:2, boot mode:(3,6)',
'',
'note: - GPIO2 is used as TX output and the internal Pullup is enabled on boot.',
'',
'rst cause',
'~~~~~~~~~',
'',
'+----------+------------------+',
'| Number | Description |',
'+==========+==================+',
'| 0 | unknown |',
'+----------+------------------+',
'| 1 | normal boot |',
'+----------+------------------+',
'| 2 | reset pin |',
'+----------+------------------+',
'| 3 | software reset |',
'+----------+------------------+',
'| 4 | watchdog reset |',
'+----------+------------------+',
'',
'boot mode',
'~~~~~~~~~',
'',
'the first value respects the pin setup of the Pins 0, 2 and 15.',
'',
'+----------+----------+---------+---------+-------------+',
'| Number | GPIO15 | GPIO0 | GPIO2 | Mode |',
'+==========+==========+=========+=========+=============+',
'| 0 | 0V | 0V | 0V | Not valid |',
'+----------+----------+---------+---------+-------------+',
'| 1 | 0V | 0V | 3.3V | Uart |',
'+----------+----------+---------+---------+-------------+',
'| 2 | 0V | 3.3V | 0V | Not valid |',
'+----------+----------+---------+---------+-------------+',
'| 3 | 0V | 3.3V | 3.3V | Flash |',
'+----------+----------+---------+---------+-------------+',
'| 4 | 3.3V | 0V | 0V | SDIO |',
'+----------+----------+---------+---------+-------------+',
'| 5 | 3.3V | 0V | 3.3V | SDIO |',
'+----------+----------+---------+---------+-------------+',
'| 6 | 3.3V | 3.3V | 0V | SDIO |',
'+----------+----------+---------+---------+-------------+',
'| 7 | 3.3V | 3.3V | 3.3V | SDIO |',
'+----------+----------+---------+---------+-------------+',
'',
'note: - number = ((GPIO15 << 2) \| (GPIO0 << 1) \| GPIO2);',
],
}),
( 'esp8285', {
'name': 'Generic ESP8285 Module',
'opts': {
'.build.board': 'ESP8266_ESP01',
},
'macro': [
'resetmethod_menu',
'resetmethod_menu_extra',
'crystalfreq_menu',
'flashmode_dout',
'flashfreq_40',
'1M',
'led',
],
'desc': [ 'ESP8285 (`datasheet <http://www.espressif.com/sites/default/files/0a-esp8285_datasheet_en_v1.0_20160422.pdf>`__) is a multi-chip package which contains ESP8266 and 1MB flash. All points related to bootstrapping resistors and recommended circuits listed above apply to ESP8285 as well.',
'',
'Note that since ESP8285 has SPI flash memory internally connected in DOUT mode, pins 9 and 10 may be used as GPIO / I2C / PWM pins.',
],
}),
( 'espduino', {
'name': 'ESPDuino (ESP-13 Module)',
'opts': collections.OrderedDict([
( '.build.board', 'ESP8266_ESP13' ),
( '.build.variant', 'ESPDuino' ),
( '.menu.ResetMethod.v2', 'ESPduino-V2' ),
( '.menu.ResetMethod.v2.upload.resetmethod', 'nodemcu' ),
( '.menu.ResetMethod.v1', 'ESPduino-V1' ),
( '.menu.ResetMethod.v1.upload.resetmethod', 'ck' ),
( '.menu.UploadTool.esptool', 'Serial' ),
( '.menu.UploadTool.esptool.upload.tool', 'esptool' ),
( '.menu.UploadTool.esptool.upload.verbose', '-vv' ),
( '.menu.UploadTool.espota', 'OTA' ),
( '.menu.UploadTool.espota.upload.tool', 'espota' ),
]),
'macro': [
'flashmode_dio',
'flashfreq_40',
'4M',
],
'desc': [ '*TODO*' ],
}),
( 'huzzah', {
'name': 'Adafruit Feather HUZZAH ESP8266',
'opts': {
'.build.board': 'ESP8266_ESP12',
'.build.variant': 'adafruit',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'desc': [ 'The Adafruit Feather HUZZAH ESP8266 is an Arduino-compatible Wi-Fi development board powered by Ai-Thinker\'s ESP-12S, clocked at 80 MHz at 3.3V logic. A high-quality SiLabs CP2104 USB-Serial chip is included so that you can upload code at a blistering 921600 baud for fast development time. It also has auto-reset so no noodling with pins and reset button pressings. A 3.7V Lithium polymer battery connector is included, making it ideal for portable projects. The Adafruit Feather HUZZAH ESP8266 will automatically recharge a connected battery when USB power is available.',
'',
'Product page: https://www.adafruit.com/product/2821'
],
}),
( 'cw01', {
'name': 'XinaBox CW01',
'opts': {
'.build.board': 'ESP8266_GENERIC',
'.build.variant': 'xinabox',
},
'macro': [
'resetmethod_nodemcu',
'crystalfreq_menu',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'desc': [ 'The XinaBox CW01 is an Arduino-compatible Wi-Fi development board powered by Ai-Thinker\'s ESP-12F, clocked at 80 MHz at 3.3V logic. It has an onboard RGB led.',
'',
'Product page: https://xinabox.cc/products/CW01'
],
}),
( 'espresso_lite_v1', {
'name': 'ESPresso Lite 1.0',
'opts': {
'.build.board': 'ESP8266_ESPRESSO_LITE_V1',
'.build.variant': 'espresso_lite_v1',
},
'macro': [
'flashmode_dio',
'flashfreq_40',
'4M',
'resetmethod_menu',
],
'desc': [ 'ESPresso Lite 1.0 (beta version) is an Arduino-compatible Wi-Fi development board powered by Espressif System\'s own ESP8266 WROOM-02 module. It has breadboard-friendly breakout pins with in-built LED, two reset/flash buttons and a user programmable button . The operating voltage is 3.3VDC, regulated with 800mA maximum current. Special distinctive features include on-board I2C pads that allow direct connection to OLED LCD and sensor boards.', ]
}),
( 'espresso_lite_v2', {
'name': 'ESPresso Lite 2.0',
'opts': {
'.build.board': 'ESP8266_ESPRESSO_LITE_V2',
'.build.variant': 'espresso_lite_v2',
},
'macro': [
'flashmode_dio',
'flashfreq_40',
'4M',
'resetmethod_menu',
],
'desc': [ 'ESPresso Lite 2.0 is an Arduino-compatible Wi-Fi development board based on an earlier V1 (beta version). Re-designed together with Cytron Technologies, the newly-revised ESPresso Lite V2.0 features the auto-load/auto-program function, eliminating the previous need to reset the board manually before flashing a new program. It also feature two user programmable side buttons and a reset button. The special distinctive features of on-board pads for I2C sensor and actuator is retained.', ]
}),
( 'phoenix_v1', {
'name': 'Phoenix 1.0',
'opts': {
'.build.board': 'ESP8266_PHOENIX_V1',
'.build.variant': 'phoenix_v1',
},
'macro': [
'flashmode_dio',
'flashfreq_40',
'4M',
'resetmethod_menu',
],
'desc': [ 'Product page: http://www.espert.co', ],
}),
( 'phoenix_v2', {
'name': 'Phoenix 2.0',
'opts': {
'.build.board': 'ESP8266_PHOENIX_V2',
'.build.variant': 'phoenix_v2',
},
'macro': [
'flashmode_dio',
'flashfreq_40',
'4M',
'resetmethod_menu',
],
'desc': [ 'Product page: http://www.espert.co', ],
}),
( 'nodemcu', {
'name': 'NodeMCU 0.9 (ESP-12 Module)',
'opts': {
'.build.board': 'ESP8266_NODEMCU',
'.build.variant': 'nodemcu',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'desc': [ 'Pin mapping',
'~~~~~~~~~~~',
'',
'Pin numbers written on the board itself do not correspond to ESP8266 GPIO pin numbers. Constants are defined to make using this board easier:',
'',
'.. code:: c++',
'',
' static const uint8_t D0 = 16;',
' static const uint8_t D1 = 5;',
' static const uint8_t D2 = 4;',
' static const uint8_t D3 = 0;',
' static const uint8_t D4 = 2;',
' static const uint8_t D5 = 14;',
' static const uint8_t D6 = 12;',
' static const uint8_t D7 = 13;',
' static const uint8_t D8 = 15;',
' static const uint8_t D9 = 3;',
' static const uint8_t D10 = 1;',
'',
'If you want to use NodeMCU pin 5, use D5 for pin number, and it will be translated to \'real\' GPIO pin 14.',
],
}),
( 'nodemcuv2', {
'name': 'NodeMCU 1.0 (ESP-12E Module)',
'opts': {
'.build.board': 'ESP8266_NODEMCU',
'.build.variant': 'nodemcu',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dio',
'flashfreq_40',
'4M',
],
'desc': [ 'This module is sold under many names for around $6.50 on AliExpress and it\'s one of the cheapest, fully integrated ESP8266 solutions.',
'',
'It\'s an open hardware design with an ESP-12E core and 4 MB of SPI flash.',
'',
'According to the manufacturer, "with a micro USB cable, you can connect NodeMCU devkit to your laptop and flash it without any trouble". This is more or less true: the board comes with a CP2102 onboard USB to serial adapter which just works, well, the majority of the time. Sometimes flashing fails and you have to reset the board by holding down FLASH +',
'RST, then releasing FLASH, then releasing RST. This forces the CP2102 device to power cycle and to be re-numbered by Linux.',
'',
'The board also features a NCP1117 voltage regulator, a blue LED on GPIO16 and a 220k/100k Ohm voltage divider on the ADC input pin.',
'The ESP-12E usually has a led connected on GPIO2.',
'',
'Full pinout and PDF schematics can be found `here <https://github.com/nodemcu/nodemcu-devkit-v1.0>`__',
],
}),
( 'modwifi', {
'name': 'Olimex MOD-WIFI-ESP8266(-DEV)',
'opts': {
'.build.board': 'MOD_WIFI_ESP8266',
'.build.variant': 'modwifi',
},
'macro': [
'resetmethod_ck',
'flashmode_qio',
'flashfreq_40',
'2M',
],
'desc': [ 'This board comes with 2 MB of SPI flash and optional accessories (e.g. evaluation board ESP8266-EVB or BAT-BOX for batteries).',
'',
'The basic module has three solder jumpers that allow you to switch the operating mode between SDIO, UART and FLASH.',
'',
'The board is shipped for FLASH operation mode, with jumpers TD0JP=0, IO0JP=1, IO2JP=1.',
'',
'Since jumper IO0JP is tied to GPIO0, which is PIN 21, you\'ll have to ground it before programming with a USB to serial adapter and reset the board by power cycling it.',
'',
'UART pins for programming and serial I/O are GPIO1 (TXD, pin 3) and GPIO3 (RXD, pin 4).',
'',
'You can find the board schematics `here <https://github.com/OLIMEX/ESP8266/blob/master/HARDWARE/MOD-WIFI-ESP8266-DEV/MOD-WIFI-ESP8266-DEV_schematic.pdf>`__',
],
}),
( 'thing', {
'name': 'SparkFun ESP8266 Thing',
'opts': {
'.build.board': 'ESP8266_THING',
'.build.variant': 'thing',
},
'macro': [
'resetmethod_ck',
'flashmode_qio',
'flashfreq_40',
'512K',
],
'desc': [ 'Product page: https://www.sparkfun.com/products/13231' ],
}),
( 'thingdev', {
'name': 'SparkFun ESP8266 Thing Dev',
'opts': {
'.build.board': 'ESP8266_THING_DEV',
'.build.variant': 'thing',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dio',
'flashfreq_40',
'512K',
],
'desc': [ 'Product page: https://www.sparkfun.com/products/13711' ],
}),
( 'esp210', {
'name': 'SweetPea ESP-210',
'opts': {
'.build.board': 'ESP8266_ESP210',
},
'macro': [
'resetmethod_ck',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'serial': '57',
'desc': [ '*TODO*' ],
}),
( 'd1_mini', {
'name': 'LOLIN(WEMOS) D1 R2 & mini',
'opts': {
'.build.board': 'ESP8266_WEMOS_D1MINI',
'.build.variant': 'd1_mini',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dio',
'flashfreq_40',
'4M',
],
'serial': '921',
'desc': [ 'Product page: https://www.wemos.cc/' ],
}),
( 'd1_mini_pro', {
'name': 'LOLIN(WEMOS) D1 mini Pro',
'opts': {
'.build.board': 'ESP8266_WEMOS_D1MINIPRO',
'.build.variant': 'd1_mini',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dio',
'flashfreq_40',
'16M',
],
'serial': '921',
'desc': [ 'Product page: https://www.wemos.cc/' ],
}),
( 'd1_mini_lite', {
'name': 'LOLIN(WEMOS) D1 mini Lite',
'opts': {
'.build.board': 'ESP8266_WEMOS_D1MINILITE',
'.build.variant': 'd1_mini',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dout',
'flashfreq_40',
'1M',
],
'serial': '921',
'desc': [
'Parameters in Arduino IDE:',
'~~~~~~~~~~~~~~~~~~~~~~~~~',
'',
'- Card: "WEMOS D1 Mini Lite"',
'- Flash Size: "1M (512K SPIFFS)"',
'- CPU Frequency: "80 Mhz"',
'- Upload Speed: "230400"',
'',
'Power:',
'~~~~~',
'',
'- 5V pin : 4.7V 500mA output when the board is powered by USB ; 3.5V-6V input',
'- 3V3 pin : 3.3V 500mA regulated output',
'- Digital pins : 3.3V 30mA.',
'',
'links:',
'~~~~~',
'',
'- Product page: https://www.wemos.cc/',
'- Board schematic: https://wiki.wemos.cc/_media/products:d1:sch_d1_mini_lite_v1.0.0.pdf',
'- ESP8285 datasheet: https://www.espressif.com/sites/default/files/0a-esp8285_datasheet_en_v1.0_20160422.pdf',
'- Voltage regulator datasheet: http://pdf-datasheet.datasheet.netdna-cdn.com/pdf-down/M/E/6/ME6211-Microne.pdf',
],
}),
( 'd1', {
'name': 'WeMos D1 R1',
'opts': {
'.build.board': 'ESP8266_WEMOS_D1R1',
'.build.variant': 'd1',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dio',
'flashfreq_40',
'4M',
],
'serial': '921',
'desc': [ 'Product page: https://www.wemos.cc/' ],
}),
( 'espino', {
'name': 'ESPino (ESP-12 Module)',
'opts': {
'.build.board': 'ESP8266_ESP12',
'.build.variant': 'espino',
},
'macro': [
'resetmethod_menu',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'desc': [ 'ESPino integrates the ESP-12 module with a 3.3v regulator, CP2104 USB-Serial bridge and a micro USB connector for easy programming. It is designed for fitting in a breadboard and has an RGB Led and two buttons for easy prototyping.',
'',
'For more information about the hardware, pinout diagram and programming procedures, please see the `datasheet <https://github.com/makerlabmx/ESPino-tools/raw/master/Docs/ESPino-Datasheet-EN.pdf>`__.',
'',
'Product page: http://www.espino.io/en',
],
}),
( 'espinotee', {
'name': 'ThaiEasyElec\'s ESPino',
'opts': {
'.build.board': 'ESP8266_ESP13',
'.build.variant': 'espinotee',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'desc': [ 'ESPino by ThaiEasyElec using WROOM-02 module from Espressif Systems with 4 MB Flash.',
'',
'We will update an English description soon. - Product page:',
'http://thaieasyelec.com/products/wireless-modules/wifi-modules/espino-wifi-development-board-detail.html',
'- Schematics:',
'www.thaieasyelec.com/downloads/ETEE052/ETEE052\_ESPino\_Schematic.pdf -',
'Dimensions:',
'http://thaieasyelec.com/downloads/ETEE052/ETEE052\_ESPino\_Dimension.pdf',
'- Pinouts:',
'http://thaieasyelec.com/downloads/ETEE052/ETEE052\_ESPino\_User\_Manual\_TH\_v1\_0\_20160204.pdf (Please see pg. 8)',
],
}),
( 'wifinfo', {
'name': 'WifInfo',
'opts': {
'.build.board': 'WIFINFO',
'.build.variant': 'wifinfo',
'.menu.ESPModule.ESP07192': 'ESP07 (1M/192K SPIFFS)',
'.menu.ESPModule.ESP07192.build.board': 'ESP8266_ESP07',
'.menu.ESPModule.ESP07192.build.flash_size': '1M',
'.menu.ESPModule.ESP07192.build.flash_ld': 'eagle.flash.1m192.ld',
'.menu.ESPModule.ESP07192.build.spiffs_start': '0xCB000',
'.menu.ESPModule.ESP07192.build.spiffs_end': '0xFB000',
'.menu.ESPModule.ESP07192.build.spiffs_blocksize': '4096',
'.menu.ESPModule.ESP07192.upload.maximum_size': '827376',
'.menu.ESPModule.ESP12': 'ESP12 (4M/1M SPIFFS)',
'.menu.ESPModule.ESP12.build.board': 'ESP8266_ESP12',
'.menu.ESPModule.ESP12.build.flash_size': '4M',
'.menu.ESPModule.ESP12.build.flash_ld': 'eagle.flash.4m1m.ld',
'.menu.ESPModule.ESP12.build.spiffs_start': '0x300000',
'.menu.ESPModule.ESP12.build.spiffs_end': '0x3FB000',
'.menu.ESPModule.ESP12.build.spiffs_blocksize': '8192',
'.menu.ESPModule.ESP12.build.spiffs_pagesize': '256',
'.menu.ESPModule.ESP12.upload.maximum_size': '1044464',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_qio',
'flashfreq_menu',
'1M',
],
'desc': [ 'WifInfo integrates the ESP-12 or ESP-07+Ext antenna module with a 3.3v regulator and the hardware to be able to measure French telemetry issue from ERDF powering meter serial output. It has a USB connector for powering, an RGB WS2812 Led, 4 pins I2C connector to fit OLED or sensor, and two buttons + FTDI connector and auto reset feature.',
'',
'For more information, please see WifInfo related `blog <http://hallard.me/category/wifinfo/>`__ entries, `github <https://github.com/hallard/WifInfo>`__ and `community <https://community.hallard.me/category/16/wifinfo>`__ forum.',
],
}),
( 'arduino-esp8266', {
'name': 'Arduino',
'opts': {
'.build.board': 'ESP8266_ARDUINO',
'.menu.BoardModel.primo': 'Primo',
'.menu.BoardModel.primo.build.board': 'ESP8266_ARDUINO_PRIMO',
'.menu.BoardModel.primo.build.variant': 'arduino_spi',
'.menu.BoardModel.primo.build.extra_flags': '-DF_CRYSTAL=40000000 -DESP8266',
'.menu.BoardModel.unowifideved': 'Uno WiFi',
'.menu.BoardModel.unowifideved.build.board': 'ESP8266_ARDUINO_UNOWIFI',
'.menu.BoardModel.unowifideved.build.variant': 'arduino_uart',
'.menu.BoardModel.unowifideved.build.extra_flags=-DF_CRYSTAL': '40000000 -DESP8266',
'.menu.BoardModel.starottodeved': 'Star OTTO',
'.menu.BoardModel.starottodeved.build.variant': 'arduino_uart',
'.menu.BoardModel.starottodeved.build.board': 'ESP8266_ARDUINO_STAR_OTTO',
'.menu.BoardModel.starottodeved.build.extra_flags': '-DF_CRYSTAL=40000000 -DESP8266',
},
'macro': [
'resetmethod_ck',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'desc': [ '*TODO*' ],
}),
( 'gen4iod', {
'name': '4D Systems gen4 IoD Range',
'opts': {
'.build.board': 'GEN4_IOD',
'.build.f_cpu': '160000000L',
'.build.variant': 'generic',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dio',
'flashfreq_80',
'512K',
],
'desc': [ 'gen4-IoD Range of ESP8266 powered Display Modules by 4D Systems.',
'',
'2.4", 2.8" and 3.2" TFT LCD with uSD card socket and Resistive Touch. Chip Antenna + uFL Connector.',
'',
'Datasheet and associated downloads can be found on the 4D Systems product page.',
'',
'The gen4-IoD range can be programmed using the Arduino IDE and also the 4D Systems Workshop4 IDE, which incorporates many additional graphics benefits. GFX4d library is available, along with a number of demo applications.',
'',
'- Product page: http://www.4dsystems.com.au/product/gen4-IoD',
],
}),
( 'oak', {
'name': 'Digistump Oak',
'opts': {
'.build.board': 'ESP8266_OAK',
'.build.variant': 'oak',
'.upload.maximum_size': '1040368',
},
'macro': [
'resetmethod_none',
'flashmode_dio',
'flashfreq_40',
'4M',
],
'serial': '921',
'desc': [ 'The Oak requires an `Serial Adapter`_ for a serial connection or flashing; its micro USB port is only for power.',
'',
'To make a serial connection, wire the adapter\'s **TX to P3**, **RX to P4**, and **GND** to **GND**. Supply 3.3v from the serial adapter if not already powered via USB.',
'',
'To put the board into bootloader mode, configure a serial connection as above, connect **P2 to GND**, then re-apply power. Once flashing is complete, remove the connection from P2 to GND, then re-apply power to boot into normal mode.',
],
}),
( 'wifiduino', {
'name': 'WiFiduino',
'opts': {
'.build.board': 'WIFIDUINO_ESP8266',
'.build.variant': 'wifiduino',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_dio',
'flashfreq_40',
'4M',
],
'serial': '921',
'desc': [ 'Product page: https://wifiduino.com/esp8266' ],
}),
( 'wifi_slot', {
'name': 'Amperka WiFi Slot',
'opts': {
'.build.board': 'AMPERKA_WIFI_SLOT',
'.build.variant': 'wifi_slot',
},
'macro': [
'resetmethod_nodemcu',
'flashfreq_menu',
'flashmode_menu',
'1M', '2M',
],
'desc': [ 'Product page: http://wiki.amperka.ru/wifi-slot' ],
}),
( 'wiolink', {
'name': 'Seeed Wio Link',
'opts': {
'.build.board': 'ESP8266_WIO_LINK',
'.build.variant': 'wiolink',
},
'macro': [
'resetmethod_nodemcu',
'flashmode_qio',
'flashfreq_40',
'4M',
],
'desc': [ 'Wio Link is designed to simplify your IoT development. It is an ESP8266 based open-source Wi-Fi development board to create IoT applications by virtualizing plug-n-play modules to RESTful APIs with mobile APPs. Wio Link is also compatible with the Arduino IDE.',
'',
'Please DO NOTICE that you MUST pull up pin 15 to enable the power for Grove ports, the board is designed like this for the purpose of peripherals power management.',
'',
'Product page: https://www.seeedstudio.com/Wio-Link-p-2604.html'
],
})
])
################################################################
macros = {
'defaults': collections.OrderedDict([
( '.upload.tool', 'esptool' ),
( '.upload.maximum_data_size', '81920' ),
( '.upload.wait_for_upload_port', 'true' ),
( '.upload.erase_cmd', ''),
( '.serial.disableDTR', 'true' ),
( '.serial.disableRTS', 'true' ),
( '.build.mcu', 'esp8266' ),
( '.build.core', 'esp8266' ),
( '.build.variant', 'generic' ),
( '.build.spiffs_pagesize', '256' ),
( '.build.debug_port', '' ),
( '.build.debug_level', '' ),
]),
#######################
'cpufreq_menu': collections.OrderedDict([
( '.menu.xtal.80', '80 MHz' ),
( '.menu.xtal.80.build.f_cpu', '80000000L' ),
( '.menu.xtal.160', '160 MHz' ),
( '.menu.xtal.160.build.f_cpu', '160000000L' ),
]),
'vtable_menu': collections.OrderedDict([
( '.menu.vt.flash', 'Flash'),
( '.menu.vt.flash.build.vtable_flags', '-DVTABLES_IN_FLASH'),
( '.menu.vt.heap', 'Heap'),
( '.menu.vt.heap.build.vtable_flags', '-DVTABLES_IN_DRAM'),
( '.menu.vt.iram', 'IRAM'),
( '.menu.vt.iram.build.vtable_flags', '-DVTABLES_IN_IRAM'),
]),
'crystalfreq_menu': collections.OrderedDict([
( '.menu.CrystalFreq.26', '26 MHz' ),
( '.menu.CrystalFreq.40', '40 MHz' ),
( '.menu.CrystalFreq.40.build.extra_flags', '-DF_CRYSTAL=40000000 -DESP8266' ),
]),
'flashfreq_menu': collections.OrderedDict([
( '.menu.FlashFreq.40', '40MHz' ),
( '.menu.FlashFreq.40.build.flash_freq', '40' ),
( '.menu.FlashFreq.80', '80MHz' ),
( '.menu.FlashFreq.80.build.flash_freq', '80' ),
]),
'flashfreq_40': collections.OrderedDict([
( '.build.flash_freq', '40' ),
]),
'flashfreq_80': collections.OrderedDict([
( '.build.flash_freq', '80' ),
]),
####################### menu.resetmethod
'resetmethod_menu': collections.OrderedDict([
( '.menu.ResetMethod.ck', 'ck' ),
( '.menu.ResetMethod.ck.upload.resetmethod', 'ck' ),
( '.menu.ResetMethod.nodemcu', 'nodemcu' ),
( '.menu.ResetMethod.nodemcu.upload.resetmethod', 'nodemcu' ),
]),
'resetmethod_menu_extra': collections.OrderedDict([
( '.menu.ResetMethod.none', 'none' ),
( '.menu.ResetMethod.none.upload.resetmethod', 'none' ),
( '.menu.ResetMethod.dtrset', 'dtrset' ),
( '.menu.ResetMethod.dtrset.upload.resetmethod', 'dtrset' ),
]),
####################### upload.resetmethod
'resetmethod_ck': collections.OrderedDict([
( '.upload.resetmethod', 'ck' ),
]),
'resetmethod_nodemcu': collections.OrderedDict([
( '.upload.resetmethod', 'nodemcu' ),
]),
'resetmethod_none': collections.OrderedDict([
( '.upload.resetmethod', 'none' ),
]),
'resetmethod_dtrset': collections.OrderedDict([
( '.upload.resetmethod', 'dtrset' ),
]),
####################### menu.FlashMode
'flashmode_menu': collections.OrderedDict([
( '.menu.FlashMode.qio', 'QIO' ),
( '.menu.FlashMode.qio.build.flash_mode', 'qio' ),
( '.menu.FlashMode.qout', 'QOUT' ),
( '.menu.FlashMode.qout.build.flash_mode', 'qout' ),
( '.menu.FlashMode.dio', 'DIO' ),
( '.menu.FlashMode.dio.build.flash_mode', 'dio' ),
( '.menu.FlashMode.dout', 'DOUT' ),
( '.menu.FlashMode.dout.build.flash_mode', 'dout' ),
]),
####################### default flash_mode
'flashmode_dio': collections.OrderedDict([
( '.build.flash_mode', 'dio' ),
]),
'flashmode_qio': collections.OrderedDict([
( '.build.flash_mode', 'qio' ),
]),
'flashmode_dout': collections.OrderedDict([
( '.build.flash_mode', 'dout' ),
]),
'flashmode_qout': collections.OrderedDict([
( '.build.flash_mode', 'qout' ),
]),
####################### lwip
'lwip2': collections.OrderedDict([
( '.menu.ip.lm2', 'v2 Lower Memory' ),
( '.menu.ip.lm2.build.lwip_include', 'lwip2/include' ),
( '.menu.ip.lm2.build.lwip_lib', '-llwip2' ),
( '.menu.ip.lm2.build.lwip_flags', '-DLWIP_OPEN_SRC -DTCP_MSS=536' ),
( '.menu.ip.hb2', 'v2 Higher Bandwidth' ),
( '.menu.ip.hb2.build.lwip_include', 'lwip2/include' ),
( '.menu.ip.hb2.build.lwip_lib', '-llwip2_1460' ),
( '.menu.ip.hb2.build.lwip_flags', '-DLWIP_OPEN_SRC -DTCP_MSS=1460' ),
]),
'lwip': collections.OrderedDict([
( '.menu.ip.hb1', 'v1.4 Higher Bandwidth' ),
( '.menu.ip.hb1.build.lwip_lib', '-llwip_gcc' ),
( '.menu.ip.hb1.build.lwip_flags', '-DLWIP_OPEN_SRC' ),
#( '.menu.ip.Espressif', 'v1.4 Espressif (xcc)' ),
#( '.menu.ip.Espressif.build.lwip_lib', '-llwip' ),
#( '.menu.ip.Espressif.build.lwip_flags', '-DLWIP_MAYBE_XCC' ),
( '.menu.ip.src', 'v1.4 Compile from source' ),
( '.menu.ip.src.build.lwip_lib', '-llwip_src' ),
( '.menu.ip.src.build.lwip_flags', '-DLWIP_OPEN_SRC' ),
( '.menu.ip.src.recipe.hooks.sketch.prebuild.1.pattern', 'make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-"' ),
]),
####################### serial
's9': collections.OrderedDict([
( '.menu.baud.9600', '9600' ),
( '.menu.baud.9600.upload.speed', '9600' ),
]),
's57': collections.OrderedDict([
( '.menu.baud.57600', '57600' ),
( '.menu.baud.57600.upload.speed', '57600' ),
]),
's115': collections.OrderedDict([
( '.menu.baud.115200', '115200' ),
( '.menu.baud.115200.upload.speed', '115200' ),
]),
's256': collections.OrderedDict([
( '.menu.baud.256000.windows', '256000' ),
( '.menu.baud.256000.upload.speed', '256000' ),
]),
's230': collections.OrderedDict([
( '.menu.baud.230400.linux', '230400' ),
( '.menu.baud.230400.macosx', '230400' ),
( '.menu.baud.230400.upload.speed', '230400' ),
]),
's460': collections.OrderedDict([
( '.menu.baud.460800.linux', '460800' ),
( '.menu.baud.460800.macosx', '460800' ),
( '.menu.baud.460800.upload.speed', '460800' ),
]),
's512': collections.OrderedDict([
( '.menu.baud.512000.windows', '512000' ),
( '.menu.baud.512000.upload.speed', '512000' ),
]),
's921': collections.OrderedDict([
( '.menu.baud.921600', '921600' ),
( '.menu.baud.921600.upload.speed', '921600' ),
]),
####################### flash erase
'flash_erase_menu': collections.OrderedDict([
( '.menu.wipe.none', 'Only Sketch' ),
( '.menu.wipe.none.upload.erase_cmd', '' ),
( '.menu.wipe.sdk', 'Sketch + WiFi Settings' ),
( '.menu.wipe.sdk.upload.erase_cmd', '-ca "{build.rfcal_addr}" -cz 0x4000' ),
( '.menu.wipe.all', 'All Flash Contents' ),