update IDF libraries and includes
This commit is contained in:
parent
261bc5ae85
commit
3c071e1d89
@ -189,9 +189,9 @@ bool WiFiAPClass::softAPdisconnect(bool wifioff)
|
|||||||
*/
|
*/
|
||||||
uint8_t WiFiAPClass::softAPgetStationNum()
|
uint8_t WiFiAPClass::softAPgetStationNum()
|
||||||
{
|
{
|
||||||
uint16_t number;
|
wifi_sta_list_t clients;
|
||||||
if(esp_wifi_get_ap_num(&number) == ESP_OK) {
|
if(esp_wifi_ap_get_sta_list(&clients) == ESP_OK) {
|
||||||
return number;
|
return clients.num;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -99,11 +99,11 @@ void WiFiScanClass::_scanDone()
|
|||||||
{
|
{
|
||||||
WiFiScanClass::_scanComplete = true;
|
WiFiScanClass::_scanComplete = true;
|
||||||
WiFiScanClass::_scanStarted = false;
|
WiFiScanClass::_scanStarted = false;
|
||||||
esp_wifi_get_ap_num(&(WiFiScanClass::_scanCount));
|
esp_wifi_scan_get_ap_num(&(WiFiScanClass::_scanCount));
|
||||||
if(WiFiScanClass::_scanCount) {
|
if(WiFiScanClass::_scanCount) {
|
||||||
WiFiScanClass::_scanResult = new wifi_ap_list_t[WiFiScanClass::_scanCount];
|
WiFiScanClass::_scanResult = new wifi_ap_record_t[WiFiScanClass::_scanCount];
|
||||||
if(WiFiScanClass::_scanResult) {
|
if(WiFiScanClass::_scanResult) {
|
||||||
esp_wifi_get_ap_list(&(WiFiScanClass::_scanCount), (wifi_ap_list_t*)_scanResult);
|
esp_wifi_scan_get_ap_records(&(WiFiScanClass::_scanCount), (wifi_ap_record_t*)_scanResult);
|
||||||
} else {
|
} else {
|
||||||
//no memory
|
//no memory
|
||||||
WiFiScanClass::_scanCount = 0;
|
WiFiScanClass::_scanCount = 0;
|
||||||
@ -121,7 +121,7 @@ void * WiFiScanClass::_getScanInfoByIndex(int i)
|
|||||||
if(!WiFiScanClass::_scanResult || (size_t) i > WiFiScanClass::_scanCount) {
|
if(!WiFiScanClass::_scanResult || (size_t) i > WiFiScanClass::_scanCount) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return reinterpret_cast<wifi_ap_list_t*>(WiFiScanClass::_scanResult) + i;
|
return reinterpret_cast<wifi_ap_record_t*>(WiFiScanClass::_scanResult) + i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -150,7 +150,7 @@ int8_t WiFiScanClass::scanComplete()
|
|||||||
void WiFiScanClass::scanDelete()
|
void WiFiScanClass::scanDelete()
|
||||||
{
|
{
|
||||||
if(WiFiScanClass::_scanResult) {
|
if(WiFiScanClass::_scanResult) {
|
||||||
delete[] reinterpret_cast<wifi_ap_list_t*>(WiFiScanClass::_scanResult);
|
delete[] reinterpret_cast<wifi_ap_record_t*>(WiFiScanClass::_scanResult);
|
||||||
WiFiScanClass::_scanResult = 0;
|
WiFiScanClass::_scanResult = 0;
|
||||||
WiFiScanClass::_scanCount = 0;
|
WiFiScanClass::_scanCount = 0;
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ void WiFiScanClass::scanDelete()
|
|||||||
*/
|
*/
|
||||||
bool WiFiScanClass::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t* &bssid, int32_t &channel)
|
bool WiFiScanClass::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t* &bssid, int32_t &channel)
|
||||||
{
|
{
|
||||||
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
|
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
|
||||||
if(!it) {
|
if(!it) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@ bool WiFiScanClass::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, in
|
|||||||
*/
|
*/
|
||||||
String WiFiScanClass::SSID(uint8_t i)
|
String WiFiScanClass::SSID(uint8_t i)
|
||||||
{
|
{
|
||||||
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
|
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
|
||||||
if(!it) {
|
if(!it) {
|
||||||
return String();
|
return String();
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ String WiFiScanClass::SSID(uint8_t i)
|
|||||||
*/
|
*/
|
||||||
wifi_auth_mode_t WiFiScanClass::encryptionType(uint8_t i)
|
wifi_auth_mode_t WiFiScanClass::encryptionType(uint8_t i)
|
||||||
{
|
{
|
||||||
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
|
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
|
||||||
if(!it) {
|
if(!it) {
|
||||||
return WIFI_AUTH_OPEN;
|
return WIFI_AUTH_OPEN;
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ wifi_auth_mode_t WiFiScanClass::encryptionType(uint8_t i)
|
|||||||
*/
|
*/
|
||||||
int32_t WiFiScanClass::RSSI(uint8_t i)
|
int32_t WiFiScanClass::RSSI(uint8_t i)
|
||||||
{
|
{
|
||||||
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
|
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
|
||||||
if(!it) {
|
if(!it) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ int32_t WiFiScanClass::RSSI(uint8_t i)
|
|||||||
*/
|
*/
|
||||||
uint8_t * WiFiScanClass::BSSID(uint8_t i)
|
uint8_t * WiFiScanClass::BSSID(uint8_t i)
|
||||||
{
|
{
|
||||||
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
|
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
|
||||||
if(!it) {
|
if(!it) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ uint8_t * WiFiScanClass::BSSID(uint8_t i)
|
|||||||
String WiFiScanClass::BSSIDstr(uint8_t i)
|
String WiFiScanClass::BSSIDstr(uint8_t i)
|
||||||
{
|
{
|
||||||
char mac[18] = { 0 };
|
char mac[18] = { 0 };
|
||||||
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
|
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
|
||||||
if(!it) {
|
if(!it) {
|
||||||
return String();
|
return String();
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ String WiFiScanClass::BSSIDstr(uint8_t i)
|
|||||||
|
|
||||||
int32_t WiFiScanClass::channel(uint8_t i)
|
int32_t WiFiScanClass::channel(uint8_t i)
|
||||||
{
|
{
|
||||||
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
|
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
|
||||||
if(!it) {
|
if(!it) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ compiler.warning_flags.all=-Wall -Wextra
|
|||||||
|
|
||||||
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
|
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
|
||||||
compiler.sdk.path={runtime.platform.path}/tools/sdk
|
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/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
|
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/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
|
||||||
|
|
||||||
compiler.c.cmd=xtensa-esp32-elf-gcc
|
compiler.c.cmd=xtensa-esp32-elf-gcc
|
||||||
compiler.c.flags=-c {compiler.warning_flags} -Os -g3 -Wpointer-arith -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -ffunction-sections -fdata-sections -mlongcalls -nostdlib -MMD -std=gnu99 -fstrict-volatile-bitfields
|
compiler.c.flags=-c {compiler.warning_flags} -Os -g3 -Wpointer-arith -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -ffunction-sections -fdata-sections -mlongcalls -nostdlib -MMD -std=gnu99 -fstrict-volatile-bitfields
|
||||||
@ -26,7 +26,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
|
|||||||
|
|
||||||
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
|
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
|
||||||
compiler.c.elf.flags="-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -nostdlib -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
|
compiler.c.elf.flags="-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -nostdlib -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
|
||||||
compiler.c.elf.libs=-lgcc -lc -lm -lhal -lcore -lnet80211 -lphy -lrtc -lpp -lwpa -lsmartconfig -lbtdm_app -lbt -ldriver -lesp32 -lcrypto -lexpat -lfreertos -ljson -llog -llwip -lmbedtls -lnghttp -lnvs_flash -lspi_flash -ltcpip_adapter
|
compiler.c.elf.libs=-lgcc -lc -lm -lhal -lcore -lnet80211 -lphy -lrtc -lpp -lwpa -lsmartconfig -lbtdm_app -lbt -ldriver -lesp32 -lcrypto -lexpat -lfreertos -ljson -llog -llwip -lmbedtls -lnghttp -lnvs_flash -lspi_flash -ltcpip_adapter -lnewlib -lvfs
|
||||||
|
|
||||||
compiler.as.cmd=xtensa-esp32-elf-as
|
compiler.as.cmd=xtensa-esp32-elf-as
|
||||||
|
|
||||||
|
477
tools/esptool.py
477
tools/esptool.py
@ -98,7 +98,6 @@ class ESPLoader(object):
|
|||||||
# Some comands supported by ESP32 ROM bootloader (or -8266 w/ stub)
|
# Some comands supported by ESP32 ROM bootloader (or -8266 w/ stub)
|
||||||
ESP_SPI_SET_PARAMS = 0x0B
|
ESP_SPI_SET_PARAMS = 0x0B
|
||||||
ESP_SPI_ATTACH = 0x0D
|
ESP_SPI_ATTACH = 0x0D
|
||||||
|
|
||||||
ESP_CHANGE_BAUDRATE = 0x0F
|
ESP_CHANGE_BAUDRATE = 0x0F
|
||||||
ESP_FLASH_DEFL_BEGIN = 0x10
|
ESP_FLASH_DEFL_BEGIN = 0x10
|
||||||
ESP_FLASH_DEFL_DATA = 0x11
|
ESP_FLASH_DEFL_DATA = 0x11
|
||||||
@ -131,14 +130,11 @@ class ESPLoader(object):
|
|||||||
|
|
||||||
UART_DATA_REG_ADDR = 0x60000078
|
UART_DATA_REG_ADDR = 0x60000078
|
||||||
|
|
||||||
# SPI peripheral "command" bitmasks
|
|
||||||
SPI_CMD_READ_ID = 0x10000000
|
|
||||||
|
|
||||||
# Memory addresses
|
# Memory addresses
|
||||||
IROM_MAP_START = 0x40200000
|
IROM_MAP_START = 0x40200000
|
||||||
IROM_MAP_END = 0x40300000
|
IROM_MAP_END = 0x40300000
|
||||||
|
|
||||||
# The number of bytes in the response that signify command status
|
# The number of bytes in the UART response that signify command status
|
||||||
STATUS_BYTES_LENGTH = 2
|
STATUS_BYTES_LENGTH = 2
|
||||||
|
|
||||||
def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, do_connect=True):
|
def __init__(self, port=DEFAULT_PORT, baud=ESP_ROM_BAUD, do_connect=True):
|
||||||
@ -271,7 +267,7 @@ class ESPLoader(object):
|
|||||||
""" Try connecting repeatedly until successful, or giving up """
|
""" Try connecting repeatedly until successful, or giving up """
|
||||||
print 'Connecting...'
|
print 'Connecting...'
|
||||||
|
|
||||||
for _ in xrange(4):
|
for _ in xrange(10):
|
||||||
# issue reset-to-bootloader:
|
# issue reset-to-bootloader:
|
||||||
# RTS = either CH_PD or nRESET (both active low = chip in reset)
|
# RTS = either CH_PD or nRESET (both active low = chip in reset)
|
||||||
# DTR = GPIO0 (active low = boot to flasher)
|
# DTR = GPIO0 (active low = boot to flasher)
|
||||||
@ -283,8 +279,7 @@ class ESPLoader(object):
|
|||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
self._port.setDTR(False)
|
self._port.setDTR(False)
|
||||||
|
|
||||||
# worst-case latency timer should be 255ms (probably <20ms)
|
self._port.timeout = 0.1
|
||||||
self._port.timeout = 0.3
|
|
||||||
last_exception = None
|
last_exception = None
|
||||||
for _ in xrange(4):
|
for _ in xrange(4):
|
||||||
try:
|
try:
|
||||||
@ -362,10 +357,9 @@ class ESPLoader(object):
|
|||||||
self.flash_finish(reboot)
|
self.flash_finish(reboot)
|
||||||
|
|
||||||
""" Read SPI flash manufacturer and device id """
|
""" Read SPI flash manufacturer and device id """
|
||||||
@stub_function_only
|
|
||||||
def flash_id(self):
|
def flash_id(self):
|
||||||
resp = self.check_command("get flash id", self.ESP_GET_FLASH_ID)
|
SPIFLASH_RDID = 0x9F
|
||||||
return struct.unpack('<I', resp)[0]
|
return self.run_spiflash_command(SPIFLASH_RDID, b"", 24)
|
||||||
|
|
||||||
def parse_flash_size_arg(self, arg):
|
def parse_flash_size_arg(self, arg):
|
||||||
try:
|
try:
|
||||||
@ -420,7 +414,7 @@ class ESPLoader(object):
|
|||||||
|
|
||||||
self._port.timeout = 20
|
self._port.timeout = 20
|
||||||
t = time.time()
|
t = time.time()
|
||||||
print "Unc size %d comp size %d comp blocks %d" % (size, compsize, num_blocks)
|
print "Compressed %d bytes to %d..." % (size, compsize)
|
||||||
self.check_command("enter compressed flash mode", self.ESP_FLASH_DEFL_BEGIN,
|
self.check_command("enter compressed flash mode", self.ESP_FLASH_DEFL_BEGIN,
|
||||||
struct.pack('<IIII', erase_blocks * self.ESP_FLASH_BLOCK, num_blocks, self.ESP_FLASH_BLOCK, offset))
|
struct.pack('<IIII', erase_blocks * self.ESP_FLASH_BLOCK, num_blocks, self.ESP_FLASH_BLOCK, offset))
|
||||||
if size != 0 and not self.IS_STUB:
|
if size != 0 and not self.IS_STUB:
|
||||||
@ -495,7 +489,6 @@ class ESPLoader(object):
|
|||||||
while len(data) < length:
|
while len(data) < length:
|
||||||
p = self.read()
|
p = self.read()
|
||||||
data += p
|
data += p
|
||||||
print "Read %d bytes total %d" % (len(p), len(data))
|
|
||||||
self.write(struct.pack('<I', len(data)))
|
self.write(struct.pack('<I', len(data)))
|
||||||
if progress_fn and (len(data) % 1024 == 0 or len(data) == length):
|
if progress_fn and (len(data) % 1024 == 0 or len(data) == length):
|
||||||
progress_fn(len(data), length)
|
progress_fn(len(data), length)
|
||||||
@ -542,6 +535,151 @@ class ESPLoader(object):
|
|||||||
self.check_command("set SPI params", ESP32ROM.ESP_SPI_SET_PARAMS,
|
self.check_command("set SPI params", ESP32ROM.ESP_SPI_SET_PARAMS,
|
||||||
struct.pack('<IIIIII', fl_id, total_size, block_size, sector_size, page_size, status_mask))
|
struct.pack('<IIIIII', fl_id, total_size, block_size, sector_size, page_size, status_mask))
|
||||||
|
|
||||||
|
def run_spiflash_command(self, spiflash_command, data=b"", read_bits=0):
|
||||||
|
"""Run an arbitrary SPI flash command.
|
||||||
|
|
||||||
|
This function uses the "USR_COMMAND" functionality in the ESP
|
||||||
|
SPI hardware, rather than the precanned commands supported by
|
||||||
|
hardware. So the value of spiflash_command is an actual command
|
||||||
|
byte, sent over the wire.
|
||||||
|
|
||||||
|
After writing command byte, writes 'data' to MOSI and then
|
||||||
|
reads back 'read_bits' of reply on MISO. Result is a number.
|
||||||
|
"""
|
||||||
|
|
||||||
|
# SPI_USR register flags
|
||||||
|
SPI_USR_COMMAND = (1 << 31)
|
||||||
|
SPI_USR_MISO = (1 << 28)
|
||||||
|
SPI_USR_MOSI = (1 << 27)
|
||||||
|
|
||||||
|
# SPI registers, base address differs ESP32 vs 8266
|
||||||
|
base = self.SPI_REG_BASE
|
||||||
|
SPI_CMD_REG = base + 0x00
|
||||||
|
SPI_USR_REG = base + 0x1C
|
||||||
|
SPI_USR1_REG = base + 0x20
|
||||||
|
SPI_USR2_REG = base + 0x24
|
||||||
|
SPI_W0_REG = base + self.SPI_W0_OFFS
|
||||||
|
|
||||||
|
# following two registers are ESP32 only
|
||||||
|
if self.SPI_HAS_MOSI_DLEN_REG:
|
||||||
|
# ESP32 has a more sophisticated wayto set up "user" commands
|
||||||
|
def set_data_lengths(mosi_bits, miso_bits):
|
||||||
|
SPI_MOSI_DLEN_REG = base + 0x28
|
||||||
|
SPI_MISO_DLEN_REG = base + 0x2C
|
||||||
|
if mosi_bits > 0:
|
||||||
|
self.write_reg(SPI_MOSI_DLEN_REG, mosi_bits - 1)
|
||||||
|
if miso_bits > 0:
|
||||||
|
self.write_reg(SPI_MISO_DLEN_REG, miso_bits - 1)
|
||||||
|
else:
|
||||||
|
|
||||||
|
def set_data_lengths(mosi_bits, miso_bits):
|
||||||
|
SPI_DATA_LEN_REG = SPI_USR1_REG
|
||||||
|
SPI_MOSI_BITLEN_S = 17
|
||||||
|
SPI_MISO_BITLEN_S = 8
|
||||||
|
mosi_mask = 0 if (mosi_bits == 0) else (mosi_bits - 1)
|
||||||
|
miso_mask = 0 if (miso_bits == 0) else (miso_bits - 1)
|
||||||
|
self.write_reg(SPI_DATA_LEN_REG,
|
||||||
|
(miso_mask << SPI_MISO_BITLEN_S) | (
|
||||||
|
mosi_mask << SPI_MOSI_BITLEN_S))
|
||||||
|
|
||||||
|
# SPI peripheral "command" bitmasks for SPI_CMD_REG
|
||||||
|
SPI_CMD_USR = (1 << 18)
|
||||||
|
|
||||||
|
# shift values
|
||||||
|
SPI_USR2_DLEN_SHIFT = 28
|
||||||
|
|
||||||
|
if read_bits > 32:
|
||||||
|
raise FatalError("Reading more than 32 bits back from a SPI flash operation is unsupported")
|
||||||
|
if len(data) > 64:
|
||||||
|
raise FatalError("Writing more than 64 bytes of data with one SPI command is unsupported")
|
||||||
|
|
||||||
|
data_bits = len(data) * 8
|
||||||
|
flags = SPI_USR_COMMAND
|
||||||
|
if read_bits > 0:
|
||||||
|
flags |= SPI_USR_MISO
|
||||||
|
if data_bits > 0:
|
||||||
|
flags |= SPI_USR_MOSI
|
||||||
|
set_data_lengths(data_bits, read_bits)
|
||||||
|
self.write_reg(SPI_USR_REG, flags)
|
||||||
|
self.write_reg(SPI_USR2_REG,
|
||||||
|
(7 << SPI_USR2_DLEN_SHIFT) | spiflash_command)
|
||||||
|
if data_bits == 0:
|
||||||
|
self.write_reg(SPI_W0_REG, 0) # clear data register before we read it
|
||||||
|
else:
|
||||||
|
if len(data) % 4 != 0: # pad to 32-bit multiple
|
||||||
|
data += b'\0' * (4 - (len(data) % 4))
|
||||||
|
words = struct.unpack("I" * (len(data) / 4), data)
|
||||||
|
next_reg = SPI_W0_REG
|
||||||
|
for word in words:
|
||||||
|
self.write_reg(next_reg, word)
|
||||||
|
next_reg += 4
|
||||||
|
self.write_reg(SPI_CMD_REG, SPI_CMD_USR)
|
||||||
|
|
||||||
|
def wait_done():
|
||||||
|
for _ in xrange(10):
|
||||||
|
if (self.read_reg(SPI_CMD_REG) & SPI_CMD_USR) == 0:
|
||||||
|
return
|
||||||
|
raise FatalError("SPI command did not complete in time")
|
||||||
|
wait_done()
|
||||||
|
|
||||||
|
status = self.read_reg(SPI_W0_REG)
|
||||||
|
return status
|
||||||
|
|
||||||
|
def read_status(self, num_bytes=2):
|
||||||
|
"""Read up to 24 bits (num_bytes) of SPI flash status register contents
|
||||||
|
via RDSR, RDSR2, RDSR3 commands
|
||||||
|
|
||||||
|
Not all SPI flash supports all three commands. The upper 1 or 2
|
||||||
|
bytes may be 0xFF.
|
||||||
|
"""
|
||||||
|
SPIFLASH_RDSR = 0x05
|
||||||
|
SPIFLASH_RDSR2 = 0x35
|
||||||
|
SPIFLASH_RDSR3 = 0x15
|
||||||
|
|
||||||
|
status = 0
|
||||||
|
shift = 0
|
||||||
|
for cmd in [SPIFLASH_RDSR, SPIFLASH_RDSR2, SPIFLASH_RDSR3][0:num_bytes]:
|
||||||
|
status += self.run_spiflash_command(cmd, read_bits=8) << shift
|
||||||
|
shift += 8
|
||||||
|
return status
|
||||||
|
|
||||||
|
def write_status(self, new_status, num_bytes=2, set_non_volatile=False):
|
||||||
|
"""Write up to 24 bits (num_bytes) of new status register
|
||||||
|
|
||||||
|
num_bytes can be 1, 2 or 3.
|
||||||
|
|
||||||
|
Not all flash supports the additional commands to write the
|
||||||
|
second and third byte of the status register. When writing 2
|
||||||
|
bytes, esptool also sends a 16-byte WRSR command (as some
|
||||||
|
flash types use this instead of WRSR2.)
|
||||||
|
|
||||||
|
If the set_non_volatile flag is set, non-volatile bits will
|
||||||
|
be set as well as volatile ones (WREN used instead of WEVSR).
|
||||||
|
|
||||||
|
"""
|
||||||
|
SPIFLASH_WRSR = 0x01
|
||||||
|
SPIFLASH_WRSR2 = 0x31
|
||||||
|
SPIFLASH_WRSR3 = 0x11
|
||||||
|
SPIFLASH_WEVSR = 0x50
|
||||||
|
SPIFLASH_WREN = 0x06
|
||||||
|
SPIFLASH_WRDI = 0x04
|
||||||
|
|
||||||
|
enable_cmd = SPIFLASH_WREN if set_non_volatile else SPIFLASH_WEVSR
|
||||||
|
|
||||||
|
# try using a 16-bit WRSR (not supported by all chips)
|
||||||
|
# this may be redundant, but shouldn't hurt
|
||||||
|
if num_bytes == 2:
|
||||||
|
self.run_spiflash_command(enable_cmd)
|
||||||
|
self.run_spiflash_command(SPIFLASH_WRSR, struct.pack("<H", new_status))
|
||||||
|
|
||||||
|
# also try using individual commands (also not supported by all chips for num_bytes 2 & 3)
|
||||||
|
for cmd in [SPIFLASH_WRSR, SPIFLASH_WRSR2, SPIFLASH_WRSR3][0:num_bytes]:
|
||||||
|
self.run_spiflash_command(enable_cmd)
|
||||||
|
self.run_spiflash_command(cmd, struct.pack("B", new_status & 0xFF))
|
||||||
|
new_status >>= 8
|
||||||
|
|
||||||
|
self.run_spiflash_command(SPIFLASH_WRDI)
|
||||||
|
|
||||||
|
|
||||||
class ESP8266ROM(ESPLoader):
|
class ESP8266ROM(ESPLoader):
|
||||||
""" Access class for ESP8266 ROM bootloader
|
""" Access class for ESP8266 ROM bootloader
|
||||||
@ -556,8 +694,9 @@ class ESP8266ROM(ESPLoader):
|
|||||||
ESP_OTP_MAC1 = 0x3ff00054
|
ESP_OTP_MAC1 = 0x3ff00054
|
||||||
ESP_OTP_MAC3 = 0x3ff0005c
|
ESP_OTP_MAC3 = 0x3ff0005c
|
||||||
|
|
||||||
SPI_CMD_REG_ADDR = 0x60000200
|
SPI_REG_BASE = 0x60000200
|
||||||
SPI_W0_REG_ADDR = 0x60000240
|
SPI_W0_OFFS = 0x40
|
||||||
|
SPI_HAS_MOSI_DLEN_REG = False
|
||||||
|
|
||||||
FLASH_SIZES = {
|
FLASH_SIZES = {
|
||||||
'512KB':0x00,
|
'512KB':0x00,
|
||||||
@ -619,7 +758,7 @@ class ESP8266ROM(ESPLoader):
|
|||||||
class ESP8266StubLoader(ESP8266ROM):
|
class ESP8266StubLoader(ESP8266ROM):
|
||||||
""" Access class for ESP8266 stub loader, runs on top of ROM.
|
""" Access class for ESP8266 stub loader, runs on top of ROM.
|
||||||
"""
|
"""
|
||||||
FLASH_WRITE_SIZE = 8192 # matches MAX_WRITE_BLOCK in stub_loader.c
|
FLASH_WRITE_SIZE = 0x4000 # matches MAX_WRITE_BLOCK in stub_loader.c
|
||||||
IS_STUB = True
|
IS_STUB = True
|
||||||
|
|
||||||
def __init__(self, rom_loader):
|
def __init__(self, rom_loader):
|
||||||
@ -646,10 +785,11 @@ class ESP32ROM(ESPLoader):
|
|||||||
# ESP32 uses a 4 byte status reply
|
# ESP32 uses a 4 byte status reply
|
||||||
STATUS_BYTES_LENGTH = 4
|
STATUS_BYTES_LENGTH = 4
|
||||||
|
|
||||||
SPI_CMD_REG_ADDR = 0x60003000
|
SPI_REG_BASE = 0x60002000
|
||||||
SPI_W0_REG_ADDR = 0x60003040
|
EFUSE_REG_BASE = 0x6001a000
|
||||||
|
|
||||||
EFUSE_BASE = 0x6001a000
|
SPI_W0_OFFS = 0x80
|
||||||
|
SPI_HAS_MOSI_DLEN_REG = True
|
||||||
|
|
||||||
FLASH_SIZES = {
|
FLASH_SIZES = {
|
||||||
'1MB':0x00,
|
'1MB':0x00,
|
||||||
@ -661,7 +801,7 @@ class ESP32ROM(ESPLoader):
|
|||||||
|
|
||||||
def read_efuse(self, n):
|
def read_efuse(self, n):
|
||||||
""" Read the nth word of the ESP3x EFUSE region. """
|
""" Read the nth word of the ESP3x EFUSE region. """
|
||||||
return self.read_reg(self.EFUSE_BASE + (4 * n))
|
return self.read_reg(self.EFUSE_REG_BASE + (4 * n))
|
||||||
|
|
||||||
def chip_id(self):
|
def chip_id(self):
|
||||||
word16 = self.read_efuse(16)
|
word16 = self.read_efuse(16)
|
||||||
@ -687,7 +827,7 @@ class ESP32ROM(ESPLoader):
|
|||||||
class ESP32StubLoader(ESP32ROM):
|
class ESP32StubLoader(ESP32ROM):
|
||||||
""" Access class for ESP32 stub loader, runs on top of ROM.
|
""" Access class for ESP32 stub loader, runs on top of ROM.
|
||||||
"""
|
"""
|
||||||
FLASH_WRITE_SIZE = 8192 # matches MAX_WRITE_BLOCK in stub_loader.c
|
FLASH_WRITE_SIZE = 0x4000 # matches MAX_WRITE_BLOCK in stub_loader.c
|
||||||
STATUS_BYTES_LENGTH = 2 # same as ESP8266, different to ESP32 ROM
|
STATUS_BYTES_LENGTH = 2 # same as ESP8266, different to ESP32 ROM
|
||||||
IS_STUB = True
|
IS_STUB = True
|
||||||
|
|
||||||
@ -739,6 +879,7 @@ class ImageSegment(object):
|
|||||||
data += "\x00" * (4 - pad_mod)
|
data += "\x00" * (4 - pad_mod)
|
||||||
self.data = data
|
self.data = data
|
||||||
self.file_offs = file_offs
|
self.file_offs = file_offs
|
||||||
|
self.include_in_checksum = True
|
||||||
|
|
||||||
def copy_with_new_addr(self, new_addr):
|
def copy_with_new_addr(self, new_addr):
|
||||||
""" Return a new ImageSegment with same data, but mapped at
|
""" Return a new ImageSegment with same data, but mapped at
|
||||||
@ -782,9 +923,7 @@ class BaseFirmwareImage(object):
|
|||||||
""" Load the next segment from the image file """
|
""" Load the next segment from the image file """
|
||||||
file_offs = f.tell()
|
file_offs = f.tell()
|
||||||
(offset, size) = struct.unpack('<II', f.read(8))
|
(offset, size) = struct.unpack('<II', f.read(8))
|
||||||
if not is_irom_segment:
|
self.warn_if_unusual_segment(offset, size, is_irom_segment)
|
||||||
if offset > 0x40200000 or offset < 0x3ffe0000 or size > 65536:
|
|
||||||
print('WARNING: Suspicious segment 0x%x, length %d' % (offset, size))
|
|
||||||
segment_data = f.read(size)
|
segment_data = f.read(size)
|
||||||
if len(segment_data) < size:
|
if len(segment_data) < size:
|
||||||
raise FatalError('End of file reading segment 0x%x, length %d (actual length %d)' % (offset, size, len(segment_data)))
|
raise FatalError('End of file reading segment 0x%x, length %d (actual length %d)' % (offset, size, len(segment_data)))
|
||||||
@ -792,6 +931,11 @@ class BaseFirmwareImage(object):
|
|||||||
self.segments.append(segment)
|
self.segments.append(segment)
|
||||||
return segment
|
return segment
|
||||||
|
|
||||||
|
def warn_if_unusual_segment(self, offset, size, is_irom_segment):
|
||||||
|
if not is_irom_segment:
|
||||||
|
if offset > 0x40200000 or offset < 0x3ffe0000 or size > 65536:
|
||||||
|
print('WARNING: Suspicious segment 0x%x, length %d' % (offset, size))
|
||||||
|
|
||||||
def save_segment(self, f, segment, checksum=None):
|
def save_segment(self, f, segment, checksum=None):
|
||||||
""" Save the next segment to the image file, return next checksum value if provided """
|
""" 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(struct.pack('<II', segment.addr, len(segment.data)))
|
||||||
@ -806,6 +950,16 @@ class BaseFirmwareImage(object):
|
|||||||
align_file_position(f, 16)
|
align_file_position(f, 16)
|
||||||
return ord(f.read(1))
|
return ord(f.read(1))
|
||||||
|
|
||||||
|
def calculate_checksum(self):
|
||||||
|
""" Calculate checksum of loaded image, based on segments in
|
||||||
|
segment array.
|
||||||
|
"""
|
||||||
|
checksum = ESPLoader.ESP_CHECKSUM_MAGIC
|
||||||
|
for seg in self.segments:
|
||||||
|
if seg.include_in_checksum:
|
||||||
|
checksum = ESPLoader.checksum(seg.data, checksum)
|
||||||
|
return checksum
|
||||||
|
|
||||||
def append_checksum(self, f, checksum):
|
def append_checksum(self, f, checksum):
|
||||||
""" Append ESPLoader checksum to the just-written image """
|
""" Append ESPLoader checksum to the just-written image """
|
||||||
align_file_position(f, 16)
|
align_file_position(f, 16)
|
||||||
@ -819,7 +973,7 @@ class BaseFirmwareImage(object):
|
|||||||
""" Returns True if an address starts in the irom region.
|
""" Returns True if an address starts in the irom region.
|
||||||
Valid for ESP8266 only.
|
Valid for ESP8266 only.
|
||||||
"""
|
"""
|
||||||
return ESPLoader.IROM_MAP_START <= addr < ESPLoader.IROM_MAP_END
|
return ESP8266ROM.IROM_MAP_START <= addr < ESP8266ROM.IROM_MAP_END
|
||||||
|
|
||||||
def get_irom_segment(self):
|
def get_irom_segment(self):
|
||||||
irom_segments = [s for s in self.segments if self.is_irom_addr(s.addr)]
|
irom_segments = [s for s in self.segments if self.is_irom_addr(s.addr)]
|
||||||
@ -836,6 +990,9 @@ class BaseFirmwareImage(object):
|
|||||||
|
|
||||||
class ESPFirmwareImage(BaseFirmwareImage):
|
class ESPFirmwareImage(BaseFirmwareImage):
|
||||||
""" 'Version 1' firmware image, segments loaded directly by the ROM bootloader. """
|
""" 'Version 1' firmware image, segments loaded directly by the ROM bootloader. """
|
||||||
|
|
||||||
|
ROM_LOADER = ESP8266ROM
|
||||||
|
|
||||||
def __init__(self, load_file=None):
|
def __init__(self, load_file=None):
|
||||||
super(ESPFirmwareImage, self).__init__()
|
super(ESPFirmwareImage, self).__init__()
|
||||||
self.flash_mode = 0
|
self.flash_mode = 0
|
||||||
@ -858,7 +1015,7 @@ class ESPFirmwareImage(BaseFirmwareImage):
|
|||||||
# IROM data goes in its own plain binary file
|
# IROM data goes in its own plain binary file
|
||||||
irom_segment = self.get_irom_segment()
|
irom_segment = self.get_irom_segment()
|
||||||
if irom_segment is not None:
|
if irom_segment is not None:
|
||||||
with open("%s0x%05x.bin" % (basename, irom_segment.addr), "wb") as f:
|
with open("%s0x%05x.bin" % (basename, irom_segment.addr - ESP8266ROM.IROM_MAP_START), "wb") as f:
|
||||||
f.write(irom_segment.data)
|
f.write(irom_segment.data)
|
||||||
|
|
||||||
# everything but IROM goes at 0x00000 in an image file
|
# everything but IROM goes at 0x00000 in an image file
|
||||||
@ -866,7 +1023,7 @@ class ESPFirmwareImage(BaseFirmwareImage):
|
|||||||
with open("%s0x00000.bin" % basename, 'wb') as f:
|
with open("%s0x00000.bin" % basename, 'wb') as f:
|
||||||
self.write_common_header(f, normal_segments)
|
self.write_common_header(f, normal_segments)
|
||||||
checksum = ESPLoader.ESP_CHECKSUM_MAGIC
|
checksum = ESPLoader.ESP_CHECKSUM_MAGIC
|
||||||
for segment in self.segments:
|
for segment in normal_segments:
|
||||||
checksum = self.save_segment(f, segment, checksum)
|
checksum = self.save_segment(f, segment, checksum)
|
||||||
self.append_checksum(f, checksum)
|
self.append_checksum(f, checksum)
|
||||||
|
|
||||||
@ -875,6 +1032,9 @@ class OTAFirmwareImage(BaseFirmwareImage):
|
|||||||
""" 'Version 2' firmware image, segments loaded by software bootloader stub
|
""" 'Version 2' firmware image, segments loaded by software bootloader stub
|
||||||
(ie Espressif bootloader or rboot)
|
(ie Espressif bootloader or rboot)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
ROM_LOADER = ESP8266ROM
|
||||||
|
|
||||||
def __init__(self, load_file=None):
|
def __init__(self, load_file=None):
|
||||||
super(OTAFirmwareImage, self).__init__()
|
super(OTAFirmwareImage, self).__init__()
|
||||||
self.version = 2
|
self.version = 2
|
||||||
@ -888,16 +1048,17 @@ class OTAFirmwareImage(BaseFirmwareImage):
|
|||||||
#
|
#
|
||||||
# the file is saved in the image with a zero load address
|
# the file is saved in the image with a zero load address
|
||||||
# in the header, so we need to calculate a load address
|
# in the header, so we need to calculate a load address
|
||||||
irom_offs = load_file.tell()
|
|
||||||
irom_segment = self.load_segment(load_file, True)
|
irom_segment = self.load_segment(load_file, True)
|
||||||
irom_segment.addr = irom_offs + self.IROM_MAP_START
|
# for actual mapped addr, add ESP8266ROM.IROM_MAP_START + flashing_Addr + 8
|
||||||
|
irom_segment.addr = 0
|
||||||
|
irom_segment.include_in_checksum = False
|
||||||
|
|
||||||
first_flash_mode = self.flash_mode
|
first_flash_mode = self.flash_mode
|
||||||
first_flash_size_freq = self.flash_size_freq
|
first_flash_size_freq = self.flash_size_freq
|
||||||
first_entrypoint = self.entrypoint
|
first_entrypoint = self.entrypoint
|
||||||
# load the second header
|
# load the second header
|
||||||
self.load_common_header(load_file, ESPLoader.ESP_IMAGE_MAGIC)
|
|
||||||
(magic, segments, self.flash_mode, self.flash_size_freq, self.entrypoint) = struct.unpack('<BBBBI', load_file.read(8))
|
segments = self.load_common_header(load_file, ESPLoader.ESP_IMAGE_MAGIC)
|
||||||
|
|
||||||
if first_flash_mode != self.flash_mode:
|
if first_flash_mode != self.flash_mode:
|
||||||
print('WARNING: Flash mode value in first header (0x%02x) disagrees with second (0x%02x). Using second value.'
|
print('WARNING: Flash mode value in first header (0x%02x) disagrees with second (0x%02x). Using second value.'
|
||||||
@ -918,7 +1079,7 @@ class OTAFirmwareImage(BaseFirmwareImage):
|
|||||||
""" Derive a default output name from the ELF name. """
|
""" Derive a default output name from the ELF name. """
|
||||||
irom_segment = self.get_irom_segment()
|
irom_segment = self.get_irom_segment()
|
||||||
if irom_segment is not None:
|
if irom_segment is not None:
|
||||||
irom_offs = irom_segment.addr - self.IROM_MAP_START
|
irom_offs = irom_segment.addr - ESP8266ROM.IROM_MAP_START
|
||||||
else:
|
else:
|
||||||
irom_offs = 0
|
irom_offs = 0
|
||||||
return "%s-0x%05x.bin" % (os.path.splitext(input_file)[0],
|
return "%s-0x%05x.bin" % (os.path.splitext(input_file)[0],
|
||||||
@ -951,6 +1112,9 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
|||||||
and because of new flash mapping capabilities the flash-mapped regions
|
and because of new flash mapping capabilities the flash-mapped regions
|
||||||
can be placed in the normal image (just @ 64kB padded offsets).
|
can be placed in the normal image (just @ 64kB padded offsets).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
ROM_LOADER = ESP32ROM
|
||||||
|
|
||||||
def __init__(self, load_file=None):
|
def __init__(self, load_file=None):
|
||||||
super(ESP32FirmwareImage, self).__init__()
|
super(ESP32FirmwareImage, self).__init__()
|
||||||
self.flash_mode = 0
|
self.flash_mode = 0
|
||||||
@ -974,6 +1138,9 @@ class ESP32FirmwareImage(BaseFirmwareImage):
|
|||||||
""" Derive a default output name from the ELF name. """
|
""" Derive a default output name from the ELF name. """
|
||||||
return "%s.bin" % (os.path.splitext(input_file)[0])
|
return "%s.bin" % (os.path.splitext(input_file)[0])
|
||||||
|
|
||||||
|
def warn_if_unusual_segment(self, offset, size, is_irom_segment):
|
||||||
|
pass # TODO: add warnings for ESP32 segment offset/size combinations that are wrong
|
||||||
|
|
||||||
def save(self, filename):
|
def save(self, filename):
|
||||||
padding_segments = 0
|
padding_segments = 0
|
||||||
with open(filename, 'wb') as f:
|
with open(filename, 'wb') as f:
|
||||||
@ -1268,24 +1435,25 @@ def write_flash(esp, args):
|
|||||||
for address, argfile in args.addr_filename:
|
for address, argfile in args.addr_filename:
|
||||||
argfile.seek(0,2) # seek to end
|
argfile.seek(0,2) # seek to end
|
||||||
if address + argfile.tell() > flash_end:
|
if address + argfile.tell() > flash_end:
|
||||||
raise FatalError("File %s (length %d) at offset %d will not fit in %d bytes of flash." +
|
raise FatalError(("File %s (length %d) at offset %d will not fit in %d bytes of flash. " +
|
||||||
"Use --flash-size argument, or change flashing address."
|
"Use --flash-size argument, or change flashing address.")
|
||||||
% (argfile.name, argfile.tell(), address, flash_end))
|
% (argfile.name, argfile.tell(), address, flash_end))
|
||||||
argfile.seek(0)
|
argfile.seek(0)
|
||||||
|
|
||||||
for address, argfile in args.addr_filename:
|
for address, argfile in args.addr_filename:
|
||||||
print 'Erasing flash...'
|
print 'Erasing flash...'
|
||||||
|
image = argfile.read()
|
||||||
|
# Update header with flash parameters
|
||||||
|
if address == 0 and image[0] == '\xe9':
|
||||||
|
image = image[0:2] + flash_info + image[4:]
|
||||||
|
calcmd5 = hashlib.md5(image).hexdigest()
|
||||||
|
uncsize = len(image)
|
||||||
if args.compress:
|
if args.compress:
|
||||||
uncimage = argfile.read()
|
uncimage = image
|
||||||
calcmd5 = hashlib.md5(uncimage).hexdigest()
|
|
||||||
uncsize = len(uncimage)
|
|
||||||
image = zlib.compress(uncimage, 9)
|
image = zlib.compress(uncimage, 9)
|
||||||
blocks = div_roundup(len(image), esp.FLASH_WRITE_SIZE)
|
blocks = div_roundup(len(image), esp.FLASH_WRITE_SIZE)
|
||||||
esp.flash_defl_begin(len(uncimage),len(image), address)
|
esp.flash_defl_begin(len(uncimage),len(image), address)
|
||||||
else:
|
else:
|
||||||
image = argfile.read()
|
|
||||||
calcmd5 = hashlib.md5(image).hexdigest()
|
|
||||||
uncsize = len(image)
|
|
||||||
blocks = div_roundup(len(image), esp.FLASH_WRITE_SIZE)
|
blocks = div_roundup(len(image), esp.FLASH_WRITE_SIZE)
|
||||||
esp.flash_begin(blocks * esp.FLASH_WRITE_SIZE, address)
|
esp.flash_begin(blocks * esp.FLASH_WRITE_SIZE, address)
|
||||||
argfile.seek(0) # in case we need it again
|
argfile.seek(0) # in case we need it again
|
||||||
@ -1302,16 +1470,20 @@ def write_flash(esp, args):
|
|||||||
else:
|
else:
|
||||||
# Pad the last block
|
# Pad the last block
|
||||||
block = block + '\xff' * (esp.FLASH_WRITE_SIZE - len(block))
|
block = block + '\xff' * (esp.FLASH_WRITE_SIZE - len(block))
|
||||||
# Fix sflash config data
|
|
||||||
if address == 0 and seq == 0 and block[0] == '\xe9':
|
|
||||||
block = block[0:2] + flash_info + block[4:]
|
|
||||||
header_block = block
|
|
||||||
esp.flash_block(block, seq)
|
esp.flash_block(block, seq)
|
||||||
image = image[esp.FLASH_WRITE_SIZE:]
|
image = image[esp.FLASH_WRITE_SIZE:]
|
||||||
seq += 1
|
seq += 1
|
||||||
written += len(block)
|
written += len(block)
|
||||||
t = time.time() - t
|
t = time.time() - t
|
||||||
print '\rWrote %d bytes at 0x%08x in %.1f seconds (%.1f kbit/s)...' % (written, address, t, written / t * 8 / 1000)
|
speed_msg = ""
|
||||||
|
if args.compress:
|
||||||
|
if t > 0.0:
|
||||||
|
speed_msg = " (effective %.1f kbit/s)" % (uncsize / t * 8 / 1000)
|
||||||
|
print '\rWrote %d bytes (%d compressed) at 0x%08x in %.1f seconds%s...' % (uncsize, written, address, t, speed_msg)
|
||||||
|
else:
|
||||||
|
if t > 0.0:
|
||||||
|
speed_msg = " (%.1f kbit/s)" % (written / t * 8 / 1000)
|
||||||
|
print '\rWrote %d bytes at 0x%08x in %.1f seconds%s...' % (written, address, t, speed_msg)
|
||||||
res = esp.flash_md5sum(address, uncsize)
|
res = esp.flash_md5sum(address, uncsize)
|
||||||
if res != calcmd5:
|
if res != calcmd5:
|
||||||
print 'File md5: %s' % calcmd5
|
print 'File md5: %s' % calcmd5
|
||||||
@ -1339,14 +1511,13 @@ def image_info(args):
|
|||||||
print('Entry point: %08x' % image.entrypoint) if image.entrypoint != 0 else 'Entry point not set'
|
print('Entry point: %08x' % image.entrypoint) if image.entrypoint != 0 else 'Entry point not set'
|
||||||
print '%d segments' % len(image.segments)
|
print '%d segments' % len(image.segments)
|
||||||
print
|
print
|
||||||
checksum = ESPLoader.ESP_CHECKSUM_MAGIC
|
|
||||||
idx = 0
|
idx = 0
|
||||||
for seg in image.segments:
|
for seg in image.segments:
|
||||||
idx += 1
|
idx += 1
|
||||||
print 'Segment %d: %r' % (idx, seg)
|
print 'Segment %d: %r' % (idx, seg)
|
||||||
checksum = ESPLoader.checksum(seg.data, checksum)
|
calc_checksum = image.calculate_checksum()
|
||||||
print
|
print 'Checksum: %02x (%s)' % (image.checksum,
|
||||||
print 'Checksum: %02x (%s)' % (image.checksum, 'valid' if image.checksum == checksum else 'invalid!')
|
'valid' if image.checksum == calc_checksum else 'invalid - calculated %02x' % calc_checksum)
|
||||||
|
|
||||||
|
|
||||||
def make_image(args):
|
def make_image(args):
|
||||||
@ -1377,7 +1548,7 @@ def elf2image(args):
|
|||||||
image.entrypoint = e.entrypoint
|
image.entrypoint = e.entrypoint
|
||||||
image.segments = e.sections # ELFSection is a subclass of ImageSegment
|
image.segments = e.sections # ELFSection is a subclass of ImageSegment
|
||||||
image.flash_mode = {'qio':0, 'qout':1, 'dio':2, 'dout': 3}[args.flash_mode]
|
image.flash_mode = {'qio':0, 'qout':1, 'dio':2, 'dout': 3}[args.flash_mode]
|
||||||
image.flash_size_freq = ESP8266ROM.FLASH_SIZES[args.flash_size]
|
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]
|
image.flash_size_freq += {'40m':0, '26m':1, '20m':2, '80m': 0xf}[args.flash_freq]
|
||||||
|
|
||||||
if args.output is None:
|
if args.output is None:
|
||||||
@ -1404,8 +1575,9 @@ def erase_flash(esp, args):
|
|||||||
|
|
||||||
def erase_region(esp, args):
|
def erase_region(esp, args):
|
||||||
print 'Erasing region (may be slow depending on size)...'
|
print 'Erasing region (may be slow depending on size)...'
|
||||||
|
t = time.time()
|
||||||
esp.erase_region(args.address, args.size)
|
esp.erase_region(args.address, args.size)
|
||||||
print 'Erase completed successfully.'
|
print 'Erase completed successfully in %.1f seconds.' % (time.time() - t)
|
||||||
|
|
||||||
|
|
||||||
def run(esp, args):
|
def run(esp, args):
|
||||||
@ -1468,6 +1640,19 @@ def verify_flash(esp, args, flash_params=None):
|
|||||||
raise FatalError("Verify failed.")
|
raise FatalError("Verify failed.")
|
||||||
|
|
||||||
|
|
||||||
|
def read_flash_status(esp, args):
|
||||||
|
print ('Status value: 0x%04x' % esp.read_status(args.bytes))
|
||||||
|
|
||||||
|
|
||||||
|
def write_flash_status(esp, args):
|
||||||
|
fmt = "0x%%0%dx" % (args.bytes * 2)
|
||||||
|
args.value = args.value & ((1 << (args.bytes * 8)) - 1)
|
||||||
|
print (('Initial flash status: ' + fmt) % esp.read_status(args.bytes))
|
||||||
|
print (('Setting flash status: ' + fmt) % args.value)
|
||||||
|
esp.write_status(args.value, args.bytes, args.non_volatile)
|
||||||
|
print (('After flash status: ' + fmt) % esp.read_status(args.bytes))
|
||||||
|
|
||||||
|
|
||||||
def version(args):
|
def version(args):
|
||||||
print __version__
|
print __version__
|
||||||
|
|
||||||
@ -1590,6 +1775,20 @@ def main():
|
|||||||
'flash_id',
|
'flash_id',
|
||||||
help='Read SPI flash manufacturer and device ID')
|
help='Read SPI flash manufacturer and device ID')
|
||||||
|
|
||||||
|
parser_read_status = subparsers.add_parser(
|
||||||
|
'read_flash_status',
|
||||||
|
help='Read SPI flash status register')
|
||||||
|
|
||||||
|
parser_read_status.add_argument('--bytes', help='Number of bytes to read (1-3)', type=int, choices=[1,2,3], default=2)
|
||||||
|
|
||||||
|
parser_write_status = subparsers.add_parser(
|
||||||
|
'write_flash_status',
|
||||||
|
help='Write SPI flash status register')
|
||||||
|
|
||||||
|
parser_write_status.add_argument('--non-volatile', help='Write non-volatile bits (use with caution)', action='store_true')
|
||||||
|
parser_write_status.add_argument('--bytes', help='Number of status bytes to write (1-3)', type=int, choices=[1,2,3], default=2)
|
||||||
|
parser_write_status.add_argument('value', help='New value', type=arg_auto_int)
|
||||||
|
|
||||||
parser_read_flash = subparsers.add_parser(
|
parser_read_flash = subparsers.add_parser(
|
||||||
'read_flash',
|
'read_flash',
|
||||||
help='Read SPI flash content')
|
help='Read SPI flash content')
|
||||||
@ -1652,6 +1851,8 @@ def main():
|
|||||||
if hasattr(args, "ucIsHspi"):
|
if hasattr(args, "ucIsHspi"):
|
||||||
print "Attaching SPI flash..."
|
print "Attaching SPI flash..."
|
||||||
esp.flash_spi_attach(args.ucIsHspi,args.ucIsLegacy)
|
esp.flash_spi_attach(args.ucIsHspi,args.ucIsLegacy)
|
||||||
|
else:
|
||||||
|
esp.flash_spi_attach(0, 0)
|
||||||
if hasattr(args, "flash_size"):
|
if hasattr(args, "flash_size"):
|
||||||
print "Configuring flash size..."
|
print "Configuring flash size..."
|
||||||
esp.flash_set_parameters(flash_size_bytes(args.flash_size))
|
esp.flash_set_parameters(flash_size_bytes(args.flash_size))
|
||||||
@ -1718,94 +1919,96 @@ class AddrFilenamePairAction(argparse.Action):
|
|||||||
|
|
||||||
# Binary stub code (see flasher_stub dir for source & details)
|
# Binary stub code (see flasher_stub dir for source & details)
|
||||||
ESP8266ROM.STUB_CODE = eval(zlib.decompress(base64.b64decode(b"""
|
ESP8266ROM.STUB_CODE = eval(zlib.decompress(base64.b64decode(b"""
|
||||||
eNrFPHl/1MbZX0VaG18YmJG00shAsl7McgR+NRAc0nfTWBpJIRSovXELobSf/dVzaUbaXRxy9Y+1NdJojue+Rv/evqjfX2wfBNvz942Zv1dR+1On8/daeQ211JCf0e17tv018/dWBXB3p/0TB8HmyRRuw/McLg7b\
|
eNrFXPt/08aW/1ckJ+RhQjsjydIohF7HCSZw4XMhNCm967YZvaBc2k1c74ayufu3r85LGsk2gb72h4BnNJrHmfP4njNn9D/bi/L9Ynvf2569r8zsvQrqP3Uxe6+VU1BLBfkzun4vr/+q2ftceVC7U/8Tet7m+QSq\
|
||||||
P0Wv4y50DNtbWe/2A5qLW/ehdXLR6wHrjNtfO6+OcBlJsKHmi7aTGqxPu2uj+tdN/aXfeUJTyI+G9QECa9I0hc1DbtCOLvTOo7ZH+rTtm7a/sdurbtsNjDFuX6kTAUl/y3lvy4iGk5+gx86j9nYBS2nm2xvtv0y2\
|
4XkKPw7rf2yn4S409OuqpFP9mMbi0gmUzhedFjDPsP6rx9UBTiPyNtRsXjdSvfnp9rdR3d9V+Te38ZiGkD/q1iUIzEnTEHlgeZK6XZXCynCwRy/qePbewsv16vKRUAHqJ1D50K2ZvU8D+F0TowyEalFnzWmHKrhT\
|
||||||
3YKzrnipKcND7ewHQXJCEzY1dCl5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r4jH0PV95cIgUGK9eDlegBFHVvvA2/cdVv9IbtFVrd8RvP/EYP\
|
HA/CApp8eQKmoBkeUSrR9Z9MaeaDUsgVO+OVat3gf2Kh1rgysyxtfmJWb7OM3qdy3LvGDQer7mdMOuVRr9xJNG+/uoJ/vc+z6N7YmLzkfmtDud+qaAuHbsH2PvXT6zPXK76tq3vtde950CuHvXLUK8e9sumV825Z\
|
||||||
IT8NJM1gncWgbQftOl7BJfpP5OI/Wgr8VinxW6XIb5Uyv1UKXdb+zJ9W7ju7HQdmyHlU/jhmTku6g2wLhhp/jajjtFU6bu1OwQKGT8r7FnCS5SpRrUO8Xb+9WPzc3YxUHP3n/wHA2KlZ\
|
9+ajO+09t9Bp6X6vR18sf7znT/vTt5SDz+Sh23jqNh7rl+NbysktZfPR8uIjpZ8/Uup+/mdVOf9oef4x2bn173PlNv4sGi0+Y939mVe3aIHezHVvJrpHRd3pb8Mt3HULnW47GVVHbuGlW+hsyC89TdObp+2V8165\
|
||||||
|
DFdIif4LpfjP1gK/V0v8Xi3ye7XM79VCt5U/80+r9nu+jQQmKHmU5zhqr57zQd2cqcZfJGokbZWNW7vSQQ134fP6LhCOklRFCoBw+fNi/mtTGajY/Pv/ALbA9mA=\
|
||||||
""")))
|
""")))
|
||||||
ESP32ROM.STUB_CODE = eval(zlib.decompress(base64.b64decode(b"""
|
ESP32ROM.STUB_CODE = eval(zlib.decompress(base64.b64decode(b"""
|
||||||
eNp9Wmtz28YV/SsUZUukLTtYgAQWajKVZIeRbM/Edi1acZlpgAUQZybVNAoztVP3v3fPfWAXINUPFMF93N37OvcB/ed4237aHp9OjjefOjvxfxZ/3XwyiT4l0VP0sfk5ng78XO0/3eaTw0LMWeu/U/+N5+TB+pLn\
|
eNqNWnlz1MgV/ypjge0ZY9huaUZquTblA3YwhlQwWYyBSWVbLSlma9cF3qmyIWw+e/pd6pZGTuWPAamP16/f8XuH/O/ddXO33j2Y7K7uWjPx/8wP4UnhU368ulP+sdT+tfa/dnXn1I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3u/w31GIaVWJfg0gppt7ILcl6E0IHNH00sK4Pg26WhDCHAT7D73iGIzm3n/A7SSl/WgDel30nV6d2yw67\
|
||||||
|
mNmBjtli2e8odzle/OVKTR9QwVAaSOddMmOR52z08QYnSzktcYx05cZ3CYREuYGRGyDtJJxOG76TZOhld3+yW9u1/ecfa3sDfw2iVZEtFnlmFM/QX4hI5wbWw9+NxOvnWabzufEzzfX65ms3mKl0/ud/AYyHY9Q=\
|
||||||
""")))
|
""")))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Binary file not shown.
@ -6,24 +6,30 @@
|
|||||||
*/
|
*/
|
||||||
#define CONFIG_TRACEMEM_RESERVE_DRAM 0x0
|
#define CONFIG_TRACEMEM_RESERVE_DRAM 0x0
|
||||||
#define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE 1
|
#define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE 1
|
||||||
|
#define CONFIG_ESPTOOLPY_FLASHSIZE_4MB 1
|
||||||
#define CONFIG_ESPTOOLPY_FLASHFREQ "80m"
|
#define CONFIG_ESPTOOLPY_FLASHFREQ "80m"
|
||||||
#define CONFIG_NEWLIB_STDOUT_ADDCR 1
|
#define CONFIG_NEWLIB_STDOUT_ADDCR 1
|
||||||
#define CONFIG_FREERTOS_PANIC_PRINT_REBOOT 1
|
#define CONFIG_TASK_WDT_CHECK_IDLE_TASK 1
|
||||||
|
#define CONFIG_ESPTOOLPY_FLASHSIZE "4MB"
|
||||||
|
#define CONFIG_INT_WDT 1
|
||||||
#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1
|
#define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1
|
||||||
#define CONFIG_BT_RESERVE_DRAM 0x0
|
#define CONFIG_BT_RESERVE_DRAM 0x0
|
||||||
#define CONFIG_LWIP_MAX_SOCKETS 4
|
#define CONFIG_LWIP_MAX_SOCKETS 4
|
||||||
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_160 1
|
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_160 1
|
||||||
#define CONFIG_ULP_COPROC_RESERVE_MEM 0
|
#define CONFIG_ULP_COPROC_RESERVE_MEM 32
|
||||||
#define CONFIG_ESPTOOLPY_BAUD 921600
|
#define CONFIG_ESPTOOLPY_BAUD 921600
|
||||||
#define CONFIG_LOG_DEFAULT_LEVEL_WARN 1
|
#define CONFIG_INT_WDT_CHECK_CPU1 1
|
||||||
#define CONFIG_TOOLPREFIX "xtensa-esp32-elf-"
|
#define CONFIG_TOOLPREFIX "xtensa-esp32-elf-"
|
||||||
#define CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX 0
|
#define CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX 0
|
||||||
#define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384
|
#define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384
|
||||||
#define CONFIG_ESP32_ENABLE_STACK_WIFI 1
|
#define CONFIG_ESP32_ENABLE_STACK_WIFI 1
|
||||||
#define CONFIG_LOG_BOOTLOADER_LEVEL_WARN 1
|
#define CONFIG_TASK_WDT 1
|
||||||
#define CONFIG_MAIN_TASK_STACK_SIZE 4096
|
#define CONFIG_MAIN_TASK_STACK_SIZE 4096
|
||||||
|
#define CONFIG_TASK_WDT_TIMEOUT_S 5
|
||||||
|
#define CONFIG_INT_WDT_TIMEOUT_MS 10
|
||||||
#define CONFIG_ESPTOOLPY_FLASHMODE "dio"
|
#define CONFIG_ESPTOOLPY_FLASHMODE "dio"
|
||||||
#define CONFIG_LOG_DEFAULT_LEVEL 2
|
#define CONFIG_LOG_DEFAULT_LEVEL 0
|
||||||
|
#define CONFIG_ULP_COPROC_ENABLED 1
|
||||||
#define CONFIG_ESPTOOLPY_FLASHMODE_DIO 1
|
#define CONFIG_ESPTOOLPY_FLASHMODE_DIO 1
|
||||||
#define CONFIG_PYTHON "python"
|
#define CONFIG_PYTHON "python"
|
||||||
#define CONFIG_ESPTOOLPY_COMPRESSED 1
|
#define CONFIG_ESPTOOLPY_COMPRESSED 1
|
||||||
@ -33,17 +39,22 @@
|
|||||||
#define CONFIG_ESPTOOLPY_FLASHFREQ_80M 1
|
#define CONFIG_ESPTOOLPY_FLASHFREQ_80M 1
|
||||||
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048
|
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048
|
||||||
#define CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET 0x10000
|
#define CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET 0x10000
|
||||||
|
#define CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1 1
|
||||||
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 160
|
#define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 160
|
||||||
#define CONFIG_FREERTOS_HZ 1000
|
#define CONFIG_FREERTOS_HZ 1000
|
||||||
#define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1
|
#define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1
|
||||||
#define CONFIG_LOG_BOOTLOADER_LEVEL 2
|
#define CONFIG_LOG_BOOTLOADER_LEVEL 0
|
||||||
#define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200
|
#define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200
|
||||||
|
#define CONFIG_LOG_BOOTLOADER_LEVEL_NONE 1
|
||||||
#define CONFIG_LWIP_SO_REUSE 1
|
#define CONFIG_LWIP_SO_REUSE 1
|
||||||
|
#define CONFIG_ESP32_DEBUG_OCDAWARE 1
|
||||||
|
#define CONFIG_LOG_DEFAULT_LEVEL_NONE 1
|
||||||
#define CONFIG_FREERTOS_CORETIMER_0 1
|
#define CONFIG_FREERTOS_CORETIMER_0 1
|
||||||
#define CONFIG_PARTITION_TABLE_CUSTOM_FILENAME "partitions.csv"
|
#define CONFIG_PARTITION_TABLE_CUSTOM_FILENAME "partitions.csv"
|
||||||
#define CONFIG_FREERTOS_DEBUG_OCDAWARE 1
|
|
||||||
#define CONFIG_SYSTEM_EVENT_QUEUE_SIZE 32
|
#define CONFIG_SYSTEM_EVENT_QUEUE_SIZE 32
|
||||||
#define CONFIG_ESPTOOLPY_BAUD_921600B 1
|
#define CONFIG_ESPTOOLPY_BAUD_921600B 1
|
||||||
#define CONFIG_APP_OFFSET 0x10000
|
#define CONFIG_APP_OFFSET 0x10000
|
||||||
#define CONFIG_MEMMAP_SMP 1
|
#define CONFIG_MEMMAP_SMP 1
|
||||||
#define CONFIG_ESPTOOLPY_PORT "/dev/tty.SLAB_USBtoUART"
|
#define CONFIG_ESPTOOLPY_PORT "/dev/tty.SLAB_USBtoUART"
|
||||||
|
#define CONFIG_OPTIMIZATION_LEVEL_RELEASE 1
|
||||||
|
#define CONFIG_ESP32_PANIC_PRINT_HALT 1
|
||||||
|
21
tools/sdk/include/esp32/esp_brownout.h
Normal file
21
tools/sdk/include/esp32/esp_brownout.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __ESP_BROWNOUT_H
|
||||||
|
#define __ESP_BROWNOUT_H
|
||||||
|
|
||||||
|
void esp_brownout_init();
|
||||||
|
|
||||||
|
#endif
|
22
tools/sdk/include/esp32/esp_gdbstub.h
Normal file
22
tools/sdk/include/esp32/esp_gdbstub.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
#ifndef GDBSTUB_H
|
||||||
|
#define GDBSTUB_H
|
||||||
|
|
||||||
|
#include <xtensa/config/core.h>
|
||||||
|
#include "freertos/xtensa_api.h"
|
||||||
|
|
||||||
|
void esp_gdbstub_panic_handler(XtExcFrame *frame);
|
||||||
|
|
||||||
|
#endif
|
34
tools/sdk/include/esp32/esp_heap_alloc_caps.h
Normal file
34
tools/sdk/include/esp32/esp_heap_alloc_caps.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
#ifndef HEAP_ALLOC_CAPS_H
|
||||||
|
#define HEAP_ALLOC_CAPS_H
|
||||||
|
|
||||||
|
#define MALLOC_CAP_EXEC (1<<0) //Memory must be able to run executable code
|
||||||
|
#define MALLOC_CAP_32BIT (1<<1) //Memory must allow for aligned 32-bit data accesses
|
||||||
|
#define MALLOC_CAP_8BIT (1<<2) //Memory must allow for 8/16/...-bit data accesses
|
||||||
|
#define MALLOC_CAP_DMA (1<<3) //Memory must be able to accessed by DMA
|
||||||
|
#define MALLOC_CAP_PID2 (1<<4) //Memory must be mapped to PID2 memory space
|
||||||
|
#define MALLOC_CAP_PID3 (1<<5) //Memory must be mapped to PID3 memory space
|
||||||
|
#define MALLOC_CAP_PID4 (1<<6) //Memory must be mapped to PID4 memory space
|
||||||
|
#define MALLOC_CAP_PID5 (1<<7) //Memory must be mapped to PID5 memory space
|
||||||
|
#define MALLOC_CAP_PID6 (1<<8) //Memory must be mapped to PID6 memory space
|
||||||
|
#define MALLOC_CAP_PID7 (1<<9) //Memory must be mapped to PID7 memory space
|
||||||
|
#define MALLOC_CAP_SPISRAM (1<<10) //Memory must be in SPI SRAM
|
||||||
|
#define MALLOC_CAP_INVALID (1<<31) //Memory can't be used / list end marker
|
||||||
|
|
||||||
|
|
||||||
|
void heap_alloc_caps_init();
|
||||||
|
void *pvPortMallocCaps(size_t xWantedSize, uint32_t caps);
|
||||||
|
|
||||||
|
#endif
|
60
tools/sdk/include/esp32/esp_int_wdt.h
Normal file
60
tools/sdk/include/esp32/esp_int_wdt.h
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
|
||||||
|
#ifndef __ESP_INT_WDT_H
|
||||||
|
#define __ESP_INT_WDT_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @addtogroup Watchdog_APIs
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
This routine enables a watchdog to catch instances of processes disabling
|
||||||
|
interrupts for too long, or code within interrupt handlers taking too long.
|
||||||
|
It does this by setting up a watchdog which gets fed from the FreeRTOS
|
||||||
|
task switch interrupt. When this watchdog times out, initially it will call
|
||||||
|
a high-level interrupt routine that will panic FreeRTOS in order to allow
|
||||||
|
for forensic examination of the state of the CPU. When this interrupt
|
||||||
|
handler is not called and the watchdog times out a second time, it will
|
||||||
|
reset the SoC.
|
||||||
|
|
||||||
|
This uses the TIMERG1 WDT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initialize the interrupt watchdog. This is called in the init code if
|
||||||
|
* the interrupt watchdog is enabled in menuconfig.
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
void esp_int_wdt_init();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
21
tools/sdk/include/esp32/esp_panic.h
Normal file
21
tools/sdk/include/esp32/esp_panic.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef PANIC_H
|
||||||
|
#define PANIC_H
|
||||||
|
|
||||||
|
|
||||||
|
#define PANIC_RSN_NONE 0
|
||||||
|
#define PANIC_RSN_DEBUGEXCEPTION 1
|
||||||
|
#define PANIC_RSN_DOUBLEEXCEPTION 2
|
||||||
|
#define PANIC_RSN_KERNELEXCEPTION 3
|
||||||
|
#define PANIC_RSN_COPROCEXCEPTION 4
|
||||||
|
#define PANIC_RSN_INTWDT_CPU0 5
|
||||||
|
#define PANIC_RSN_INTWDT_CPU1 6
|
||||||
|
#define PANIC_RSN_MAX 6
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
|
void esp_set_breakpoint_if_jtag(void *fn);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
83
tools/sdk/include/esp32/esp_task_wdt.h
Normal file
83
tools/sdk/include/esp32/esp_task_wdt.h
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
|
||||||
|
#ifndef __ESP_TASK_WDT_H
|
||||||
|
#define __ESP_TASK_WDT_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** \defgroup Watchdog_APIs Watchdog APIs
|
||||||
|
* @brief Watchdog APIs
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @addtogroup Watchdog_APIs
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
This routine enables a more general-purpose task watchdog: tasks can individually
|
||||||
|
feed the watchdog and the watchdog will bark if one or more tasks haven't fed the
|
||||||
|
watchdog within the specified time. Optionally, the idle tasks can also configured
|
||||||
|
to feed the watchdog in a similar fashion, to detect CPU starvation.
|
||||||
|
|
||||||
|
This uses the TIMERG0 WDT.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initialize the task watchdog. This is called in the init code, if the
|
||||||
|
* task watchdog is enabled in menuconfig.
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
void esp_task_wdt_init();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Feed the watchdog. After the first feeding session, the watchdog will expect the calling
|
||||||
|
* task to keep feeding the watchdog until task_wdt_delete() is called.
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
|
||||||
|
void esp_task_wdt_feed();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delete the watchdog for the current task.
|
||||||
|
*
|
||||||
|
* @param null
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
void esp_task_wdt_delete();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -191,14 +191,14 @@ esp_err_t esp_wifi_disconnect(void);
|
|||||||
esp_err_t esp_wifi_clear_fast_connect(void);
|
esp_err_t esp_wifi_clear_fast_connect(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Kick the all station or associated id equals to aid
|
* @brief deauthenticate all stations or associated id equals to aid
|
||||||
*
|
*
|
||||||
* @param uint16_t aid : when aid is 0, kick all stations, otherwise kick station whose associated id is aid
|
* @param uint16_t aid : when aid is 0, deauthenticate all stations, otherwise deauthenticate station whose associated id is aid
|
||||||
*
|
*
|
||||||
* @return ESP_OK : succeed
|
* @return ESP_OK : succeed
|
||||||
* @return others : fail
|
* @return others : fail
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_kick_station(uint16_t aid);
|
esp_err_t esp_wifi_deauth_sta(uint16_t aid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Scan all available APs.
|
* @brief Scan all available APs.
|
||||||
@ -235,19 +235,30 @@ esp_err_t esp_wifi_scan_stop(void);
|
|||||||
* @return ESP_OK : succeed
|
* @return ESP_OK : succeed
|
||||||
* @return others : fail
|
* @return others : fail
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_get_ap_num(uint16_t *number);
|
esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get AP list found in last scan
|
* @brief Get AP list found in last scan
|
||||||
*
|
*
|
||||||
* @param uint16_t *number : as input param, it stores max AP number ap_list can hold, as output param, it store
|
* @param uint16_t *number : as input param, it stores max AP number ap_records can hold, as output param, it store
|
||||||
the actual AP number this API returns
|
the actual AP number this API returns
|
||||||
* @param wifi_ap_list_t *ap_list : a list to hold the found APs
|
* @param wifi_ap_record_t *ap_records: wifi_ap_record_t array to hold the found APs
|
||||||
*
|
*
|
||||||
* @return ESP_OK : succeed
|
* @return ESP_OK : succeed
|
||||||
* @return others : fail
|
* @return others : fail
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_get_ap_list(uint16_t *number, wifi_ap_list_t *ap_list);
|
esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get information of AP associated with ESP32 station
|
||||||
|
*
|
||||||
|
* @param wifi_ap_record_t *ap_info: the wifi_ap_record_t to hold station assocated AP
|
||||||
|
*
|
||||||
|
* @return ESP_OK : succeed
|
||||||
|
* @return others : fail
|
||||||
|
*/
|
||||||
|
esp_err_t esp_wifi_sta_get_ap_info(wifi_ap_record_t *ap_info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set current power save type
|
* @brief Set current power save type
|
||||||
@ -471,14 +482,13 @@ esp_err_t esp_wifi_get_config(wifi_interface_t ifx, wifi_config_t *conf);
|
|||||||
*
|
*
|
||||||
* @attention SSC only API
|
* @attention SSC only API
|
||||||
*
|
*
|
||||||
* @param struct station_info **station : station list
|
* @param wifi_sta_list_t *sta: station list
|
||||||
*
|
*
|
||||||
* @return ESP_OK : succeed
|
* @return ESP_OK : succeed
|
||||||
* @return others : fail
|
* @return others : fail
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_get_station_list(struct station_info **station);
|
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta);
|
||||||
|
|
||||||
esp_err_t esp_wifi_free_station_list(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the WiFi API configuration storage type
|
* @brief Set the WiFi API configuration storage type
|
||||||
|
80
tools/sdk/include/esp32/esp_wifi_internal.h
Normal file
80
tools/sdk/include/esp32/esp_wifi_internal.h
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
|
||||||
|
/*
|
||||||
|
* All the APIs declared here are internal only APIs, it can only be used by
|
||||||
|
* espressif internal modules, such as SSC, LWIP, TCPIP adapter etc, espressif
|
||||||
|
* customers are not recommended to use them.
|
||||||
|
*
|
||||||
|
* If someone really want to use specified APIs declared in here, please contact
|
||||||
|
* espressif AE/developer to make sure you know the limitations or risk of
|
||||||
|
* the API, otherwise you may get unexpected behavior!!!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __ESP_WIFI_INTERNAL_H__
|
||||||
|
#define __ESP_WIFI_INTERNAL_H__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "freertos/FreeRTOS.h"
|
||||||
|
#include "freertos/queue.h"
|
||||||
|
#include "rom/queue.h"
|
||||||
|
#include "esp_err.h"
|
||||||
|
#include "esp_wifi_types.h"
|
||||||
|
#include "esp_event.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief get whether the wifi driver is allowed to transmit data or not
|
||||||
|
*
|
||||||
|
* @param none
|
||||||
|
*
|
||||||
|
* @return true : upper layer should stop to transmit data to wifi driver
|
||||||
|
* @return false : upper layer can transmit data to wifi driver
|
||||||
|
*/
|
||||||
|
bool esp_wifi_internal_tx_is_stop(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief free the rx buffer which allocated by wifi driver
|
||||||
|
*
|
||||||
|
* @param void* buffer: rx buffer pointer
|
||||||
|
*
|
||||||
|
* @return nonoe
|
||||||
|
*/
|
||||||
|
void esp_wifi_internal_free_rx_buffer(void* buffer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief transmit the buffer via wifi driver
|
||||||
|
*
|
||||||
|
* @attention1 TODO should modify the return type from bool to int
|
||||||
|
*
|
||||||
|
* @param wifi_interface_t wifi_if : wifi interface id
|
||||||
|
* @param void *buffer : the buffer to be tansmit
|
||||||
|
* @param u16_t len : the length of buffer
|
||||||
|
*
|
||||||
|
* @return True : success transmit the buffer to wifi driver
|
||||||
|
* False : failed to transmit the buffer to wifi driver
|
||||||
|
*/
|
||||||
|
bool esp_wifi_internal_tx(wifi_interface_t wifi_if, void *buffer, u16_t len);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ESP_WIFI_H__ */
|
@ -109,7 +109,7 @@ typedef struct {
|
|||||||
wifi_second_chan_t second; /**< second channel of AP */
|
wifi_second_chan_t second; /**< second channel of AP */
|
||||||
int8_t rssi; /**< signal strength of AP */
|
int8_t rssi; /**< signal strength of AP */
|
||||||
wifi_auth_mode_t authmode; /**< authmode of AP */
|
wifi_auth_mode_t authmode; /**< authmode of AP */
|
||||||
} wifi_ap_list_t;
|
} wifi_ap_record_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WIFI_PS_NONE, /**< No power save */
|
WIFI_PS_NONE, /**< No power save */
|
||||||
@ -150,10 +150,15 @@ typedef union {
|
|||||||
wifi_sta_config_t sta; /**< configuration of STA */
|
wifi_sta_config_t sta; /**< configuration of STA */
|
||||||
} wifi_config_t;
|
} wifi_config_t;
|
||||||
|
|
||||||
struct station_info {
|
typedef struct {
|
||||||
STAILQ_ENTRY(station_info) next;
|
uint8_t mac[6]; /**< mac address of sta that associated with ESP32 soft-AP */
|
||||||
uint8_t bssid[6];
|
}wifi_sta_info_t;
|
||||||
};
|
|
||||||
|
#define ESP_WIFI_MAX_CONN_NUM (8+2) /**< max number of sta the eSP32 soft-AP can connect */
|
||||||
|
typedef struct {
|
||||||
|
wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< station list */
|
||||||
|
uint8_t num; /**< number of station that associated with ESP32 soft-AP */
|
||||||
|
}wifi_sta_list_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WIFI_STORAGE_FLASH, /**< all configuration will strore in both memory and flash */
|
WIFI_STORAGE_FLASH, /**< all configuration will strore in both memory and flash */
|
||||||
|
34
tools/sdk/include/esp32/heap_alloc_caps.h
Normal file
34
tools/sdk/include/esp32/heap_alloc_caps.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
#ifndef HEAP_ALLOC_CAPS_H
|
||||||
|
#define HEAP_ALLOC_CAPS_H
|
||||||
|
|
||||||
|
#define MALLOC_CAP_EXEC (1<<0) //Memory must be able to run executable code
|
||||||
|
#define MALLOC_CAP_32BIT (1<<1) //Memory must allow for aligned 32-bit data accesses
|
||||||
|
#define MALLOC_CAP_8BIT (1<<2) //Memory must allow for 8/16/...-bit data accesses
|
||||||
|
#define MALLOC_CAP_DMA (1<<3) //Memory must be able to accessed by DMA
|
||||||
|
#define MALLOC_CAP_PID2 (1<<4) //Memory must be mapped to PID2 memory space
|
||||||
|
#define MALLOC_CAP_PID3 (1<<5) //Memory must be mapped to PID3 memory space
|
||||||
|
#define MALLOC_CAP_PID4 (1<<6) //Memory must be mapped to PID4 memory space
|
||||||
|
#define MALLOC_CAP_PID5 (1<<7) //Memory must be mapped to PID5 memory space
|
||||||
|
#define MALLOC_CAP_PID6 (1<<8) //Memory must be mapped to PID6 memory space
|
||||||
|
#define MALLOC_CAP_PID7 (1<<9) //Memory must be mapped to PID7 memory space
|
||||||
|
#define MALLOC_CAP_SPISRAM (1<<10) //Memory must be in SPI SRAM
|
||||||
|
#define MALLOC_CAP_INVALID (1<<31) //Memory can't be used / list end marker
|
||||||
|
|
||||||
|
|
||||||
|
void heap_alloc_caps_init();
|
||||||
|
void *pvPortMallocCaps(size_t xWantedSize, uint32_t caps);
|
||||||
|
|
||||||
|
#endif
|
@ -218,7 +218,7 @@ void SelectSpiFunction(uint32_t ishspi);
|
|||||||
void spi_flash_attach(uint32_t ishspi, bool legacy);
|
void spi_flash_attach(uint32_t ishspi, bool legacy);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SPI Read Flash status register. We use CMD 0x05.
|
* @brief SPI Read Flash status register. We use CMD 0x05 (RDSR).
|
||||||
* Please do not call this function in SDK.
|
* Please do not call this function in SDK.
|
||||||
*
|
*
|
||||||
* @param SpiFlashChip *spi : The information for Flash, which is exported from ld file.
|
* @param SpiFlashChip *spi : The information for Flash, which is exported from ld file.
|
||||||
@ -232,7 +232,7 @@ void spi_flash_attach(uint32_t ishspi, bool legacy);
|
|||||||
SpiFlashOpResult SPI_read_status(SpiFlashChip *spi, uint32_t *status);
|
SpiFlashOpResult SPI_read_status(SpiFlashChip *spi, uint32_t *status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SPI Read Flash status register high 16 bit. We use CMD 0x35.
|
* @brief SPI Read Flash status register bits 8-15. We use CMD 0x35 (RDSR2).
|
||||||
* Please do not call this function in SDK.
|
* Please do not call this function in SDK.
|
||||||
*
|
*
|
||||||
* @param SpiFlashChip *spi : The information for Flash, which is exported from ld file.
|
* @param SpiFlashChip *spi : The information for Flash, which is exported from ld file.
|
||||||
@ -243,7 +243,7 @@ SpiFlashOpResult SPI_read_status(SpiFlashChip *spi, uint32_t *status);
|
|||||||
* SPI_FLASH_RESULT_ERR : read error.
|
* SPI_FLASH_RESULT_ERR : read error.
|
||||||
* SPI_FLASH_RESULT_TIMEOUT : read timeout.
|
* SPI_FLASH_RESULT_TIMEOUT : read timeout.
|
||||||
*/
|
*/
|
||||||
SpiFlashOpResult SPI_read_status_high(SpiFlashChip *spi, uint32_t *status);
|
SpiFlashOpResult SPI_read_status_high(uint32_t *status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Write status to Falsh status register.
|
* @brief Write status to Falsh status register.
|
||||||
@ -503,6 +503,12 @@ void SPI_Write_Encrypt_Disable(void);
|
|||||||
*/
|
*/
|
||||||
SpiFlashOpResult SPI_Encrypt_Write(uint32_t flash_addr, uint32_t *data, uint32_t len);
|
SpiFlashOpResult SPI_Encrypt_Write(uint32_t flash_addr, uint32_t *data, uint32_t len);
|
||||||
|
|
||||||
|
|
||||||
|
/** @brief Global SpiFlashChip structure used by ROM functions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
extern SpiFlashChip g_rom_flashchip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
#ifndef _SOC_CPU_H
|
#ifndef _SOC_CPU_H
|
||||||
#define _SOC_CPU_H
|
#define _SOC_CPU_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include "xtensa/corebits.h"
|
#include "xtensa/corebits.h"
|
||||||
|
|
||||||
/* C macros for xtensa special register read/write/exchange */
|
/* C macros for xtensa special register read/write/exchange */
|
||||||
|
@ -225,4 +225,22 @@ typedef volatile struct {
|
|||||||
uint32_t date; /*This is the version register.*/
|
uint32_t date; /*This is the version register.*/
|
||||||
} rmt_dev_t;
|
} rmt_dev_t;
|
||||||
extern rmt_dev_t RMT;
|
extern rmt_dev_t RMT;
|
||||||
|
|
||||||
|
//Allow access to RMT memory using RMTMEM.chan[0].data[8]
|
||||||
|
typedef volatile struct {
|
||||||
|
struct {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
uint32_t level1: 1;
|
||||||
|
uint32_t duration1: 15;
|
||||||
|
uint32_t level0: 1;
|
||||||
|
uint32_t duration0: 15;
|
||||||
|
|
||||||
|
};
|
||||||
|
uint32_t val;
|
||||||
|
} data[64];
|
||||||
|
} chan[8];
|
||||||
|
} rmt_mem_t;
|
||||||
|
extern rmt_mem_t RMTMEM;
|
||||||
|
|
||||||
#endif /* _SOC_RMT_STRUCT_H_ */
|
#endif /* _SOC_RMT_STRUCT_H_ */
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
#ifndef _SOC_RTC_CNTL_REG_H_
|
#ifndef _SOC_RTC_CNTL_REG_H_
|
||||||
#define _SOC_RTC_CNTL_REG_H_
|
#define _SOC_RTC_CNTL_REG_H_
|
||||||
|
|
||||||
|
/* The value that needs to be written to RTC_CNTL_WDT_WKEY to write-enable the wdt registers */
|
||||||
|
#define RTC_CNTL_WDT_WKEY_VALUE 0x50D83AA1
|
||||||
|
|
||||||
|
|
||||||
#include "soc.h"
|
#include "soc.h"
|
||||||
#define RTC_CNTL_OPTIONS0_REG (DR_REG_RTCCNTL_BASE + 0x0)
|
#define RTC_CNTL_OPTIONS0_REG (DR_REG_RTCCNTL_BASE + 0x0)
|
||||||
|
@ -15,6 +15,16 @@
|
|||||||
#define __TIMG_REG_H__
|
#define __TIMG_REG_H__
|
||||||
#include "soc.h"
|
#include "soc.h"
|
||||||
|
|
||||||
|
/* The value that needs to be written to TIMG_WDT_WKEY to write-enable the wdt registers */
|
||||||
|
#define TIMG_WDT_WKEY_VALUE 0x50D83AA1
|
||||||
|
|
||||||
|
/* Possible values for TIMG_WDT_STGx */
|
||||||
|
#define TIMG_WDT_STG_SEL_OFF 0
|
||||||
|
#define TIMG_WDT_STG_SEL_INT 1
|
||||||
|
#define TIMG_WDT_STG_SEL_RESET_CPU 2
|
||||||
|
#define TIMG_WDT_STG_SEL_RESET_SYSTEM 3
|
||||||
|
|
||||||
|
|
||||||
#define REG_TIMG_BASE(i) (DR_REG_TIMERGROUP0_BASE + i*0x1000)
|
#define REG_TIMG_BASE(i) (DR_REG_TIMERGROUP0_BASE + i*0x1000)
|
||||||
#define TIMG_T0CONFIG_REG(i) (REG_TIMG_BASE(i) + 0x0000)
|
#define TIMG_T0CONFIG_REG(i) (REG_TIMG_BASE(i) + 0x0000)
|
||||||
/* TIMG_T0_EN : R/W ;bitpos:[31] ;default: 1'h0 ; */
|
/* TIMG_T0_EN : R/W ;bitpos:[31] ;default: 1'h0 ; */
|
||||||
|
@ -74,6 +74,7 @@
|
|||||||
* Include the generic headers required for the FreeRTOS port being used.
|
* Include the generic headers required for the FreeRTOS port being used.
|
||||||
*/
|
*/
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include "sys/reent.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If stdint.h cannot be located then:
|
* If stdint.h cannot be located then:
|
||||||
@ -739,6 +740,20 @@ extern "C" {
|
|||||||
#define portTICK_TYPE_IS_ATOMIC 0
|
#define portTICK_TYPE_IS_ATOMIC 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef configSUPPORT_STATIC_ALLOCATION
|
||||||
|
/* Defaults to 0 for backward compatibility. */
|
||||||
|
#define configSUPPORT_STATIC_ALLOCATION 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef configSUPPORT_DYNAMIC_ALLOCATION
|
||||||
|
/* Defaults to 1 for backward compatibility. */
|
||||||
|
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
|
||||||
|
#error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
|
||||||
|
#endif
|
||||||
|
|
||||||
#if( portTICK_TYPE_IS_ATOMIC == 0 )
|
#if( portTICK_TYPE_IS_ATOMIC == 0 )
|
||||||
/* Either variables of tick type cannot be read atomically, or
|
/* Either variables of tick type cannot be read atomically, or
|
||||||
portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
|
portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
|
||||||
@ -791,6 +806,153 @@ V8 if desired. */
|
|||||||
#define configESP32_PER_TASK_DATA 1
|
#define configESP32_PER_TASK_DATA 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In line with software engineering best practice, FreeRTOS implements a strict
|
||||||
|
* data hiding policy, so the real structures used by FreeRTOS to maintain the
|
||||||
|
* state of tasks, queues, semaphores, etc. are not accessible to the application
|
||||||
|
* code. However, if the application writer wants to statically allocate such
|
||||||
|
* an object then the size of the object needs to be know. Dummy structures
|
||||||
|
* that are guaranteed to have the same size and alignment requirements of the
|
||||||
|
* real objects are used for this purpose. The dummy list and list item
|
||||||
|
* structures below are used for inclusion in such a dummy structure.
|
||||||
|
*/
|
||||||
|
struct xSTATIC_LIST_ITEM
|
||||||
|
{
|
||||||
|
TickType_t xDummy1;
|
||||||
|
void *pvDummy2[ 4 ];
|
||||||
|
};
|
||||||
|
typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
|
||||||
|
|
||||||
|
/* See the comments above the struct xSTATIC_LIST_ITEM definition. */
|
||||||
|
struct xSTATIC_MINI_LIST_ITEM
|
||||||
|
{
|
||||||
|
TickType_t xDummy1;
|
||||||
|
void *pvDummy2[ 2 ];
|
||||||
|
};
|
||||||
|
typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
|
||||||
|
|
||||||
|
/* See the comments above the struct xSTATIC_LIST_ITEM definition. */
|
||||||
|
typedef struct xSTATIC_LIST
|
||||||
|
{
|
||||||
|
UBaseType_t uxDummy1;
|
||||||
|
void *pvDummy2;
|
||||||
|
StaticMiniListItem_t xDummy3;
|
||||||
|
} StaticList_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In line with software engineering best practice, especially when supplying a
|
||||||
|
* library that is likely to change in future versions, FreeRTOS implements a
|
||||||
|
* strict data hiding policy. This means the Task structure used internally by
|
||||||
|
* FreeRTOS is not accessible to application code. However, if the application
|
||||||
|
* writer wants to statically allocate the memory required to create a task then
|
||||||
|
* the size of the task object needs to be know. The StaticTask_t structure
|
||||||
|
* below is provided for this purpose. Its sizes and alignment requirements are
|
||||||
|
* guaranteed to match those of the genuine structure, no matter which
|
||||||
|
* architecture is being used, and no matter how the values in FreeRTOSConfig.h
|
||||||
|
* are set. Its contents are somewhat obfuscated in the hope users will
|
||||||
|
* recognise that it would be unwise to make direct use of the structure members.
|
||||||
|
*/
|
||||||
|
typedef struct xSTATIC_TCB
|
||||||
|
{
|
||||||
|
void *pxDummy1;
|
||||||
|
#if ( portUSING_MPU_WRAPPERS == 1 )
|
||||||
|
xMPU_SETTINGS xDummy2;
|
||||||
|
#endif
|
||||||
|
StaticListItem_t xDummy3[ 2 ];
|
||||||
|
UBaseType_t uxDummy5;
|
||||||
|
void *pxDummy6;
|
||||||
|
uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
|
||||||
|
UBaseType_t uxDummyCoreId;
|
||||||
|
#if ( portSTACK_GROWTH > 0 )
|
||||||
|
void *pxDummy8;
|
||||||
|
#endif
|
||||||
|
#if ( portCRITICAL_NESTING_IN_TCB == 1 )
|
||||||
|
UBaseType_t uxDummy9;
|
||||||
|
uint32_t OldInterruptState;
|
||||||
|
#endif
|
||||||
|
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||||
|
UBaseType_t uxDummy10[ 2 ];
|
||||||
|
#endif
|
||||||
|
#if ( configUSE_MUTEXES == 1 )
|
||||||
|
UBaseType_t uxDummy12[ 2 ];
|
||||||
|
#endif
|
||||||
|
#if ( configUSE_APPLICATION_TASK_TAG == 1 )
|
||||||
|
void *pxDummy14;
|
||||||
|
#endif
|
||||||
|
#if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
|
||||||
|
void *pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
|
||||||
|
#if ( configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS )
|
||||||
|
void *pvDummyLocalStorageCallBack[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
||||||
|
uint32_t ulDummy16;
|
||||||
|
#endif
|
||||||
|
#if ( configUSE_NEWLIB_REENTRANT == 1 )
|
||||||
|
struct _reent xDummy17;
|
||||||
|
#endif
|
||||||
|
#if ( configUSE_TASK_NOTIFICATIONS == 1 )
|
||||||
|
uint32_t ulDummy18;
|
||||||
|
uint32_t ucDummy19;
|
||||||
|
#endif
|
||||||
|
#if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
||||||
|
uint8_t uxDummy20;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} StaticTask_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In line with software engineering best practice, especially when supplying a
|
||||||
|
* library that is likely to change in future versions, FreeRTOS implements a
|
||||||
|
* strict data hiding policy. This means the Queue structure used internally by
|
||||||
|
* FreeRTOS is not accessible to application code. However, if the application
|
||||||
|
* writer wants to statically allocate the memory required to create a queue
|
||||||
|
* then the size of the queue object needs to be know. The StaticQueue_t
|
||||||
|
* structure below is provided for this purpose. Its sizes and alignment
|
||||||
|
* requirements are guaranteed to match those of the genuine structure, no
|
||||||
|
* matter which architecture is being used, and no matter how the values in
|
||||||
|
* FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope
|
||||||
|
* users will recognise that it would be unwise to make direct use of the
|
||||||
|
* structure members.
|
||||||
|
*/
|
||||||
|
typedef struct xSTATIC_QUEUE
|
||||||
|
{
|
||||||
|
void *pvDummy1[ 3 ];
|
||||||
|
|
||||||
|
union
|
||||||
|
{
|
||||||
|
void *pvDummy2;
|
||||||
|
UBaseType_t uxDummy2;
|
||||||
|
} u;
|
||||||
|
|
||||||
|
StaticList_t xDummy3[ 2 ];
|
||||||
|
UBaseType_t uxDummy4[ 3 ];
|
||||||
|
BaseType_t ucDummy5[ 2 ];
|
||||||
|
|
||||||
|
#if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
||||||
|
uint8_t ucDummy6;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ( configUSE_QUEUE_SETS == 1 )
|
||||||
|
void *pvDummy7;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||||
|
UBaseType_t uxDummy8;
|
||||||
|
uint8_t ucDummy9;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct {
|
||||||
|
volatile uint32_t mux;
|
||||||
|
#ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
|
||||||
|
const char *lastLockedFn;
|
||||||
|
int lastLockedLine;
|
||||||
|
#endif
|
||||||
|
} mux;
|
||||||
|
|
||||||
|
} StaticQueue_t;
|
||||||
|
typedef StaticQueue_t StaticSemaphore_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -152,9 +152,9 @@
|
|||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
|
||||||
#define configUSE_PREEMPTION 1
|
#define configUSE_PREEMPTION 1
|
||||||
#define configUSE_IDLE_HOOK 0
|
#define configUSE_IDLE_HOOK ( CONFIG_TASK_WDT_CHECK_IDLE_TASK )
|
||||||
|
|
||||||
#define configUSE_TICK_HOOK 0
|
#define configUSE_TICK_HOOK ( CONFIG_INT_WDT )
|
||||||
|
|
||||||
#define configTICK_RATE_HZ ( CONFIG_FREERTOS_HZ )
|
#define configTICK_RATE_HZ ( CONFIG_FREERTOS_HZ )
|
||||||
|
|
||||||
@ -231,6 +231,7 @@
|
|||||||
#define INCLUDE_vTaskDelayUntil 1
|
#define INCLUDE_vTaskDelayUntil 1
|
||||||
#define INCLUDE_vTaskDelay 1
|
#define INCLUDE_vTaskDelay 1
|
||||||
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||||
|
#define INCLUDE_pcTaskGetTaskName 1
|
||||||
|
|
||||||
#if CONFIG_ENABLE_MEMORY_DEBUG
|
#if CONFIG_ENABLE_MEMORY_DEBUG
|
||||||
#define configENABLE_MEMORY_DEBUG 1
|
#define configENABLE_MEMORY_DEBUG 1
|
||||||
@ -251,6 +252,8 @@
|
|||||||
|
|
||||||
#define configUSE_NEWLIB_REENTRANT 1
|
#define configUSE_NEWLIB_REENTRANT 1
|
||||||
|
|
||||||
|
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||||
|
|
||||||
/* Test FreeRTOS timers (with timer task) and more. */
|
/* Test FreeRTOS timers (with timer task) and more. */
|
||||||
/* Some files don't compile if this flag is disabled */
|
/* Some files don't compile if this flag is disabled */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
#ifndef PANIC_H
|
|
||||||
#define PANIC_H
|
|
||||||
|
|
||||||
void setBreakpointIfJtag(void *fn);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -192,8 +192,14 @@ void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Multi-core: get current core ID */
|
/* Multi-core: get current core ID */
|
||||||
int xPortGetCoreID( void );
|
static inline uint32_t xPortGetCoreID() {
|
||||||
|
int id;
|
||||||
|
asm volatile(
|
||||||
|
"rsr.prid %0\n"
|
||||||
|
" extui %0,%0,13,1"
|
||||||
|
:"=r"(id));
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,26 @@ static inline unsigned portENTER_CRITICAL_NESTED() { unsigned state = XTOS_SET_I
|
|||||||
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(state) portEXIT_CRITICAL_NESTED(state)
|
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(state) portEXIT_CRITICAL_NESTED(state)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Wrapper for the Xtensa compare-and-set instruction. This subroutine will atomically compare
|
||||||
|
* *mux to compare, and if it's the same, will set *mux to set. It will return the old value
|
||||||
|
* of *addr in *set.
|
||||||
|
*
|
||||||
|
* Warning: From the ISA docs: in some (unspecified) cases, the s32c1i instruction may return the
|
||||||
|
* *bitwise inverse* of the old mem if the mem wasn't written. This doesn't seem to happen on the
|
||||||
|
* ESP32, though. (Would show up directly if it did because the magic wouldn't match.)
|
||||||
|
*/
|
||||||
|
static inline void uxPortCompareSet(volatile uint32_t *addr, uint32_t compare, uint32_t *set) {
|
||||||
|
__asm__ __volatile__(
|
||||||
|
"WSR %2,SCOMPARE1 \n"
|
||||||
|
"ISYNC \n"
|
||||||
|
"S32C1I %0, %1, 0 \n"
|
||||||
|
:"=r"(*set)
|
||||||
|
:"r"(addr), "r"(compare), "0"(*set)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Architecture specifics. */
|
/* Architecture specifics. */
|
||||||
|
@ -170,7 +170,95 @@ typedef void * QueueSetMemberHandle_t;
|
|||||||
* \defgroup xQueueCreate xQueueCreate
|
* \defgroup xQueueCreate xQueueCreate
|
||||||
* \ingroup QueueManagement
|
* \ingroup QueueManagement
|
||||||
*/
|
*/
|
||||||
#define xQueueCreate( uxQueueLength, uxItemSize ) xQueueGenericCreate( uxQueueLength, uxItemSize, queueQUEUE_TYPE_BASE )
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
|
#define xQueueCreate( uxQueueLength, uxItemSize ) xQueueGenericCreate( ( uxQueueLength ), ( uxItemSize ), ( queueQUEUE_TYPE_BASE ) )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* queue. h
|
||||||
|
* <pre>
|
||||||
|
QueueHandle_t xQueueCreateStatic(
|
||||||
|
UBaseType_t uxQueueLength,
|
||||||
|
UBaseType_t uxItemSize,
|
||||||
|
uint8_t *pucQueueStorageBuffer,
|
||||||
|
StaticQueue_t *pxQueueBuffer
|
||||||
|
);
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* Creates a new queue instance, and returns a handle by which the new queue
|
||||||
|
* can be referenced.
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, queues use two blocks of
|
||||||
|
* memory. The first block is used to hold the queue's data structures. The
|
||||||
|
* second block is used to hold items placed into the queue. If a queue is
|
||||||
|
* created using xQueueCreate() then both blocks of memory are automatically
|
||||||
|
* dynamically allocated inside the xQueueCreate() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a queue is created using
|
||||||
|
* xQueueCreateStatic() then the application writer must provide the memory that
|
||||||
|
* will get used by the queue. xQueueCreateStatic() therefore allows a queue to
|
||||||
|
* be created without using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* http://www.FreeRTOS.org/Embedded-RTOS-Queues.html
|
||||||
|
*
|
||||||
|
* @param uxQueueLength The maximum number of items that the queue can contain.
|
||||||
|
*
|
||||||
|
* @param uxItemSize The number of bytes each item in the queue will require.
|
||||||
|
* Items are queued by copy, not by reference, so this is the number of bytes
|
||||||
|
* that will be copied for each posted item. Each item on the queue must be
|
||||||
|
* the same size.
|
||||||
|
*
|
||||||
|
* @param pucQueueStorageBuffer If uxItemSize is not zero then
|
||||||
|
* pucQueueStorageBuffer must point to a uint8_t array that is at least large
|
||||||
|
* enough to hold the maximum number of items that can be in the queue at any
|
||||||
|
* one time - which is ( uxQueueLength * uxItemsSize ) bytes. If uxItemSize is
|
||||||
|
* zero then pucQueueStorageBuffer can be NULL.
|
||||||
|
*
|
||||||
|
* @param pxQueueBuffer Must point to a variable of type StaticQueue_t, which
|
||||||
|
* will be used to hold the queue's data structure.
|
||||||
|
*
|
||||||
|
* @return If the queue is created then a handle to the created queue is
|
||||||
|
* returned. If pxQueueBuffer is NULL then NULL is returned.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
<pre>
|
||||||
|
struct AMessage
|
||||||
|
{
|
||||||
|
char ucMessageID;
|
||||||
|
char ucData[ 20 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
#define QUEUE_LENGTH 10
|
||||||
|
#define ITEM_SIZE sizeof( uint32_t )
|
||||||
|
|
||||||
|
// xQueueBuffer will hold the queue structure.
|
||||||
|
StaticQueue_t xQueueBuffer;
|
||||||
|
|
||||||
|
// ucQueueStorage will hold the items posted to the queue. Must be at least
|
||||||
|
// [(queue length) * ( queue item size)] bytes long.
|
||||||
|
uint8_t ucQueueStorage[ QUEUE_LENGTH * ITEM_SIZE ];
|
||||||
|
|
||||||
|
void vATask( void *pvParameters )
|
||||||
|
{
|
||||||
|
QueueHandle_t xQueue1;
|
||||||
|
|
||||||
|
// Create a queue capable of containing 10 uint32_t values.
|
||||||
|
xQueue1 = xQueueCreate( QUEUE_LENGTH, // The number of items the queue can hold.
|
||||||
|
ITEM_SIZE // The size of each item in the queue
|
||||||
|
&( ucQueueStorage[ 0 ] ), // The buffer that will hold the items in the queue.
|
||||||
|
&xQueueBuffer ); // The buffer that will hold the queue structure.
|
||||||
|
|
||||||
|
// The queue is guaranteed to be created successfully as no dynamic memory
|
||||||
|
// allocation is used. Therefore xQueue1 is now a handle to a valid queue.
|
||||||
|
|
||||||
|
// ... Rest of task code.
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
* \defgroup xQueueCreateStatic xQueueCreateStatic
|
||||||
|
* \ingroup QueueManagement
|
||||||
|
*/
|
||||||
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||||
|
#define xQueueCreateStatic( uxQueueLength, uxItemSize, pucQueueStorage, pxQueueBuffer ) xQueueGenericCreateStatic( ( uxQueueLength ), ( uxItemSize ), ( pucQueueStorage ), ( pxQueueBuffer ), ( queueQUEUE_TYPE_BASE ) )
|
||||||
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* queue. h
|
* queue. h
|
||||||
@ -1479,7 +1567,9 @@ BaseType_t xQueueCRReceive( QueueHandle_t xQueue, void *pvBuffer, TickType_t xTi
|
|||||||
* these functions directly.
|
* these functions directly.
|
||||||
*/
|
*/
|
||||||
QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;
|
QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;
|
||||||
|
QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
|
||||||
QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION;
|
QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) PRIVILEGED_FUNCTION;
|
||||||
|
QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) PRIVILEGED_FUNCTION;
|
||||||
void* xQueueGetMutexHolder( QueueHandle_t xSemaphore ) PRIVILEGED_FUNCTION;
|
void* xQueueGetMutexHolder( QueueHandle_t xSemaphore ) PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1538,10 +1628,22 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) PRIVILEGED_FUNCTION
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic version of the queue creation function, which is in turn called by
|
* Generic version of the function used to creaet a queue using dynamic memory
|
||||||
* any queue, semaphore or mutex creation function or macro.
|
* allocation. This is called by other functions and macros that create other
|
||||||
|
* RTOS objects that use the queue structure as their base.
|
||||||
*/
|
*/
|
||||||
QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
|
QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generic version of the function used to creaet a queue using dynamic memory
|
||||||
|
* allocation. This is called by other functions and macros that create other
|
||||||
|
* RTOS objects that use the queue structure as their base.
|
||||||
|
*/
|
||||||
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||||
|
QueueHandle_t xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType ) PRIVILEGED_FUNCTION;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Queue sets provide a mechanism to allow a task to block (pend) on a read
|
* Queue sets provide a mechanism to allow a task to block (pend) on a read
|
||||||
|
@ -128,7 +128,8 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* \defgroup vSemaphoreCreateBinary vSemaphoreCreateBinary
|
* \defgroup vSemaphoreCreateBinary vSemaphoreCreateBinary
|
||||||
* \ingroup Semaphores
|
* \ingroup Semaphores
|
||||||
*/
|
*/
|
||||||
#define vSemaphoreCreateBinary( xSemaphore ) \
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
|
#define vSemaphoreCreateBinary( xSemaphore ) \
|
||||||
{ \
|
{ \
|
||||||
( xSemaphore ) = xQueueGenericCreate( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE ); \
|
( xSemaphore ) = xQueueGenericCreate( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE ); \
|
||||||
if( ( xSemaphore ) != NULL ) \
|
if( ( xSemaphore ) != NULL ) \
|
||||||
@ -136,11 +137,28 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
( void ) xSemaphoreGive( ( xSemaphore ) ); \
|
( void ) xSemaphoreGive( ( xSemaphore ) ); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* semphr. h
|
* semphr. h
|
||||||
* <pre>SemaphoreHandle_t xSemaphoreCreateBinary( void )</pre>
|
* <pre>SemaphoreHandle_t xSemaphoreCreateBinary( void )</pre>
|
||||||
*
|
*
|
||||||
|
* Creates a new binary semaphore instance, and returns a handle by which the
|
||||||
|
* new semaphore can be referenced.
|
||||||
|
*
|
||||||
|
* In many usage scenarios it is faster and more memory efficient to use a
|
||||||
|
* direct to task notification in place of a binary semaphore!
|
||||||
|
* http://www.freertos.org/RTOS-task-notifications.html
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, binary semaphores use a block
|
||||||
|
* of memory, in which the semaphore structure is stored. If a binary semaphore
|
||||||
|
* is created using xSemaphoreCreateBinary() then the required memory is
|
||||||
|
* automatically dynamically allocated inside the xSemaphoreCreateBinary()
|
||||||
|
* function. (see http://www.freertos.org/a00111.html). If a binary semaphore
|
||||||
|
* is created using xSemaphoreCreateBinaryStatic() then the application writer
|
||||||
|
* must provide the memory. xSemaphoreCreateBinaryStatic() therefore allows a
|
||||||
|
* binary semaphore to be created without using any dynamic memory allocation.
|
||||||
|
*
|
||||||
* The old vSemaphoreCreateBinary() macro is now deprecated in favour of this
|
* The old vSemaphoreCreateBinary() macro is now deprecated in favour of this
|
||||||
* xSemaphoreCreateBinary() function. Note that binary semaphores created using
|
* xSemaphoreCreateBinary() function. Note that binary semaphores created using
|
||||||
* the vSemaphoreCreateBinary() macro are created in a state such that the
|
* the vSemaphoreCreateBinary() macro are created in a state such that the
|
||||||
@ -182,7 +200,68 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* \defgroup vSemaphoreCreateBinary vSemaphoreCreateBinary
|
* \defgroup vSemaphoreCreateBinary vSemaphoreCreateBinary
|
||||||
* \ingroup Semaphores
|
* \ingroup Semaphores
|
||||||
*/
|
*/
|
||||||
#define xSemaphoreCreateBinary() xQueueGenericCreate( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE )
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
|
#define xSemaphoreCreateBinary() xQueueGenericCreate( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* semphr. h
|
||||||
|
* <pre>SemaphoreHandle_t xSemaphoreCreateBinaryStatic( StaticSemaphore_t *pxSemaphoreBuffer )</pre>
|
||||||
|
*
|
||||||
|
* Creates a new binary semaphore instance, and returns a handle by which the
|
||||||
|
* new semaphore can be referenced.
|
||||||
|
*
|
||||||
|
* NOTE: In many usage scenarios it is faster and more memory efficient to use a
|
||||||
|
* direct to task notification in place of a binary semaphore!
|
||||||
|
* http://www.freertos.org/RTOS-task-notifications.html
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, binary semaphores use a block
|
||||||
|
* of memory, in which the semaphore structure is stored. If a binary semaphore
|
||||||
|
* is created using xSemaphoreCreateBinary() then the required memory is
|
||||||
|
* automatically dynamically allocated inside the xSemaphoreCreateBinary()
|
||||||
|
* function. (see http://www.freertos.org/a00111.html). If a binary semaphore
|
||||||
|
* is created using xSemaphoreCreateBinaryStatic() then the application writer
|
||||||
|
* must provide the memory. xSemaphoreCreateBinaryStatic() therefore allows a
|
||||||
|
* binary semaphore to be created without using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* This type of semaphore can be used for pure synchronisation between tasks or
|
||||||
|
* between an interrupt and a task. The semaphore need not be given back once
|
||||||
|
* obtained, so one task/interrupt can continuously 'give' the semaphore while
|
||||||
|
* another continuously 'takes' the semaphore. For this reason this type of
|
||||||
|
* semaphore does not use a priority inheritance mechanism. For an alternative
|
||||||
|
* that does use priority inheritance see xSemaphoreCreateMutex().
|
||||||
|
*
|
||||||
|
* @param pxSemaphoreBuffer Must point to a variable of type StaticSemaphore_t,
|
||||||
|
* which will then be used to hold the semaphore's data structure, removing the
|
||||||
|
* need for the memory to be allocated dynamically.
|
||||||
|
*
|
||||||
|
* @return If the semaphore is created then a handle to the created semaphore is
|
||||||
|
* returned. If pxSemaphoreBuffer is NULL then NULL is returned.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
<pre>
|
||||||
|
SemaphoreHandle_t xSemaphore = NULL;
|
||||||
|
StaticSemaphore_t xSemaphoreBuffer;
|
||||||
|
|
||||||
|
void vATask( void * pvParameters )
|
||||||
|
{
|
||||||
|
// Semaphore cannot be used before a call to xSemaphoreCreateBinary().
|
||||||
|
// The semaphore's data structures will be placed in the xSemaphoreBuffer
|
||||||
|
// variable, the address of which is passed into the function. The
|
||||||
|
// function's parameter is not NULL, so the function will not attempt any
|
||||||
|
// dynamic memory allocation, and therefore the function will not return
|
||||||
|
// return NULL.
|
||||||
|
xSemaphore = xSemaphoreCreateBinary( &xSemaphoreBuffer );
|
||||||
|
|
||||||
|
// Rest of task code goes here.
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
* \defgroup xSemaphoreCreateBinaryStatic xSemaphoreCreateBinaryStatic
|
||||||
|
* \ingroup Semaphores
|
||||||
|
*/
|
||||||
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||||
|
#define xSemaphoreCreateBinaryStatic( pxStaticSemaphore ) xQueueGenericCreateStatic( ( UBaseType_t ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticSemaphore, queueQUEUE_TYPE_BINARY_SEMAPHORE )
|
||||||
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* semphr. h
|
* semphr. h
|
||||||
@ -652,9 +731,18 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* <i>Macro</i> that implements a mutex semaphore by using the existing queue
|
* <i>Macro</i> that implements a mutex semaphore by using the existing queue
|
||||||
* mechanism.
|
* mechanism.
|
||||||
*
|
*
|
||||||
* Mutexes created using this macro can be accessed using the xSemaphoreTake()
|
* Internally, within the FreeRTOS implementation, mutex semaphores use a block
|
||||||
|
* of memory, in which the mutex structure is stored. If a mutex is created
|
||||||
|
* using xSemaphoreCreateMutex() then the required memory is automatically
|
||||||
|
* dynamically allocated inside the xSemaphoreCreateMutex() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a mutex is created using
|
||||||
|
* xSemaphoreCreateMutexStatic() then the application writer must provided the
|
||||||
|
* memory. xSemaphoreCreateMutexStatic() therefore allows a mutex to be created
|
||||||
|
* without using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* Mutexes created using this function can be accessed using the xSemaphoreTake()
|
||||||
* and xSemaphoreGive() macros. The xSemaphoreTakeRecursive() and
|
* and xSemaphoreGive() macros. The xSemaphoreTakeRecursive() and
|
||||||
* xSemaphoreGiveRecursive() macros should not be used.
|
* xSemaphoreGiveRecursive() macros must not be used.
|
||||||
*
|
*
|
||||||
* This type of semaphore uses a priority inheritance mechanism so a task
|
* This type of semaphore uses a priority inheritance mechanism so a task
|
||||||
* 'taking' a semaphore MUST ALWAYS 'give' the semaphore back once the
|
* 'taking' a semaphore MUST ALWAYS 'give' the semaphore back once the
|
||||||
@ -667,8 +755,9 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* semaphore and another always 'takes' the semaphore) and from within interrupt
|
* semaphore and another always 'takes' the semaphore) and from within interrupt
|
||||||
* service routines.
|
* service routines.
|
||||||
*
|
*
|
||||||
* @return xSemaphore Handle to the created mutex semaphore. Should be of type
|
* @return If the mutex was successfully created then a handle to the created
|
||||||
* SemaphoreHandle_t.
|
* semaphore is returned. If there was not enough heap to allocate the mutex
|
||||||
|
* data structures then NULL is returned.
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
<pre>
|
<pre>
|
||||||
@ -690,19 +779,93 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* \defgroup vSemaphoreCreateMutex vSemaphoreCreateMutex
|
* \defgroup vSemaphoreCreateMutex vSemaphoreCreateMutex
|
||||||
* \ingroup Semaphores
|
* \ingroup Semaphores
|
||||||
*/
|
*/
|
||||||
#define xSemaphoreCreateMutex() xQueueCreateMutex( queueQUEUE_TYPE_MUTEX )
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
|
#define xSemaphoreCreateMutex() xQueueCreateMutex( queueQUEUE_TYPE_MUTEX )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* semphr. h
|
||||||
|
* <pre>SemaphoreHandle_t xSemaphoreCreateMutexStatic( StaticSemaphore_t *pxMutexBuffer )</pre>
|
||||||
|
*
|
||||||
|
* Creates a new mutex type semaphore instance, and returns a handle by which
|
||||||
|
* the new mutex can be referenced.
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, mutex semaphores use a block
|
||||||
|
* of memory, in which the mutex structure is stored. If a mutex is created
|
||||||
|
* using xSemaphoreCreateMutex() then the required memory is automatically
|
||||||
|
* dynamically allocated inside the xSemaphoreCreateMutex() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a mutex is created using
|
||||||
|
* xSemaphoreCreateMutexStatic() then the application writer must provided the
|
||||||
|
* memory. xSemaphoreCreateMutexStatic() therefore allows a mutex to be created
|
||||||
|
* without using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* Mutexes created using this function can be accessed using the xSemaphoreTake()
|
||||||
|
* and xSemaphoreGive() macros. The xSemaphoreTakeRecursive() and
|
||||||
|
* xSemaphoreGiveRecursive() macros must not be used.
|
||||||
|
*
|
||||||
|
* This type of semaphore uses a priority inheritance mechanism so a task
|
||||||
|
* 'taking' a semaphore MUST ALWAYS 'give' the semaphore back once the
|
||||||
|
* semaphore it is no longer required.
|
||||||
|
*
|
||||||
|
* Mutex type semaphores cannot be used from within interrupt service routines.
|
||||||
|
*
|
||||||
|
* See xSemaphoreCreateBinary() for an alternative implementation that can be
|
||||||
|
* used for pure synchronisation (where one task or interrupt always 'gives' the
|
||||||
|
* semaphore and another always 'takes' the semaphore) and from within interrupt
|
||||||
|
* service routines.
|
||||||
|
*
|
||||||
|
* @param pxMutexBuffer Must point to a variable of type StaticSemaphore_t,
|
||||||
|
* which will be used to hold the mutex's data structure, removing the need for
|
||||||
|
* the memory to be allocated dynamically.
|
||||||
|
*
|
||||||
|
* @return If the mutex was successfully created then a handle to the created
|
||||||
|
* mutex is returned. If pxMutexBuffer was NULL then NULL is returned.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
<pre>
|
||||||
|
SemaphoreHandle_t xSemaphore;
|
||||||
|
StaticSemaphore_t xMutexBuffer;
|
||||||
|
|
||||||
|
void vATask( void * pvParameters )
|
||||||
|
{
|
||||||
|
// A mutex cannot be used before it has been created. xMutexBuffer is
|
||||||
|
// into xSemaphoreCreateMutexStatic() so no dynamic memory allocation is
|
||||||
|
// attempted.
|
||||||
|
xSemaphore = xSemaphoreCreateMutexStatic( &xMutexBuffer );
|
||||||
|
|
||||||
|
// As no dynamic memory allocation was performed, xSemaphore cannot be NULL,
|
||||||
|
// so there is no need to check it.
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
* \defgroup xSemaphoreCreateMutexStatic xSemaphoreCreateMutexStatic
|
||||||
|
* \ingroup Semaphores
|
||||||
|
*/
|
||||||
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||||
|
#define xSemaphoreCreateMutexStatic( pxMutexBuffer ) xQueueCreateMutexStatic( queueQUEUE_TYPE_MUTEX, ( pxMutexBuffer ) )
|
||||||
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* semphr. h
|
* semphr. h
|
||||||
* <pre>SemaphoreHandle_t xSemaphoreCreateRecursiveMutex( void )</pre>
|
* <pre>SemaphoreHandle_t xSemaphoreCreateRecursiveMutex( void )</pre>
|
||||||
*
|
*
|
||||||
* <i>Macro</i> that implements a recursive mutex by using the existing queue
|
* Creates a new recursive mutex type semaphore instance, and returns a handle
|
||||||
* mechanism.
|
* by which the new recursive mutex can be referenced.
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, recursive mutexs use a block
|
||||||
|
* of memory, in which the mutex structure is stored. If a recursive mutex is
|
||||||
|
* created using xSemaphoreCreateRecursiveMutex() then the required memory is
|
||||||
|
* automatically dynamically allocated inside the
|
||||||
|
* xSemaphoreCreateRecursiveMutex() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a recursive mutex is created using
|
||||||
|
* xSemaphoreCreateRecursiveMutexStatic() then the application writer must
|
||||||
|
* provide the memory that will get used by the mutex.
|
||||||
|
* xSemaphoreCreateRecursiveMutexStatic() therefore allows a recursive mutex to
|
||||||
|
* be created without using any dynamic memory allocation.
|
||||||
*
|
*
|
||||||
* Mutexes created using this macro can be accessed using the
|
* Mutexes created using this macro can be accessed using the
|
||||||
* xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() macros. The
|
* xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() macros. The
|
||||||
* xSemaphoreTake() and xSemaphoreGive() macros should not be used.
|
* xSemaphoreTake() and xSemaphoreGive() macros must not be used.
|
||||||
*
|
*
|
||||||
* A mutex used recursively can be 'taken' repeatedly by the owner. The mutex
|
* A mutex used recursively can be 'taken' repeatedly by the owner. The mutex
|
||||||
* doesn't become available again until the owner has called
|
* doesn't become available again until the owner has called
|
||||||
@ -745,14 +908,104 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* \defgroup vSemaphoreCreateMutex vSemaphoreCreateMutex
|
* \defgroup vSemaphoreCreateMutex vSemaphoreCreateMutex
|
||||||
* \ingroup Semaphores
|
* \ingroup Semaphores
|
||||||
*/
|
*/
|
||||||
#define xSemaphoreCreateRecursiveMutex() xQueueCreateMutex( queueQUEUE_TYPE_RECURSIVE_MUTEX )
|
#if( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_RECURSIVE_MUTEXES == 1 ) )
|
||||||
|
#define xSemaphoreCreateRecursiveMutex() xQueueCreateMutex( queueQUEUE_TYPE_RECURSIVE_MUTEX )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* semphr. h
|
||||||
|
* <pre>SemaphoreHandle_t xSemaphoreCreateRecursiveMutexStatic( StaticSemaphore_t *pxMutexBuffer )</pre>
|
||||||
|
*
|
||||||
|
* Creates a new recursive mutex type semaphore instance, and returns a handle
|
||||||
|
* by which the new recursive mutex can be referenced.
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, recursive mutexs use a block
|
||||||
|
* of memory, in which the mutex structure is stored. If a recursive mutex is
|
||||||
|
* created using xSemaphoreCreateRecursiveMutex() then the required memory is
|
||||||
|
* automatically dynamically allocated inside the
|
||||||
|
* xSemaphoreCreateRecursiveMutex() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a recursive mutex is created using
|
||||||
|
* xSemaphoreCreateRecursiveMutexStatic() then the application writer must
|
||||||
|
* provide the memory that will get used by the mutex.
|
||||||
|
* xSemaphoreCreateRecursiveMutexStatic() therefore allows a recursive mutex to
|
||||||
|
* be created without using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* Mutexes created using this macro can be accessed using the
|
||||||
|
* xSemaphoreTakeRecursive() and xSemaphoreGiveRecursive() macros. The
|
||||||
|
* xSemaphoreTake() and xSemaphoreGive() macros must not be used.
|
||||||
|
*
|
||||||
|
* A mutex used recursively can be 'taken' repeatedly by the owner. The mutex
|
||||||
|
* doesn't become available again until the owner has called
|
||||||
|
* xSemaphoreGiveRecursive() for each successful 'take' request. For example,
|
||||||
|
* if a task successfully 'takes' the same mutex 5 times then the mutex will
|
||||||
|
* not be available to any other task until it has also 'given' the mutex back
|
||||||
|
* exactly five times.
|
||||||
|
*
|
||||||
|
* This type of semaphore uses a priority inheritance mechanism so a task
|
||||||
|
* 'taking' a semaphore MUST ALWAYS 'give' the semaphore back once the
|
||||||
|
* semaphore it is no longer required.
|
||||||
|
*
|
||||||
|
* Mutex type semaphores cannot be used from within interrupt service routines.
|
||||||
|
*
|
||||||
|
* See xSemaphoreCreateBinary() for an alternative implementation that can be
|
||||||
|
* used for pure synchronisation (where one task or interrupt always 'gives' the
|
||||||
|
* semaphore and another always 'takes' the semaphore) and from within interrupt
|
||||||
|
* service routines.
|
||||||
|
*
|
||||||
|
* @param pxMutexBuffer Must point to a variable of type StaticSemaphore_t,
|
||||||
|
* which will then be used to hold the recursive mutex's data structure,
|
||||||
|
* removing the need for the memory to be allocated dynamically.
|
||||||
|
*
|
||||||
|
* @return If the recursive mutex was successfully created then a handle to the
|
||||||
|
* created recursive mutex is returned. If pxMutexBuffer was NULL then NULL is
|
||||||
|
* returned.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
<pre>
|
||||||
|
SemaphoreHandle_t xSemaphore;
|
||||||
|
StaticSemaphore_t xMutexBuffer;
|
||||||
|
|
||||||
|
void vATask( void * pvParameters )
|
||||||
|
{
|
||||||
|
// A recursive semaphore cannot be used before it is created. Here a
|
||||||
|
// recursive mutex is created using xSemaphoreCreateRecursiveMutexStatic().
|
||||||
|
// The address of xMutexBuffer is passed into the function, and will hold
|
||||||
|
// the mutexes data structures - so no dynamic memory allocation will be
|
||||||
|
// attempted.
|
||||||
|
xSemaphore = xSemaphoreCreateRecursiveMutexStatic( &xMutexBuffer );
|
||||||
|
|
||||||
|
// As no dynamic memory allocation was performed, xSemaphore cannot be NULL,
|
||||||
|
// so there is no need to check it.
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
* \defgroup xSemaphoreCreateRecursiveMutexStatic xSemaphoreCreateRecursiveMutexStatic
|
||||||
|
* \ingroup Semaphores
|
||||||
|
*/
|
||||||
|
#if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_RECURSIVE_MUTEXES == 1 ) )
|
||||||
|
#define xSemaphoreCreateRecursiveMutexStatic( pxStaticSemaphore ) xQueueCreateMutexStatic( queueQUEUE_TYPE_RECURSIVE_MUTEX, pxStaticSemaphore )
|
||||||
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* semphr. h
|
* semphr. h
|
||||||
* <pre>SemaphoreHandle_t xSemaphoreCreateCounting( UBaseType_t uxMaxCount, UBaseType_t uxInitialCount )</pre>
|
* <pre>SemaphoreHandle_t xSemaphoreCreateCounting( UBaseType_t uxMaxCount, UBaseType_t uxInitialCount )</pre>
|
||||||
*
|
*
|
||||||
* <i>Macro</i> that creates a counting semaphore by using the existing
|
* Creates a new counting semaphore instance, and returns a handle by which the
|
||||||
* queue mechanism.
|
* new counting semaphore can be referenced.
|
||||||
|
*
|
||||||
|
* In many usage scenarios it is faster and more memory efficient to use a
|
||||||
|
* direct to task notification in place of a counting semaphore!
|
||||||
|
* http://www.freertos.org/RTOS-task-notifications.html
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, counting semaphores use a
|
||||||
|
* block of memory, in which the counting semaphore structure is stored. If a
|
||||||
|
* counting semaphore is created using xSemaphoreCreateCounting() then the
|
||||||
|
* required memory is automatically dynamically allocated inside the
|
||||||
|
* xSemaphoreCreateCounting() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a counting semaphore is created
|
||||||
|
* using xSemaphoreCreateCountingStatic() then the application writer can
|
||||||
|
* instead optionally provide the memory that will get used by the counting
|
||||||
|
* semaphore. xSemaphoreCreateCountingStatic() therefore allows a counting
|
||||||
|
* semaphore to be created without using any dynamic memory allocation.
|
||||||
*
|
*
|
||||||
* Counting semaphores are typically used for two things:
|
* Counting semaphores are typically used for two things:
|
||||||
*
|
*
|
||||||
@ -808,7 +1061,94 @@ typedef QueueHandle_t SemaphoreHandle_t;
|
|||||||
* \defgroup xSemaphoreCreateCounting xSemaphoreCreateCounting
|
* \defgroup xSemaphoreCreateCounting xSemaphoreCreateCounting
|
||||||
* \ingroup Semaphores
|
* \ingroup Semaphores
|
||||||
*/
|
*/
|
||||||
#define xSemaphoreCreateCounting( uxMaxCount, uxInitialCount ) xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) )
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
|
#define xSemaphoreCreateCounting( uxMaxCount, uxInitialCount ) xQueueCreateCountingSemaphore( ( uxMaxCount ), ( uxInitialCount ) )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* semphr. h
|
||||||
|
* <pre>SemaphoreHandle_t xSemaphoreCreateCountingStatic( UBaseType_t uxMaxCount, UBaseType_t uxInitialCount, StaticSemaphore_t *pxSemaphoreBuffer )</pre>
|
||||||
|
*
|
||||||
|
* Creates a new counting semaphore instance, and returns a handle by which the
|
||||||
|
* new counting semaphore can be referenced.
|
||||||
|
*
|
||||||
|
* In many usage scenarios it is faster and more memory efficient to use a
|
||||||
|
* direct to task notification in place of a counting semaphore!
|
||||||
|
* http://www.freertos.org/RTOS-task-notifications.html
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, counting semaphores use a
|
||||||
|
* block of memory, in which the counting semaphore structure is stored. If a
|
||||||
|
* counting semaphore is created using xSemaphoreCreateCounting() then the
|
||||||
|
* required memory is automatically dynamically allocated inside the
|
||||||
|
* xSemaphoreCreateCounting() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a counting semaphore is created
|
||||||
|
* using xSemaphoreCreateCountingStatic() then the application writer must
|
||||||
|
* provide the memory. xSemaphoreCreateCountingStatic() therefore allows a
|
||||||
|
* counting semaphore to be created without using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* Counting semaphores are typically used for two things:
|
||||||
|
*
|
||||||
|
* 1) Counting events.
|
||||||
|
*
|
||||||
|
* In this usage scenario an event handler will 'give' a semaphore each time
|
||||||
|
* an event occurs (incrementing the semaphore count value), and a handler
|
||||||
|
* task will 'take' a semaphore each time it processes an event
|
||||||
|
* (decrementing the semaphore count value). The count value is therefore
|
||||||
|
* the difference between the number of events that have occurred and the
|
||||||
|
* number that have been processed. In this case it is desirable for the
|
||||||
|
* initial count value to be zero.
|
||||||
|
*
|
||||||
|
* 2) Resource management.
|
||||||
|
*
|
||||||
|
* In this usage scenario the count value indicates the number of resources
|
||||||
|
* available. To obtain control of a resource a task must first obtain a
|
||||||
|
* semaphore - decrementing the semaphore count value. When the count value
|
||||||
|
* reaches zero there are no free resources. When a task finishes with the
|
||||||
|
* resource it 'gives' the semaphore back - incrementing the semaphore count
|
||||||
|
* value. In this case it is desirable for the initial count value to be
|
||||||
|
* equal to the maximum count value, indicating that all resources are free.
|
||||||
|
*
|
||||||
|
* @param uxMaxCount The maximum count value that can be reached. When the
|
||||||
|
* semaphore reaches this value it can no longer be 'given'.
|
||||||
|
*
|
||||||
|
* @param uxInitialCount The count value assigned to the semaphore when it is
|
||||||
|
* created.
|
||||||
|
*
|
||||||
|
* @param pxSemaphoreBuffer Must point to a variable of type StaticSemaphore_t,
|
||||||
|
* which will then be used to hold the semaphore's data structure, removing the
|
||||||
|
* need for the memory to be allocated dynamically.
|
||||||
|
*
|
||||||
|
* @return If the counting semaphore was successfully created then a handle to
|
||||||
|
* the created counting semaphore is returned. If pxSemaphoreBuffer was NULL
|
||||||
|
* then NULL is returned.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
<pre>
|
||||||
|
SemaphoreHandle_t xSemaphore;
|
||||||
|
StaticSemaphore_t xSemaphoreBuffer;
|
||||||
|
|
||||||
|
void vATask( void * pvParameters )
|
||||||
|
{
|
||||||
|
SemaphoreHandle_t xSemaphore = NULL;
|
||||||
|
|
||||||
|
// Counting semaphore cannot be used before they have been created. Create
|
||||||
|
// a counting semaphore using xSemaphoreCreateCountingStatic(). The max
|
||||||
|
// value to which the semaphore can count is 10, and the initial value
|
||||||
|
// assigned to the count will be 0. The address of xSemaphoreBuffer is
|
||||||
|
// passed in and will be used to hold the semaphore structure, so no dynamic
|
||||||
|
// memory allocation will be used.
|
||||||
|
xSemaphore = xSemaphoreCreateCounting( 10, 0, &xSemaphoreBuffer );
|
||||||
|
|
||||||
|
// No memory allocation was attempted so xSemaphore cannot be NULL, so there
|
||||||
|
// is no need to check its value.
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
* \defgroup xSemaphoreCreateCountingStatic xSemaphoreCreateCountingStatic
|
||||||
|
* \ingroup Semaphores
|
||||||
|
*/
|
||||||
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||||
|
#define xSemaphoreCreateCountingStatic( uxMaxCount, uxInitialCount, pxSemaphoreBuffer ) xQueueCreateCountingSemaphoreStatic( ( uxMaxCount ), ( uxInitialCount ), ( pxSemaphoreBuffer ) )
|
||||||
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* semphr. h
|
* semphr. h
|
||||||
|
@ -177,6 +177,7 @@ typedef struct xTASK_STATUS
|
|||||||
UBaseType_t uxCurrentPriority; /* The priority at which the task was running (may be inherited) when the structure was populated. */
|
UBaseType_t uxCurrentPriority; /* The priority at which the task was running (may be inherited) when the structure was populated. */
|
||||||
UBaseType_t uxBasePriority; /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */
|
UBaseType_t uxBasePriority; /* The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */
|
||||||
uint32_t ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See http://www.freertos.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */
|
uint32_t ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See http://www.freertos.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */
|
||||||
|
StackType_t *pxStackBase; /* Points to the lowest address of the task's stack area. */
|
||||||
uint16_t usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */
|
uint16_t usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */
|
||||||
} TaskStatus_t;
|
} TaskStatus_t;
|
||||||
|
|
||||||
@ -281,8 +282,19 @@ is used in assert() statements. */
|
|||||||
);</pre>
|
);</pre>
|
||||||
*
|
*
|
||||||
* Create a new task and add it to the list of tasks that are ready to run.
|
* Create a new task and add it to the list of tasks that are ready to run.
|
||||||
* On multicore environments, this will give no specific affinity to the task.
|
*
|
||||||
* Use xTaskCreatePinnedToCore to give affinity.
|
* Internally, within the FreeRTOS implementation, tasks use two blocks of
|
||||||
|
* memory. The first block is used to hold the task's data structures. The
|
||||||
|
* second block is used by the task as its stack. If a task is created using
|
||||||
|
* xTaskCreate() then both blocks of memory are automatically dynamically
|
||||||
|
* allocated inside the xTaskCreate() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a task is created using
|
||||||
|
* xTaskCreateStatic() then the application writer must provide the required
|
||||||
|
* memory. xTaskCreateStatic() therefore allows a task to be created without
|
||||||
|
* using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* See xTaskCreateStatic() for a version that does not use any dynamic memory
|
||||||
|
* allocation.
|
||||||
*
|
*
|
||||||
* xTaskCreate() can only be used to create a task that has unrestricted
|
* xTaskCreate() can only be used to create a task that has unrestricted
|
||||||
* access to the entire microcontroller memory map. Systems that include MPU
|
* access to the entire microcontroller memory map. Systems that include MPU
|
||||||
@ -350,8 +362,139 @@ is used in assert() statements. */
|
|||||||
* \defgroup xTaskCreate xTaskCreate
|
* \defgroup xTaskCreate xTaskCreate
|
||||||
* \ingroup Tasks
|
* \ingroup Tasks
|
||||||
*/
|
*/
|
||||||
#define xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ) xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ), tskNO_AFFINITY )
|
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||||
#define xTaskCreatePinnedToCore( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask, xCoreID ) xTaskGenericCreate( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), ( NULL ), ( NULL ), xCoreID )
|
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pxTaskCode,
|
||||||
|
const char * const pcName,
|
||||||
|
const uint16_t usStackDepth,
|
||||||
|
void * const pvParameters,
|
||||||
|
UBaseType_t uxPriority,
|
||||||
|
TaskHandle_t * const pxCreatedTask,
|
||||||
|
const BaseType_t xCoreID);
|
||||||
|
|
||||||
|
#define xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ) xTaskCreatePinnedToCore( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), tskNO_AFFINITY )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* task. h
|
||||||
|
*<pre>
|
||||||
|
TaskHandle_t xTaskCreateStatic( TaskFunction_t pvTaskCode,
|
||||||
|
const char * const pcName,
|
||||||
|
uint32_t ulStackDepth,
|
||||||
|
void *pvParameters,
|
||||||
|
UBaseType_t uxPriority,
|
||||||
|
StackType_t *pxStackBuffer,
|
||||||
|
StaticTask_t *pxTaskBuffer,
|
||||||
|
const BaseType_t xCoreID );</pre>
|
||||||
|
|
||||||
|
*
|
||||||
|
* Create a new task and add it to the list of tasks that are ready to run.
|
||||||
|
*
|
||||||
|
* Internally, within the FreeRTOS implementation, tasks use two blocks of
|
||||||
|
* memory. The first block is used to hold the task's data structures. The
|
||||||
|
* second block is used by the task as its stack. If a task is created using
|
||||||
|
* xTaskCreate() then both blocks of memory are automatically dynamically
|
||||||
|
* allocated inside the xTaskCreate() function. (see
|
||||||
|
* http://www.freertos.org/a00111.html). If a task is created using
|
||||||
|
* xTaskCreateStatic() then the application writer must provide the required
|
||||||
|
* memory. xTaskCreateStatic() therefore allows a task to be created without
|
||||||
|
* using any dynamic memory allocation.
|
||||||
|
*
|
||||||
|
* @param pvTaskCode Pointer to the task entry function. Tasks
|
||||||
|
* must be implemented to never return (i.e. continuous loop).
|
||||||
|
*
|
||||||
|
* @param pcName A descriptive name for the task. This is mainly used to
|
||||||
|
* facilitate debugging. The maximum length of the string is defined by
|
||||||
|
* configMAX_TASK_NAME_LEN in FreeRTOSConfig.h.
|
||||||
|
*
|
||||||
|
* @param ulStackDepth The size of the task stack specified as the number of
|
||||||
|
* variables the stack can hold - not the number of bytes. For example, if
|
||||||
|
* the stack is 32-bits wide and ulStackDepth is defined as 100 then 400 bytes
|
||||||
|
* will be allocated for stack storage.
|
||||||
|
*
|
||||||
|
* @param pvParameters Pointer that will be used as the parameter for the task
|
||||||
|
* being created.
|
||||||
|
*
|
||||||
|
* @param uxPriority The priority at which the task will run.
|
||||||
|
*
|
||||||
|
* @param pxStackBuffer Must point to a StackType_t array that has at least
|
||||||
|
* ulStackDepth indexes - the array will then be used as the task's stack,
|
||||||
|
* removing the need for the stack to be allocated dynamically.
|
||||||
|
*
|
||||||
|
* @param pxTaskBuffer Must point to a variable of type StaticTask_t, which will
|
||||||
|
* then be used to hold the task's data structures, removing the need for the
|
||||||
|
* memory to be allocated dynamically.
|
||||||
|
*
|
||||||
|
* @return If neither pxStackBuffer or pxTaskBuffer are NULL, then the task will
|
||||||
|
* be created and pdPASS is returned. If either pxStackBuffer or pxTaskBuffer
|
||||||
|
* are NULL then the task will not be created and
|
||||||
|
* errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY is returned.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
// Dimensions the buffer that the task being created will use as its stack.
|
||||||
|
// NOTE: This is the number of words the stack will hold, not the number of
|
||||||
|
// bytes. For example, if each stack item is 32-bits, and this is set to 100,
|
||||||
|
// then 400 bytes (100 * 32-bits) will be allocated.
|
||||||
|
#define STACK_SIZE 200
|
||||||
|
|
||||||
|
// Structure that will hold the TCB of the task being created.
|
||||||
|
StaticTask_t xTaskBuffer;
|
||||||
|
|
||||||
|
// Buffer that the task being created will use as its stack. Note this is
|
||||||
|
// an array of StackType_t variables. The size of StackType_t is dependent on
|
||||||
|
// the RTOS port.
|
||||||
|
StackType_t xStack[ STACK_SIZE ];
|
||||||
|
|
||||||
|
// Function that implements the task being created.
|
||||||
|
void vTaskCode( void * pvParameters )
|
||||||
|
{
|
||||||
|
// The parameter value is expected to be 1 as 1 is passed in the
|
||||||
|
// pvParameters value in the call to xTaskCreateStatic().
|
||||||
|
configASSERT( ( uint32_t ) pvParameters == 1UL );
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
// Task code goes here.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function that creates a task.
|
||||||
|
void vOtherFunction( void )
|
||||||
|
{
|
||||||
|
TaskHandle_t xHandle = NULL;
|
||||||
|
|
||||||
|
// Create the task without using any dynamic memory allocation.
|
||||||
|
xHandle = xTaskCreateStatic(
|
||||||
|
vTaskCode, // Function that implements the task.
|
||||||
|
"NAME", // Text name for the task.
|
||||||
|
STACK_SIZE, // Stack size in words, not bytes.
|
||||||
|
( void * ) 1, // Parameter passed into the task.
|
||||||
|
tskIDLE_PRIORITY,// Priority at which the task is created.
|
||||||
|
xStack, // Array to use as the task's stack.
|
||||||
|
&xTaskBuffer ); // Variable to hold the task's data structure.
|
||||||
|
|
||||||
|
// puxStackBuffer and pxTaskBuffer were not NULL, so the task will have
|
||||||
|
// been created, and xHandle will be the task's handle. Use the handle
|
||||||
|
// to suspend the task.
|
||||||
|
vTaskSuspend( xHandle );
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
* \defgroup xTaskCreateStatic xTaskCreateStatic
|
||||||
|
* \ingroup Tasks
|
||||||
|
*/
|
||||||
|
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||||
|
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
|
||||||
|
const char * const pcName,
|
||||||
|
const uint32_t ulStackDepth,
|
||||||
|
void * const pvParameters,
|
||||||
|
UBaseType_t uxPriority,
|
||||||
|
StackType_t * const puxStackBuffer,
|
||||||
|
StaticTask_t * const pxTaskBuffer,
|
||||||
|
const BaseType_t xCoreID );
|
||||||
|
|
||||||
|
#define xTaskCreateStatic( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxStackBuffer, pxTaskBuffer ) xTaskCreateStaticPinnedToCore( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxStackBuffer ), ( pxTaskBuffer ), tskNO_AFFINITY )
|
||||||
|
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* task. h
|
* task. h
|
||||||
@ -420,7 +563,9 @@ TaskHandle_t xHandle;
|
|||||||
* \defgroup xTaskCreateRestricted xTaskCreateRestricted
|
* \defgroup xTaskCreateRestricted xTaskCreateRestricted
|
||||||
* \ingroup Tasks
|
* \ingroup Tasks
|
||||||
*/
|
*/
|
||||||
#define xTaskCreateRestricted( x, pxCreatedTask ) xTaskGenericCreate( ((x)->pvTaskCode), ((x)->pcName), ((x)->usStackDepth), ((x)->pvParameters), ((x)->uxPriority), (pxCreatedTask), ((x)->puxStackBuffer), ((x)->xRegions) )
|
#if( portUSING_MPU_WRAPPERS == 1 )
|
||||||
|
BaseType_t xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask ) PRIVILEGED_FUNCTION;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* task. h
|
* task. h
|
||||||
@ -1933,6 +2078,17 @@ TickType_t uxTaskResetEventItemValue( void ) PRIVILEGED_FUNCTION;
|
|||||||
*/
|
*/
|
||||||
TaskHandle_t xTaskGetCurrentTaskHandle( void ) PRIVILEGED_FUNCTION;
|
TaskHandle_t xTaskGetCurrentTaskHandle( void ) PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the handle of the task running on a certain CPU. Because of
|
||||||
|
* the nature of SMP processing, there is no guarantee that this
|
||||||
|
* value will still be valid on return and should only be used for
|
||||||
|
* debugging purposes.
|
||||||
|
*/
|
||||||
|
TaskHandle_t xTaskGetCurrentTaskHandleForCPU( BaseType_t cpuid );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Capture the current time status for future reference.
|
* Capture the current time status for future reference.
|
||||||
*/
|
*/
|
||||||
@ -1968,12 +2124,6 @@ void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTIO
|
|||||||
*/
|
*/
|
||||||
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;
|
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) PRIVILEGED_FUNCTION;
|
||||||
|
|
||||||
/*
|
|
||||||
* Generic version of the task creation function which is in turn called by the
|
|
||||||
* xTaskCreate() and xTaskCreateRestricted() macros.
|
|
||||||
*/
|
|
||||||
BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions, const BaseType_t xCoreID) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the uxTCBNumber assigned to the task referenced by the xTask parameter.
|
* Get the uxTCBNumber assigned to the task referenced by the xTask parameter.
|
||||||
*/
|
*/
|
||||||
|
@ -322,12 +322,7 @@ STRUCT_END(XtSolFrame)
|
|||||||
#ifdef __ASSEMBLER__
|
#ifdef __ASSEMBLER__
|
||||||
.macro getcoreid reg
|
.macro getcoreid reg
|
||||||
rsr.prid \reg
|
rsr.prid \reg
|
||||||
bbci \reg,1,1f
|
extui \reg,\reg,13,1
|
||||||
movi \reg,1
|
|
||||||
j 2f
|
|
||||||
1:
|
|
||||||
movi \reg,0
|
|
||||||
2:
|
|
||||||
.endm
|
.endm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -185,10 +185,6 @@ struct netconn {
|
|||||||
/** sem that is used to synchronously execute functions in the core context */
|
/** sem that is used to synchronously execute functions in the core context */
|
||||||
sys_sem_t op_completed;
|
sys_sem_t op_completed;
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
|
||||||
sys_sem_t snd_op_completed; //only for snd semphore
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** mbox where received packets are stored until they are fetched
|
/** mbox where received packets are stored until they are fetched
|
||||||
|
@ -249,7 +249,7 @@ void dhcp_fine_tmr(void);
|
|||||||
#define DHCP_OPTION_NTP 42
|
#define DHCP_OPTION_NTP 42
|
||||||
#define DHCP_OPTION_END 255
|
#define DHCP_OPTION_END 255
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_LWIP
|
||||||
/**add options for support more router by liuHan**/
|
/**add options for support more router by liuHan**/
|
||||||
#define DHCP_OPTION_DOMAIN_NAME 15
|
#define DHCP_OPTION_DOMAIN_NAME 15
|
||||||
#define DHCP_OPTION_PRD 31
|
#define DHCP_OPTION_PRD 31
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_DNS
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ typedef s8_t err_t;
|
|||||||
#define ERR_USE -8 /* Address in use. */
|
#define ERR_USE -8 /* Address in use. */
|
||||||
|
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_LWIP
|
||||||
#define ERR_ALREADY -9 /* Already connected. */
|
#define ERR_ALREADY -9 /* Already connected. */
|
||||||
#define ERR_ISCONN -10 /* Conn already established.*/
|
#define ERR_ISCONN -10 /* Conn already established.*/
|
||||||
#define ERR_IS_FATAL(e) ((e) < ERR_ISCONN)
|
#define ERR_IS_FATAL(e) ((e) < ERR_ISCONN)
|
||||||
|
@ -51,8 +51,6 @@ typedef size_t mem_size_t;
|
|||||||
* allow these defines to be overridden.
|
* allow these defines to be overridden.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MEMLEAK_DEBUG
|
|
||||||
|
|
||||||
#ifndef mem_free
|
#ifndef mem_free
|
||||||
#define mem_free free
|
#define mem_free free
|
||||||
#endif
|
#endif
|
||||||
@ -63,41 +61,6 @@ typedef size_t mem_size_t;
|
|||||||
#define mem_calloc calloc
|
#define mem_calloc calloc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* DYC_NEED_TO_DO_LATER
|
|
||||||
#ifndef mem_realloc
|
|
||||||
#define mem_realloc
|
|
||||||
#endif
|
|
||||||
#ifndef mem_zalloc
|
|
||||||
#define mem_zalloc
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
#else
|
|
||||||
/*
|
|
||||||
#ifndef mem_free
|
|
||||||
#define mem_free(s) \
|
|
||||||
do{\
|
|
||||||
const char *file = mem_debug_file;\
|
|
||||||
vPortFree(s, file, __LINE__);\
|
|
||||||
}while(0)
|
|
||||||
#endif
|
|
||||||
#ifndef mem_malloc
|
|
||||||
#define mem_malloc(s) ({const char *file = mem_debug_file; pvPortMalloc(s, file, __LINE__);})
|
|
||||||
#endif
|
|
||||||
#ifndef mem_calloc
|
|
||||||
#define mem_calloc(s) ({const char *file = mem_debug_file; pvPortCalloc(s, file, __LINE__);})
|
|
||||||
#endif
|
|
||||||
#ifndef mem_realloc
|
|
||||||
#define mem_realloc(p, s) ({const char *file = mem_debug_file; pvPortRealloc(p, s, file, __LINE__);})
|
|
||||||
#endif
|
|
||||||
#ifndef mem_zalloc
|
|
||||||
#define mem_zalloc(s) ({const char *file = mem_debug_file; pvPortZalloc(s, file, __LINE__);})
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Since there is no C library allocation function to shrink memory without
|
/* Since there is no C library allocation function to shrink memory without
|
||||||
moving it, define this to nothing. */
|
moving it, define this to nothing. */
|
||||||
#ifndef mem_trim
|
#ifndef mem_trim
|
||||||
|
@ -177,7 +177,7 @@ typedef err_t (*netif_mld_mac_filter_fn)(struct netif *netif,
|
|||||||
#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
|
#endif /* LWIP_IPV6 && LWIP_IPV6_MLD */
|
||||||
|
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_DHCP
|
||||||
/*add DHCP event processing by LiuHan*/
|
/*add DHCP event processing by LiuHan*/
|
||||||
typedef void (*dhcp_event_fn)(void);
|
typedef void (*dhcp_event_fn)(void);
|
||||||
#endif
|
#endif
|
||||||
@ -190,7 +190,7 @@ struct netif {
|
|||||||
/** pointer to next in linked list */
|
/** pointer to next in linked list */
|
||||||
struct netif *next;
|
struct netif *next;
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_LWIP
|
||||||
//ip_addr_t is changed by marco IPV4, IPV6
|
//ip_addr_t is changed by marco IPV4, IPV6
|
||||||
ip_addr_t link_local_addr;
|
ip_addr_t link_local_addr;
|
||||||
#endif
|
#endif
|
||||||
@ -248,7 +248,7 @@ struct netif {
|
|||||||
/** the DHCP client state information for this netif */
|
/** the DHCP client state information for this netif */
|
||||||
struct dhcp *dhcp;
|
struct dhcp *dhcp;
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_LWIP
|
||||||
struct udp_pcb *dhcps_pcb;
|
struct udp_pcb *dhcps_pcb;
|
||||||
dhcp_event_fn dhcp_event;
|
dhcp_event_fn dhcp_event;
|
||||||
#endif
|
#endif
|
||||||
|
@ -986,7 +986,7 @@
|
|||||||
* (2 * TCP_MSS) for things to work well
|
* (2 * TCP_MSS) for things to work well
|
||||||
*/
|
*/
|
||||||
#ifndef TCP_WND
|
#ifndef TCP_WND
|
||||||
#define TCP_WND (4 * TCP_MSS)
|
#define TCP_WND(pcb) (4 * TCP_MSS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1040,7 +1040,7 @@
|
|||||||
* To achieve good performance, this should be at least 2 * TCP_MSS.
|
* To achieve good performance, this should be at least 2 * TCP_MSS.
|
||||||
*/
|
*/
|
||||||
#ifndef TCP_SND_BUF
|
#ifndef TCP_SND_BUF
|
||||||
#define TCP_SND_BUF (2 * TCP_MSS)
|
#define TCP_SND_BUF(pcb) (2 * TCP_MSS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1048,7 +1048,7 @@
|
|||||||
* as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
|
* as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
|
||||||
*/
|
*/
|
||||||
#ifndef TCP_SND_QUEUELEN
|
#ifndef TCP_SND_QUEUELEN
|
||||||
#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
|
#define TCP_SND_QUEUELEN(pcb) ((4 * (TCP_SND_BUF((pcb))) + (TCP_MSS - 1))/(TCP_MSS))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1057,7 +1057,7 @@
|
|||||||
* TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
|
* TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
|
||||||
*/
|
*/
|
||||||
#ifndef TCP_SNDLOWAT
|
#ifndef TCP_SNDLOWAT
|
||||||
#define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1)
|
#define TCP_SNDLOWAT(pcb) LWIP_MIN(LWIP_MAX(((TCP_SND_BUF((pcb)))/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF((pcb))) - 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1066,7 +1066,7 @@
|
|||||||
* this number, select returns writable (combined with TCP_SNDLOWAT).
|
* this number, select returns writable (combined with TCP_SNDLOWAT).
|
||||||
*/
|
*/
|
||||||
#ifndef TCP_SNDQUEUELOWAT
|
#ifndef TCP_SNDQUEUELOWAT
|
||||||
#define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5)
|
#define TCP_SNDQUEUELOWAT(pcb) LWIP_MAX(((TCP_SND_QUEUELEN((pcb)))/2), 5)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1134,7 +1134,7 @@
|
|||||||
* explicit window update
|
* explicit window update
|
||||||
*/
|
*/
|
||||||
#ifndef TCP_WND_UPDATE_THRESHOLD
|
#ifndef TCP_WND_UPDATE_THRESHOLD
|
||||||
#define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4))
|
#define TCP_WND_UPDATE_THRESHOLD(pcb) LWIP_MIN((TCP_WND((pcb)) / 4), (TCP_MSS * 4))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3008,8 +3008,8 @@
|
|||||||
#define LWIP_PERF 0
|
#define LWIP_PERF 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef THREAD_SAFE_DEBUG
|
#ifndef ESP_THREAD_SAFE_DEBUG
|
||||||
#define THREAD_SAFE_DEBUG 0
|
#define ESP_THREAD_SAFE_DEBUG 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* LWIP_HDR_OPT_H */
|
#endif /* LWIP_HDR_OPT_H */
|
||||||
|
@ -137,7 +137,7 @@ struct pbuf {
|
|||||||
*/
|
*/
|
||||||
u16_t ref;
|
u16_t ref;
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_LWIP
|
||||||
void *eb;
|
void *eb;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -187,7 +187,7 @@ struct dns_api_msg {
|
|||||||
#endif /* LWIP_DNS */
|
#endif /* LWIP_DNS */
|
||||||
|
|
||||||
#if LWIP_NETCONN_SEM_PER_THREAD
|
#if LWIP_NETCONN_SEM_PER_THREAD
|
||||||
#ifdef LWIP_ESP8266
|
#if ESP_THREAD_SAFE
|
||||||
#define LWIP_NETCONN_THREAD_SEM_GET() sys_thread_sem_get()
|
#define LWIP_NETCONN_THREAD_SEM_GET() sys_thread_sem_get()
|
||||||
#define LWIP_NETCONN_THREAD_SEM_ALLOC() sys_thread_sem_init()
|
#define LWIP_NETCONN_THREAD_SEM_ALLOC() sys_thread_sem_init()
|
||||||
#define LWIP_NETCONN_THREAD_SEM_FREE() sys_thread_sem_deinit()
|
#define LWIP_NETCONN_THREAD_SEM_FREE() sys_thread_sem_deinit()
|
||||||
@ -222,10 +222,6 @@ struct dns_api_msg {
|
|||||||
#define TCPIP_APIMSG(m,f,e) do { (m)->function = f; (e) = tcpip_apimsg(m); } while(0)
|
#define TCPIP_APIMSG(m,f,e) do { (m)->function = f; (e) = tcpip_apimsg(m); } while(0)
|
||||||
#define TCPIP_APIMSG_ACK(m) do { NETCONN_SET_SAFE_ERR((m)->conn, (m)->err); sys_sem_signal(LWIP_API_MSG_SEM(m)); } while(0)
|
#define TCPIP_APIMSG_ACK(m) do { NETCONN_SET_SAFE_ERR((m)->conn, (m)->err); sys_sem_signal(LWIP_API_MSG_SEM(m)); } while(0)
|
||||||
|
|
||||||
#ifdef LWIP_ESP8266
|
|
||||||
#define TCPIP_APIMSG_ACK_SND(m) do { NETCONN_SET_SAFE_ERR((m)->conn, (m)->err); sys_sem_signal(LWIP_API_MSG_SND_SEM(m)); } while(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* LWIP_TCPIP_CORE_LOCKING */
|
#endif /* LWIP_TCPIP_CORE_LOCKING */
|
||||||
|
|
||||||
void lwip_netconn_do_newconn (void *m);
|
void lwip_netconn_do_newconn (void *m);
|
||||||
|
@ -92,7 +92,7 @@ err_t tcp_process_refused_data(struct tcp_pcb *pcb);
|
|||||||
((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \
|
((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \
|
||||||
(((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \
|
(((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \
|
||||||
((tpcb)->unsent->len >= (tpcb)->mss))) || \
|
((tpcb)->unsent->len >= (tpcb)->mss))) || \
|
||||||
((tcp_sndbuf(tpcb) == 0) || (tcp_sndqueuelen(tpcb) >= TCP_SND_QUEUELEN)) \
|
((tcp_sndbuf(tpcb) == 0) || (tcp_sndqueuelen(tpcb) >= TCP_SND_QUEUELEN(tpcb))) \
|
||||||
) ? 1 : 0)
|
) ? 1 : 0)
|
||||||
#define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK)
|
#define tcp_output_nagle(tpcb) (tcp_do_output_nagle(tpcb) ? tcp_output(tpcb) : ERR_OK)
|
||||||
|
|
||||||
|
@ -190,7 +190,6 @@ struct msghdr {
|
|||||||
#define SO_CONTIMEO 0x1009 /* Unimplemented: connect timeout */
|
#define SO_CONTIMEO 0x1009 /* Unimplemented: connect timeout */
|
||||||
#define SO_NO_CHECK 0x100a /* don't create UDP checksum */
|
#define SO_NO_CHECK 0x100a /* don't create UDP checksum */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structure used for manipulating linger option.
|
* Structure used for manipulating linger option.
|
||||||
*/
|
*/
|
||||||
@ -250,6 +249,11 @@ struct linger {
|
|||||||
#define TCP_KEEPIDLE 0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */
|
#define TCP_KEEPIDLE 0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */
|
||||||
#define TCP_KEEPINTVL 0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */
|
#define TCP_KEEPINTVL 0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */
|
||||||
#define TCP_KEEPCNT 0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */
|
#define TCP_KEEPCNT 0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */
|
||||||
|
#if ESP_PER_SOC_TCP_WND
|
||||||
|
#define TCP_WINDOW 0x06 /* set pcb->per_soc_tcp_wnd */
|
||||||
|
#define TCP_SNDBUF 0x07 /* set pcb->per_soc_tcp_snd_buf */
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* LWIP_TCP */
|
#endif /* LWIP_TCP */
|
||||||
|
|
||||||
#if LWIP_IPV6
|
#if LWIP_IPV6
|
||||||
@ -505,7 +509,7 @@ int lwip_fcntl(int s, int cmd, int val);
|
|||||||
#if LWIP_COMPAT_SOCKETS
|
#if LWIP_COMPAT_SOCKETS
|
||||||
#if LWIP_COMPAT_SOCKETS != 2
|
#if LWIP_COMPAT_SOCKETS != 2
|
||||||
|
|
||||||
#if LWIP_THREAD_SAFE
|
#if ESP_THREAD_SAFE
|
||||||
|
|
||||||
int lwip_accept_r(int s, struct sockaddr *addr, socklen_t *addrlen);
|
int lwip_accept_r(int s, struct sockaddr *addr, socklen_t *addrlen);
|
||||||
int lwip_bind_r(int s, const struct sockaddr *name, socklen_t namelen);
|
int lwip_bind_r(int s, const struct sockaddr *name, socklen_t namelen);
|
||||||
@ -590,7 +594,7 @@ int lwip_fcntl_r(int s, int cmd, int val);
|
|||||||
#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val)
|
#define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val)
|
||||||
#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp)
|
#define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp)
|
||||||
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
|
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
|
||||||
#endif /* LWIP_THREAD_SAFE */
|
#endif /* ESP_THREAD_SAFE */
|
||||||
|
|
||||||
#endif /* LWIP_COMPAT_SOCKETS != 2 */
|
#endif /* LWIP_COMPAT_SOCKETS != 2 */
|
||||||
|
|
||||||
|
@ -129,14 +129,14 @@ typedef err_t (*tcp_connected_fn)(void *arg, struct tcp_pcb *tpcb, err_t err);
|
|||||||
#define RCV_WND_SCALE(pcb, wnd) (((wnd) >> (pcb)->rcv_scale))
|
#define RCV_WND_SCALE(pcb, wnd) (((wnd) >> (pcb)->rcv_scale))
|
||||||
#define SND_WND_SCALE(pcb, wnd) (((wnd) << (pcb)->snd_scale))
|
#define SND_WND_SCALE(pcb, wnd) (((wnd) << (pcb)->snd_scale))
|
||||||
#define TCPWND16(x) ((u16_t)LWIP_MIN((x), 0xFFFF))
|
#define TCPWND16(x) ((u16_t)LWIP_MIN((x), 0xFFFF))
|
||||||
#define TCP_WND_MAX(pcb) ((tcpwnd_size_t)(((pcb)->flags & TF_WND_SCALE) ? TCP_WND : TCPWND16(TCP_WND)))
|
#define TCP_WND_MAX(pcb) ((tcpwnd_size_t)(((pcb)->flags & TF_WND_SCALE) ? TCP_WND(pcb) : TCPWND16(TCP_WND(pcb))))
|
||||||
typedef u32_t tcpwnd_size_t;
|
typedef u32_t tcpwnd_size_t;
|
||||||
typedef u16_t tcpflags_t;
|
typedef u16_t tcpflags_t;
|
||||||
#else
|
#else
|
||||||
#define RCV_WND_SCALE(pcb, wnd) (wnd)
|
#define RCV_WND_SCALE(pcb, wnd) (wnd)
|
||||||
#define SND_WND_SCALE(pcb, wnd) (wnd)
|
#define SND_WND_SCALE(pcb, wnd) (wnd)
|
||||||
#define TCPWND16(x) (x)
|
#define TCPWND16(x) (x)
|
||||||
#define TCP_WND_MAX(pcb) TCP_WND
|
#define TCP_WND_MAX(pcb) TCP_WND(pcb)
|
||||||
typedef u16_t tcpwnd_size_t;
|
typedef u16_t tcpwnd_size_t;
|
||||||
typedef u8_t tcpflags_t;
|
typedef u8_t tcpflags_t;
|
||||||
#endif
|
#endif
|
||||||
@ -236,6 +236,11 @@ struct tcp_pcb {
|
|||||||
u8_t dupacks;
|
u8_t dupacks;
|
||||||
u32_t lastack; /* Highest acknowledged seqno. */
|
u32_t lastack; /* Highest acknowledged seqno. */
|
||||||
|
|
||||||
|
#if ESP_PER_SOC_TCP_WND
|
||||||
|
tcpwnd_size_t per_soc_tcp_wnd; /* per tcp socket tcp window size */
|
||||||
|
tcpwnd_size_t per_soc_tcp_snd_buf; /* per tcp socket tcp send buffer size */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* congestion avoidance/control variables */
|
/* congestion avoidance/control variables */
|
||||||
tcpwnd_size_t cwnd;
|
tcpwnd_size_t cwnd;
|
||||||
tcpwnd_size_t ssthresh;
|
tcpwnd_size_t ssthresh;
|
||||||
@ -402,6 +407,10 @@ const char* tcp_debug_state_str(enum tcp_state s);
|
|||||||
/* for compatibility with older implementation */
|
/* for compatibility with older implementation */
|
||||||
#define tcp_new_ip6() tcp_new_ip_type(IPADDR_TYPE_V6)
|
#define tcp_new_ip6() tcp_new_ip_type(IPADDR_TYPE_V6)
|
||||||
|
|
||||||
|
#if ESP_PER_SOC_TCP_WND
|
||||||
|
#define PER_SOC_WND(pcb) (pcb->per_soc_wnd)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
/* Enable all Espressif-only options */
|
/* Enable all Espressif-only options */
|
||||||
#define LWIP_ESP8266
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
@ -225,18 +224,21 @@ extern unsigned long os_random(void);
|
|||||||
* TCP_WND: The size of a TCP window. This must be at least
|
* TCP_WND: The size of a TCP window. This must be at least
|
||||||
* (2 * TCP_MSS) for things to work well
|
* (2 * TCP_MSS) for things to work well
|
||||||
*/
|
*/
|
||||||
#define PERF 1
|
|
||||||
|
#define ESP_PER_SOC_TCP_WND 1
|
||||||
|
#if ESP_PER_SOC_TCP_WND
|
||||||
|
#define TCP_WND_DEFAULT (4*TCP_MSS)
|
||||||
|
#define TCP_SND_BUF_DEFAULT (2*TCP_MSS)
|
||||||
|
|
||||||
|
#define TCP_WND(pcb) (pcb->per_soc_tcp_wnd)
|
||||||
|
#define TCP_SND_BUF(pcb) (pcb->per_soc_tcp_snd_buf)
|
||||||
|
#else
|
||||||
#ifdef PERF
|
#ifdef PERF
|
||||||
extern unsigned char misc_prof_get_tcpw(void);
|
extern unsigned char misc_prof_get_tcpw(void);
|
||||||
extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
||||||
#define TCP_WND (misc_prof_get_tcpw()*TCP_MSS)
|
#define TCP_WND(pcb) (misc_prof_get_tcpw()*TCP_MSS)
|
||||||
#define TCP_SND_BUF (misc_prof_get_tcp_snd_buf()*TCP_MSS)
|
#define TCP_SND_BUF(pcb) (misc_prof_get_tcp_snd_buf()*TCP_MSS)
|
||||||
|
#endif
|
||||||
#else
|
|
||||||
|
|
||||||
#define TCP_WND (4 * TCP_MSS)
|
|
||||||
#define TCP_SND_BUF (2 * TCP_MSS)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -507,14 +509,42 @@ extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
|||||||
*/
|
*/
|
||||||
#define TCPIP_DEBUG LWIP_DBG_OFF
|
#define TCPIP_DEBUG LWIP_DBG_OFF
|
||||||
|
|
||||||
|
/* Enable all Espressif-only options */
|
||||||
|
|
||||||
|
#define ESP_LWIP 1
|
||||||
|
#define ESP_PER_SOC_TCP_WND 1
|
||||||
|
#define ESP_THREAD_SAFE 1
|
||||||
|
#define ESP_THREAD_SAFE_DEBUG LWIP_DBG_OFF
|
||||||
|
#define ESP_DHCP 1
|
||||||
|
#define ESP_DNS 1
|
||||||
|
#define ESP_IPV6_AUTOCONFIG 1
|
||||||
|
#define ESP_PERF 0
|
||||||
|
#define ESP_RANDOM_TCP_PORT 1
|
||||||
|
#define ESP_IP4_ATON 1
|
||||||
|
#define ESP_LIGHT_SLEEP 1
|
||||||
|
|
||||||
|
|
||||||
|
#if ESP_PER_SOC_TCP_WND
|
||||||
|
#define TCP_WND_DEFAULT (4*TCP_MSS)
|
||||||
|
#define TCP_SND_BUF_DEFAULT (2*TCP_MSS)
|
||||||
|
#define TCP_WND(pcb) (pcb->per_soc_tcp_wnd)
|
||||||
|
#define TCP_SND_BUF(pcb) (pcb->per_soc_tcp_snd_buf)
|
||||||
|
#else
|
||||||
|
#if ESP_PERF
|
||||||
|
extern unsigned char misc_prof_get_tcpw(void);
|
||||||
|
extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
||||||
|
#define TCP_WND(pcb) (misc_prof_get_tcpw()*TCP_MSS)
|
||||||
|
#define TCP_SND_BUF(pcb) (misc_prof_get_tcp_snd_buf()*TCP_MSS)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DHCP_DEBUG: Enable debugging in dhcp.c.
|
* DHCP_DEBUG: Enable debugging in dhcp.c.
|
||||||
*/
|
*/
|
||||||
#define DHCP_DEBUG LWIP_DBG_OFF
|
#define DHCP_DEBUG LWIP_DBG_OFF
|
||||||
#define LWIP_DEBUG 0
|
#define LWIP_DEBUG 0
|
||||||
#define TCP_DEBUG LWIP_DBG_OFF
|
#define TCP_DEBUG LWIP_DBG_OFF
|
||||||
#define THREAD_SAFE_DEBUG LWIP_DBG_OFF
|
#define ESP_THREAD_SAFE_DEBUG LWIP_DBG_OFF
|
||||||
#define LWIP_THREAD_SAFE 1
|
|
||||||
|
|
||||||
#define CHECKSUM_CHECK_UDP 0
|
#define CHECKSUM_CHECK_UDP 0
|
||||||
#define CHECKSUM_CHECK_IP 0
|
#define CHECKSUM_CHECK_IP 0
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
|
|
||||||
|
#include "esp_wifi_internal.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -18,8 +20,6 @@ err_t wlanif_init(struct netif *netif);
|
|||||||
|
|
||||||
void wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb);
|
void wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb);
|
||||||
|
|
||||||
bool ieee80211_output(wifi_interface_t wifi_if, void *buffer, u16_t len);
|
|
||||||
|
|
||||||
wifi_interface_t wifi_get_interface(void *dev);
|
wifi_interface_t wifi_get_interface(void *dev);
|
||||||
|
|
||||||
void netif_reg_addr_change_cb(void* cb);
|
void netif_reg_addr_change_cb(void* cb);
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
/* Enable all Espressif-only options */
|
/* Enable all Espressif-only options */
|
||||||
#define LWIP_ESP8266
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
@ -225,18 +224,21 @@ extern unsigned long os_random(void);
|
|||||||
* TCP_WND: The size of a TCP window. This must be at least
|
* TCP_WND: The size of a TCP window. This must be at least
|
||||||
* (2 * TCP_MSS) for things to work well
|
* (2 * TCP_MSS) for things to work well
|
||||||
*/
|
*/
|
||||||
#define PERF 1
|
|
||||||
|
#define ESP_PER_SOC_TCP_WND 1
|
||||||
|
#if ESP_PER_SOC_TCP_WND
|
||||||
|
#define TCP_WND_DEFAULT (4*TCP_MSS)
|
||||||
|
#define TCP_SND_BUF_DEFAULT (2*TCP_MSS)
|
||||||
|
|
||||||
|
#define TCP_WND(pcb) (pcb->per_soc_tcp_wnd)
|
||||||
|
#define TCP_SND_BUF(pcb) (pcb->per_soc_tcp_snd_buf)
|
||||||
|
#else
|
||||||
#ifdef PERF
|
#ifdef PERF
|
||||||
extern unsigned char misc_prof_get_tcpw(void);
|
extern unsigned char misc_prof_get_tcpw(void);
|
||||||
extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
||||||
#define TCP_WND (misc_prof_get_tcpw()*TCP_MSS)
|
#define TCP_WND(pcb) (misc_prof_get_tcpw()*TCP_MSS)
|
||||||
#define TCP_SND_BUF (misc_prof_get_tcp_snd_buf()*TCP_MSS)
|
#define TCP_SND_BUF(pcb) (misc_prof_get_tcp_snd_buf()*TCP_MSS)
|
||||||
|
#endif
|
||||||
#else
|
|
||||||
|
|
||||||
#define TCP_WND (4 * TCP_MSS)
|
|
||||||
#define TCP_SND_BUF (2 * TCP_MSS)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -507,14 +509,42 @@ extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
|||||||
*/
|
*/
|
||||||
#define TCPIP_DEBUG LWIP_DBG_OFF
|
#define TCPIP_DEBUG LWIP_DBG_OFF
|
||||||
|
|
||||||
|
/* Enable all Espressif-only options */
|
||||||
|
|
||||||
|
#define ESP_LWIP 1
|
||||||
|
#define ESP_PER_SOC_TCP_WND 1
|
||||||
|
#define ESP_THREAD_SAFE 1
|
||||||
|
#define ESP_THREAD_SAFE_DEBUG LWIP_DBG_OFF
|
||||||
|
#define ESP_DHCP 1
|
||||||
|
#define ESP_DNS 1
|
||||||
|
#define ESP_IPV6_AUTOCONFIG 1
|
||||||
|
#define ESP_PERF 0
|
||||||
|
#define ESP_RANDOM_TCP_PORT 1
|
||||||
|
#define ESP_IP4_ATON 1
|
||||||
|
#define ESP_LIGHT_SLEEP 1
|
||||||
|
|
||||||
|
|
||||||
|
#if ESP_PER_SOC_TCP_WND
|
||||||
|
#define TCP_WND_DEFAULT (4*TCP_MSS)
|
||||||
|
#define TCP_SND_BUF_DEFAULT (2*TCP_MSS)
|
||||||
|
#define TCP_WND(pcb) (pcb->per_soc_tcp_wnd)
|
||||||
|
#define TCP_SND_BUF(pcb) (pcb->per_soc_tcp_snd_buf)
|
||||||
|
#else
|
||||||
|
#if ESP_PERF
|
||||||
|
extern unsigned char misc_prof_get_tcpw(void);
|
||||||
|
extern unsigned char misc_prof_get_tcp_snd_buf(void);
|
||||||
|
#define TCP_WND(pcb) (misc_prof_get_tcpw()*TCP_MSS)
|
||||||
|
#define TCP_SND_BUF(pcb) (misc_prof_get_tcp_snd_buf()*TCP_MSS)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DHCP_DEBUG: Enable debugging in dhcp.c.
|
* DHCP_DEBUG: Enable debugging in dhcp.c.
|
||||||
*/
|
*/
|
||||||
#define DHCP_DEBUG LWIP_DBG_OFF
|
#define DHCP_DEBUG LWIP_DBG_OFF
|
||||||
#define LWIP_DEBUG 0
|
#define LWIP_DEBUG 0
|
||||||
#define TCP_DEBUG LWIP_DBG_OFF
|
#define TCP_DEBUG LWIP_DBG_OFF
|
||||||
#define THREAD_SAFE_DEBUG LWIP_DBG_OFF
|
#define ESP_THREAD_SAFE_DEBUG LWIP_DBG_OFF
|
||||||
#define LWIP_THREAD_SAFE 1
|
|
||||||
|
|
||||||
#define CHECKSUM_CHECK_UDP 0
|
#define CHECKSUM_CHECK_UDP 0
|
||||||
#define CHECKSUM_CHECK_IP 0
|
#define CHECKSUM_CHECK_IP 0
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
|
|
||||||
|
#include "esp_wifi_internal.h"
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -18,8 +20,6 @@ err_t wlanif_init(struct netif *netif);
|
|||||||
|
|
||||||
void wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb);
|
void wlanif_input(struct netif *netif, void *buffer, u16_t len, void* eb);
|
||||||
|
|
||||||
bool ieee80211_output(wifi_interface_t wifi_if, void *buffer, u16_t len);
|
|
||||||
|
|
||||||
wifi_interface_t wifi_get_interface(void *dev);
|
wifi_interface_t wifi_get_interface(void *dev);
|
||||||
|
|
||||||
void netif_reg_addr_change_cb(void* cb);
|
void netif_reg_addr_change_cb(void* cb);
|
||||||
|
@ -67,11 +67,15 @@ typedef struct {
|
|||||||
typedef dhcps_lease_t tcpip_adapter_dhcps_lease_t;
|
typedef dhcps_lease_t tcpip_adapter_dhcps_lease_t;
|
||||||
|
|
||||||
#if CONFIG_DHCP_STA_LIST
|
#if CONFIG_DHCP_STA_LIST
|
||||||
struct station_list {
|
typedef struct {
|
||||||
STAILQ_ENTRY(station_list) next;
|
|
||||||
uint8_t mac[6];
|
uint8_t mac[6];
|
||||||
ip4_addr_t ip;
|
ip4_addr_t ip;
|
||||||
};
|
}tcpip_adapter_sta_info_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
tcpip_adapter_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM+2];
|
||||||
|
uint8_t num;
|
||||||
|
}tcpip_adapter_sta_list_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -359,26 +363,14 @@ wifi_interface_t tcpip_adapter_get_wifi_if(void *dev);
|
|||||||
/**
|
/**
|
||||||
* @brief Get the station information list
|
* @brief Get the station information list
|
||||||
*
|
*
|
||||||
* @note This function should be called in AP mode and dhcp server started, and the list should
|
* @param[in] wifi_sta_list_t *wifi_sta_list: station list info
|
||||||
* be by using tcpip_adapter_free_sta_list.
|
* @param[out] tcpip_adapter_sta_list_t *tcpip_sta_list: station list info
|
||||||
*
|
|
||||||
* @param[in] sta_info: station information
|
|
||||||
* @param[out] sta_list: station information list
|
|
||||||
*
|
*
|
||||||
* @return ESP_OK
|
* @return ESP_OK
|
||||||
* ESP_ERR_TCPIP_ADAPTER_NO_MEM
|
* ESP_ERR_TCPIP_ADAPTER_NO_MEM
|
||||||
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
* ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS
|
||||||
*/
|
*/
|
||||||
esp_err_t tcpip_adapter_get_sta_list(struct station_info *sta_info, struct station_list **sta_list);
|
esp_err_t tcpip_adapter_get_sta_list(wifi_sta_list_t *wifi_sta_list, tcpip_adapter_sta_list_t *tcpip_sta_list);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Free the station information list's memory
|
|
||||||
*
|
|
||||||
* @param sta_list: station information list
|
|
||||||
*
|
|
||||||
* @return ESP_OK
|
|
||||||
*/
|
|
||||||
esp_err_t tcpip_adapter_free_sta_list(struct station_list *sta_list);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
157
tools/sdk/include/vfs/esp_vfs.h
Normal file
157
tools/sdk/include/vfs/esp_vfs.h
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
|
||||||
|
#ifndef __ESP_VFS_H__
|
||||||
|
#define __ESP_VFS_H__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include "esp_err.h"
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/reent.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum length of path prefix (not including zero terminator)
|
||||||
|
*/
|
||||||
|
#define ESP_VFS_PATH_MAX 15
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default value of flags member in esp_vfs_t structure.
|
||||||
|
*/
|
||||||
|
#define ESP_VFS_FLAG_DEFAULT 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag which indicates that FS needs extra context pointer in syscalls.
|
||||||
|
*/
|
||||||
|
#define ESP_VFS_FLAG_CONTEXT_PTR 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief VFS definition structure
|
||||||
|
*
|
||||||
|
* This structure should be filled with pointers to corresponding
|
||||||
|
* FS driver functions.
|
||||||
|
*
|
||||||
|
* If the FS implementation has an option to use certain offset for
|
||||||
|
* all file descriptors, this value should be passed into fd_offset
|
||||||
|
* field. Otherwise VFS component will translate all FDs to start
|
||||||
|
* at zero offset.
|
||||||
|
*
|
||||||
|
* Some FS implementations expect some state (e.g. pointer to some structure)
|
||||||
|
* to be passed in as a first argument. For these implementations,
|
||||||
|
* populate the members of this structure which have _p suffix, set
|
||||||
|
* flags member to ESP_VFS_FLAG_CONTEXT_PTR and provide the context pointer
|
||||||
|
* to esp_vfs_register function.
|
||||||
|
* If the implementation doesn't use this extra argument, populate the
|
||||||
|
* members without _p suffix and set flags memeber to ESP_VFS_FLAG_DEFAULT.
|
||||||
|
*
|
||||||
|
* If the FS driver doesn't provide some of the functions, set corresponding
|
||||||
|
* members to NULL.
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int fd_offset;
|
||||||
|
int flags;
|
||||||
|
union {
|
||||||
|
size_t (*write_p)(void* p, int fd, const void * data, size_t size);
|
||||||
|
size_t (*write)(int fd, const void * data, size_t size);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
off_t (*lseek_p)(void* p, int fd, off_t size, int mode);
|
||||||
|
off_t (*lseek)(int fd, off_t size, int mode);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
ssize_t (*read_p)(void* ctx, int fd, void * dst, size_t size);
|
||||||
|
ssize_t (*read)(int fd, void * dst, size_t size);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
int (*open_p)(void* ctx, const char * path, int flags, int mode);
|
||||||
|
int (*open)(const char * path, int flags, int mode);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
int (*close_p)(void* ctx, int fd);
|
||||||
|
int (*close)(int fd);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
int (*fstat_p)(void* ctx, int fd, struct stat * st);
|
||||||
|
int (*fstat)(int fd, struct stat * st);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
int (*stat_p)(void* ctx, const char * path, struct stat * st);
|
||||||
|
int (*stat)(const char * path, struct stat * st);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
int (*link_p)(void* ctx, const char* n1, const char* n2);
|
||||||
|
int (*link)(const char* n1, const char* n2);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
int (*unlink_p)(void* ctx, const char *path);
|
||||||
|
int (*unlink)(const char *path);
|
||||||
|
};
|
||||||
|
union {
|
||||||
|
int (*rename_p)(void* ctx, const char *src, const char *dst);
|
||||||
|
int (*rename)(const char *src, const char *dst);
|
||||||
|
};
|
||||||
|
} esp_vfs_t;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register a virtual filesystem for given path prefix.
|
||||||
|
*
|
||||||
|
* @param base_path file path prefix associated with the filesystem.
|
||||||
|
* Must be a zero-terminated C string, up to ESP_VFS_PATH_MAX
|
||||||
|
* characters long, and at least 2 characters long.
|
||||||
|
* Name must start with a "/" and must not end with "/".
|
||||||
|
* For example, "/data" or "/dev/spi" are valid.
|
||||||
|
* These VFSes would then be called to handle file paths such as
|
||||||
|
* "/data/myfile.txt" or "/dev/spi/0".
|
||||||
|
* @param vfs Pointer to esp_vfs_t, a structure which maps syscalls to
|
||||||
|
* the filesystem driver functions. VFS component doesn't
|
||||||
|
* assume ownership of this pointer.
|
||||||
|
* @param ctx If vfs->flags has ESP_VFS_FLAG_CONTEXT_PTR set, a pointer
|
||||||
|
* which should be passed to VFS functions. Otherwise, NULL.
|
||||||
|
*
|
||||||
|
* @return ESP_OK if successful, ESP_ERR_NO_MEM if too many VFSes are
|
||||||
|
* registered.
|
||||||
|
*/
|
||||||
|
esp_err_t esp_vfs_register(const char* base_path, const esp_vfs_t* vfs, void* ctx);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These functions are to be used in newlib syscall table. They will be called by
|
||||||
|
* newlib when it needs to use any of the syscalls.
|
||||||
|
*/
|
||||||
|
|
||||||
|
ssize_t esp_vfs_write(struct _reent *r, int fd, const void * data, size_t size);
|
||||||
|
off_t esp_vfs_lseek(struct _reent *r, int fd, off_t size, int mode);
|
||||||
|
ssize_t esp_vfs_read(struct _reent *r, int fd, void * dst, size_t size);
|
||||||
|
int esp_vfs_open(struct _reent *r, const char * path, int flags, int mode);
|
||||||
|
int esp_vfs_close(struct _reent *r, int fd);
|
||||||
|
int esp_vfs_fstat(struct _reent *r, int fd, struct stat * st);
|
||||||
|
int esp_vfs_stat(struct _reent *r, const char * path, struct stat * st);
|
||||||
|
int esp_vfs_link(struct _reent *r, const char* n1, const char* n2);
|
||||||
|
int esp_vfs_unlink(struct _reent *r, const char *path);
|
||||||
|
int esp_vfs_rename(struct _reent *r, const char *src, const char *dst);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif //__ESP_VFS_H__
|
28
tools/sdk/include/vfs/esp_vfs_dev.h
Normal file
28
tools/sdk/include/vfs/esp_vfs_dev.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright 2015-2016 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.
|
||||||
|
|
||||||
|
#ifndef __ESP_VFS_DEV_H__
|
||||||
|
#define __ESP_VFS_DEV_H__
|
||||||
|
|
||||||
|
#include "esp_vfs.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief add /dev/uart virtual filesystem driver
|
||||||
|
*
|
||||||
|
* This function is called from startup code to enable serial output
|
||||||
|
*/
|
||||||
|
void esp_vfs_dev_uart_register();
|
||||||
|
|
||||||
|
|
||||||
|
#endif //__ESP_VFS_DEV_H__
|
@ -9,6 +9,7 @@ PROVIDE ( UART1 = 0x3ff50000 );
|
|||||||
PROVIDE ( I2C0 = 0x3ff53000 );
|
PROVIDE ( I2C0 = 0x3ff53000 );
|
||||||
PROVIDE ( UHCI0 = 0x3ff54000 );
|
PROVIDE ( UHCI0 = 0x3ff54000 );
|
||||||
PROVIDE ( RMT = 0x3ff56000 );
|
PROVIDE ( RMT = 0x3ff56000 );
|
||||||
|
PROVIDE ( RMTMEM = 0x3ff56800 );
|
||||||
PROVIDE ( PCNT = 0x3ff57000 );
|
PROVIDE ( PCNT = 0x3ff57000 );
|
||||||
PROVIDE ( LEDC = 0x3ff59000 );
|
PROVIDE ( LEDC = 0x3ff59000 );
|
||||||
PROVIDE ( TIMERG0 = 0x3ff5F000 );
|
PROVIDE ( TIMERG0 = 0x3ff5F000 );
|
||||||
|
@ -286,6 +286,7 @@ PROVIDE ( _global_impure_ptr = 0x3ffae0b0 );
|
|||||||
PROVIDE ( gmtime = 0x40059848 );
|
PROVIDE ( gmtime = 0x40059848 );
|
||||||
PROVIDE ( gmtime_r = 0x40059868 );
|
PROVIDE ( gmtime_r = 0x40059868 );
|
||||||
PROVIDE ( g_phyFuns_instance = 0x3ffae0c4 );
|
PROVIDE ( g_phyFuns_instance = 0x3ffae0c4 );
|
||||||
|
PROVIDE ( g_rom_flashchip = 0x3ffae270 );
|
||||||
PROVIDE ( gpio_init = 0x40009c20 );
|
PROVIDE ( gpio_init = 0x40009c20 );
|
||||||
PROVIDE ( gpio_input_get = 0x40009b88 );
|
PROVIDE ( gpio_input_get = 0x40009b88 );
|
||||||
PROVIDE ( gpio_input_get_high = 0x40009b9c );
|
PROVIDE ( gpio_input_get_high = 0x40009b9c );
|
||||||
@ -1584,6 +1585,8 @@ PROVIDE ( SPIEraseBlock = 0x40062c4c );
|
|||||||
PROVIDE ( SPIEraseChip = 0x40062c14 );
|
PROVIDE ( SPIEraseChip = 0x40062c14 );
|
||||||
PROVIDE ( SPIEraseSector = 0x40062ccc );
|
PROVIDE ( SPIEraseSector = 0x40062ccc );
|
||||||
PROVIDE ( spi_flash_attach = 0x40062a6c );
|
PROVIDE ( spi_flash_attach = 0x40062a6c );
|
||||||
|
/* NB: SPIUnlock @ 0x400628b0 has been replaced with an updated
|
||||||
|
version in the "spi_flash" component */
|
||||||
PROVIDE ( SPILock = 0x400628f0 );
|
PROVIDE ( SPILock = 0x400628f0 );
|
||||||
PROVIDE ( SPIMasterReadModeCnfig = 0x40062b64 );
|
PROVIDE ( SPIMasterReadModeCnfig = 0x40062b64 );
|
||||||
PROVIDE ( spi_modes = 0x3ff99270 );
|
PROVIDE ( spi_modes = 0x3ff99270 );
|
||||||
@ -1595,9 +1598,8 @@ PROVIDE ( SPIReadModeCnfig = 0x40062944 );
|
|||||||
PROVIDE ( SPI_read_status = 0x4006226c );
|
PROVIDE ( SPI_read_status = 0x4006226c );
|
||||||
/* This is static function, but can be used, not generated by script*/
|
/* This is static function, but can be used, not generated by script*/
|
||||||
PROVIDE ( SPI_read_status_high = 0x40062448 );
|
PROVIDE ( SPI_read_status_high = 0x40062448 );
|
||||||
PROVIDE ( SPIUnlock = 0x400628b0 );
|
|
||||||
PROVIDE ( SPI_user_command_read = 0x400621b0 );
|
PROVIDE ( SPI_user_command_read = 0x400621b0 );
|
||||||
PROVIDE ( spi_w25q16 = 0x3ffae270 );
|
PROVIDE ( SPI_flashchip_data = 0x3ffae270 );
|
||||||
PROVIDE ( SPIWrite = 0x40062d50 );
|
PROVIDE ( SPIWrite = 0x40062d50 );
|
||||||
/* This is static function, but can be used, not generated by script*/
|
/* This is static function, but can be used, not generated by script*/
|
||||||
PROVIDE ( SPI_write_enable = 0x40062320 );
|
PROVIDE ( SPI_write_enable = 0x40062320 );
|
||||||
|
@ -45,8 +45,8 @@ MEMORY
|
|||||||
|
|
||||||
Start of RTC slow memory is reserved for ULP co-processor code + data, if enabled.
|
Start of RTC slow memory is reserved for ULP co-processor code + data, if enabled.
|
||||||
*/
|
*/
|
||||||
rtc_slow_seg(RW) : org = 0x50000000 + 0,
|
rtc_slow_seg(RW) : org = 0x50000000 + 32,
|
||||||
len = 0x1000 - 0
|
len = 0x1000 - 32
|
||||||
}
|
}
|
||||||
/* Heap ends at top of dram0_0_seg */
|
/* Heap ends at top of dram0_0_seg */
|
||||||
_heap_end = 0x40000000 - 0x0;
|
_heap_end = 0x40000000 - 0x0;
|
||||||
|
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.
BIN
tools/sdk/lib/libnewlib.a
Normal file
BIN
tools/sdk/lib/libnewlib.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
tools/sdk/lib/librtc.a
Normal file → Executable file
0
tools/sdk/lib/librtc.a
Normal file → Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
tools/sdk/lib/libvfs.a
Normal file
BIN
tools/sdk/lib/libvfs.a
Normal file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user