Skip to content

Commit e9a9033

Browse files
committed
TEMP: add WiFi firmware and flasher
1 parent 5bdf0b3 commit e9a9033

File tree

289 files changed

+53096
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+53096
-0
lines changed

libraries/WiFi/extra/at_customize.bin

3 KB
Binary file not shown.

libraries/WiFi/extra/bootloader.bin

19.8 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
S'�{"Service": [{"index": 0, "uuid_len": 16, "uuid": "2800", "perm": 1, "val_max_len": 2, "val_cur_len": 2, "value": "A002"}, {"index": 1, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "02"}, {"index": 2, "uuid_len": 16, "uuid": "C300", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 3, "uuid_len": 16, "uuid": "2901", "perm": 17, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 4, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "02"}, {"index": 5, "uuid_len": 16, "uuid": "C301", "perm": 1, "val_max_len": 512, "val_cur_len": 512, "value": "3031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031"}, {"index": 6, "uuid_len": 16, "uuid": "2901", "perm": 17, "val_max_len": 512, "val_cur_len": 512, "value": "3031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031"}, {"index": 7, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "08"}, {"index": 8, "uuid_len": 16, "uuid": "C302", "perm": 16, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 9, "uuid_len": 16, "uuid": "2901", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "01"}, {"index": 10, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "04"}, {"index": 11, "uuid_len": 16, "uuid": "C303", "perm": 16, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 12, "uuid_len": 16, "uuid": "2901", "perm": 16, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 13, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "08"}, {"index": 14, "uuid_len": 16, "uuid": "C304", "perm": 16, "val_max_len": 512, "val_cur_len": 512, "value": "3031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031"}, {"index": 15, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "10"}, {"index": 16, "uuid_len": 16, "uuid": "C305", "perm": 1, "val_max_len": 512, "val_cur_len": 0, "value": ""}, {"index": 17, "uuid_len": 16, "uuid": "2902", "perm": 17, "val_max_len": 2, "val_cur_len": 2, "value": "0000"}, {"index": 18, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "20"}, {"index": 19, "uuid_len": 16, "uuid": "C306", "perm": 1, "val_max_len": 512, "val_cur_len": 0, "value": ""}, {"index": 20, "uuid_len": 16, "uuid": "2902", "perm": 17, "val_max_len": 2, "val_cur_len": 2, "value": "0000"}, {"index": 21, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "02"}, {"index": 22, "uuid_len": 16, "uuid": "C307", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 23, "uuid_len": 16, "uuid": "2901", "perm": 17, "val_max_len": 256, "val_cur_len": 1, "value": "30"}, {"index": 24, "uuid_len": 16, "uuid": "2800", "perm": 1, "val_max_len": 2, "val_cur_len": 2, "value": "A003"}, {"index": 25, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "02"}, {"index": 26, "uuid_len": 16, "uuid": "C400", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 27, "uuid_len": 16, "uuid": "2901", "perm": 17, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 28, "uuid_len": 16, "uuid": "2803", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "02"}, {"index": 29, "uuid_len": 16, "uuid": "C401", "perm": 1, "val_max_len": 1, "val_cur_len": 1, "value": "30"}, {"index": 30, "uuid_len": 16, "uuid": "2901", "perm": 17, "val_max_len": 256, "val_cur_len": 1, "value": "30"}]}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

libraries/WiFi/extra/esp-at.bin

