lwip: implement lwip critical session with mutex
Currently lwip critical session is based on interrupt, now replace it with mutex
See merge request !595
spi_flash: fix race condition in s_flash_op_complete access
Flash operation complete flag was cleared by the CPU initiating flash operation. If the other core was running an ISR, then IPC task could be late to enter the loop to check `s_flash_op_complete` by the time next flash operation started. This would cause a deadlock, as the IPC task would still be waiting for `s_flash_op_complete` to be set (which was already cleared by the next flash operation), while the flash operation task would be blocked waiting for IPC task to set `s_flash_op_can_start`.
If the flag is cleared on the CPU waiting on this flag, then the race condition can not happen.
See merge request !615
Fix timing adjustment needed for higher speeds of SPI master bus.
Ref https://github.com/espressif/esp-idf/issues/363 . It was found out the master SPI driver didn't exactly calculate the delay compensation needed, breaking 20 and 26MHz full-duplex mode. This fixes these use cases. We also found out 40MHz full-duplex routed over the GPIO matrix does not work because of a hardware quirk; this MR adds a check/error for that case until we find a workaround.
See merge request !547
Add WiFi static and dynamic tx buffer choice
If static tx buffer is selected, WiFi tx buffers are allocated when WiFi is initialized and released
when WiFi is de-initialized. If dynamic tx buffer is selected, WiFi tx buffer is allocated when tx
data is delivered from LWIP to WiFi and released when tx data is sent out by WiFi.
The size of each static tx buffers is fixed to about 1.6KB and the size of dynamic tx buffers is
depend on the length of the data delivered from LWIP.
If PSRAM is enabled, "STATIC" should be selected to guarantee enough WiFi tx buffers.
If PSRAM is disabled, "DYNAMIC" should be selected to improve the utilization of RAM.
See merge request !580
If static tx buffer is selected, WiFi tx buffers are allocated when WiFi is initialized and released
when WiFi is de-initialized. If dynamic tx buffer is selected, WiFi tx buffer is allocated when tx
data is delivered from LWIP to WiFi and released when tx data is sent out by WiFi.
The size of each static tx buffers is fixed to about 1.6KB and the size of dynamic tx buffers is
depend on the length of the data delivered from LWIP.
If PSRAM is enabled, "STATIC" should be selected to guarantee enough WiFi tx buffers.
If PSRAM is disabled, "DYNAMIC" should be selected to improve the utilization of RAM.
make: remove version parameter from git status porcelain option
Version parameter was added in git 2.11, while default git on macOS is
currently 2.10. According to the latest git docs, if the version
parameter is not provided, it defaults to ‘v1’, so removing it doesn’t
change the format.
See merge request !616
Fix finding location of ISR stack space for CPU1
Up to now, the CPU1 interrupts erroneously used the area *after* the ISR stack region, leading to bugs in BT Classic. This fixes that.
See merge request !618
examples: Standardise naming of files, symbols, etc. in examples
* Use "example" in all example function & variable names,
ie use i2c_example_xxx instead of i2c_xxx for example functions.
Closes#198https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation
See merge request !601
Version parameter was added in git 2.11, while default git on macOS is
currently 2.10. According to the latest git docs, if the version
parameter is not provided, it defaults to ‘v1’, so removing it doesn’t
change the format.
Windows setup improvements
* Tweak Makefile to significantly reduce startup time on Windows (also reduced on other platforms, but less obvious.)
* Revise windows setup installation script to fix various issues, use latest toolchain.
* Tweak Windows config docs
See merge request !597
Flash operation complete flag was cleared by the core initiating flash
operation. If the other core was running an ISR, then IPC task could
be late to enter the loop to check s_flash_op_complete by the time next
flash operation started. If the flag is cleared on the CPU waiting on
this flag, then the race condition can not happen.
* Use "example" in all example function & variable names,
ie use i2c_example_xxx instead of i2c_xxx for example functions.
Closes#198https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation
doc: add dev module and boards by Espressif
Overview, picture, link to schematic, ref. design, etc. for the following development module and boards:
- ESP-WROOM-32
- ESP32 Core Board V2 / ESP32 DevKitC
- ESP32 Demo Board V2
- ESP32 WROVER KIT V1 / ESP32 DevKitJ V1
- ESP32 WROVER KIT V2
See merge request !560
ULP coprocessor toolchain integration
- build system support for ULP coprocessor toolchain
- documentation for ULP coprocessor instruction set
- documentation for ULP code execution flow, loading programs, exchanging data
- example: counting pulses using ULP
See merge request !394
Reset WIFI mac when wifi start and update wifi lib
1. reset wifi mac when wifi start
2. roll back rx hung workaround for beacon timeout
3. fix amsdu ap interface wrong issue
4. fix amsdu header parse error
5. fix amsdu flag wrong issue
6. PHY: V350, fix BT rssi bug
7. RTC: V225, fix bt will be not work when wifi is reset
See merge request !606
SPI flash operations lock for shorter periods
Based on bug report here:
https://esp32.com/viewtopic.php?f=13&t=1489&p=6816#p6773
Long SPI flash erase (and possibly write/read) cycles block all tasks on both CPUs for an extended period, and can lead to WiFi dissassociation (and general priority inversion.)
This MR inserts preemption breaks into large operations (all erases, writes every 8KB, reads every 16KB).
Overhead of a single spi_flash_guart_start()/spi_flash_guard_end() cycle measured at approx 67us (assuming no preemption.)
See merge request !600
CI support for testing & deploying release tags & branches
For CI testing & deployment of release branches:
* Test release tags as well as branches
* Swap gitlab submodule URLs to github when testing release tags or branches.
These changes are already pushed to the release/v2.0 branch.
See merge request !604
bugfix: ESP32 Core Dump reported issues
This MR fixes the following issues:
1. fixed path to esptool when there is no compiled python module for it
2. GDB inernal failure handling was added
See merge request !599
ci: allow passing Hub account or registry name from the environment
This change allows to set registry name or Hub account name using CI Variables. Needs all runners to be updated to gitlab-ci-runner v1.8+ in order for the auth feature to work.
See merge request !605
Error handling in NVS initialization
Previously nvs_flash_init worked under an assumption that there should always be at least one free page available. This is true during normal operation, but in some cases (such as when changing application partition table from a non-OTA to an OTA one), NVS partition may get truncated, which will cause empty pages to be lost.
This MR adds error checks for this condition, and updates code which calls `nvs_flash_init` to check for the return code.
For most examples, a simple `ESP_ERROR_CHECK` is added around `nvs_flash_init`. For NVS examples and the OTA example, more robust error handling is added.
This change also removes nvs_flash_init calls from examples which don't use NVS.
See merge request !582
idf_monitor: Small fixes (baud rate, EOL, /dev/tty.X on macOS, Ctrl-T on failure)
* "make monitor" now passed the configured baud rate.
Closes#436https://github.com/espressif/esp-idf/issues/436
* Pass toolchain prefix from sdkconfig into monitor tool
* Allow setting EOL in idf_monitor.py, use CRLF by default
* Detect if /dev/tty.X is used on macOS, warn and replace with /dev/cu.X
* If a build fails or gdb exits, ignore Ctrl-T (allowing Ctrl-T Ctrl-A/F to be same key sequence everywhere)
* Add a note about winpty on Windows.
Ref 02fdf8271d (commitcomment-21369196)
* Fix problems with Console.cancel() not existing in older pyserial
* Print more user-friendly symbols for "start of iram" and "start of flash"
See merge request !594