Skip to content

Commit

Permalink
Tasmota changes
Browse files Browse the repository at this point in the history
* IPv6 support
* remove WPA2 Enterprise
* fix include with newer IDF5.1
* rm `WiFiClientSecure`
* "--dont-append-digest"
* add C2
* rm BluetoothSerial
* safeboot in Tasmota project
* Apply IPAddress fixes from ESP8266
esp8266/Arduino#8818
* [ESP32-C2] Fix SPI bus number & reported flash speed/size

---------

Co-authored-by: Stephan Hadinger <stephan.hadinger@gmail.com>
Co-authored-by: TD-er <gijs.noorlander@gmail.com>
  • Loading branch information
3 people authored Nov 11, 2023
1 parent fbfcb80 commit debf971
Show file tree
Hide file tree
Showing 37 changed files with 1,005 additions and 530 deletions.
68 changes: 2 additions & 66 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,8 @@ set(CORE_SRCS
set(LIBRARY_SRCS
libraries/ArduinoOTA/src/ArduinoOTA.cpp
libraries/AsyncUDP/src/AsyncUDP.cpp
libraries/BluetoothSerial/src/BluetoothSerial.cpp
libraries/BluetoothSerial/src/BTAddress.cpp
libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp
libraries/BluetoothSerial/src/BTScanResultsSet.cpp
libraries/DNSServer/src/DNSServer.cpp
libraries/EEPROM/src/EEPROM.cpp
libraries/ESP_I2S/src/ESP_I2S.cpp
libraries/ESP_SR/src/ESP_SR.cpp
libraries/ESP_SR/src/esp32-hal-sr.c
libraries/ESPmDNS/src/ESPmDNS.cpp
libraries/Ethernet/src/ETH.cpp
libraries/FFat/src/FFat.cpp
Expand All @@ -93,23 +86,12 @@ set(LIBRARY_SRCS
libraries/HTTPClient/src/HTTPClient.cpp
libraries/HTTPUpdate/src/HTTPUpdate.cpp
libraries/LittleFS/src/LittleFS.cpp
libraries/Insights/src/Insights.cpp
libraries/NetBIOS/src/NetBIOS.cpp
libraries/Preferences/src/Preferences.cpp
libraries/RainMaker/src/RMaker.cpp
libraries/RainMaker/src/RMakerNode.cpp
libraries/RainMaker/src/RMakerParam.cpp
libraries/RainMaker/src/RMakerDevice.cpp
libraries/RainMaker/src/RMakerType.cpp
libraries/RainMaker/src/RMakerQR.cpp
libraries/RainMaker/src/RMakerUtils.cpp
libraries/RainMaker/src/AppInsights.cpp
libraries/SD_MMC/src/SD_MMC.cpp
libraries/SD/src/SD.cpp
libraries/SD/src/sd_diskio.cpp
libraries/SD/src/sd_diskio_crc.c
libraries/SimpleBLE/src/SimpleBLE.cpp
libraries/SPIFFS/src/SPIFFS.cpp
libraries/SPI/src/SPI.cpp
libraries/Ticker/src/Ticker.cpp
libraries/Update/src/Updater.cpp
Expand All @@ -125,8 +107,6 @@ set(LIBRARY_SRCS
libraries/WebServer/src/WebServer.cpp
libraries/WebServer/src/Parsing.cpp
libraries/WebServer/src/detail/mimetable.cpp
libraries/WiFiClientSecure/src/ssl_client.cpp
libraries/WiFiClientSecure/src/WiFiClientSecure.cpp
libraries/WiFi/src/WiFiAP.cpp
libraries/WiFi/src/WiFiClient.cpp
libraries/WiFi/src/WiFi.cpp
Expand All @@ -136,84 +116,40 @@ set(LIBRARY_SRCS
libraries/WiFi/src/WiFiServer.cpp
libraries/WiFi/src/WiFiSTA.cpp
libraries/WiFi/src/WiFiUdp.cpp
libraries/WiFiProv/src/WiFiProv.cpp
libraries/Wire/src/Wire.cpp
)

set(BLE_SRCS
libraries/BLE/src/BLE2902.cpp
libraries/BLE/src/BLE2904.cpp
libraries/BLE/src/BLEAddress.cpp
libraries/BLE/src/BLEAdvertisedDevice.cpp
libraries/BLE/src/BLEAdvertising.cpp
libraries/BLE/src/BLEBeacon.cpp
libraries/BLE/src/BLECharacteristic.cpp
libraries/BLE/src/BLECharacteristicMap.cpp
libraries/BLE/src/BLEClient.cpp
libraries/BLE/src/BLEDescriptor.cpp
libraries/BLE/src/BLEDescriptorMap.cpp
libraries/BLE/src/BLEDevice.cpp
libraries/BLE/src/BLEEddystoneTLM.cpp
libraries/BLE/src/BLEEddystoneURL.cpp
libraries/BLE/src/BLEExceptions.cpp
libraries/BLE/src/BLEHIDDevice.cpp
libraries/BLE/src/BLERemoteCharacteristic.cpp
libraries/BLE/src/BLERemoteDescriptor.cpp
libraries/BLE/src/BLERemoteService.cpp
libraries/BLE/src/BLEScan.cpp
libraries/BLE/src/BLESecurity.cpp
libraries/BLE/src/BLEServer.cpp
libraries/BLE/src/BLEService.cpp
libraries/BLE/src/BLEServiceMap.cpp
libraries/BLE/src/BLEUtils.cpp
libraries/BLE/src/BLEUUID.cpp
libraries/BLE/src/BLEValue.cpp
libraries/BLE/src/FreeRTOS.cpp
libraries/BLE/src/GeneralUtils.cpp
)

set(includedirs
variants/${CONFIG_ARDUINO_VARIANT}/
cores/esp32/
libraries/ArduinoOTA/src
libraries/AsyncUDP/src
libraries/BLE/src
libraries/BluetoothSerial/src
libraries/DNSServer/src
libraries/EEPROM/src
libraries/ESP_I2S/src
libraries/ESP_SR/src
libraries/ESP32/src
libraries/ESPmDNS/src
libraries/Ethernet/src
libraries/FFat/src
libraries/FS/src
libraries/HTTPClient/src
libraries/HTTPUpdate/src
libraries/LittleFS/src
libraries/Insights/src
libraries/NetBIOS/src
libraries/Preferences/src
libraries/RainMaker/src
libraries/SD_MMC/src
libraries/SD/src
libraries/SimpleBLE/src
libraries/SPIFFS/src
libraries/SPI/src
libraries/Ticker/src
libraries/Update/src
libraries/USB/src
libraries/WebServer/src
libraries/WiFiClientSecure/src
libraries/WiFi/src
libraries/WiFiProv/src
libraries/Wire/src
)

set(srcs ${CORE_SRCS} ${LIBRARY_SRCS} ${BLE_SRCS})
set(srcs ${CORE_SRCS} ${LIBRARY_SRCS})
set(priv_includes cores/esp32/libb64)
set(requires spi_flash esp_partition mbedtls wifi_provisioning wpa_supplicant esp_adc esp_eth http_parser)
set(priv_requires fatfs nvs_flash app_update spiffs bootloader_support bt esp_hid)
set(priv_requires fatfs nvs_flash app_update bootloader_support bt esp_hid)

idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires})

Expand Down
60 changes: 5 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
# Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2
# Tasmota Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C6 and ESP32-H2

![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![Documentation Status](https://readthedocs.com/projects/espressif-arduino-esp32/badge/?version=latest)](https://docs.espressif.com/projects/arduino-esp32/en/latest/?badge=latest)
[![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml?link=http://https://github.com/espressif/arduino-esp32/blob/master/LIBRARIES_TEST.md)

### Need help or have a question? Join the chat at [Gitter](https://gitter.im/espressif/arduino-esp32) or [open a new Discussion](https://github.com/espressif/arduino-esp32/discussions)

## Contents

- [Development Status](#development-status)
- [Development Planning](#development-planning)
- [Documentation](#documentation)
- [Supported Chips](#supported-chips)
- [Decoding exceptions](#decoding-exceptions)
- [Issue/Bug report template](#issuebug-report-template)
- [Contributing](#contributing)

### Development Status

Latest Stable Release [![Release Version](https://img.shields.io/github/release/espressif/arduino-esp32.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/latest/) [![Release Date](https://img.shields.io/github/release-date/espressif/arduino-esp32.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/latest/) [![Downloads](https://img.shields.io/github/downloads/espressif/arduino-esp32/latest/total.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/latest/)

Latest Development Release [![Release Version](https://img.shields.io/github/release/espressif/arduino-esp32/all.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/) [![Release Date](https://img.shields.io/github/release-date-pre/espressif/arduino-esp32.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/) [![Downloads](https://img.shields.io/github/downloads-pre/espressif/arduino-esp32/latest/total.svg?style=plastic)](https://github.com/espressif/arduino-esp32/releases/)

### Development Planning

Our Development is fully tracked on this public **[Roadmap 🎉](https://github.com/orgs/espressif/projects/3)**

For even more information you can join our **[Monthly Community Meetings 🔔](https://github.com/espressif/arduino-esp32/discussions/categories/monthly-community-meetings).**
### [![GitHub Releases](https://img.shields.io/github/downloads/tasmota/arduino-esp32/total?label=downloads)](https://github.com/tasmota/arduino-esp32/releases/latest)

### Documentation

Expand All @@ -37,22 +12,16 @@ You can use the [Arduino-ESP32 Online Documentation](https://docs.espressif.com/

---

* [Getting Started](https://docs.espressif.com/projects/arduino-esp32/en/latest/getting_started.html)
* [Installing (Windows, Linux and macOS)](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html)
* [Libraries](https://docs.espressif.com/projects/arduino-esp32/en/latest/libraries.html)
* [Arduino as an ESP-IDF component](https://docs.espressif.com/projects/arduino-esp32/en/latest/esp-idf_component.html)
* [FAQ](https://docs.espressif.com/projects/arduino-esp32/en/latest/faq.html)
* [Troubleshooting](https://docs.espressif.com/projects/arduino-esp32/en/latest/troubleshooting.html)

### Supported Chips

Here are the ESP32 series supported by the Arduino-ESP32 project:
Here are the ESP32 series supported by the Tasmota Arduino-ESP32 project:

| **SoC** | **Stable** | **Development** | **Datasheet** |
|----------|:----------:|:---------------:|:-------------------------------------------------------------------------------------------------:|
| ESP32 | Yes | Yes | [ESP32](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf) |
| ESP32-S2 | Yes | Yes | [ESP32-S2](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf) |
| ESP32-C3 | Yes | Yes | [ESP32-C3](https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf) |
| ESP32-C2 | No | Yes | [ESP32-C2](https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_en.pdf) |
| ESP32-S2 | Yes | Yes | [ESP32-S2](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf) |
| ESP32-S3 | Yes | Yes | [ESP32-S3](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf) |
| ESP32-C6 | No | Yes | [ESP32-C6](https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf) |
| ESP32-H2 | No | Yes | [ESP32-H2](https://www.espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf) |
Expand All @@ -62,22 +31,3 @@ For more details visit the [supported chips](https://docs.espressif.com/projects
### Decoding exceptions

You can use [EspExceptionDecoder](https://github.com/me-no-dev/EspExceptionDecoder) to get meaningful call trace.

### Issue/Bug report template

Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as [Type: For reference](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue+label%3A%22Type%3A+For+reference%22+).

Finally, if you are sure no one else had the issue, follow the **Issue template** or **Feature request template** while reporting any [new Issue](https://github.com/espressif/arduino-esp32/issues/new/choose).

### External libraries compilation test

We have set-up CI testing for external libraries for ESP32 Arduino core. You can check test results in the file [LIBRARIES_TEST](https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md).
For more information and how to add your library to the test see [external library testing](https://docs.espressif.com/projects/arduino-esp32/en/latest/external_libraries_test.html) in the documentation.

### Contributing

We welcome contributions to the Arduino ESP32 project!

See [contributing](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html) in the documentation for more information on how to contribute to the project.

> We would like to have this repository in a polite and friendly atmosphere, so please be kind and respectful to others. For more details, look at [Code of Conduct](https://github.com/espressif/arduino-esp32/blob/master/CODE_OF_CONDUCT.md).
153 changes: 153 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,159 @@ esp32s3.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api_zczr -lesp_zb_cli_co

##############################################################

esp32c2.name=ESP32C2 Dev Module

esp32c2.bootloader.tool=esptool_py
esp32c2.bootloader.tool.default=esptool_py

esp32c2.upload.tool=esptool_py
esp32c2.upload.tool.default=esptool_py
esp32c2.upload.tool.network=esp_ota

esp32c2.upload.maximum_size=1310720
esp32c2.upload.maximum_data_size=262144
esp32c2.upload.flags=
esp32c2.upload.extra_flags=
esp32c2.upload.use_1200bps_touch=false
esp32c2.upload.wait_for_upload_port=false

esp32c2.serial.disableDTR=false
esp32c2.serial.disableRTS=false

esp32c2.build.tarch=riscv32
esp32c2.build.target=esp
esp32c2.build.mcu=esp32c2
esp32c2.build.core=esp32
esp32c2.build.variant=esp32c2
esp32c2.build.board=ESP32C2_DEV
esp32c2.build.bootloader_addr=0x0

esp32c2.build.cdc_on_boot=0
esp32c2.build.f_cpu=120000000L
esp32c2.build.flash_size=4MB
esp32c2.build.flash_freq=60m
esp32c2.build.flash_mode=qio
esp32c2.build.boot=qio
esp32c2.build.partitions=default
esp32c2.build.defines=

## IDE 2.0 Seems to not update the value
esp32c2.menu.JTAGAdapter.default=Disabled
esp32c2.menu.JTAGAdapter.default.build.copy_jtag_files=0
esp32c2.menu.JTAGAdapter.external=FTDI Adapter
esp32c2.menu.JTAGAdapter.external.build.openocdscript=esp32c2-ftdi.cfg
esp32c2.menu.JTAGAdapter.external.build.copy_jtag_files=1
esp32c2.menu.JTAGAdapter.bridge=ESP USB Bridge
esp32c2.menu.JTAGAdapter.bridge.build.openocdscript=esp32c2-bridge.cfg
esp32c2.menu.JTAGAdapter.bridge.build.copy_jtag_files=1

esp32c2.menu.CDCOnBoot.default=Disabled
esp32c2.menu.CDCOnBoot.default.build.cdc_on_boot=0
esp32c2.menu.CDCOnBoot.cdc=Enabled
esp32c2.menu.CDCOnBoot.cdc.build.cdc_on_boot=1

esp32c2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
esp32c2.menu.PartitionScheme.default.build.partitions=default
esp32c2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
esp32c2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
esp32c2.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS)
esp32c2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
esp32c2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
esp32c2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
esp32c2.menu.PartitionScheme.minimal.build.partitions=minimal
esp32c2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
esp32c2.menu.PartitionScheme.no_ota.build.partitions=no_ota
esp32c2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
esp32c2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
esp32c2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
esp32c2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
esp32c2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
esp32c2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
esp32c2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
esp32c2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
esp32c2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
esp32c2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
esp32c2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
esp32c2.menu.PartitionScheme.huge_app.build.partitions=huge_app
esp32c2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
esp32c2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
esp32c2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32c2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
esp32c2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FATFS)
esp32c2.menu.PartitionScheme.fatflash.build.partitions=ffat
esp32c2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
esp32c2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9.9MB FATFS)
esp32c2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
esp32c2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
esp32c2.menu.PartitionScheme.rainmaker=RainMaker
esp32c2.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
esp32c2.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728

esp32c2.menu.CPUFreq.120=120MHz
esp32c2.menu.CPUFreq.120.build.f_cpu=120000000L
esp32c2.menu.CPUFreq.80=80MHz
esp32c2.menu.CPUFreq.80.build.f_cpu=80000000L

esp32c2.menu.FlashMode.qio=QIO
esp32c2.menu.FlashMode.qio.build.flash_mode=dio
esp32c2.menu.FlashMode.qio.build.boot=qio
esp32c2.menu.FlashMode.dio=DIO
esp32c2.menu.FlashMode.dio.build.flash_mode=dio
esp32c2.menu.FlashMode.dio.build.boot=dio
esp32c2.menu.FlashMode.qout=QOUT
esp32c2.menu.FlashMode.qout.build.flash_mode=dout
esp32c2.menu.FlashMode.qout.build.boot=qout
esp32c2.menu.FlashMode.dout=DOUT
esp32c2.menu.FlashMode.dout.build.flash_mode=dout
esp32c2.menu.FlashMode.dout.build.boot=dout

esp32c2.menu.FlashFreq.60=60MHz
esp32c2.menu.FlashFreq.60.build.flash_freq=60m
esp32c2.menu.FlashFreq.30=30MHz
esp32c2.menu.FlashFreq.30.build.flash_freq=30m

esp32c2.menu.FlashSize.4M=4MB (32Mb)
esp32c2.menu.FlashSize.4M.build.flash_size=4MB
esp32c2.menu.FlashSize.2M=2MB (16Mb)
esp32c2.menu.FlashSize.2M.build.flash_size=2MB
esp32c2.menu.FlashSize.2M.build.partitions=minimal


esp32c2.menu.UploadSpeed.921600=921600
esp32c2.menu.UploadSpeed.921600.upload.speed=921600
esp32c2.menu.UploadSpeed.115200=115200
esp32c2.menu.UploadSpeed.115200.upload.speed=115200
esp32c2.menu.UploadSpeed.256000.windows=256000
esp32c2.menu.UploadSpeed.256000.upload.speed=256000
esp32c2.menu.UploadSpeed.230400.windows.upload.speed=256000
esp32c2.menu.UploadSpeed.230400=230400
esp32c2.menu.UploadSpeed.230400.upload.speed=230400
esp32c2.menu.UploadSpeed.460800.linux=460800
esp32c2.menu.UploadSpeed.460800.macosx=460800
esp32c2.menu.UploadSpeed.460800.upload.speed=460800
esp32c2.menu.UploadSpeed.512000.windows=512000
esp32c2.menu.UploadSpeed.512000.upload.speed=512000

esp32c2.menu.DebugLevel.none=None
esp32c2.menu.DebugLevel.none.build.code_debug=0
esp32c2.menu.DebugLevel.error=Error
esp32c2.menu.DebugLevel.error.build.code_debug=1
esp32c2.menu.DebugLevel.warn=Warn
esp32c2.menu.DebugLevel.warn.build.code_debug=2
esp32c2.menu.DebugLevel.info=Info
esp32c2.menu.DebugLevel.info.build.code_debug=3
esp32c2.menu.DebugLevel.debug=Debug
esp32c2.menu.DebugLevel.debug.build.code_debug=4
esp32c2.menu.DebugLevel.verbose=Verbose
esp32c2.menu.DebugLevel.verbose.build.code_debug=5

esp32c2.menu.EraseFlash.none=Disabled
esp32c2.menu.EraseFlash.none.upload.erase_cmd=
esp32c2.menu.EraseFlash.all=Enabled
esp32c2.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################

esp32c3.name=ESP32C3 Dev Module
esp32c3.vid.0=0x303a
esp32c3.pid.0=0x1001
Expand Down
Loading

0 comments on commit debf971

Please sign in to comment.