Skip to content

Commit 494b6c0

Browse files
committed
Fix platform for windows
1 parent 4979251 commit 494b6c0

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

builder/frameworks/esp8266-rtos-sdk.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@
7070
)
7171
if not os.path.isfile(SDKCONFIG_PATH):
7272
SDKCONFIG_PATH = os.path.join(PROJECT_DIR, "sdkconfig")
73-
73+
74+
SDKCONFIG_PATH = SDKCONFIG_PATH.replace("\\","/")
75+
7476
def set_elftobin():
7577
env.Append(
7678
# copy CCFLAGS to ASFLAGS (-x assembler-with-cpp mode)
@@ -660,6 +662,9 @@ def run_tool(cmd):
660662
idf_env = os.environ.copy()
661663
populate_idf_env_vars(idf_env)
662664

665+
print(idf_env)
666+
print("run_tool:",cmd)
667+
663668
result = exec_command(cmd, env=idf_env)
664669
if result["returncode"] != 0:
665670
sys.stderr.write(result["out"] + "\n")
@@ -1021,9 +1026,7 @@ def _get_installed_pip_packages():
10211026

10221027
# a special "esp-windows-curses" python package is required on Windows for Menuconfig
10231028
if "windows" in get_systype():
1024-
import pkg_resources
1025-
1026-
if "esp-windows-curses" not in {pkg.key for pkg in pkg_resources.working_set}:
1029+
if "esp-windows-curses" not in installed_packages and False:
10271030
env.Execute(
10281031
env.VerboseAction(
10291032
'$PYTHONEXE -m pip install "file://%s/tools/kconfig_new/esp-windows-curses" windows-curses'

platform.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"tool-esptoolpy": {
7777
"type": "uploader",
7878
"owner": "platformio",
79-
"version": "~1.30000.0"
79+
"version": "~1.40501.0"
8080
},
8181
"tool-mkspiffs": {
8282
"type": "uploader",
@@ -99,6 +99,11 @@
9999
"optional": true,
100100
"owner": "platformio",
101101
"version": "^1.7.0"
102+
},
103+
"tool-mconf": {
104+
"optional": true,
105+
"owner": "platformio",
106+
"version": "~1.4060000.0"
102107
}
103108
}
104109
}

platform.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
from platformio.public import PlatformBase
16-
16+
import sys
1717

1818
class Espressif8266Platform(PlatformBase):
1919

@@ -27,7 +27,7 @@ def configure_default_packages(self, variables, targets):
2727
for p in self.packages:
2828
if p in ('tool-cmake', 'tool-ninja'):
2929
self.packages[p]['optional'] = False
30-
elif p in ('tool-mconf') and 'windows' in get_systype():
30+
elif p in ('tool-mconf') and sys.platform.startswith("win"):
3131
self.packages[p]['optional'] = False
3232
return super().configure_default_packages(variables, targets)
3333

0 commit comments

Comments
 (0)