Skip to content

Commit

Permalink
Tasmota Platform 2024.04.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Apr 6, 2024
2 parents 8538efe + e5dc94e commit 730b9d1
Show file tree
Hide file tree
Showing 20 changed files with 145 additions and 161 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Espressif Systems is a privately held fabless semiconductor company. They provid
1. [Install PlatformIO](http://platformio.org)
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:

### Development build Arduino 3.0.0-alpha and IDF 5.1.2
### Development build Arduino 3.0.0-beta and IDF 5.1.3
Support for the ESP32/ESP32solo1, ESP32C2, ESP32C3, ESP32C6, ESP32S2, ESP32S3 and ESP32-H2
```
[platformio]
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.02.10/platform-espressif32.zip
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
framework = arduino
```
to use the ESP32 Solo1 Arduino framework add in your env
Expand All @@ -28,7 +28,7 @@ to use the ESP32 Solo1 Arduino framework add in your env
board = esp32-solo1
build_flags = -DFRAMEWORK_ARDUINO_SOLO1
```
The frameworks are here [https://github.com/tasmota/arduino-esp32/releases](https://github.com/tasmota/arduino-esp32/releases)
The released frameworks can be downloaded [here](https://github.com/tasmota/arduino-esp32/releases)

# Configuration

Expand Down
1 change: 0 additions & 1 deletion boards/4d_systems_esp32s3_gen4_r8n16.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld",
"memory_type": "qio_opi",
"partitions": "default_16MB.csv"
},
Expand Down
3 changes: 0 additions & 3 deletions boards/airm2m_core_esp32c3.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"build": {
"arduino":{
"ldscript": "esp32c3_out.ld"
},
"core": "esp32",
"f_cpu": "160000000L",
"f_flash": "80000000L",
Expand Down
41 changes: 0 additions & 41 deletions boards/briki_abc_esp32.json

This file was deleted.

41 changes: 0 additions & 41 deletions boards/briki_mbc-wb_esp32.json

This file was deleted.

3 changes: 0 additions & 3 deletions boards/esp-wrover-kit.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"build": {
"arduino":{
"ldscript": "esp32_out.ld"
},
"core": "esp32",
"extra_flags": "-DARDUINO_ESP32_DEV",
"f_cpu": "240000000L",
Expand Down
3 changes: 0 additions & 3 deletions boards/esp32-h2-devkitm-1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"build": {
"arduino": {
"ldscript": "esp32h2_out.ld"
},
"core": "esp32",
"f_cpu": "96000000L",
"f_flash": "64000000L",
Expand Down
3 changes: 0 additions & 3 deletions boards/esp32-s2-kaluga-1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"build": {
"arduino":{
"ldscript": "esp32s2_out.ld"
},
"core": "esp32",
"f_cpu": "240000000L",
"f_flash": "80000000L",
Expand Down
3 changes: 0 additions & 3 deletions boards/esp32-s2-saola-1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"build": {
"arduino":{
"ldscript": "esp32s2_out.ld"
},
"core": "esp32",
"extra_flags": "-DARDUINO_ESP32S2_DEV",
"f_cpu": "240000000L",
Expand Down
1 change: 0 additions & 1 deletion boards/esp32-s3-devkitm-1.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"build": {
"arduino":{
"ldscript": "esp32s3_out.ld",
"partitions": "default_8MB.csv"
},
"core": "esp32",
Expand Down
6 changes: 1 addition & 5 deletions boards/esp32-solo1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"build": {
"arduino":{
"ldscript": "esp32_out.ld"
},
"core": "esp32",
"extra_flags": "-DARDUINO_ESP32_DEV -DARDUINO_USB_CDC_ON_BOOT=0 -DCORE32SOLO1",
"f_cpu": "80000000L",
Expand All @@ -21,8 +18,7 @@
"openocd_target": "esp32-solo-1.cfg"
},
"frameworks": [
"arduino",
"espidf"
"arduino"
],
"name": "Espressif Generic ESP32-solo1 4M Flash",
"upload": {
Expand Down
50 changes: 50 additions & 0 deletions boards/esp32s3_120_16_8-qio_opi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"build": {
"arduino": {
"memory_type": "qio_opi",
"partitions": "default_16MB.csv"
},
"core": "esp32",
"f_cpu": "240000000L",
"f_flash": "80000000L",
"f_boot": "120000000L",
"boot": "qio",
"flash_mode": "qio",
"extra_flags": [
"-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_MODE=1",
"-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1"
],
"hwids": [
[
"0x303A",
"0x1001"
]
],
"mcu": "esp32s3",
"variant": "esp32s3"
},
"connectivity": [
"bluetooth",
"wifi"
],
"debug": {
"openocd_target": "esp32s3.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "ESP32-S3 16MB QIO, 8MB OPI PSRAM",
"upload": {
"flash_size": "16MB",
"maximum_ram_size": 327680,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 460800
},
"url": "https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf",
"vendor": "espressif"
}
1 change: 0 additions & 1 deletion boards/esp32s3camlcd.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"build": {
"arduino":{
"ldscript": "esp32s3_out.ld",
"memory_type": "opi_opi"
},
"boot": "opi",
Expand Down
1 change: 0 additions & 1 deletion boards/m5stack-core2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"build": {
"arduino":{
"ldscript": "esp32_out.ld",
"partitions": "default_16MB.csv"
},
"core": "esp32",
Expand Down
28 changes: 21 additions & 7 deletions builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@
assert os.path.isdir(FRAMEWORK_DIR)
assert os.path.isdir(TOOLCHAIN_DIR)

# The latest IDF uses a standalone GDB package which requires at least PlatformIO 6.1.11
if (
["espidf"] == env.get("PIOFRAMEWORK")
and semantic_version.Version.coerce(__version__)
<= semantic_version.Version("6.1.10")
and "__debug" in COMMAND_LINE_TARGETS
):
print("Warning! Debugging an IDF project requires PlatformIO Core >= 6.1.11!")

# Arduino framework as a component is not compatible with ESP-IDF >=4.1
if "arduino" in env.subst("$PIOFRAMEWORK"):
ARDUINO_FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
Expand Down Expand Up @@ -421,7 +430,7 @@ def _extract_flags(config):

# Flags are sorted because CMake randomly populates build flags in code model
return {
"ASFLAGS": sorted(app_flags.get("ASM", default_flags.get("ASM"))),
"ASPPFLAGS": sorted(app_flags.get("ASM", default_flags.get("ASM"))),
"CFLAGS": sorted(app_flags.get("C", default_flags.get("C"))),
"CXXFLAGS": sorted(app_flags.get("CXX", default_flags.get("CXX"))),
}
Expand Down Expand Up @@ -639,7 +648,7 @@ def prepare_build_envs(config, default_env, debug_allowed=True):
parsed_flags = build_env.ParseFlags(build_flags)
build_env.AppendUnique(**parsed_flags)
if cg.get("language", "") == "ASM":
build_env.AppendUnique(ASFLAGS=parsed_flags.get("CCFLAGS", []))
build_env.AppendUnique(ASPPFLAGS=parsed_flags.get("CCFLAGS", []))
build_env.AppendUnique(CPPDEFINES=defines, CPPPATH=includes)
if sys_includes:
build_env.Append(CCFLAGS=[("-isystem", inc) for inc in sys_includes])
Expand Down Expand Up @@ -671,7 +680,7 @@ def compile_source_files(
src_path = os.path.join(project_src_dir, src_path)

obj_path = os.path.join("$BUILD_DIR", prepend_dir or "")
if src_path.startswith(components_dir):
if src_path.lower().startswith(components_dir.lower()):
obj_path = os.path.join(
obj_path, os.path.relpath(src_path, components_dir)
)
Expand Down Expand Up @@ -1100,17 +1109,21 @@ def _get_installed_pip_packages(python_exe_path):

return result

skip_python_packages = os.path.join(FRAMEWORK_DIR, ".pio_skip_pypackages")
if os.path.isfile(skip_python_packages):
return

deps = {
"wheel": ">=0.35.1",
# https://github.com/platformio/platformio-core/issues/4614
"urllib3": "<2",
# https://github.com/platformio/platform-espressif32/issues/635
"cryptography": "~=41.0.1" if IDF5 else ">=2.1.4,<35.0.0",
"future": ">=0.18.3",
"pyparsing": "~=3.0.9" if IDF5 else ">=2.0.3,<2.4.0",
"pyparsing": ">=3.1.0,<4" if IDF5 else ">=2.0.3,<2.4.0",
"kconfiglib": "~=14.1.0" if IDF5 else "~=13.7.1",
"idf-component-manager": "~=1.4.1" if IDF5 else "~=1.0",
"esp-idf-kconfig": "~=1.2.0"
"idf-component-manager": "~=1.5.2" if IDF5 else "~=1.0",
"esp-idf-kconfig": ">=1.4.2,<2.0.0"
}

if sys_platform.system() == "Darwin" and "arm" in sys_platform.machine().lower():
Expand Down Expand Up @@ -1157,6 +1170,7 @@ def _get_installed_pip_packages(python_exe_path):
)
)


def get_idf_venv_dir():
# The name of the IDF venv contains the IDF version to avoid possible conflicts and
# unnecessary reinstallation of Python dependencies in cases when Arduino
Expand All @@ -1167,6 +1181,7 @@ def get_idf_venv_dir():
env.subst("$PROJECT_CORE_DIR"), "penv", ".espidf-" + idf_version
)


def ensure_python_venv_available():

def _is_venv_outdated(venv_data_file):
Expand Down Expand Up @@ -1209,7 +1224,6 @@ def _create_venv(venv_dir):
pip_path
), "Error: Failed to create a proper virtual environment. Missing the `pip` binary!"


venv_dir = get_idf_venv_dir()
venv_data_file = os.path.join(venv_dir, "pio-idf-venv.json")
if not os.path.isfile(venv_data_file) or _is_venv_outdated(venv_data_file):
Expand Down
Loading

0 comments on commit 730b9d1

Please sign in to comment.