1.43 MB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
idf_component_register(REQUIRES bootloader)
2+
3+
if(NOT BOOTLOADER_BUILD)
4+
idf_build_get_property(build_dir BUILD_DIR)
5+
6+
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
7+
partition_table_get_partition_info(app_partition_offset "--partition-boot-default" "offset")
8+
esptool_py_custom_target(app-flash app "app")
9+
10+
esptool_py_flash_target_image(app-flash app "${app_partition_offset}" "${build_dir}/${PROJECT_BIN}")
11+
esptool_py_flash_target_image(flash app "${app_partition_offset}" "${build_dir}/${PROJECT_BIN}")
12+
endif()
13+
14+
# If anti-rollback option is set then factory partition should not be in Partition Table.
15+
# In this case, should be used the partition table with two ota app without the factory.
16+
partition_table_get_partition_info(factory_offset "--partition-type app --partition-subtype factory" "offset")
17+
partition_table_get_partition_info(test_offset "--partition-type app --partition-subtype test" "offset")
18+
if(CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK AND (factory_offset OR test_offset))
19+
fail_at_build_time(check_table_contents "\
20+
ERROR: Anti-rollback option is enabled. Partition table should \
21+
consist of two ota app without factory or test partitions.")
22+
add_dependencies(app check_table_contents)
23+
endif()
24+
25+
# Generate flasher_args.json for tools that need it. The variables below are used
26+
# in configuring the template flasher_args.json.in.
27+
# Some of the variables (flash mode, size, frequency) are already set in project_include.cmake.
28+
29+
set(ESPTOOLPY_BEFORE "${CONFIG_ESPTOOLPY_BEFORE}")
30+
set(ESPTOOLPY_AFTER "${CONFIG_ESPTOOLPY_AFTER}")
31+
set(ESPTOOLPY_CHIP "${target}")
32+
if(CONFIG_ESPTOOLPY_NO_STUB)
33+
set(ESPTOOLPY_WITH_STUB false)
34+
else()
35+
set(ESPTOOLPY_WITH_STUB true)
36+
endif()
37+
38+
if(CONFIG_SECURE_BOOT OR CONFIG_SECURE_FLASH_ENC_ENABLED)
39+
# If security enabled then override post flash option
40+
set(ESPTOOLPY_AFTER "no_reset")
41+
endif()
42+
43+
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
44+
file(READ "flasher_args.json.in" flasher_args_content)
45+
string(CONFIGURE "${flasher_args_content}" flasher_args_content)
46+
47+
file_generate("${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in"
48+
CONTENT "${flasher_args_content}")
49+
file_generate("${CMAKE_BINARY_DIR}/flasher_args.json"
50+
INPUT "${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in")
51+
endif()
52+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
menu "Serial flasher config"
2+
3+
config ESPTOOLPY_PORT
4+
string "Default serial port"
5+
depends on !IDF_CMAKE
6+
default "/dev/ttyUSB0"
7+
help
8+
The serial port that's connected to the ESP chip. This can be overridden by setting the ESPPORT
9+
environment variable.
10+
11+
This value is ignored when using the CMake-based build system or idf.py.
12+
13+
choice ESPTOOLPY_BAUD
14+
prompt "Default baud rate"
15+
depends on !IDF_CMAKE
16+
default ESPTOOLPY_BAUD_115200B
17+
help
18+
Default baud rate to use while communicating with the ESP chip. Can be overridden by
19+
setting the ESPBAUD variable.
20+
21+
This value is ignored when using the CMake-based build system or idf.py.
22+
23+
config ESPTOOLPY_BAUD_115200B
24+
bool "115200 baud"
25+
config ESPTOOLPY_BAUD_230400B
26+
bool "230400 baud"
27+
config ESPTOOLPY_BAUD_921600B
28+
bool "921600 baud"
29+
config ESPTOOLPY_BAUD_2MB
30+
bool "2Mbaud"
31+
config ESPTOOLPY_BAUD_OTHER
32+
bool "Other baud rate"
33+
endchoice
34+
35+
config ESPTOOLPY_BAUD_OTHER_VAL
36+
int "Other baud rate value" if ESPTOOLPY_BAUD_OTHER
37+
default 115200
38+
39+
config ESPTOOLPY_BAUD
40+
int
41+
depends on !IDF_CMAKE
42+
default 115200 if ESPTOOLPY_BAUD_115200B
43+
default 230400 if ESPTOOLPY_BAUD_230400B
44+
default 921600 if ESPTOOLPY_BAUD_921600B
45+
default 2000000 if ESPTOOLPY_BAUD_2MB
46+
default ESPTOOLPY_BAUD_OTHER_VAL if ESPTOOLPY_BAUD_OTHER
47+
48+
config ESPTOOLPY_COMPRESSED
49+
bool "Use compressed upload"
50+
depends on !IDF_CMAKE
51+
default "y"
52+
help
53+
The flasher tool can send data compressed using zlib, letting the ROM on the ESP chip
54+
decompress it on the fly before flashing it. For most payloads, this should result in a
55+
speed increase.
56+
57+
config ESPTOOLPY_NO_STUB
58+
bool "Disable download stub"
59+
default "n"
60+
help
61+
The flasher tool sends a precompiled download stub first by default. That stub allows things
62+
like compressed downloads and more. Usually you should not need to disable that feature
63+
64+
choice ESPTOOLPY_FLASHMODE
65+
prompt "Flash SPI mode"
66+
default ESPTOOLPY_FLASHMODE_DIO
67+
help
68+
Mode the flash chip is flashed in, as well as the default mode for the
69+
binary to run in.
70+
71+
config ESPTOOLPY_FLASHMODE_QIO
72+
bool "QIO"
73+
config ESPTOOLPY_FLASHMODE_QOUT
74+
bool "QOUT"
75+
config ESPTOOLPY_FLASHMODE_DIO
76+
bool "DIO"
77+
config ESPTOOLPY_FLASHMODE_DOUT
78+
bool "DOUT"
79+
endchoice
80+
81+
# Note: we use esptool.py to flash bootloader in
82+
# dio mode for QIO/QOUT, bootloader then upgrades
83+
# itself to quad mode during initialisation
84+
config ESPTOOLPY_FLASHMODE
85+
string
86+
default "dio" if ESPTOOLPY_FLASHMODE_QIO
87+
default "dio" if ESPTOOLPY_FLASHMODE_QOUT
88+
default "dio" if ESPTOOLPY_FLASHMODE_DIO
89+
default "dout" if ESPTOOLPY_FLASHMODE_DOUT
90+
91+
choice ESPTOOLPY_FLASHFREQ
92+
prompt "Flash SPI speed"
93+
default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32
94+
default ESPTOOLPY_FLASHFREQ_80M
95+
help
96+
The SPI flash frequency to be used.
97+
98+
config ESPTOOLPY_FLASHFREQ_80M
99+
bool "80 MHz"
100+
config ESPTOOLPY_FLASHFREQ_40M
101+
bool "40 MHz"
102+
config ESPTOOLPY_FLASHFREQ_26M
103+
bool "26 MHz"
104+
config ESPTOOLPY_FLASHFREQ_20M
105+
bool "20 MHz"
106+
endchoice
107+
108+
config ESPTOOLPY_FLASHFREQ
109+
string
110+
default "80m" if ESPTOOLPY_FLASHFREQ_80M
111+
default "40m" if ESPTOOLPY_FLASHFREQ_40M
112+
default "26m" if ESPTOOLPY_FLASHFREQ_26M
113+
default "20m" if ESPTOOLPY_FLASHFREQ_20M
114+
115+
116+
choice ESPTOOLPY_FLASHSIZE
117+
prompt "Flash size"
118+
default ESPTOOLPY_FLASHSIZE_2MB
119+
help
120+
SPI flash size, in megabytes
121+
122+
config ESPTOOLPY_FLASHSIZE_1MB
123+
bool "1 MB"
124+
config ESPTOOLPY_FLASHSIZE_2MB
125+
bool "2 MB"
126+
config ESPTOOLPY_FLASHSIZE_4MB
127+
bool "4 MB"
128+
config ESPTOOLPY_FLASHSIZE_8MB
129+
bool "8 MB"
130+
config ESPTOOLPY_FLASHSIZE_16MB
131+
bool "16 MB"
132+
endchoice
133+
134+
config ESPTOOLPY_FLASHSIZE
135+
string
136+
default "1MB" if ESPTOOLPY_FLASHSIZE_1MB
137+
default "2MB" if ESPTOOLPY_FLASHSIZE_2MB
138+
default "4MB" if ESPTOOLPY_FLASHSIZE_4MB
139+
default "8MB" if ESPTOOLPY_FLASHSIZE_8MB
140+
default "16MB" if ESPTOOLPY_FLASHSIZE_16MB
141+
142+
config ESPTOOLPY_FLASHSIZE_DETECT
143+
bool "Detect flash size when flashing bootloader"
144+
default y
145+
help
146+
If this option is set, flashing the project will automatically detect
147+
the flash size of the target chip and update the bootloader image
148+
before it is flashed.
149+
150+
choice ESPTOOLPY_BEFORE
151+
prompt "Before flashing"
152+
default ESPTOOLPY_BEFORE_RESET
153+
help
154+
Configure whether esptool.py should reset the ESP32 before flashing.
155+
156+
Automatic resetting depends on the RTS & DTR signals being
157+
wired from the serial port to the ESP32. Most USB development
158+
boards do this internally.
159+
160+
config ESPTOOLPY_BEFORE_RESET
161+
bool "Reset to bootloader"
162+
config ESPTOOLPY_BEFORE_NORESET
163+
bool "No reset"
164+
endchoice
165+
166+
config ESPTOOLPY_BEFORE
167+
string
168+
default "default_reset" if ESPTOOLPY_BEFORE_RESET
169+
default "no_reset" if ESPTOOLPY_BEFORE_NORESET
170+
171+
choice ESPTOOLPY_AFTER
172+
prompt "After flashing"
173+
default ESPTOOLPY_AFTER_RESET
174+
help
175+
Configure whether esptool.py should reset the ESP32 after flashing.
176+
177+
Automatic resetting depends on the RTS & DTR signals being
178+
wired from the serial port to the ESP32. Most USB development
179+
boards do this internally.
180+
181+
config ESPTOOLPY_AFTER_RESET
182+
bool "Reset after flashing"
183+
config ESPTOOLPY_AFTER_NORESET
184+
bool "Stay in bootloader"
185+
endchoice
186+
187+
config ESPTOOLPY_AFTER
188+
string
189+
default "hard_reset" if ESPTOOLPY_AFTER_RESET
190+
default "no_reset" if ESPTOOLPY_AFTER_NORESET
191+
192+
choice ESPTOOLPY_MONITOR_BAUD
193+
prompt "'idf.py monitor' baud rate"
194+
default ESPTOOLPY_MONITOR_BAUD_115200B
195+
help
196+
Baud rate to use when running 'idf.py monitor' or 'make monitor'
197+
to view serial output from a running chip.
198+
199+
If "Same as UART Console baud rate" is chosen then the value will
200+
follow the "UART Console baud rate" config item.
201+
202+
Can override by setting the MONITORBAUD environment variable.
203+
204+
config ESPTOOLPY_MONITOR_BAUD_CONSOLE
205+
bool "Same as UART console baud rate"
206+
config ESPTOOLPY_MONITOR_BAUD_9600B
207+
bool "9600 bps"
208+
config ESPTOOLPY_MONITOR_BAUD_57600B
209+
bool "57600 bps"
210+
config ESPTOOLPY_MONITOR_BAUD_115200B
211+
bool "115200 bps"
212+
config ESPTOOLPY_MONITOR_BAUD_230400B
213+
bool "230400 bps"
214+
config ESPTOOLPY_MONITOR_BAUD_921600B
215+
bool "921600 bps"
216+
config ESPTOOLPY_MONITOR_BAUD_2MB
217+
bool "2 Mbps"
218+
config ESPTOOLPY_MONITOR_BAUD_OTHER
219+
bool "Custom baud rate"
220+
221+
endchoice
222+
223+
config ESPTOOLPY_MONITOR_BAUD_OTHER_VAL
224+
int "Custom baud rate value" if ESPTOOLPY_MONITOR_BAUD_OTHER
225+
default 115200
226+
227+
config ESPTOOLPY_MONITOR_BAUD
228+
int
229+
default ESP_CONSOLE_UART_BAUDRATE if ESPTOOLPY_MONITOR_BAUD_CONSOLE
230+
default 9600 if ESPTOOLPY_MONITOR_BAUD_9600B
231+
default 57600 if ESPTOOLPY_MONITOR_BAUD_57600B
232+
default 115200 if ESPTOOLPY_MONITOR_BAUD_115200B
233+
default 230400 if ESPTOOLPY_MONITOR_BAUD_230400B
234+
default 921600 if ESPTOOLPY_MONITOR_BAUD_921600B
235+
default 2000000 if ESPTOOLPY_MONITOR_BAUD_2MB
236+
default ESPTOOLPY_MONITOR_BAUD_OTHER_VAL if ESPTOOLPY_MONITOR_BAUD_OTHER
237+
238+
endmenu

0 commit comments

Comments
 (0)