Commit Graph

65 Commits

Author SHA1 Message Date
Jesse Hills 6476357596 Expand the platformio dep installer to also install platforms and tools (#4716) 2023-04-27 12:26:06 +12:00
Keith Burzinski c0ad5d1d16 Initial attempt at supporting ESP-IDF 5.0.0 (#4364)
* requirements: add pyparsing >= 3.0

ESP-IDF >= 5.0 requires pyparsing's rest_of_file, which was introduced
in version 3.0.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* esp32: fix build with ESP-IDF >= 5

We need to include esp_timer.h to be able to use esp_timer_get_time().
This header existed in ESP-IDF < 5 so we don't need if guards.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* ota: fix build with ESP-IDF >= 5

As of version 5, esp_task_wdt_init() takes a struct as argument. We also
need to include spi_flash_mmap.h.

[split unrelated change into separate commits, maintain ESP-IDF < 5
compat, use esp_task_wdt_reconfigure, add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* core: fix build with ESP-IDF >= 5

These header files already existed in ESP-IDF < 5 so skip if guards.

[add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* wifi: fix build with ESP-IDF >= 5

ESP-IDF 4.1 introduced the esp-netif API as successor to the tcp_adapter
API. The tcp_adapter API was removed in ESP-IDF 5.0.0. Part of the wifi
component was already migrated to the new API. Migrate the leftover uses
of the old API to the new API to fix build on ESP-IDF >= 5.

The version of ESP-IDF currently in use (4.4.4) supports the new API, so
we don't need any if guards to maintain backwards compatibility.

Also replace xQueueHandle, which is a pre FreeRTOS v8.0.0 data type,
with QueueHandle_t, so we don't need to enable backward compatibility
(CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY).

This reverts part of commit d42f35de5d to wifi_component_esp_idf.cpp,
as the esp-netif API handles that internally.

[replace pre FreeRTOS v8.0.0 data type, add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* mdns: fix build with ESP-IDF >= 5

In ESP-IDF 5.0.0, the mdns component was removed and moved to another
repository. Since the mdns component in esphome is always built, we
need to add the mdns component from the esp-protocols repository. This
component depends on ESP-IDF >= 5.0, so we need to add a version guard.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* docker: install python3-venv

As of version 6.0.1, platform-espressif32 requires python3-venv.
Switching between esp-idf 4.4.4 and 5.0 causes problems with esp-idf
python dependencies installed by PlatformIO. They've solved this by
using venv. Install python3-venv so that platform-espressif32 6.0.1 and
later can be used, and we don't need to wipe the dependencies manually
when switching esp-idf versions.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

---------

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-04-20 03:54:06 +00:00
Jesse Hills 0f7e34e7ec Bump arduino platform version to 5.3.0 (#4713)
* Bump arduino platform version to 5.3.0

* Update root platformio.ini
2023-04-20 00:44:49 +00:00
Jörg Thalheim 421ebcc8b2 use PRIx macros for printing u32/i32 ints (#4671)
This fix compilation issues with the latest esp-idf.
2023-04-10 22:20:02 +00:00
Oxan van Leeuwen 14e38f0469 Upgrade clang-format to v13 (#4535)
* Upgrade clang-format to v13

* Apply clang-format-13 formatting changes

* Format

* Format bme_680

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-20 03:38:41 +00:00
J. Nick Koston 600f4be2c4 Bump esp-idf to 4.4.4 (#4528)
There are some nice BLE fixes and this uses about ~5000-8000 bytes
less RAM

https://github.com/espressif/esp-idf/releases/tag/v4.4.4
2023-03-08 18:25:25 +00:00
Jesse Hills b8ca40170e Remove idf components before checking if any in config (#4506)
* Remove idf components before checking if any in config

* Fix bug with no refresh time specified
2023-03-05 20:17:32 +00:00
Jesse Hills 6ec18fc630 Update esp32 esp-idf dev and latest version numbers (#4479) 2023-02-26 18:25:22 +00:00
J. Nick Koston 6704b2cedf Bump esp-idf to 4.4.3 via platformio/espressif32 @ 5.3.0 (#4254)
* Bump esp-idf to 3.4.3 via platformio/espressif32 @ 5.3.0

The new version appears to improve the stability of
BLE + WiFi

* bump recommended version as well
2023-02-23 02:08:06 +00:00
Jesse Hills 23f47d0ad2 Initial stab at importing idf components (#4000)
* Initial stab at importing idf components

* Handle repo with multiple components
Allow components directly from yaml

* Actually use the refresh config var

* Update esphome/components/esp32/__init__.py
2023-02-23 01:22:39 +00:00
Expaso 7a2d7fdd19 Fixed PlatformIO Build on DEV (#4422)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-13 15:43:52 +13:00
Jesse Hills 1b66fa5004 Remove unneeded validation for esp32 gpio pins (#4394) 2023-02-07 12:43:30 +13:00
Maurice Makaay c1f09684e6 Handle deprecated sdkconfig option (#4204)
Co-authored-by: Maurice Makaay <maurice@h2b.nl>
fixes https://github.com/mmakaay/esphome-xiaomi_bslamp2/issues/104
2022-12-22 19:27:47 +13:00
Jesse Hills 8db3b59e0f Fix gpio pin mode for ISR pins (#4216) 2022-12-21 14:03:00 +13:00
Jesse Hills 0d50caa179 Fix ESP32 GPIO when using INPUT PULLUP mode (#4213) 2022-12-20 23:09:33 +13:00
J. Nick Koston c47dc09d34 Speed up bluetooth proxy connections when using esp-idf (#4171) 2022-12-13 13:57:12 +13:00
Jesse Hills 6ad9baa870 Add API for dashboard to get boards list (#4154) 2022-12-07 16:07:51 +13:00
Jesse Hills f843925301 ESP32 IDF: Override toolchain-esp32ulp with espressifs own published version (#4155) 2022-12-07 16:01:26 +13:00
Jesse Hills dfcccda69e Fix board pin alias lookup (#4147) 2022-12-05 19:46:00 +13:00
Jesse Hills d067c8f80b Dont set esp32 pin drive strength unless pin is set for output (#4075) 2022-11-23 20:39:19 +13:00
Jens-Christian Skibakk 8975b4b3f6 Boards: Adafruit QT Py ESP32 Pico/C3/S2 (#4064) 2022-11-23 12:54:40 +13:00
Jesse Hills 91925b1826 Update ESP-IDF and platform version (#3565)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2022-11-23 09:54:55 +13:00
uPesy Electronics 2b032e8606 Add pin aliases for upesy boards (#3794)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-21 19:03:59 +13:00
Yuval Brik 5e1b724697 Add Lolin S2 Mini board (#3264)
fixes https://github.com/esphome/feature-requests/issues/1626
2022-11-21 19:03:21 +13:00
Jesse Hills e6db61c2f0 Update esp32 boards list (#4056) 2022-11-21 14:15:32 +13:00
Jesse Hills c2e198311c Update esp32 arduino and platform versions (#3564) 2022-11-21 11:49:30 +13:00
Jens-Christian Skibakk 291deb12ad Skip validation of defined pins (#3999) 2022-11-08 19:06:45 +13:00
anatoly-savchenkov 9a5f865eea Add Factory Reset button and switch (#3724)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-09-12 10:23:46 +12:00
Borys Pierov 8546ae56da Allow GPIO20 for ESP32 (#3680) 2022-08-04 07:30:19 +12:00
Javier Peletier f33d829ce9 FIX: NVS preferences being written even if unchanged (#3647) 2022-07-25 10:10:37 +12:00
Zimmermann Zsolt 37b6d442bd Correcting ESP32 flash save/load key calculation algorithm (#3416)
Co-authored-by: Otto Winter <otto@otto-winter.com>
Co-authored-by: Dr. Zimmermann Zsolt <cina@storage1.cina.hu>
2022-06-21 17:17:51 +12:00
Mateus Demboski 01b3815f27 Map LOLIN C3 mini board pins (#3587) 2022-06-21 11:33:20 +12:00
Martin a8ceeaa7b0 esp32: fix NVS (#3497) 2022-05-23 20:56:26 +12:00
Martin 609a2ca592 ESP32: Only save to NVS if data was changed (#3479) 2022-05-17 10:59:36 +12:00
code-review-doctor 2bff9937b7 Fix issue probably-meant-fstring found at https://codereview.doctor (#3415) 2022-04-27 07:43:35 +12:00
Martin Weinelt 6919930aaa Respect ESPHOME_USE_SUBPROCESS in esp32 post_build script (#3246) 2022-02-21 14:05:13 +13:00
Otto Winter debcaf6fb7 Add ESP32C3 and ESP32S2 support to dashboard (#3152)
* Add ESP32C3 and ESP32S2 support to dashboard

* Format

* Fix tests
2022-02-19 15:47:50 +01:00
Oxan van Leeuwen 125c693e3f Add ESP32 variant config validator function (#3088)
* Add esp32_variant config validator function

* Drop unused is_esp32c3 function

Co-authored-by: Otto Winter <otto@otto-winter.com>
2022-02-19 11:41:34 +01:00
Otto Winter 72e716cdf1 Make generating combined binary output verbose (#3127) 2022-02-11 21:06:00 +13:00
Otto Winter 4de642ff28 Bump esp-idf framework version from 4.3.0 to 4.3.2 (#3120) 2022-01-31 07:59:56 +01:00
Oxan van Leeuwen cdda648360 Generate ARDUINO_VERSION_CODE in Python code (#3101)
Co-authored-by: Otto winter <otto@otto-winter.com>
2022-01-24 10:34:34 +01:00
Oxan van Leeuwen f44fca0a4b Rename post_build scripts to fix codeowners script (#3057) 2022-01-17 11:15:11 +13:00
Jesse Hills ece71a0228 Run post scripts for factory binaries for flashing (#3003)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2022-01-11 15:24:26 +13:00
arunderwood 07ff3a853f Add pin aliases for featheresp32-s2 (#2970) 2021-12-31 20:11:28 +13:00
Martin 4bb58b2de9 Add gpio 12 to strapping pin list (#2902) 2021-12-13 11:03:08 +13:00
Oxan van Leeuwen ffc112c9d0 Don't disable idle task WDT when it's not enabled (#2856) 2021-12-06 20:01:14 +13:00
Oxan van Leeuwen 54106179a1 Set ESP32 watchdog to loop task (#2846) 2021-12-02 09:05:42 +13:00
Maurice Makaay 671d68bc2c Add missing nvs_flash_init() to ESP32 preferences code (#2805)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-11-26 21:25:58 +01:00
Jesse Hills 5ff7c8418c Implement Improv via Serial component (#2423)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-11-11 08:55:45 +13:00
Carlos Garcia Saura 875b803483 Remove "delay_microseconds_accurate()" and improve systemwide delayMicroseconds() (#2497) 2021-11-10 16:22:00 +13:00