Update IDF to abea9e4c0 (#2458)
* Update IDF to abea9e4c0 * Update esptool * Enable PSRAM for PICO D4 * Enable APP_ROLLBACK_ENABLE
This commit is contained in:
parent
c0345eafbf
commit
010a7c60f7
@ -21,6 +21,9 @@
|
||||
#include "esp_partition.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_timer.h"
|
||||
#ifdef CONFIG_APP_ROLLBACK_ENABLE
|
||||
#include "esp_ota_ops.h"
|
||||
#endif //CONFIG_APP_ROLLBACK_ENABLE
|
||||
#ifdef CONFIG_BT_ENABLED
|
||||
#include "esp_bt.h"
|
||||
#endif //CONFIG_BT_ENABLED
|
||||
@ -145,6 +148,9 @@ void initVariant() {}
|
||||
void init() __attribute__((weak));
|
||||
void init() {}
|
||||
|
||||
bool verifyOta() __attribute__((weak));
|
||||
bool verifyOta() { return true; }
|
||||
|
||||
#ifdef CONFIG_BT_ENABLED
|
||||
//overwritten in esp32-hal-bt.c
|
||||
bool btInUse() __attribute__((weak));
|
||||
@ -153,6 +159,20 @@ bool btInUse(){ return false; }
|
||||
|
||||
void initArduino()
|
||||
{
|
||||
#ifdef CONFIG_APP_ROLLBACK_ENABLE
|
||||
const esp_partition_t *running = esp_ota_get_running_partition();
|
||||
esp_ota_img_states_t ota_state;
|
||||
if (esp_ota_get_state_partition(running, &ota_state) == ESP_OK) {
|
||||
if (ota_state == ESP_OTA_IMG_PENDING_VERIFY) {
|
||||
if (verifyOta()) {
|
||||
esp_ota_mark_app_valid_cancel_rollback();
|
||||
} else {
|
||||
log_e("OTA verification failed! Start rollback to the previous version ...");
|
||||
esp_ota_mark_app_invalid_rollback_and_reboot();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//init proper ref tick value for PLL (uncomment if REF_TICK is different than 1MHz)
|
||||
//ESP_REG(APB_CTRL_PLL_TICK_CONF_REG) = APB_CLK_FREQ / REF_CLK_FREQ - 1;
|
||||
#ifdef F_CPU
|
||||
|
@ -19,7 +19,7 @@ bool psramInit(){
|
||||
}
|
||||
uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
|
||||
uint32_t pkg_ver = chip_ver & 0x7;
|
||||
if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4) {
|
||||
if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2) {
|
||||
spiramFailed = true;
|
||||
log_w("PSRAM not supported!");
|
||||
return false;
|
||||
|
@ -38,7 +38,7 @@
|
||||
{
|
||||
"packager": "esp32",
|
||||
"name": "esptool_py",
|
||||
"version": "2.6.0"
|
||||
"version": "2.6.1"
|
||||
},
|
||||
{
|
||||
"packager": "esp32",
|
||||
@ -85,42 +85,42 @@
|
||||
},
|
||||
{
|
||||
"name": "esptool_py",
|
||||
"version": "2.6.0",
|
||||
"version": "2.6.1",
|
||||
"systems": [
|
||||
{
|
||||
"host": "i686-mingw32",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-windows.zip",
|
||||
"archiveFileName": "esptool-2.6.0-windows.zip",
|
||||
"checksum": "SHA-256:a73f4cf68db240d7f1d250c5c7f2dfcb53c17a37483729f1bf71f8f43d79a799",
|
||||
"size": "3421208"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.1-windows.zip",
|
||||
"archiveFileName": "esptool-2.6.1-windows.zip",
|
||||
"checksum": "SHA-256:84cf0b369a7707fe566434faba148852fc464992111d5baa95b658b374802f96",
|
||||
"size": "3422445"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-apple-darwin",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-macos.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-macos.tar.gz",
|
||||
"checksum": "SHA-256:0a881b91547c840fab8c72ae3d031069384278b8c2e5241647e8c8292c5e4a4b",
|
||||
"size": "3835660"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.1-macos.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.1-macos.tar.gz",
|
||||
"checksum": "SHA-256:f4eb758a301d6902cc9dfcd49d36345d2f075ad123da7cf8132d15cfb7533457",
|
||||
"size": "3837085"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-pc-linux-gnu",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
|
||||
"size": "43535"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.1-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.1-linux.tar.gz",
|
||||
"checksum": "SHA-256:eaf82ff4070d9792f6a42ae1e485375de5a87bec59ef01dfb95de901519ec7fb",
|
||||
"size": "44762"
|
||||
},
|
||||
{
|
||||
"host": "i686-pc-linux-gnu",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
|
||||
"size": "43535"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.1-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.1-linux.tar.gz",
|
||||
"checksum": "SHA-256:eaf82ff4070d9792f6a42ae1e485375de5a87bec59ef01dfb95de901519ec7fb",
|
||||
"size": "44762"
|
||||
},
|
||||
{
|
||||
"host": "arm-linux-gnueabihf",
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.0-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.0-linux.tar.gz",
|
||||
"checksum": "SHA-256:6d162f70f395ca31f5008829dd7e833e729f044a9c7355d5be8ce333a054e110",
|
||||
"size": "43535"
|
||||
"url": "https://dl.espressif.com/dl/esptool-2.6.1-linux.tar.gz",
|
||||
"archiveFileName": "esptool-2.6.1-linux.tar.gz",
|
||||
"checksum": "SHA-256:eaf82ff4070d9792f6a42ae1e485375de5a87bec59ef01dfb95de901519ec7fb",
|
||||
"size": "44762"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
286
tools/esptool.py
286
tools/esptool.py
@ -32,9 +32,12 @@ import sys
|
||||
import time
|
||||
import zlib
|
||||
import string
|
||||
import serial.tools.list_ports as list_ports
|
||||
|
||||
try:
|
||||
import serial
|
||||
except ImportError:
|
||||
print("Pyserial is not installed for %s. Check the README for installation instructions." % (sys.executable))
|
||||
raise
|
||||
|
||||
# check 'serial' is 'pyserial' and not 'serial' https://github.com/espressif/esptool/issues/269
|
||||
try:
|
||||
@ -50,8 +53,14 @@ See https://github.com/espressif/esptool/issues/269#issuecomment-385298196 for d
|
||||
except TypeError:
|
||||
pass # __doc__ returns None for pyserial
|
||||
|
||||
try:
|
||||
import serial.tools.list_ports as list_ports
|
||||
except ImportError:
|
||||
print("The installed version (%s) of pyserial appears to be too old for esptool.py (Python interpreter %s). "
|
||||
"Check the README for installation instructions." % (sys.VERSION, sys.executable))
|
||||
raise
|
||||
|
||||
__version__ = "2.6-beta1"
|
||||
__version__ = "2.6"
|
||||
|
||||
MAX_UINT32 = 0xffffffff
|
||||
MAX_UINT24 = 0xffffff
|
||||
@ -221,7 +230,12 @@ class ESPLoader(object):
|
||||
self._set_port_baudrate(baud)
|
||||
self._trace_enabled = trace_enabled
|
||||
# set write timeout, to prevent esptool blocked at write forever.
|
||||
try:
|
||||
self._port.write_timeout = DEFAULT_SERIAL_WRITE_TIMEOUT
|
||||
except NotImplementedError:
|
||||
# no write timeout for RFC2217 ports
|
||||
# need to set the property back to None or it will continue to fail
|
||||
self._port.write_timeout = None
|
||||
|
||||
def _set_port_baudrate(self, baud):
|
||||
try:
|
||||
@ -1274,19 +1288,26 @@ class ELFSection(ImageSegment):
|
||||
|
||||
class BaseFirmwareImage(object):
|
||||
SEG_HEADER_LEN = 8
|
||||
SHA256_DIGEST_LEN = 32
|
||||
|
||||
""" Base class with common firmware image functions """
|
||||
def __init__(self):
|
||||
self.segments = []
|
||||
self.entrypoint = 0
|
||||
self.elf_sha256 = None
|
||||
self.elf_sha256_offset = 0
|
||||
|
||||
def load_common_header(self, load_file, expected_magic):
|
||||
(magic, segments, self.flash_mode, self.flash_size_freq, self.entrypoint) = struct.unpack('<BBBBI', load_file.read(8))
|
||||
|
||||
if magic != expected_magic or segments > 16:
|
||||
raise FatalError('Invalid firmware image magic=%d segments=%d' % (magic, segments))
|
||||
if magic != expected_magic:
|
||||
raise FatalError('Invalid firmware image magic=0x%x' % (magic))
|
||||
return segments
|
||||
|
||||
def verify(self):
|
||||
if len(self.segments) > 16:
|
||||
raise FatalError('Invalid segment count %d (max 16). Usually this indicates a linker script problem.' % len(self.segments))
|
||||
|
||||
def load_segment(self, f, is_irom_segment=False):
|
||||
""" Load the next segment from the image file """
|
||||
file_offs = f.tell()
|
||||
@ -1304,12 +1325,33 @@ class BaseFirmwareImage(object):
|
||||
if offset > 0x40200000 or offset < 0x3ffe0000 or size > 65536:
|
||||
print('WARNING: Suspicious segment 0x%x, length %d' % (offset, size))
|
||||
|
||||
def maybe_patch_segment_data(self, f, segment_data):
|
||||
"""If SHA256 digest of the ELF file needs to be inserted into this segment, do so. Returns segment data."""
|
||||
segment_len = len(segment_data)
|
||||
file_pos = f.tell()
|
||||
if self.elf_sha256_offset >= file_pos and self.elf_sha256_offset < file_pos + segment_len:
|
||||
# SHA256 digest needs to be patched into this segment,
|
||||
# calculate offset of the digest inside the segment.
|
||||
patch_offset = self.elf_sha256_offset - file_pos
|
||||
# Sanity checks
|
||||
if patch_offset < self.SEG_HEADER_LEN or patch_offset + self.SHA256_DIGEST_LEN > segment_len:
|
||||
raise FatalError('Can not place SHA256 digest on segment boundary' +
|
||||
'(elf_sha256_offset=%d, file_pos=%d, segment_size=%d)' %
|
||||
(self.elf_sha256_offset, file_pos, segment_len))
|
||||
assert(len(self.elf_sha256) == self.SHA256_DIGEST_LEN)
|
||||
# offset relative to the data part
|
||||
patch_offset -= self.SEG_HEADER_LEN
|
||||
segment_data = segment_data[0:patch_offset] + self.elf_sha256 + \
|
||||
segment_data[patch_offset + self.SHA256_DIGEST_LEN:]
|
||||
return segment_data
|
||||
|
||||
def save_segment(self, f, segment, checksum=None):
|
||||
""" Save the next segment to the image file, return next checksum value if provided """
|
||||
f.write(struct.pack('<II', segment.addr, len(segment.data)))
|
||||
f.write(segment.data)
|
||||
segment_data = self.maybe_patch_segment_data(f, segment.data)
|
||||
f.write(struct.pack('<II', segment.addr, len(segment_data)))
|
||||
f.write(segment_data)
|
||||
if checksum is not None:
|
||||
return ESPLoader.checksum(segment.data, checksum)
|
||||
return ESPLoader.checksum(segment_data, checksum)
|
||||
|
||||
def read_checksum(self, f):
|
||||
""" Return ESPLoader checksum from end of just-read image """
|
||||
@ -1374,6 +1416,8 @@ class ESP8266ROMFirmwareImage(BaseFirmwareImage):
|
||||
self.load_segment(load_file)
|
||||
self.checksum = self.read_checksum(load_file)
|
||||
|
||||
self.verify()
|
||||
|
||||
def default_output_name(self, input_file):
|
||||
""" Derive a default output name from the ELF name. """
|
||||
return input_file + '-'
|
||||
@ -1442,6 +1486,8 @@ class ESP8266V2FirmwareImage(BaseFirmwareImage):
|
||||
self.load_segment(load_file)
|
||||
self.checksum = self.read_checksum(load_file)
|
||||
|
||||
self.verify()
|
||||
|
||||
def default_output_name(self, input_file):
|
||||
""" Derive a default output name from the ELF name. """
|
||||
irom_segment = self.get_irom_segment()
|
||||
@ -1514,6 +1560,8 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
|
||||
EXTENDED_HEADER_STRUCT_FMT = "B" * 16
|
||||
|
||||
IROM_ALIGN = 65536
|
||||
|
||||
def __init__(self, load_file=None):
|
||||
super(ESP32FirmwareImage, self).__init__()
|
||||
self.secure_pad = False
|
||||
@ -1549,6 +1597,8 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
calc_digest.update(load_file.read(end - start))
|
||||
self.calc_digest = calc_digest.digest() # TODO: decide what to do here?
|
||||
|
||||
self.verify()
|
||||
|
||||
def is_flash_addr(self, addr):
|
||||
return (ESP32ROM.IROM_MAP_START <= addr < ESP32ROM.IROM_MAP_END) \
|
||||
or (ESP32ROM.DROM_MAP_START <= addr < ESP32ROM.DROM_MAP_END)
|
||||
@ -1575,8 +1625,6 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
flash_segments = [copy.deepcopy(s) for s in sorted(self.segments, key=lambda s:s.addr) if self.is_flash_addr(s.addr)]
|
||||
ram_segments = [copy.deepcopy(s) for s in sorted(self.segments, key=lambda s:s.addr) if not self.is_flash_addr(s.addr)]
|
||||
|
||||
IROM_ALIGN = 65536
|
||||
|
||||
# check for multiple ELF sections that are mapped in the same flash mapping region.
|
||||
# this is usually a sign of a broken linker script, but if you have a legitimate
|
||||
# use case then let us know (we can merge segments here, but as a rule you probably
|
||||
@ -1584,7 +1632,7 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
if len(flash_segments) > 0:
|
||||
last_addr = flash_segments[0].addr
|
||||
for segment in flash_segments[1:]:
|
||||
if segment.addr // IROM_ALIGN == last_addr // IROM_ALIGN:
|
||||
if segment.addr // self.IROM_ALIGN == last_addr // self.IROM_ALIGN:
|
||||
raise FatalError(("Segment loaded at 0x%08x lands in same 64KB flash mapping as segment loaded at 0x%08x. " +
|
||||
"Can't generate binary. Suggest changing linker script or ELF to merge sections.") %
|
||||
(segment.addr, last_addr))
|
||||
@ -1596,15 +1644,15 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
#
|
||||
# (this is because the segment's vaddr may not be IROM_ALIGNed, more likely is aligned
|
||||
# IROM_ALIGN+0x18 to account for the binary file header
|
||||
align_past = (segment.addr % IROM_ALIGN) - self.SEG_HEADER_LEN
|
||||
pad_len = (IROM_ALIGN - (f.tell() % IROM_ALIGN)) + align_past
|
||||
if pad_len == 0 or pad_len == IROM_ALIGN:
|
||||
align_past = (segment.addr % self.IROM_ALIGN) - self.SEG_HEADER_LEN
|
||||
pad_len = (self.IROM_ALIGN - (f.tell() % self.IROM_ALIGN)) + align_past
|
||||
if pad_len == 0 or pad_len == self.IROM_ALIGN:
|
||||
return 0 # already aligned
|
||||
|
||||
# subtract SEG_HEADER_LEN a second time, as the padding block has a header as well
|
||||
pad_len -= self.SEG_HEADER_LEN
|
||||
if pad_len < 0:
|
||||
pad_len += IROM_ALIGN
|
||||
pad_len += self.IROM_ALIGN
|
||||
return pad_len
|
||||
|
||||
# try to fit each flash segment on a 64kB aligned boundary
|
||||
@ -1623,8 +1671,8 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
total_segments += 1
|
||||
else:
|
||||
# write the flash segment
|
||||
assert (f.tell() + 8) % IROM_ALIGN == segment.addr % IROM_ALIGN
|
||||
checksum = self.save_segment(f, segment, checksum)
|
||||
assert (f.tell() + 8) % self.IROM_ALIGN == segment.addr % self.IROM_ALIGN
|
||||
checksum = self.save_flash_segment(f, segment, checksum)
|
||||
flash_segments.pop(0)
|
||||
total_segments += 1
|
||||
|
||||
@ -1638,12 +1686,12 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
# This ensures all mapped flash content will be verified.
|
||||
if not self.append_digest:
|
||||
raise FatalError("secure_pad only applies if a SHA-256 digest is also appended to the image")
|
||||
align_past = (f.tell() + self.SEG_HEADER_LEN) % IROM_ALIGN
|
||||
align_past = (f.tell() + self.SEG_HEADER_LEN) % self.IROM_ALIGN
|
||||
# 16 byte aligned checksum (force the alignment to simplify calculations)
|
||||
checksum_space = 16
|
||||
# after checksum: SHA-256 digest + (to be added by signing process) version, signature + 12 trailing bytes due to alignment
|
||||
space_after_checksum = 32 + 4 + 64 + 12
|
||||
pad_len = (IROM_ALIGN - align_past - checksum_space - space_after_checksum) % IROM_ALIGN
|
||||
pad_len = (self.IROM_ALIGN - align_past - checksum_space - space_after_checksum) % self.IROM_ALIGN
|
||||
pad_segment = ImageSegment(0, b'\x00' * pad_len, f.tell())
|
||||
|
||||
checksum = self.save_segment(f, pad_segment, checksum)
|
||||
@ -1654,7 +1702,7 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
image_length = f.tell()
|
||||
|
||||
if self.secure_pad:
|
||||
assert ((image_length + space_after_checksum) % IROM_ALIGN) == 0
|
||||
assert ((image_length + space_after_checksum) % self.IROM_ALIGN) == 0
|
||||
|
||||
# kinda hacky: go back to the initial header and write the new segment count
|
||||
# that includes padding segments. This header is not checksummed
|
||||
@ -1674,6 +1722,16 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
||||
with open(filename, 'wb') as real_file:
|
||||
real_file.write(f.getvalue())
|
||||
|
||||
def save_flash_segment(self, f, segment, checksum=None):
|
||||
""" Save the next segment to the image file, return next checksum value if provided """
|
||||
segment_end_pos = f.tell() + len(segment.data) + self.SEG_HEADER_LEN
|
||||
segment_len_remainder = segment_end_pos % self.IROM_ALIGN
|
||||
if segment_len_remainder < 0x24:
|
||||
# Work around a bug in ESP-IDF 2nd stage bootloader, that it didn't map the
|
||||
# last MMU page, if an IROM/DROM segment was < 0x24 bytes over the page boundary.
|
||||
segment.data += b'\x00' * (0x24 - segment_len_remainder)
|
||||
return self.save_segment(f, segment, checksum)
|
||||
|
||||
def load_extended_header(self, load_file):
|
||||
def split_byte(n):
|
||||
return (n & 0x0F, (n >> 4) & 0x0F)
|
||||
@ -1790,9 +1848,16 @@ class ELFFile(object):
|
||||
return f.read(size)
|
||||
|
||||
prog_sections = [ELFSection(lookup_string(n_offs), lma, read_data(offs, size)) for (n_offs, _type, lma, size, offs) in prog_sections
|
||||
if lma != 0]
|
||||
if lma != 0 and size > 0]
|
||||
self.sections = prog_sections
|
||||
|
||||
def sha256(self):
|
||||
# return SHA256 hash of the input ELF file
|
||||
sha256 = hashlib.sha256()
|
||||
with open(self.name, 'rb') as f:
|
||||
sha256.update(f.read())
|
||||
return sha256.digest()
|
||||
|
||||
|
||||
def slip_reader(port, trace_function):
|
||||
"""Generator to read SLIP packets from a serial port.
|
||||
@ -1991,7 +2056,7 @@ def write_mem(esp, args):
|
||||
|
||||
|
||||
def dump_mem(esp, args):
|
||||
f = open(args.filename, 'wb')
|
||||
with open(args.filename, 'wb') as f:
|
||||
for i in range(args.size // 4):
|
||||
d = esp.read_reg(args.address + (i * 4))
|
||||
f.write(struct.pack(b'<I', d))
|
||||
@ -2060,6 +2125,9 @@ def write_flash(esp, args):
|
||||
% (argfile.name, argfile.tell(), address, flash_end))
|
||||
argfile.seek(0)
|
||||
|
||||
if args.erase_all:
|
||||
erase_flash(esp, args)
|
||||
|
||||
for address, argfile in args.addr_filename:
|
||||
if args.no_stub:
|
||||
print('Erasing flash...')
|
||||
@ -2087,7 +2155,7 @@ def write_flash(esp, args):
|
||||
sys.stdout.flush()
|
||||
block = image[0:esp.FLASH_WRITE_SIZE]
|
||||
if args.compress:
|
||||
esp.flash_defl_block(block, seq, timeout=DEFAULT_TIMEOUT * ratio)
|
||||
esp.flash_defl_block(block, seq, timeout=DEFAULT_TIMEOUT * ratio * 2)
|
||||
else:
|
||||
# Pad the last block
|
||||
block = block + b'\xff' * (esp.FLASH_WRITE_SIZE - len(block))
|
||||
@ -2165,7 +2233,8 @@ def make_image(args):
|
||||
if len(args.segfile) != len(args.segaddr):
|
||||
raise FatalError('Number of specified files does not match number of specified addresses')
|
||||
for (seg, addr) in zip(args.segfile, args.segaddr):
|
||||
data = open(seg, 'rb').read()
|
||||
with open(seg, 'rb') as f:
|
||||
data = f.read()
|
||||
image.segments.append(ImageSegment(addr, data))
|
||||
image.entrypoint = args.entrypoint
|
||||
image.save(args.output)
|
||||
@ -2190,6 +2259,12 @@ def elf2image(args):
|
||||
image.flash_size_freq = image.ROM_LOADER.FLASH_SIZES[args.flash_size]
|
||||
image.flash_size_freq += {'40m':0, '26m':1, '20m':2, '80m': 0xf}[args.flash_freq]
|
||||
|
||||
if args.elf_sha256_offset:
|
||||
image.elf_sha256 = e.sha256()
|
||||
image.elf_sha256_offset = args.elf_sha256_offset
|
||||
|
||||
image.verify()
|
||||
|
||||
if args.output is None:
|
||||
args.output = image.default_output_name(args.input)
|
||||
image.save(args.output)
|
||||
@ -2254,7 +2329,8 @@ def read_flash(esp, args):
|
||||
t = time.time() - t
|
||||
print('\rRead %d bytes at 0x%x in %.1f seconds (%.1f kbit/s)...'
|
||||
% (len(data), args.address, t, len(data) / t * 8 / 1000))
|
||||
open(args.filename, 'wb').write(data)
|
||||
with open(args.filename, 'wb') as f:
|
||||
f.write(data)
|
||||
|
||||
|
||||
def verify_flash(esp, args):
|
||||
@ -2316,7 +2392,13 @@ def version(args):
|
||||
#
|
||||
|
||||
|
||||
def main():
|
||||
def main(custom_commandline=None):
|
||||
"""
|
||||
Main function for esptool
|
||||
|
||||
custom_commandline - Optional override for default arguments parsing (that uses sys.argv), can be a list of custom arguments
|
||||
as strings.
|
||||
"""
|
||||
parser = argparse.ArgumentParser(description='esptool.py v%s - ESP8266 ROM Bootloader Utility' % __version__, prog='esptool')
|
||||
|
||||
parser.add_argument('--chip', '-c',
|
||||
@ -2413,15 +2495,18 @@ def main():
|
||||
default=os.environ.get('ESPTOOL_FS', 'detect' if auto_detect else '1MB'))
|
||||
add_spi_connection_arg(parent)
|
||||
|
||||
parser_write_flash = subparsers.add_parser(
|
||||
'write_flash',
|
||||
help='Write a binary blob to flash')
|
||||
parser_write_flash = subparsers.add_parser('write_flash', help='Write a binary blob to flash')
|
||||
parser_write_flash.add_argument('addr_filename', metavar='<address> <filename>', help='Address followed by binary filename, separated by space',
|
||||
action=AddrFilenamePairAction)
|
||||
parser_write_flash.add_argument('--erase-all', '-e',
|
||||
help='Erase all regions of flash (not just write areas) before programming',
|
||||
action="store_true")
|
||||
|
||||
add_spi_flash_subparsers(parser_write_flash, is_elf2image=False)
|
||||
parser_write_flash.add_argument('--no-progress', '-p', help='Suppress progress output', action="store_true")
|
||||
parser_write_flash.add_argument('--verify', help='Verify just-written data on flash ' +
|
||||
'(mostly superfluous, data is read back during flashing)', action='store_true')
|
||||
|
||||
compress_args = parser_write_flash.add_mutually_exclusive_group(required=False)
|
||||
compress_args.add_argument('--compress', '-z', help='Compress data in transfer (default unless --no-stub is specified)',action="store_true", default=None)
|
||||
compress_args.add_argument('--no-compress', '-u', help='Disable data compression during transfer (default if --no-stub is specified)',action="store_true")
|
||||
@ -2450,6 +2535,8 @@ def main():
|
||||
parser_elf2image.add_argument('--output', '-o', help='Output filename prefix (for version 1 image), or filename (for version 2 single image)', type=str)
|
||||
parser_elf2image.add_argument('--version', '-e', help='Output image version', choices=['1','2'], default='1')
|
||||
parser_elf2image.add_argument('--secure-pad', action='store_true', help='Pad image so once signed it will end on a 64KB boundary. For ESP32 images only.')
|
||||
parser_elf2image.add_argument('--elf-sha256-offset', help='If set, insert SHA256 hash (32 bytes) of the input ELF file at specified offset in the binary.',
|
||||
type=arg_auto_int, default=None)
|
||||
|
||||
add_spi_flash_subparsers(parser_elf2image, is_elf2image=True)
|
||||
|
||||
@ -2521,7 +2608,7 @@ def main():
|
||||
|
||||
expand_file_arguments()
|
||||
|
||||
args = parser.parse_args()
|
||||
args = parser.parse_args(custom_commandline)
|
||||
|
||||
print('esptool.py v%s' % __version__)
|
||||
|
||||
@ -2607,7 +2694,14 @@ def main():
|
||||
detect_flash_size(esp, args)
|
||||
esp.flash_set_parameters(flash_size_bytes(args.flash_size))
|
||||
|
||||
try:
|
||||
operation_func(esp, args)
|
||||
finally:
|
||||
try: # Clean up AddrFilenamePairAction files
|
||||
for address, argfile in args.addr_filename:
|
||||
argfile.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
# Handle post-operation behaviour (reset or other)
|
||||
if operation_func == load_ram:
|
||||
@ -2752,73 +2846,73 @@ class AddrFilenamePairAction(argparse.Action):
|
||||
|
||||
# Binary stub code (see flasher_stub dir for source & details)
|
||||
ESP8266ROM.STUB_CODE = eval(zlib.decompress(base64.b64decode(b"""
|
||||
eNrNPHt/1Da2X2XshJCE0Fq2x5bTsMxMwvAo3PLYpHQ3bWPLNpTbdpMhv03K0vvZr89Lkj0TAn3d+0dgZFvS0XmfoyP95+Z5c3l+c3dU3Ty+LPXxpYqOL6No0v2jji/bFv7m9+BR/093f21z96sH04ddv7T7q+DT\
|
||||
u91bw43mLn2mvW5NN0NbwCwT+pJenAwmUKt/K+8bAs0DyPRnohkGULtOk5XLOb4szC1eRxnJr27am97AqQe1HZAh6WFi0JDhqh62eggabXmwdqjSNYL10gMQaGR7F9BovEZhEZ96b6CzqtzQZXS8GCBHWxCOz+Xn\
|
||||
0+6fxmuo2BvCeGBUkddQrV3EXve4YIAiH1QgVll70EUedFHvpaG57Dxq7KFI9XkgijzWw4bMXhmhUUd4rb1G6Rovsddk5zH+F32B/10+sOzyiH9V6UP+Zcxn/Et1EzQxN2pd4K/X9lk3SC0zFiAHyNWTxxsCEg8Z\
|
||||
EKiwqKLrWSpieuiiut8mCsu1EAlIC47L/e5pXM668eNyCvOV3XBtXN4l0WlyGs1YFMEUMTzs3lYJIxDQA3yd+QIHIMVfhjl8rXlWbbYD+H7/HvWOVCB07SZRQjklD7d3YO4RDWkALfFM4JeFjGnSulwBKlKwZVRE\
|
||||
yg4GVImjdGQf4NA78A+Plg5Hu+o5wIoImcqPZ90PxMyZ/GAUxRUDwoOZdhXIEWMABLLDwJqFURN4Knsr3QQx/AYnSfproqcqDqfAJiF/BECYdXw2nj3bj8twg1gGJlEmyUlcVTeLznz5lgESmS4GCQyBv6Jw1M6g\
|
||||
36Yj2iZ8EZbhXBiDidbB82yffxvGRpUNsSFMkwIbhzBRzDTX90g/opWxKw99mGgwpUbwY9QhVsescHNiYZUT8xSgpBTP1TQ0aGmuAEagLctlBjEZCC9znMMzCBeYgCIh2OAzjXooj5+1AnDGkADg2du1Fj+efytP\
|
||||
9o9/btfk08c8J/SpfQXW7mOvM/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2YtQ+rYlnIHccmR4E6ZOxsmTkbAlRwwn+IiuccEeA1rdppVKHTwBx3yg081CtvIGjkN3t8FgM7\
|
||||
hE6j0wFSKLW5Kjmm+A4bKI/Fuj5O4weasv94j9gcH0N9c41HvibfmV+Xj0je7/rPMF8lty6jwlTUWFJIRZgqnQZeBRpfOeXljZoPDq++wajboDEl/6VtfG8ocMPpCsd6DJ5xi0PIUSjzJnVHDL4c2N/ZGBpAXppf\
|
||||
U2cNKzsn/ax0/5ad3jna7glLt2KI6s46rd7V0ao3Nx4gc+1n4F6jaxudGwmLXjqnN6ZWay4IV73v+5eGh7121GvHvXbSa2e9tu62VQ8e1fl+4DY6X7o3j6vT1R2vP+1PXdEOv5CHruKpq3is306uaKdXtLNPtpef\
|
||||
aP38iVb3avJ1bf3J9uJTsnPl35fKbfJFOFp+wbr7kDdXaIEe5KoHiephUXXGG7qNG26jM2znYNu+23jmNjoEedfTND04i15b99p1tEZK1F8oxX+2Fvi9WuL3apHfq2V+rxa6qv2FfyqwyTQjgSlKHp01HbOkxWYL\
|
||||
ZcFY47yGkTR1+f8YY3Wl19nrdZ3kKA3bkDP79X8BZBZfEg==\
|
||||
""")))
|
||||
ESP32ROM.STUB_CODE = eval(zlib.decompress(base64.b64decode(b"""
|
||||
eNqNWnt31LgV/yqOYfJaskeyPbZEz0IS6BBg2xIoIdDp2bFlOyFbcoDOQjgL/ezVfVnyzNDtHxNkPa/u43cf4vedZXez3LmbNDvzm94k/k9xH1oKW+XR/Eb5ptX+s/W/fn7jVEKdxsyX/i+01O2zExrFmfX/M1PD\
|
||||
|
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.
@ -76,6 +76,7 @@
|
||||
#define CONFIG_CONSOLE_UART_BAUDRATE 115200
|
||||
#define CONFIG_SPIRAM_SUPPORT 1
|
||||
#define CONFIG_LWIP_MAX_SOCKETS 10
|
||||
#define CONFIG_APP_ROLLBACK_ENABLE 1
|
||||
#define CONFIG_LWIP_NETIF_LOOPBACK 1
|
||||
#define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT "pthread"
|
||||
#define CONFIG_EMAC_TASK_PRIORITY 20
|
||||
@ -198,6 +199,7 @@
|
||||
#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN 0
|
||||
#define CONFIG_LWIP_DHCP_RESTORE_LAST_IP 1
|
||||
#define CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN 2
|
||||
#define CONFIG_PICO_PSRAM_CS_IO 10
|
||||
#define CONFIG_EMAC_TASK_STACK_SIZE 3072
|
||||
#define CONFIG_MB_QUEUE_LENGTH 20
|
||||
#define CONFIG_SW_COEXIST_PREFERENCE_VALUE 0
|
||||
@ -334,7 +336,6 @@
|
||||
#define CONFIG_MONITOR_BAUD_OTHER_VAL 115200
|
||||
#define CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF 1
|
||||
#define CONFIG_ESPTOOLPY_PORT "/dev/cu.usbserial-DO00EAB0"
|
||||
#define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS 1
|
||||
#define CONFIG_TASK_WDT_PANIC 1
|
||||
#define CONFIG_UNITY_ENABLE_DOUBLE 1
|
||||
#define CONFIG_BLUEDROID_PINNED_TO_CORE 0
|
||||
|
@ -260,10 +260,25 @@ void esp_tls_conn_delete(esp_tls_t *tls);
|
||||
size_t esp_tls_get_bytes_avail(esp_tls_t *tls);
|
||||
|
||||
/**
|
||||
* @brief Create a global CA store with the buffer provided in cfg.
|
||||
* @brief Create a global CA store, initially empty.
|
||||
*
|
||||
* This function should be called if the application wants to use the same CA store for
|
||||
* multiple connections. The application must call this function before calling esp_tls_conn_new().
|
||||
* This function should be called if the application wants to use the same CA store for multiple connections.
|
||||
* This function initialises the global CA store which can be then set by calling esp_tls_set_global_ca_store().
|
||||
* To be effective, this function must be called before any call to esp_tls_set_global_ca_store().
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK if creating global CA store was successful.
|
||||
* - ESP_ERR_NO_MEM if an error occured when allocating the mbedTLS resources.
|
||||
*/
|
||||
esp_err_t esp_tls_init_global_ca_store();
|
||||
|
||||
/**
|
||||
* @brief Set the global CA store with the buffer provided in pem format.
|
||||
*
|
||||
* This function should be called if the application wants to set the global CA store for
|
||||
* multiple connections i.e. to add the certificates in the provided buffer to the certificate chain.
|
||||
* This function implicitly calls esp_tls_init_global_ca_store() if it has not already been called.
|
||||
* The application must call this function before calling esp_tls_conn_new().
|
||||
*
|
||||
* @param[in] cacert_pem_buf Buffer which has certificates in pem format. This buffer
|
||||
* is used for creating a global CA store, which can be used
|
||||
@ -271,7 +286,7 @@ size_t esp_tls_get_bytes_avail(esp_tls_t *tls);
|
||||
* @param[in] cacert_pem_bytes Length of the buffer.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK if creating global CA store was successful.
|
||||
* - ESP_OK if adding certificates was successful.
|
||||
* - Other if an error occured or an action must be taken by the calling process.
|
||||
*/
|
||||
esp_err_t esp_tls_set_global_ca_store(const unsigned char *cacert_pem_buf, const unsigned int cacert_pem_bytes);
|
||||
|
@ -94,7 +94,7 @@ typedef struct {
|
||||
int pin_href; /*!< GPIO pin for camera HREF line */
|
||||
int pin_pclk; /*!< GPIO pin for camera PCLK line */
|
||||
|
||||
int xclk_freq_hz; /*!< Frequency of XCLK signal, in Hz. Either 10KHz or 20KHz */
|
||||
int xclk_freq_hz; /*!< Frequency of XCLK signal, in Hz. Either 20KHz or 10KHz for OV2640 double FPS (Experimental) */
|
||||
|
||||
ledc_timer_t ledc_timer; /*!< LEDC timer to be used for generating XCLK */
|
||||
ledc_channel_t ledc_channel; /*!< LEDC channel to be used for generating XCLK */
|
||||
|
@ -86,6 +86,7 @@ typedef struct _sensor {
|
||||
uint8_t slv_addr; // Sensor I2C slave address.
|
||||
pixformat_t pixformat;
|
||||
camera_status_t status;
|
||||
int xclk_freq_hz;
|
||||
|
||||
// Sensor function pointers
|
||||
int (*init_status) (sensor_t *sensor);
|
||||
|
@ -1044,9 +1044,10 @@ esp_err_t esp_mesh_set_vote_percentage(float percentage);
|
||||
float esp_mesh_get_vote_percentage(void);
|
||||
|
||||
/**
|
||||
* @brief Set mesh softAP associate expired time
|
||||
* @brief Set mesh softAP associate expired time (default:10 seconds)
|
||||
* - If mesh softAP hasn't received any data from an associated child within this time,
|
||||
* mesh softAP will take this child inactive and disassociate it.
|
||||
* - If mesh softAP is encrypted, this value should be set a greater value, such as 30 seconds.
|
||||
*
|
||||
* @param[in] seconds the expired time
|
||||
*
|
||||
@ -1227,7 +1228,7 @@ esp_err_t esp_mesh_get_group_list(mesh_addr_t *addr, int num);
|
||||
bool esp_mesh_is_my_group(const mesh_addr_t *addr);
|
||||
|
||||
/**
|
||||
* @brief Set mesh network capacity
|
||||
* @brief Set mesh network capacity (max:1000, default:300)
|
||||
*
|
||||
* @attention This API shall be called before mesh is started.
|
||||
*
|
||||
|
@ -22,8 +22,9 @@
|
||||
#include "esp_err.h"
|
||||
|
||||
typedef enum {
|
||||
ESP_SPIRAM_SIZE_32MBITS = 0, /*!< SPI RAM size is 32 MBits */
|
||||
ESP_SPIRAM_SIZE_64MBITS = 1, /*!< SPI RAM size is 64 MBits */
|
||||
ESP_SPIRAM_SIZE_16MBITS = 0, /*!< SPI RAM size is 16 MBits */
|
||||
ESP_SPIRAM_SIZE_32MBITS = 1, /*!< SPI RAM size is 32 MBits */
|
||||
ESP_SPIRAM_SIZE_64MBITS = 2, /*!< SPI RAM size is 64 MBits */
|
||||
ESP_SPIRAM_SIZE_INVALID, /*!< SPI RAM size is invalid */
|
||||
} esp_spiram_size_t;
|
||||
|
||||
|
@ -405,7 +405,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
wifi_pkt_rx_ctrl_t rx_ctrl;/**< received packet radio metadata header of the CSI data */
|
||||
uint8_t mac[6]; /**< source MAC address of the CSI data */
|
||||
bool last_word_invalid; /**< last four bytes of the CSI data is invalid or not */
|
||||
bool first_word_invalid; /**< first four bytes of the CSI data is invalid or not */
|
||||
int8_t *buf; /**< buffer of CSI data */
|
||||
uint16_t len; /**< length of CSI data */
|
||||
} wifi_csi_info_t;
|
||||
|
@ -166,6 +166,8 @@ void esp_sha_unlock_engine(esp_sha_type sha_type);
|
||||
* while it is in use by the SHA engine. Caller should use esp_sha_wait_idle()
|
||||
* to ensure the SHA engine is not reading from the memory block in hardware.
|
||||
*
|
||||
* @note This function enters a critical section. Do not block while holding this lock.
|
||||
*
|
||||
* @note You do not need to lock the memory block before calling esp_sha_block() or esp_sha_read_digest_state(), these functions handle memory block locking internally.
|
||||
*
|
||||
* Call esp_sha_unlock_memory_block() when done.
|
||||
@ -177,6 +179,8 @@ void esp_sha_lock_memory_block(void);
|
||||
*
|
||||
* Caller should have already locked a SHA engine before calling this function.
|
||||
*
|
||||
* This function releases the critical section entered by esp_sha_lock_memory_block().
|
||||
*
|
||||
* Call following esp_sha_lock_memory_block().
|
||||
*/
|
||||
void esp_sha_unlock_memory_block(void);
|
||||
|
@ -105,7 +105,9 @@ typedef struct {
|
||||
esp_http_client_auth_type_t auth_type; /*!< Http authentication type, see `esp_http_client_auth_type_t` */
|
||||
const char *path; /*!< HTTP Path, if not set, default is `/` */
|
||||
const char *query; /*!< HTTP query */
|
||||
const char *cert_pem; /*!< SSL Certification, PEM format as string, if the client requires to verify server */
|
||||
const char *cert_pem; /*!< SSL server certification, PEM format as string, if the client requires to verify server */
|
||||
const char *client_cert_pem; /*!< SSL client certification, PEM format as string, if the server requires to verify client */
|
||||
const char *client_key_pem; /*!< SSL client key, PEM format as string, if the server requires to verify client */
|
||||
esp_http_client_method_t method; /*!< HTTP Method */
|
||||
int timeout_ms; /*!< Network timeout in milliseconds */
|
||||
bool disable_auto_redirect; /*!< Disable HTTP automatic redirects */
|
||||
|
@ -49,6 +49,7 @@ initializer that should be kept in sync
|
||||
.global_transport_ctx_free_fn = NULL, \
|
||||
.open_fn = NULL, \
|
||||
.close_fn = NULL, \
|
||||
.uri_match_fn = NULL \
|
||||
}
|
||||
|
||||
#define ESP_ERR_HTTPD_BASE (0x8000) /*!< Starting number of HTTPD error codes */
|
||||
@ -61,6 +62,10 @@ initializer that should be kept in sync
|
||||
#define ESP_ERR_HTTPD_ALLOC_MEM (ESP_ERR_HTTPD_BASE + 7) /*!< Failed to dynamically allocate memory for resource */
|
||||
#define ESP_ERR_HTTPD_TASK (ESP_ERR_HTTPD_BASE + 8) /*!< Failed to launch server task/thread */
|
||||
|
||||
/* Symbol to be used as length parameter in httpd_resp_send APIs
|
||||
* for setting buffer length to string length */
|
||||
#define HTTPD_RESP_USE_STRLEN -1
|
||||
|
||||
/* ************** Group: Initialization ************** */
|
||||
/** @name Initialization
|
||||
* APIs related to the Initialization of the web server
|
||||
@ -82,7 +87,7 @@ typedef enum http_method httpd_method_t;
|
||||
|
||||
/**
|
||||
* @brief Prototype for freeing context data (if any)
|
||||
* @param[in] ctx : object to free
|
||||
* @param[in] ctx object to free
|
||||
*/
|
||||
typedef void (*httpd_free_ctx_fn_t)(void *ctx);
|
||||
|
||||
@ -92,8 +97,8 @@ typedef void (*httpd_free_ctx_fn_t)(void *ctx);
|
||||
* Called immediately after the socket was opened to set up the send/recv functions and
|
||||
* other parameters of the socket.
|
||||
*
|
||||
* @param[in] hd : server instance
|
||||
* @param[in] sockfd : session socket file descriptor
|
||||
* @param[in] hd server instance
|
||||
* @param[in] sockfd session socket file descriptor
|
||||
* @return status
|
||||
*/
|
||||
typedef esp_err_t (*httpd_open_func_t)(httpd_handle_t hd, int sockfd);
|
||||
@ -104,11 +109,26 @@ typedef esp_err_t (*httpd_open_func_t)(httpd_handle_t hd, int sockfd);
|
||||
* @note It's possible that the socket descriptor is invalid at this point, the function
|
||||
* is called for all terminated sessions. Ensure proper handling of return codes.
|
||||
*
|
||||
* @param[in] hd : server instance
|
||||
* @param[in] sockfd : session socket file descriptor
|
||||
* @param[in] hd server instance
|
||||
* @param[in] sockfd session socket file descriptor
|
||||
*/
|
||||
typedef void (*httpd_close_func_t)(httpd_handle_t hd, int sockfd);
|
||||
|
||||
/**
|
||||
* @brief Function prototype for URI matching.
|
||||
*
|
||||
* @param[in] reference_uri URI/template with respect to which the other URI is matched
|
||||
* @param[in] uri_to_match URI/template being matched to the reference URI/template
|
||||
* @param[in] match_upto For specifying the actual length of `uri_to_match` up to
|
||||
* which the matching algorithm is to be applied (The maximum
|
||||
* value is `strlen(uri_to_match)`, independent of the length
|
||||
* of `reference_uri`)
|
||||
* @return true on match
|
||||
*/
|
||||
typedef bool (*httpd_uri_match_func_t)(const char *reference_uri,
|
||||
const char *uri_to_match,
|
||||
size_t match_upto);
|
||||
|
||||
/**
|
||||
* @brief HTTP Server Configuration Structure
|
||||
*
|
||||
@ -195,6 +215,24 @@ typedef struct httpd_config {
|
||||
* was closed by the network stack - that is, the file descriptor may not be valid anymore.
|
||||
*/
|
||||
httpd_close_func_t close_fn;
|
||||
|
||||
/**
|
||||
* URI matcher function.
|
||||
*
|
||||
* Called when searching for a matching URI:
|
||||
* 1) whose request handler is to be executed right
|
||||
* after an HTTP request is successfully parsed
|
||||
* 2) in order to prevent duplication while registering
|
||||
* a new URI handler using `httpd_register_uri_handler()`
|
||||
*
|
||||
* Available options are:
|
||||
* 1) NULL : Internally do basic matching using `strncmp()`
|
||||
* 2) `httpd_uri_match_wildcard()` : URI wildcard matcher
|
||||
*
|
||||
* Users can implement their own matching functions (See description
|
||||
* of the `httpd_uri_match_func_t` function prototype)
|
||||
*/
|
||||
httpd_uri_match_func_t uri_match_fn;
|
||||
} httpd_config_t;
|
||||
|
||||
/**
|
||||
@ -227,8 +265,8 @@ typedef struct httpd_config {
|
||||
*
|
||||
* @endcode
|
||||
*
|
||||
* @param[in] config : Configuration for new instance of the server
|
||||
* @param[out] handle : Handle to newly created instance of the server. NULL on error
|
||||
* @param[in] config Configuration for new instance of the server
|
||||
* @param[out] handle Handle to newly created instance of the server. NULL on error
|
||||
* @return
|
||||
* - ESP_OK : Instance created successfully
|
||||
* - ESP_ERR_INVALID_ARG : Null argument(s)
|
||||
@ -451,11 +489,11 @@ esp_err_t httpd_unregister_uri(httpd_handle_t handle, const char* uri);
|
||||
* HTTPD_SOCK_ERR_ codes, which will eventually be conveyed as
|
||||
* return value of httpd_send() function
|
||||
*
|
||||
* @param[in] hd : server instance
|
||||
* @param[in] sockfd : session socket file descriptor
|
||||
* @param[in] buf : buffer with bytes to send
|
||||
* @param[in] buf_len : data size
|
||||
* @param[in] flags : flags for the send() function
|
||||
* @param[in] hd server instance
|
||||
* @param[in] sockfd session socket file descriptor
|
||||
* @param[in] buf buffer with bytes to send
|
||||
* @param[in] buf_len data size
|
||||
* @param[in] flags flags for the send() function
|
||||
* @return
|
||||
* - Bytes : The number of bytes sent successfully
|
||||
* - HTTPD_SOCK_ERR_INVALID : Invalid arguments
|
||||
@ -472,11 +510,11 @@ typedef int (*httpd_send_func_t)(httpd_handle_t hd, int sockfd, const char *buf,
|
||||
* HTTPD_SOCK_ERR_ codes, which will eventually be conveyed as
|
||||
* return value of httpd_req_recv() function
|
||||
*
|
||||
* @param[in] hd : server instance
|
||||
* @param[in] sockfd : session socket file descriptor
|
||||
* @param[in] buf : buffer with bytes to send
|
||||
* @param[in] buf_len : data size
|
||||
* @param[in] flags : flags for the send() function
|
||||
* @param[in] hd server instance
|
||||
* @param[in] sockfd session socket file descriptor
|
||||
* @param[in] buf buffer with bytes to send
|
||||
* @param[in] buf_len data size
|
||||
* @param[in] flags flags for the send() function
|
||||
* @return
|
||||
* - Bytes : The number of bytes received successfully
|
||||
* - 0 : Buffer length parameter is zero / connection closed by peer
|
||||
@ -494,8 +532,8 @@ typedef int (*httpd_recv_func_t)(httpd_handle_t hd, int sockfd, char *buf, size_
|
||||
* HTTPD_SOCK_ERR_ codes, which will be handled accordingly in
|
||||
* the server task.
|
||||
*
|
||||
* @param[in] hd : server instance
|
||||
* @param[in] sockfd : session socket file descriptor
|
||||
* @param[in] hd server instance
|
||||
* @param[in] sockfd session socket file descriptor
|
||||
* @return
|
||||
* - Bytes : The number of bytes waiting to be received
|
||||
* - HTTPD_SOCK_ERR_INVALID : Invalid arguments
|
||||
@ -744,6 +782,30 @@ esp_err_t httpd_req_get_url_query_str(httpd_req_t *r, char *buf, size_t buf_len)
|
||||
*/
|
||||
esp_err_t httpd_query_key_value(const char *qry, const char *key, char *val, size_t val_size);
|
||||
|
||||
/**
|
||||
* @brief Test if a URI matches the given wildcard template.
|
||||
*
|
||||
* Template may end with "?" to make the previous character optional (typically a slash),
|
||||
* "*" for a wildcard match, and "?*" to make the previous character optional, and if present,
|
||||
* allow anything to follow.
|
||||
*
|
||||
* Example:
|
||||
* - * matches everything
|
||||
* - /foo/? matches /foo and /foo/
|
||||
* - /foo/\* (sans the backslash) matches /foo/ and /foo/bar, but not /foo or /fo
|
||||
* - /foo/?* or /foo/\*? (sans the backslash) matches /foo/, /foo/bar, and also /foo, but not /foox or /fo
|
||||
*
|
||||
* The special characters "?" and "*" anywhere else in the template will be taken literally.
|
||||
*
|
||||
* @param[in] uri_template URI template (pattern)
|
||||
* @param[in] uri_to_match URI to be matched
|
||||
* @param[in] match_upto how many characters of the URI buffer to test
|
||||
* (there may be trailing query string etc.)
|
||||
*
|
||||
* @return true if a match was found
|
||||
*/
|
||||
bool httpd_uri_match_wildcard(const char *uri_template, const char *uri_to_match, size_t match_upto);
|
||||
|
||||
/**
|
||||
* @brief API to send a complete HTTP response.
|
||||
*
|
||||
@ -772,7 +834,7 @@ esp_err_t httpd_query_key_value(const char *qry, const char *key, char *val, siz
|
||||
*
|
||||
* @param[in] r The request being responded to
|
||||
* @param[in] buf Buffer from where the content is to be fetched
|
||||
* @param[in] buf_len Length of the buffer, -1 to use strlen()
|
||||
* @param[in] buf_len Length of the buffer, HTTPD_RESP_USE_STRLEN to use strlen()
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : On successfully sending the response packet
|
||||
@ -811,7 +873,7 @@ esp_err_t httpd_resp_send(httpd_req_t *r, const char *buf, ssize_t buf_len);
|
||||
*
|
||||
* @param[in] r The request being responded to
|
||||
* @param[in] buf Pointer to a buffer that stores the data
|
||||
* @param[in] buf_len Length of the data from the buffer that should be sent out, -1 to use strlen()
|
||||
* @param[in] buf_len Length of the buffer, HTTPD_RESP_USE_STRLEN to use strlen()
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : On successfully sending the response packet chunk
|
||||
@ -822,6 +884,48 @@ esp_err_t httpd_resp_send(httpd_req_t *r, const char *buf, ssize_t buf_len);
|
||||
*/
|
||||
esp_err_t httpd_resp_send_chunk(httpd_req_t *r, const char *buf, ssize_t buf_len);
|
||||
|
||||
/**
|
||||
* @brief API to send a complete string as HTTP response.
|
||||
*
|
||||
* This API simply calls http_resp_send with buffer length
|
||||
* set to string length assuming the buffer contains a null
|
||||
* terminated string
|
||||
*
|
||||
* @param[in] r The request being responded to
|
||||
* @param[in] str String to be sent as response body
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : On successfully sending the response packet
|
||||
* - ESP_ERR_INVALID_ARG : Null request pointer
|
||||
* - ESP_ERR_HTTPD_RESP_HDR : Essential headers are too large for internal buffer
|
||||
* - ESP_ERR_HTTPD_RESP_SEND : Error in raw send
|
||||
* - ESP_ERR_HTTPD_INVALID_REQ : Invalid request
|
||||
*/
|
||||
inline esp_err_t httpd_resp_sendstr(httpd_req_t *r, const char *str) {
|
||||
return httpd_resp_send(r, str, (str == NULL) ? 0 : strlen(str));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief API to send a string as an HTTP response chunk.
|
||||
*
|
||||
* This API simply calls http_resp_send_chunk with buffer length
|
||||
* set to string length assuming the buffer contains a null
|
||||
* terminated string
|
||||
*
|
||||
* @param[in] r The request being responded to
|
||||
* @param[in] str String to be sent as response body (NULL to finish response packet)
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : On successfully sending the response packet
|
||||
* - ESP_ERR_INVALID_ARG : Null request pointer
|
||||
* - ESP_ERR_HTTPD_RESP_HDR : Essential headers are too large for internal buffer
|
||||
* - ESP_ERR_HTTPD_RESP_SEND : Error in raw send
|
||||
* - ESP_ERR_HTTPD_INVALID_REQ : Invalid request
|
||||
*/
|
||||
inline esp_err_t httpd_resp_sendstr_chunk(httpd_req_t *r, const char *str) {
|
||||
return httpd_resp_send_chunk(r, str, (str == NULL) ? 0 : strlen(str));
|
||||
}
|
||||
|
||||
/* Some commonly used status codes */
|
||||
#define HTTPD_200 "200 OK" /*!< HTTP Response 200 */
|
||||
#define HTTPD_204 "204 No Content" /*!< HTTP Response 204 */
|
||||
|
@ -33,6 +33,7 @@ extern "C" {
|
||||
* @return
|
||||
* - ESP_OK: OTA data updated, next reboot will use specified partition.
|
||||
* - ESP_FAIL: For generic failure.
|
||||
* - ESP_ERR_INVALID_ARG: Invalid argument
|
||||
* - ESP_ERR_OTA_VALIDATE_FAILED: Invalid app image
|
||||
* - ESP_ERR_NO_MEM: Cannot allocate memory for OTA operation.
|
||||
* - ESP_ERR_FLASH_OP_TIMEOUT or ESP_ERR_FLASH_OP_FAIL: Flash write failed.
|
||||
|
@ -15,68 +15,88 @@
|
||||
#ifndef __ESP_ETH_H__
|
||||
#define __ESP_ETH_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "esp_types.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
/**
|
||||
* @brief Ethernet interface mode
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
ETH_MODE_RMII = 0,
|
||||
ETH_MODE_MII,
|
||||
ETH_MODE_RMII = 0, /*!< RMII mode */
|
||||
ETH_MODE_MII, /*!< MII mode */
|
||||
} eth_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Ethernet clock mode
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
ETH_CLOCK_GPIO0_IN = 0,
|
||||
ETH_CLOCK_GPIO16_OUT = 2,
|
||||
ETH_CLOCK_GPIO17_OUT = 3
|
||||
ETH_CLOCK_GPIO0_IN = 0, /*!< RMII clock input to GPIO0 */
|
||||
ETH_CLOCK_GPIO0_OUT = 1, /*!< RMII clock output from GPIO0 */
|
||||
ETH_CLOCK_GPIO16_OUT = 2, /*!< RMII clock output from GPIO16 */
|
||||
ETH_CLOCK_GPIO17_OUT = 3 /*!< RMII clock output from GPIO17 */
|
||||
} eth_clock_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Ethernet Speed
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
ETH_SPEED_MODE_10M = 0,
|
||||
ETH_SPEED_MODE_100M,
|
||||
ETH_SPEED_MODE_10M = 0, /*!< Ethernet speed: 10Mbps */
|
||||
ETH_SPEED_MODE_100M, /*!< Ethernet speed: 100Mbps */
|
||||
} eth_speed_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Ethernet Duplex
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
ETH_MODE_HALFDUPLEX = 0,
|
||||
ETH_MODE_FULLDUPLEX,
|
||||
ETH_MODE_HALFDUPLEX = 0, /*!< Ethernet half duplex */
|
||||
ETH_MODE_FULLDUPLEX, /*!< Ethernet full duplex */
|
||||
} eth_duplex_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Ethernet PHY address
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
PHY0 = 0,
|
||||
PHY1,
|
||||
PHY2,
|
||||
PHY3,
|
||||
PHY4,
|
||||
PHY5,
|
||||
PHY6,
|
||||
PHY7,
|
||||
PHY8,
|
||||
PHY9,
|
||||
PHY10,
|
||||
PHY11,
|
||||
PHY12,
|
||||
PHY13,
|
||||
PHY14,
|
||||
PHY15,
|
||||
PHY16,
|
||||
PHY17,
|
||||
PHY18,
|
||||
PHY19,
|
||||
PHY20,
|
||||
PHY21,
|
||||
PHY22,
|
||||
PHY23,
|
||||
PHY24,
|
||||
PHY25,
|
||||
PHY26,
|
||||
PHY27,
|
||||
PHY28,
|
||||
PHY29,
|
||||
PHY30,
|
||||
PHY31,
|
||||
PHY0 = 0, /*!< PHY address 0 */
|
||||
PHY1, /*!< PHY address 1 */
|
||||
PHY2, /*!< PHY address 2 */
|
||||
PHY3, /*!< PHY address 3 */
|
||||
PHY4, /*!< PHY address 4 */
|
||||
PHY5, /*!< PHY address 5 */
|
||||
PHY6, /*!< PHY address 6 */
|
||||
PHY7, /*!< PHY address 7 */
|
||||
PHY8, /*!< PHY address 8 */
|
||||
PHY9, /*!< PHY address 9 */
|
||||
PHY10, /*!< PHY address 10 */
|
||||
PHY11, /*!< PHY address 11 */
|
||||
PHY12, /*!< PHY address 12 */
|
||||
PHY13, /*!< PHY address 13 */
|
||||
PHY14, /*!< PHY address 14 */
|
||||
PHY15, /*!< PHY address 15 */
|
||||
PHY16, /*!< PHY address 16 */
|
||||
PHY17, /*!< PHY address 17 */
|
||||
PHY18, /*!< PHY address 18 */
|
||||
PHY19, /*!< PHY address 19 */
|
||||
PHY20, /*!< PHY address 20 */
|
||||
PHY21, /*!< PHY address 21 */
|
||||
PHY22, /*!< PHY address 22 */
|
||||
PHY23, /*!< PHY address 23 */
|
||||
PHY24, /*!< PHY address 24 */
|
||||
PHY25, /*!< PHY address 25 */
|
||||
PHY26, /*!< PHY address 26 */
|
||||
PHY27, /*!< PHY address 27 */
|
||||
PHY28, /*!< PHY address 28 */
|
||||
PHY29, /*!< PHY address 29 */
|
||||
PHY30, /*!< PHY address 30 */
|
||||
PHY31 /*!< PHY address 31 */
|
||||
} eth_phy_base_t;
|
||||
|
||||
typedef bool (*eth_phy_check_link_func)(void);
|
||||
@ -94,9 +114,9 @@ typedef void (*eth_phy_power_enable_func)(bool enable);
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
eth_phy_base_t phy_addr; /*!< phy base addr (0~31) */
|
||||
eth_mode_t mac_mode; /*!< mac mode only support RMII now */
|
||||
eth_clock_mode_t clock_mode; /*!< external/internal clock mode selecton */
|
||||
eth_phy_base_t phy_addr; /*!< PHY address (0~31) */
|
||||
eth_mode_t mac_mode; /*!< MAC mode: only support RMII now */
|
||||
eth_clock_mode_t clock_mode; /*!< external/internal clock mode selection */
|
||||
eth_tcpip_input_func tcpip_input; /*!< tcpip input func */
|
||||
eth_phy_func phy_init; /*!< phy init func */
|
||||
eth_phy_check_link_func phy_check_link; /*!< phy check link func */
|
||||
|
@ -20,38 +20,55 @@ extern "C" {
|
||||
|
||||
#include "esp_eth.h"
|
||||
|
||||
/** Common PHY-management functions.
|
||||
|
||||
These are not enough to drive any particular Ethernet PHY, but they provide a common configuration structure and
|
||||
management functions.
|
||||
/**
|
||||
* @brief Common PHY-management functions.
|
||||
*
|
||||
* @note These are not enough to drive any particular Ethernet PHY.
|
||||
* They provide a common configuration structure and management functions.
|
||||
*
|
||||
*/
|
||||
|
||||
/** Configure fixed pins for RMII data interface.
|
||||
|
||||
This configures GPIOs 0, 19, 22, 25, 26, 27 for use with RMII
|
||||
data interface. These pins cannot be changed, and must be wired to
|
||||
ethernet functions.
|
||||
|
||||
This is not sufficient to fully configure the Ethernet PHY,
|
||||
MDIO configuration interface pins (such as SMI MDC, MDO, MDI)
|
||||
must also be configured correctly in the GPIO matrix.
|
||||
/**
|
||||
* @brief Configure fixed pins for RMII data interface.
|
||||
*
|
||||
* @note This configures GPIOs 0, 19, 22, 25, 26, 27 for use with RMII data interface.
|
||||
* These pins cannot be changed, and must be wired to ethernet functions.
|
||||
* This is not sufficient to fully configure the Ethernet PHY.
|
||||
* MDIO configuration interface pins (such as SMI MDC, MDO, MDI) must also be configured correctly in the GPIO matrix.
|
||||
*
|
||||
*/
|
||||
void phy_rmii_configure_data_interface_pins(void);
|
||||
|
||||
/** Configure variable pins for SMI (MDIO) ethernet functions.
|
||||
|
||||
Calling this function along with mii_configure_default_pins() will
|
||||
fully configure the GPIOs for the ethernet PHY.
|
||||
/**
|
||||
* @brief Configure variable pins for SMI ethernet functions.
|
||||
*
|
||||
* @param mdc_gpio MDC GPIO Pin number
|
||||
* @param mdio_gpio MDIO GPIO Pin number
|
||||
*
|
||||
* @note Calling this function along with mii_configure_default_pins() will fully configure the GPIOs for the ethernet PHY.
|
||||
*/
|
||||
void phy_rmii_smi_configure_pins(uint8_t mdc_gpio, uint8_t mdio_gpio);
|
||||
|
||||
|
||||
/** Enable flow control in standard PHY MII register.
|
||||
/**
|
||||
* @brief Enable flow control in standard PHY MII register.
|
||||
*
|
||||
*/
|
||||
void phy_mii_enable_flow_ctrl(void);
|
||||
|
||||
/**
|
||||
* @brief Check Ethernet link status via MII interface
|
||||
*
|
||||
* @return true Link is on
|
||||
* @return false Link is off
|
||||
*/
|
||||
bool phy_mii_check_link_status(void);
|
||||
|
||||
/**
|
||||
* @brief Check pause frame ability of partner via MII interface
|
||||
*
|
||||
* @return true Partner is able to process pause frame
|
||||
* @return false Partner can not process pause frame
|
||||
*/
|
||||
bool phy_mii_get_partner_pause_enable(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
75
tools/sdk/include/ethernet/eth_phy/phy_ip101.h
Normal file
75
tools/sdk/include/ethernet/eth_phy/phy_ip101.h
Normal file
@ -0,0 +1,75 @@
|
||||
// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "phy.h"
|
||||
|
||||
/**
|
||||
* @brief Dump IP101 PHY SMI configuration registers
|
||||
*
|
||||
*/
|
||||
void phy_ip101_dump_registers();
|
||||
|
||||
/**
|
||||
* @brief Default IP101 phy_check_init function
|
||||
*
|
||||
*/
|
||||
void phy_ip101_check_phy_init(void);
|
||||
|
||||
/**
|
||||
* @brief Default IP101 phy_get_speed_mode function
|
||||
*
|
||||
* @return eth_speed_mode_t Ethernet speed mode
|
||||
*/
|
||||
eth_speed_mode_t phy_ip101_get_speed_mode(void);
|
||||
|
||||
/**
|
||||
* @brief Default IP101 phy_get_duplex_mode function
|
||||
*
|
||||
* @return eth_duplex_mode_t Ethernet duplex mode
|
||||
*/
|
||||
eth_duplex_mode_t phy_ip101_get_duplex_mode(void);
|
||||
|
||||
/**
|
||||
* @brief Default IP101 phy_power_enable function
|
||||
*
|
||||
*/
|
||||
void phy_ip101_power_enable(bool);
|
||||
|
||||
/**
|
||||
* @brief Default IP101 phy_init function
|
||||
*
|
||||
* @return esp_err_t
|
||||
* - ESP_OK on success
|
||||
* - ESP_FAIL on error
|
||||
*/
|
||||
esp_err_t phy_ip101_init(void);
|
||||
|
||||
/**
|
||||
* @brief Default IP101 PHY configuration
|
||||
*
|
||||
* @note This configuration is not suitable for use as-is,
|
||||
* it will need to be modified for your particular PHY hardware setup.
|
||||
*
|
||||
*/
|
||||
extern const eth_config_t phy_ip101_default_ethernet_config;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -20,45 +20,53 @@ extern "C" {
|
||||
|
||||
#include "phy.h"
|
||||
|
||||
|
||||
/** @brief Dump all LAN8720 PHY SMI configuration registers
|
||||
/**
|
||||
* @brief Dump LAN8720 PHY SMI configuration registers
|
||||
*
|
||||
* @note These registers are dumped at 'debug' level, so output
|
||||
* may not be visible depending on default log levels.
|
||||
*/
|
||||
void phy_lan8720_dump_registers();
|
||||
|
||||
/** @brief Default LAN8720 phy_check_init function.
|
||||
/**
|
||||
* @brief Default LAN8720 phy_check_init function
|
||||
*
|
||||
*/
|
||||
void phy_lan8720_check_phy_init(void);
|
||||
|
||||
/** @brief Default LAN8720 phy_get_speed_mode function.
|
||||
/**
|
||||
* @brief Default LAN8720 phy_get_speed_mode function
|
||||
*
|
||||
* @return eth_speed_mode_t Ethernet speed mode
|
||||
*/
|
||||
eth_speed_mode_t phy_lan8720_get_speed_mode(void);
|
||||
|
||||
/** @brief Default LAN8720 phy_get_duplex_mode function.
|
||||
/**
|
||||
* @brief Default LAN8720 phy_get_duplex_mode function
|
||||
*
|
||||
* @return eth_duplex_mode_t Ethernet duplex mode
|
||||
*/
|
||||
eth_duplex_mode_t phy_lan8720_get_duplex_mode(void);
|
||||
|
||||
/** @brief Default LAN8720 phy_power_enable function.
|
||||
/**
|
||||
* @brief Default LAN8720 phy_power_enable function
|
||||
*
|
||||
* @note This function may need to be replaced with a custom function
|
||||
* if the PHY has a GPIO to enable power or start a clock.
|
||||
*
|
||||
* Consult the ethernet example to see how this is done.
|
||||
*/
|
||||
void phy_lan8720_power_enable(bool);
|
||||
|
||||
/** @brief Default LAN8720 phy_init function.
|
||||
/**
|
||||
* @brief Default LAN8720 phy_init function
|
||||
*
|
||||
* @return esp_err_t
|
||||
* - ESP_OK on success
|
||||
* - ESP_FAIL on error
|
||||
*/
|
||||
esp_err_t phy_lan8720_init(void);
|
||||
|
||||
/** @brief Default LAN8720 PHY configuration
|
||||
/**
|
||||
* @brief Default LAN8720 PHY configuration
|
||||
*
|
||||
* This configuration is not suitable for use as-is, it will need
|
||||
* to be modified for your particular PHY hardware setup.
|
||||
* @note This configuration is not suitable for use as-is,
|
||||
* it will need to be modified for your particular PHY hardware setup.
|
||||
*
|
||||
* Consult the Ethernet example to see how this is done.
|
||||
*/
|
||||
extern const eth_config_t phy_lan8720_default_ethernet_config;
|
||||
|
||||
|
@ -18,8 +18,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* This header contains register/bit masks for the standard
|
||||
PHY MII registers that should be supported by all PHY models.
|
||||
/**
|
||||
* @brief This header contains register/bit masks for the standard PHY MII registers that should be supported by all PHY models.
|
||||
*
|
||||
*/
|
||||
|
||||
#define MII_BASIC_MODE_CONTROL_REG (0x0)
|
||||
|
@ -20,44 +20,53 @@ extern "C" {
|
||||
|
||||
#include "phy.h"
|
||||
|
||||
/** @brief Dump all TLK110 PHY SMI configuration registers
|
||||
/**
|
||||
* @brief Dump TLK110 PHY SMI configuration registers
|
||||
*
|
||||
* @note These registers are dumped at 'debug' level, so output
|
||||
* may not be visible depending on default log levels.
|
||||
*/
|
||||
void phy_tlk110_dump_registers();
|
||||
|
||||
/** @brief Default TLK110 phy_check_init function.
|
||||
/**
|
||||
* @brief Default TLK110 phy_check_init function
|
||||
*
|
||||
*/
|
||||
void phy_tlk110_check_phy_init(void);
|
||||
|
||||
/** @brief Default TLK110 phy_get_speed_mode function.
|
||||
/**
|
||||
* @brief Default TLK110 phy_get_speed_mode function
|
||||
*
|
||||
* @return eth_speed_mode_t Ethernet speed mode
|
||||
*/
|
||||
eth_speed_mode_t phy_tlk110_get_speed_mode(void);
|
||||
|
||||
/** @brief Default TLK110 phy_get_duplex_mode function.
|
||||
/**
|
||||
* @brief Default TLK110 phy_get_duplex_mode function
|
||||
*
|
||||
* @return eth_duplex_mode_t Ethernet duplex mode
|
||||
*/
|
||||
eth_duplex_mode_t phy_tlk110_get_duplex_mode(void);
|
||||
|
||||
/** @brief Default TLK110 phy_power_enable function.
|
||||
/**
|
||||
* @brief Default TLK110 phy_power_enable function
|
||||
*
|
||||
* @note This function may need to be replaced with a custom function
|
||||
* if the PHY has a GPIO to enable power or start a clock.
|
||||
*
|
||||
* Consult the ethernet example to see how this is done.
|
||||
*/
|
||||
void phy_tlk110_power_enable(bool);
|
||||
|
||||
/** @brief Default TLK110 phy_init function.
|
||||
/**
|
||||
* @brief Default TLK110 phy_init function
|
||||
*
|
||||
* @return esp_err_t
|
||||
* - ESP_OK on success
|
||||
* - ESP_FAIL on error
|
||||
*/
|
||||
esp_err_t phy_tlk110_init(void);
|
||||
|
||||
/** @brief Default TLK110 PHY configuration
|
||||
/**
|
||||
* @brief Default TLK110 PHY configuration
|
||||
*
|
||||
* This configuration is not suitable for use as-is, it will need
|
||||
* to be modified for your particular PHY hardware setup.
|
||||
* @note This configuration is not suitable for use as-is,
|
||||
* it will need to be modified for your particular PHY hardware setup.
|
||||
*
|
||||
* Consult the Ethernet example to see how this is done.
|
||||
*/
|
||||
extern const eth_config_t phy_tlk110_default_ethernet_config;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
/* ----------------------- Defines ------------------------------------------*/
|
||||
#define MB_INST_MIN_SIZE (2) // The minimal size of Modbus registers area in bytes
|
||||
#define MB_INST_MAX_SIZE (2048) // The maximum size of Modbus area in bytes
|
||||
#define MB_INST_MAX_SIZE (65535 * 2) // The maximum size of Modbus area in bytes
|
||||
|
||||
#define MB_CONTROLLER_STACK_SIZE (CONFIG_MB_CONTROLLER_STACK_SIZE) // Stack size for Modbus controller
|
||||
#define MB_CONTROLLER_PRIORITY (CONFIG_MB_SERIAL_TASK_PRIO - 1) // priority of MB controller task
|
||||
|
@ -576,6 +576,11 @@
|
||||
|
||||
#if PPP_SUPPORT
|
||||
|
||||
/**
|
||||
* PPP_NOTIFY_PHASE==1: Support PPP notify phase.
|
||||
*/
|
||||
#define PPP_NOTIFY_PHASE CONFIG_PPP_NOTIFY_PHASE_SUPPORT
|
||||
|
||||
/**
|
||||
* PAP_SUPPORT==1: Support PAP.
|
||||
*/
|
||||
|
@ -45,6 +45,7 @@ typedef enum {
|
||||
- current_data_offset offset of the current data for this event
|
||||
- total_data_len total length of the data received
|
||||
*/
|
||||
MQTT_EVENT_BEFORE_CONNECT, /*!< The event occurs before connecting */
|
||||
} esp_mqtt_event_id_t;
|
||||
|
||||
typedef enum {
|
||||
@ -103,6 +104,7 @@ typedef struct {
|
||||
const char *client_cert_pem; /*!< Pointer to certificate data in PEM format for SSL mutual authentication, default is NULL, not required if mutual authentication is not needed. If it is not NULL, also `client_key_pem` has to be provided. */
|
||||
const char *client_key_pem; /*!< Pointer to private key data in PEM format for SSL mutual authentication, default is NULL, not required if mutual authentication is not needed. If it is not NULL, also `client_cert_pem` has to be provided. */
|
||||
esp_mqtt_transport_t transport; /*!< overrides URI transport */
|
||||
int refresh_connection_after_ms; /*!< Refresh connection after this value (in milliseconds) */
|
||||
} esp_mqtt_client_config_t;
|
||||
|
||||
esp_mqtt_client_handle_t esp_mqtt_client_init(const esp_mqtt_client_config_t *config);
|
||||
@ -113,6 +115,7 @@ esp_err_t esp_mqtt_client_subscribe(esp_mqtt_client_handle_t client, const char
|
||||
esp_err_t esp_mqtt_client_unsubscribe(esp_mqtt_client_handle_t client, const char *topic);
|
||||
int esp_mqtt_client_publish(esp_mqtt_client_handle_t client, const char *topic, const char *data, int len, int qos, int retain);
|
||||
esp_err_t esp_mqtt_client_destroy(esp_mqtt_client_handle_t client);
|
||||
esp_err_t esp_mqtt_set_config(esp_mqtt_client_handle_t client, const esp_mqtt_client_config_t *config);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -65,6 +65,20 @@ typedef enum {
|
||||
NVS_READWRITE /*!< Read and write */
|
||||
} nvs_open_mode;
|
||||
|
||||
typedef enum {
|
||||
NVS_TYPE_U8 = 0x01,
|
||||
NVS_TYPE_I8 = 0x11,
|
||||
NVS_TYPE_U16 = 0x02,
|
||||
NVS_TYPE_I16 = 0x12,
|
||||
NVS_TYPE_U32 = 0x04,
|
||||
NVS_TYPE_I32 = 0x14,
|
||||
NVS_TYPE_U64 = 0x08,
|
||||
NVS_TYPE_I64 = 0x18,
|
||||
NVS_TYPE_STR = 0x21,
|
||||
NVS_TYPE_BLOB = 0x42,
|
||||
NVS_TYPE_ANY = 0xff // Must be last
|
||||
} nvs_type_t;
|
||||
|
||||
/**
|
||||
* @brief Open non-volatile storage with a given namespace from the default NVS partition
|
||||
*
|
||||
|
@ -205,12 +205,28 @@
|
||||
#define EFUSE_RD_FLASH_CRYPT_CONFIG_M ((EFUSE_RD_FLASH_CRYPT_CONFIG_V)<<(EFUSE_RD_FLASH_CRYPT_CONFIG_S))
|
||||
#define EFUSE_RD_FLASH_CRYPT_CONFIG_V 0xF
|
||||
#define EFUSE_RD_FLASH_CRYPT_CONFIG_S 28
|
||||
/* EFUSE_RD_DIG_VOL_L6: RO; bitpos:[27:24]; */
|
||||
/*descritpion: This field stores the difference between the digital regulator voltage at level6 and 1.2 V. (RO)
|
||||
BIT[27] is the sign bit, 0: + , 1: -
|
||||
BIT[26:24] is the difference value, unit: 0.017V
|
||||
volt_lv6 = BIT[27] ? 1.2 - BIT[26:24] * 0.017 : 1.2 + BIT[26:24] * 0.017 */
|
||||
#define EFUSE_RD_DIG_VOL_L6 0x0F
|
||||
#define EFUSE_RD_DIG_VOL_L6_M ((EFUSE_RD_DIG_VOL_L6_V)<<(EFUSE_RD_DIG_VOL_L6_S))
|
||||
#define EFUSE_RD_DIG_VOL_L6_V 0x0F
|
||||
#define EFUSE_RD_DIG_VOL_L6_S 24
|
||||
/* EFUSE_RD_VOL_LEVEL_HP_INV: RO; bitpos:[23:22] */
|
||||
/*description: This field stores the voltage level for CPU to run at 240 MHz, or for flash/PSRAM to run at 80 MHz.
|
||||
0x0: level 7; 0x1: level 6; 0x2: level 5; 0x3: level 4. (RO)*/
|
||||
#define EFUSE_RD_VOL_LEVEL_HP_INV 0x03
|
||||
#define EFUSE_RD_VOL_LEVEL_HP_INV_M ((EFUSE_RD_VOL_LEVEL_HP_INV_V)<<(EFUSE_RD_VOL_LEVEL_HP_INV_S))
|
||||
#define EFUSE_RD_VOL_LEVEL_HP_INV_V 0x03
|
||||
#define EFUSE_RD_VOL_LEVEL_HP_INV_S 22
|
||||
/* EFUSE_RD_INST_CONFIG : RO ;bitpos:[27:20] ;default: 8'b0 ; */
|
||||
/*description: */
|
||||
#define EFUSE_RD_INST_CONFIG 0x000000FF
|
||||
#define EFUSE_RD_INST_CONFIG_M ((EFUSE_RD_INST_CONFIG_V)<<(EFUSE_RD_INST_CONFIG_S))
|
||||
#define EFUSE_RD_INST_CONFIG_V 0xFF
|
||||
#define EFUSE_RD_INST_CONFIG_S 20
|
||||
/* Deprecated */
|
||||
#define EFUSE_RD_INST_CONFIG 0x000000FF /** Deprecated **/
|
||||
#define EFUSE_RD_INST_CONFIG_M ((EFUSE_RD_INST_CONFIG_V)<<(EFUSE_RD_INST_CONFIG_S)) /** Deprecated **/
|
||||
#define EFUSE_RD_INST_CONFIG_V 0xFF /** Deprecated **/
|
||||
#define EFUSE_RD_INST_CONFIG_S 20 /** Deprecated **/
|
||||
/* EFUSE_RD_SPI_PAD_CONFIG_CS0 : RO ;bitpos:[19:15] ;default: 5'b0 ; */
|
||||
/*description: read for SPI_pad_config_cs0*/
|
||||
#define EFUSE_RD_SPI_PAD_CONFIG_CS0 0x0000001F
|
||||
@ -464,12 +480,28 @@
|
||||
#define EFUSE_FLASH_CRYPT_CONFIG_M ((EFUSE_FLASH_CRYPT_CONFIG_V)<<(EFUSE_FLASH_CRYPT_CONFIG_S))
|
||||
#define EFUSE_FLASH_CRYPT_CONFIG_V 0xF
|
||||
#define EFUSE_FLASH_CRYPT_CONFIG_S 28
|
||||
/* EFUSE_DIG_VOL_L6: R/W; bitpos:[27:24]; */
|
||||
/*descritpion: This field stores the difference between the digital regulator voltage at level6 and 1.2 V. (R/W)
|
||||
BIT[27] is the sign bit, 0: + , 1: -
|
||||
BIT[26:24] is the difference value, unit: 0.017V
|
||||
volt_lv6 = BIT[27] ? 1.2 - BIT[26:24] * 0.017 : 1.2 + BIT[26:24] * 0.017 */
|
||||
#define EFUSE_DIG_VOL_L6 0x0F
|
||||
#define EFUSE_DIG_VOL_L6_M ((EFUSE_RD_DIG_VOL_L6_V)<<(EFUSE_RD_DIG_VOL_L6_S))
|
||||
#define EFUSE_DIG_VOL_L6_V 0x0F
|
||||
#define EFUSE_DIG_VOL_L6_S 24
|
||||
/* EFUSE_VOL_LEVEL_HP_INV: R/W; bitpos:[23:22] */
|
||||
/*description: This field stores the voltage level for CPU to run at 240 MHz, or for flash/PSRAM to run at 80 MHz.
|
||||
0x0: level 7; 0x1: level 6; 0x2: level 5; 0x3: level 4. (R/W)*/
|
||||
#define EFUSE_VOL_LEVEL_HP_INV 0x03
|
||||
#define EFUSE_VOL_LEVEL_HP_INV_M ((EFUSE_RD_VOL_LEVEL_HP_INV_V)<<(EFUSE_RD_VOL_LEVEL_HP_INV_S))
|
||||
#define EFUSE_VOL_LEVEL_HP_INV_V 0x03
|
||||
#define EFUSE_VOL_LEVEL_HP_INV_S 22
|
||||
/* EFUSE_INST_CONFIG : R/W ;bitpos:[27:20] ;default: 8'b0 ; */
|
||||
/*description: */
|
||||
#define EFUSE_INST_CONFIG 0x000000FF
|
||||
#define EFUSE_INST_CONFIG_M ((EFUSE_INST_CONFIG_V)<<(EFUSE_INST_CONFIG_S))
|
||||
#define EFUSE_INST_CONFIG_V 0xFF
|
||||
#define EFUSE_INST_CONFIG_S 20
|
||||
/* Deprecated */
|
||||
#define EFUSE_INST_CONFIG 0x000000FF /** Deprecated **/
|
||||
#define EFUSE_INST_CONFIG_M ((EFUSE_INST_CONFIG_V)<<(EFUSE_INST_CONFIG_S)) /** Deprecated **/
|
||||
#define EFUSE_INST_CONFIG_V 0xFF /** Deprecated **/
|
||||
#define EFUSE_INST_CONFIG_S 20 /** Deprecated **/
|
||||
/* EFUSE_SPI_PAD_CONFIG_CS0 : R/W ;bitpos:[19:15] ;default: 5'b0 ; */
|
||||
/*description: program for SPI_pad_config_cs0*/
|
||||
#define EFUSE_SPI_PAD_CONFIG_CS0 0x0000001F
|
||||
|
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.
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.
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.
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.
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.
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.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user