Skip to content

Commit

Permalink
Merge pull request #111 from Jason2866/Arduino/IDF5
Browse files Browse the repository at this point in the history
rm SPIFFS support
  • Loading branch information
Jason2866 authored Jan 19, 2024
2 parents 14bb291 + db63f4e commit c4b6ab7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 31 deletions.
5 changes: 1 addition & 4 deletions builder/frameworks/espidf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import sys
import shutil
import os
import pkg_resources
import platform as sys_platform

import click
Expand Down Expand Up @@ -1149,9 +1148,7 @@ def _get_installed_pip_packages(python_exe_path):

# A special "esp-windows-curses" python package is required on Windows
# for Menuconfig on IDF <5
if not IDF5 and "esp-windows-curses" not in {
pkg.key for pkg in pkg_resources.working_set
}:
if not IDF5 and "esp-windows-curses" not in installed_packages:
env.Execute(
env.VerboseAction(
'"%s" -m pip install "file://%s/tools/kconfig_new/esp-windows-curses"'
Expand Down
23 changes: 4 additions & 19 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def __fetch_fs_size(target, source, env):
board = env.BoardConfig()
mcu = board.get("build.mcu", "esp32")
toolchain_arch = "xtensa-%s" % mcu
filesystem = board.get("build.filesystem", "spiffs")
filesystem = board.get("build.filesystem", "littlefs")
if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32h2"):
toolchain_arch = "riscv32-esp"

Expand Down Expand Up @@ -256,20 +256,8 @@ def __fetch_fs_size(target, source, env):
],
ERASECMD='"$PYTHONEXE" "$OBJCOPY" $ERASEFLAGS erase_flash',

# mkspiffs package contains two different binaries for IDF and Arduino
MKFSTOOL="mk%s" % filesystem
+ (
(
"_${PIOPLATFORM}_"
+ (
"espidf"
if "espidf" in env.subst("$PIOFRAMEWORK")
else "${PIOFRAMEWORK}"
)
)
if filesystem == "spiffs"
else ""
),
MKFSTOOL="mk%s" % filesystem,

# Legacy `ESP32_SPIFFS_IMAGE_NAME` is used as the second fallback value for
# backward compatibility
ESP32_FS_IMAGE_NAME=env.get(
Expand Down Expand Up @@ -310,7 +298,7 @@ def __fetch_fs_size(target, source, env):
"-b",
"$FS_BLOCK",
]
if filesystem in ("spiffs", "littlefs")
if filesystem in ("littlefs")
else []
)
+ ["$TARGET"]
Expand Down Expand Up @@ -363,9 +351,6 @@ def __fetch_fs_size(target, source, env):
env.VerboseAction(
lambda source, target, env: _update_max_upload_size(env),
"Retrieving maximum program size $SOURCES"))
# remove after PIO Core 3.6 release
elif set(["checkprogsize", "upload"]) & set(COMMAND_LINE_TARGETS):
_update_max_upload_size(env)

#
# Target: Print binary size
Expand Down
6 changes: 0 additions & 6 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@
"owner": "platformio",
"version": "~2.1100.0"
},
"tool-mkspiffs": {
"type": "uploader",
"optional": true,
"owner": "platformio",
"version": "~2.230.0"
},
"tool-mklittlefs": {
"type": "uploader",
"owner": "tasmota",
Expand Down
2 changes: 0 additions & 2 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ def configure_default_packages(self, variables, targets):
self.packages["tool-mklittlefs"]["optional"] = False
elif filesystem == "fatfs":
self.packages["tool-mkfatfs"]["optional"] = False
else:
self.packages["tool-mkspiffs"]["optional"] = False
if variables.get("upload_protocol"):
self.packages["tool-openocd-esp32"]["optional"] = False
if os.path.isdir("ulp"):
Expand Down

0 comments on commit c4b6ab7

Please sign in to comment.