Skip to content

Commit

Permalink
Update IDF to a0468b2 (#2108)
Browse files Browse the repository at this point in the history
* Update IDF to a0468b2

* add missing ld file

* Fix PIO builds and change coex policy
  • Loading branch information
me-no-dev committed Nov 26, 2018
1 parent c3ec91f commit 0496300
Show file tree
Hide file tree
Showing 988 changed files with 114,622 additions and 65,120 deletions.
4 changes: 2 additions & 2 deletions platform.txt
Expand Up @@ -22,7 +22,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra

compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bluedroid" "-I{compiler.sdk.path}/include/bluedroid/api" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp-mqtt" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/http_server" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mbedtls_port" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/wpa_supplicant"
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module"

compiler.c.cmd=xtensa-esp32-elf-gcc
compiler.c.flags=-std=gnu99 -Os -g3 -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
Expand All @@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls

compiler.c.elf.cmd=xtensa-esp32-elf-gcc
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception
compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lhttp_server -lcoexist -lwear_levelling -lesp_http_client -lhal -lnewlib -ldriver -lbootloader_support -lpp -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lsdmmc -lcoap -ltcpip_adapter -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lesp32 -lapp_update -lnghttp -lspiffs -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lpthread -ljson -lesp_https_ota -lstdc++
compiler.c.elf.libs=-lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lesp_ringbuf -lsoc -lcore -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lapp_update -lnghttp -lspiffs -lunity -lesp_https_server -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lstdc++

compiler.as.cmd=xtensa-esp32-elf-as

Expand Down
42 changes: 29 additions & 13 deletions tools/esptool.py
Expand Up @@ -51,7 +51,7 @@
pass # __doc__ returns None for pyserial


__version__ = "2.5.0"
__version__ = "2.6-beta1"

MAX_UINT32 = 0xffffffff
MAX_UINT24 = 0xffffff
Expand Down Expand Up @@ -243,17 +243,19 @@ def detect_chip(port=DEFAULT_PORT, baud=ESP_ROM_BAUD, connect_mode='default_rese
"""
detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
detect_port.connect(connect_mode)
print('Detecting chip type...', end='')
sys.stdout.flush()
date_reg = detect_port.read_reg(ESPLoader.UART_DATA_REG_ADDR)

for cls in [ESP8266ROM, ESP32ROM]:
if date_reg == cls.DATE_REG_VALUE:
# don't connect a second time
inst = cls(detect_port._port, baud, trace_enabled=trace_enabled)
print(' %s' % inst.CHIP_NAME)
return inst
print('')
try:
print('Detecting chip type...', end='')
sys.stdout.flush()
date_reg = detect_port.read_reg(ESPLoader.UART_DATA_REG_ADDR)

for cls in [ESP8266ROM, ESP32ROM]:
if date_reg == cls.DATE_REG_VALUE:
# don't connect a second time
inst = cls(detect_port._port, baud, trace_enabled=trace_enabled)
print(' %s' % inst.CHIP_NAME, end='')
return inst
finally:
print('') # end line
raise FatalError("Unexpected UART datecode value 0x%08x. Failed to autodetect chip type." % date_reg)

""" Read a SLIP packet from the serial port """
Expand Down Expand Up @@ -681,6 +683,8 @@ def read_flash(self, offset, length, progress_fn=None):
while len(data) < length:
p = self.read()
data += p
if len(data) < length and len(p) < self.FLASH_SECTOR_SIZE:
raise FatalError('Corrupt data, expected 0x%x bytes but received 0x%x bytes' % (self.FLASH_SECTOR_SIZE, len(p)))
self.write(struct.pack('<I', len(data)))
if progress_fn and (len(data) % 1024 == 0 or len(data) == length):
progress_fn(len(data), length)
Expand Down Expand Up @@ -1116,6 +1120,18 @@ def get_chip_features(self):
if adc_vref:
features += ["VRef calibration in efuse"]

blk3_part_res = word3 >> 14 & 0x1
if blk3_part_res:
features += ["BLK3 partially reserved"]

word6 = self.read_efuse(6)
coding_scheme = word6 & 0x3
features += ["Coding Scheme %s" % {
0: "None",
1: "3/4",
2: "Repeat (UNSUPPORTED)",
3: "Invalid"}[coding_scheme]]

return features

def read_efuse(self, n):
Expand Down Expand Up @@ -2549,7 +2565,7 @@ def add_spi_flash_subparsers(parent, is_elf2image):
esp = chip_class(each_port, initial_baud, args.trace)
esp.connect(args.before)
break
except FatalError as err:
except (FatalError, OSError) as err:
if args.port is not None:
raise
print("%s failed to connect: %s" % (each_port, err))
Expand Down
4 changes: 3 additions & 1 deletion tools/gen_esp32part.py
Expand Up @@ -21,6 +21,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function, division
from __future__ import unicode_literals
import argparse
import os
import re
Expand Down Expand Up @@ -54,6 +55,7 @@
"phy" : 0x01,
"nvs" : 0x02,
"coredump" : 0x03,
"nvs_keys" : 0x04,
"esphttpd" : 0x80,
"fat" : 0x81,
"spiffs" : 0x82,
Expand Down Expand Up @@ -354,7 +356,7 @@ def verify(self):
if self.name in all_subtype_names and SUBTYPES.get(self.type, {}).get(self.name, "") != self.subtype:
critical("WARNING: Partition has name '%s' which is a partition subtype, but this partition has non-matching type 0x%x and subtype 0x%x. Mistake in partition table?" % (self.name, self.type, self.subtype))

STRUCT_FORMAT = "<2sBBLL16sL"
STRUCT_FORMAT = b"<2sBBLL16sL"

@classmethod
def from_binary(cls, b):
Expand Down
49 changes: 29 additions & 20 deletions tools/platformio-build.py
Expand Up @@ -96,52 +96,61 @@
],

CPPPATH=[
join(FRAMEWORK_DIR, "tools", "sdk", "include", "config"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "bluedroid"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "bluedroid", "api"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "config"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "app_trace"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "app_update"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "asio"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "bootloader_support"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "bt"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "coap"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "console"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "driver"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp-tls"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp32"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_adc_cal"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_event"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_http_client"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_http_server"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_https_ota"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp-mqtt"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp-tls"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_https_server"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_ringbuf"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "ethernet"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "expat"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "fatfs"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "freemodbus"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "freertos"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "heap"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "http_server"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "idf_test"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "jsmn"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "json"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "libsodium"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "log"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "mdns"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "lwip"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "mbedtls"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "mbedtls_port"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "mdns"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "micro-ecc"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "mqtt"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "newlib"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nghttp"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nvs_flash"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "openssl"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "spi_flash"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "protobuf-c"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "protocomm"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "pthread"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "sdmmc"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "smartconfig_ack"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "soc"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "spi_flash"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "spiffs"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "tcpip_adapter"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "tcp_transport"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "tcpip_adapter"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "ulp"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "unity"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "vfs"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "wear_levelling"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "xtensa-debug-module"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "lwip"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "coap"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "console"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "expat"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "json"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "newlib"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "nghttp"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "soc"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "wifi_provisioning"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "wpa_supplicant"),
join(FRAMEWORK_DIR, "tools", "sdk", "include", "xtensa-debug-module"),
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core"))
],

Expand All @@ -151,7 +160,7 @@
],

LIBS=[
"gcc", "openssl", "btdm_app", "fatfs", "wps", "http_server", "coexist", "wear_levelling", "esp_http_client", "hal", "newlib", "driver", "bootloader_support", "pp", "mesh", "smartconfig", "jsmn", "wpa", "ethernet", "phy", "app_trace", "console", "ulp", "wpa_supplicant", "freertos", "bt", "micro-ecc", "cxx", "xtensa-debug-module", "tcp_transport", "mdns", "vfs", "esp_ringbuf", "soc", "core", "sdmmc", "coap", "tcpip_adapter", "c_nano", "esp-tls", "asio", "rtc", "spi_flash", "wpa2", "esp32", "app_update", "nghttp", "spiffs", "espnow", "nvs_flash", "esp_adc_cal", "log", "smartconfig_ack", "expat", "m", "mqtt", "c", "heap", "mbedtls", "lwip", "net80211", "pthread", "json", "esp_https_ota", "stdc++"
"-lgcc", "-lopenssl", "-lbtdm_app", "-lfatfs", "-lwps", "-lcoexist", "-lwear_levelling", "-lesp_http_client", "-lprotobuf-c", "-lhal", "-lnewlib", "-ldriver", "-lbootloader_support", "-lpp", "-lfreemodbus", "-lmesh", "-lsmartconfig", "-ljsmn", "-lwpa", "-lethernet", "-lphy", "-lapp_trace", "-lconsole", "-lulp", "-lwpa_supplicant", "-lfreertos", "-lbt", "-lmicro-ecc", "-lcxx", "-lxtensa-debug-module", "-ltcp_transport", "-lmdns", "-lvfs", "-lesp_ringbuf", "-lsoc", "-lcore", "-lsdmmc", "-llibsodium", "-lcoap", "-ltcpip_adapter", "-lprotocomm", "-lesp_event", "-lc_nano", "-lesp-tls", "-lasio", "-lrtc", "-lspi_flash", "-lwpa2", "-lwifi_provisioning", "-lesp32", "-lapp_update", "-lnghttp", "-lspiffs", "-lunity", "-lesp_https_server", "-lespnow", "-lnvs_flash", "-lesp_adc_cal", "-llog", "-lsmartconfig_ack", "-lexpat", "-lm", "-lmqtt", "-lc", "-lheap", "-lmbedtls", "-llwip", "-lnet80211", "-lesp_http_server", "-lpthread", "-ljson", "-lesp_https_ota", "-lstdc++"
],

LIBSOURCE_DIRS=[
Expand Down
Binary file modified tools/sdk/bin/bootloader_dio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_dio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_dout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_dout_80m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qout_80m.bin
Binary file not shown.

0 comments on commit 0496300

Please sign in to comment.