Skip to content

Commit e1cc3fb

Browse files
committed
"tool" can not always shortened
1 parent 4a4c844 commit e1cc3fb

File tree

5 files changed

+47
-50
lines changed

5 files changed

+47
-50
lines changed

builder/frameworks/_embed_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def transform_to_asm(target, source, env):
133133
" ".join(
134134
[
135135
join(
136-
env.PioPlatform().get_package_dir("tl-cmake") or "",
136+
env.PioPlatform().get_package_dir("tool-cmake") or "",
137137
"bin",
138138
"cmake",
139139
),

builder/frameworks/espidf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ def populate_idf_env_vars(idf_env):
242242
idf_env["IDF_PATH"] = fs.to_unix_path(FRAMEWORK_DIR)
243243
additional_packages = [
244244
os.path.join(TOOLCHAIN_DIR, "bin"),
245-
platform.get_package_dir("tl-ninja"),
246-
os.path.join(platform.get_package_dir("tl-cmake"), "bin"),
245+
platform.get_package_dir("tool-ninja"),
246+
os.path.join(platform.get_package_dir("tool-cmake"), "bin"),
247247
os.path.dirname(get_python_exe()),
248248
]
249249

@@ -793,7 +793,7 @@ def RunMenuconfig(target, source, env):
793793

794794
rc = subprocess.call(
795795
[
796-
os.path.join(platform.get_package_dir("tl-cmake"), "bin", "cmake"),
796+
os.path.join(platform.get_package_dir("tool-cmake"), "bin", "cmake"),
797797
"--build",
798798
BUILD_DIR,
799799
"--target",
@@ -809,7 +809,7 @@ def RunMenuconfig(target, source, env):
809809

810810
def run_cmake(src_dir, build_dir, extra_args=None):
811811
cmd = [
812-
os.path.join(platform.get_package_dir("tl-cmake") or "", "bin", "cmake"),
812+
os.path.join(platform.get_package_dir("tool-cmake") or "", "bin", "cmake"),
813813
"-S",
814814
src_dir,
815815
"-B",
@@ -1122,7 +1122,7 @@ def preprocess_linker_file(src_ld_script, target_ld_script):
11221122
" ".join(
11231123
[
11241124
os.path.join(
1125-
platform.get_package_dir("tl-cmake"),
1125+
platform.get_package_dir("tool-cmake"),
11261126
"bin",
11271127
"cmake",
11281128
),
@@ -1193,7 +1193,7 @@ def generate_mbedtls_bundle(sdk_config):
11931193
" ".join(
11941194
[
11951195
os.path.join(
1196-
env.PioPlatform().get_package_dir("tl-cmake"),
1196+
env.PioPlatform().get_package_dir("tool-cmake"),
11971197
"bin",
11981198
"cmake",
11991199
),

builder/frameworks/ulp.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def prepare_ulp_env_vars(env):
4545
platform.get_package_dir("tc-ulp"),
4646
"bin",
4747
),
48-
platform.get_package_dir("tl-ninja"),
49-
os.path.join(platform.get_package_dir("tl-cmake"), "bin"),
48+
platform.get_package_dir("tool-ninja"),
49+
os.path.join(platform.get_package_dir("tool-cmake"), "bin"),
5050
os.path.dirname(where_is_program("python")),
5151
]
5252

@@ -81,7 +81,7 @@ def _generate_ulp_configuration_action(env, target, source):
8181
riscv_ulp_enabled = sdk_config.get("ULP_COPROC_TYPE_RISCV", False)
8282

8383
cmd = (
84-
os.path.join(platform.get_package_dir("tl-cmake"), "bin", "cmake"),
84+
os.path.join(platform.get_package_dir("tool-cmake"), "bin", "cmake"),
8585
"-DCMAKE_GENERATOR=Ninja",
8686
"-DCMAKE_TOOLCHAIN_FILE="
8787
+ os.path.join(
@@ -129,7 +129,7 @@ def _generate_ulp_configuration_action(env, target, source):
129129

130130
def compile_ulp_binary():
131131
cmd = (
132-
os.path.join(platform.get_package_dir("tl-cmake"), "bin", "cmake"),
132+
os.path.join(platform.get_package_dir("tool-cmake"), "bin", "cmake"),
133133
"--build",
134134
ULP_BUILD_DIR,
135135
"--target",
@@ -154,7 +154,7 @@ def compile_ulp_binary():
154154

155155
def generate_ulp_assembly():
156156
cmd = (
157-
os.path.join(platform.get_package_dir("tl-cmake"), "bin", "cmake"),
157+
os.path.join(platform.get_package_dir("tool-cmake"), "bin", "cmake"),
158158
"-DDATA_FILE=$SOURCE",
159159
"-DSOURCE_FILE=$TARGET",
160160
"-DFILE_TYPE=BINARY",

platform.json

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"owner": "",
9090
"version": ""
9191
},
92-
"tl-esptool": {
92+
"tool-esptool": {
9393
"type": "uploader",
9494
"optional": false,
9595
"owner": "pioarduino",
@@ -100,48 +100,44 @@
100100
"owner": "pioarduino",
101101
"version": "https://github.com/pioarduino/esp_install/releases/download/v1.4.0/esp_install-v1.4.0.zip"
102102
},
103-
"tl-dfuutil": {
103+
"tool-dfuutil": {
104104
"type": "uploader",
105105
"optional": true,
106106
"owner": "",
107107
"version": ""
108108
},
109-
"tl-openocd": {
109+
"tool-openocd": {
110110
"type": "debugger",
111111
"optional": true,
112112
"owner": "",
113113
"version": ""
114114
},
115-
"tl-littlefs320": {
116-
"type": "uploader",
115+
"tool-mklittlefs": {
117116
"optional": true,
118117
"owner": "",
119118
"version": ""
120119
},
121-
"tl-littlefs400": {
122-
"type": "uploader",
120+
"tool-mklittlefs400": {
123121
"optional": true,
124122
"owner": "",
125123
"version": ""
126124
},
127-
"tl-fatfs": {
128-
"type": "uploader",
125+
"tool-mkfatfs": {
129126
"optional": true,
130127
"owner": "",
131128
"version": ""
132129
},
133-
"tl-spiffs": {
134-
"type": "uploader",
130+
"tool-mkspiffs": {
135131
"optional": true,
136132
"owner": "",
137133
"version": ""
138134
},
139-
"tl-cmake": {
135+
"tool-cmake": {
140136
"optional": true,
141137
"owner": "",
142138
"version": ""
143139
},
144-
"tl-ninja": {
140+
"tool-ninja": {
145141
"optional": true,
146142
"owner": "",
147143
"version": ""

platform.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
python_exe = get_pythonexe_path()
2929
IS_WINDOWS = sys.platform.startswith("win")
3030
IDF_TOOLS_PATH_DEFAULT = os.path.join(os.path.expanduser("~"), ".espressif")
31-
IDF_TOOLS = os.path.join(os.path.expanduser("~"), ".platformio", "packages", "tl-install", "tools", "idf_tools.py")
31+
IDF_TOOLS = os.path.join(os.path.expanduser("~"), ".platformio", "packages", "tool-install", "tools", "idf_tools.py")
3232
IDF_TOOLS_FLAG = ["install"]
3333
IDF_TOOLS_CMD = [python_exe, IDF_TOOLS] + IDF_TOOLS_FLAG
3434

@@ -50,7 +50,7 @@ def configure_default_packages(self, variables, targets):
5050
if rc != 0:
5151
sys.stderr.write("Error: Couldn't execute 'idf_tools.py install' \n")
5252
else:
53-
shutil.copytree(join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-packages"), join(IDF_TOOLS_PATH_DEFAULT, "tools"), symlinks=False, ignore=None, ignore_dangling_symlinks=False, dirs_exist_ok=True)
53+
shutil.copytree(join(IDF_TOOLS_PATH_DEFAULT, "tools", "tool-packages"), join(IDF_TOOLS_PATH_DEFAULT, "tools"), symlinks=False, ignore=None, ignore_dangling_symlinks=False, dirs_exist_ok=True)
5454

5555

5656
if "arduino" in frameworks:
@@ -60,21 +60,22 @@ def configure_default_packages(self, variables, targets):
6060
if "buildfs" in targets:
6161
filesystem = variables.get("board_build.filesystem", "littlefs")
6262
if filesystem == "littlefs":
63-
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-littlefs320")
64-
self.packages["tl-littlefs320"]["optional"] = False
65-
self.packages["tl-littlefs320"]["version"] = tl_path
63+
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tool-mklittlefs")
64+
self.packages["tool-mklittlefs"]["optional"] = False
65+
self.packages["tool-mklittlefs"]["version"] = tl_path
6666
elif filesystem == "fatfs":
67-
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-fatfs")
68-
self.packages["tl-fatfs"]["optional"] = False
69-
self.packages["tl-fatfs"]["version"] = tl_path
70-
else:
71-
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-spiffs")
72-
self.packages["tl-spiffs"]["optional"] = False
73-
self.packages["tl-spiffs"]["version"] = tl_path
67+
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tool-mkfatfs")
68+
self.packages["tool-mkfatfs"]["optional"] = False
69+
self.packages["tool-mkfatfs"]["version"] = tl_path
70+
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tool-mkspiffs")
71+
self.packages["tool-mkspiffs"]["optional"] = False
72+
self.packages["tool-mkspiffs"]["version"] = tl_path
73+
7474
if variables.get("upload_protocol"):
75-
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-openocd")
76-
self.packages["tl-openocd"]["optional"] = False
77-
self.packages["tl-openocd"]["version"] = tl_path
75+
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tool-openocd")
76+
self.packages["tool-openocd"]["optional"] = False
77+
self.packages["tool-openocd"]["version"] = tl_path
78+
7879
if os.path.isdir("ulp"):
7980
ulp_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tc-ulp")
8081
self.packages["tc-ulp"]["optional"] = False
@@ -84,18 +85,18 @@ def configure_default_packages(self, variables, targets):
8485
filesystem = variables.get("board_build.filesystem", "littlefs")
8586
if filesystem == "littlefs":
8687
# Use mklittlefs v4.0.0 to unpack, older version is incompatible
87-
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-littlefs400")
88-
self.packages["tl-littlefs400"]["optional"] = False
89-
self.packages["tl-littlefs400"]["version"] = tl_path
90-
del self.packages["tl-littlefs320"]
88+
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tool-mklittlefs400")
89+
self.packages["tool-mklittlefs"]["optional"] = False
90+
self.packages["tool-mklittlefs"]["version"] = tl_path
91+
#del self.packages["tool-mklittlefs"]
9192

9293
# Currently only Arduino Nano ESP32 uses the dfuutil tool as uploader
9394
if variables.get("board") == "arduino_nano_esp32":
94-
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tl-dfuutil")
95-
self.packages["tl-dfuutil"]["optional"] = False
96-
self.packages["tl-dfuutil"]["version"] = tl_path
95+
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", "tool-dfuutil")
96+
self.packages["tool-dfuutil"]["optional"] = False
97+
self.packages["tool-dfuutil"]["version"] = tl_path
9798
else:
98-
del self.packages["tl-dfuutil"]
99+
del self.packages["tool-dfuutil"]
99100

100101
# Starting from v12, Espressif's toolchains are shipped without
101102
# bundled GDB. Instead, it's distributed as separate packages for Xtensa
@@ -112,7 +113,7 @@ def configure_default_packages(self, variables, targets):
112113
self.packages["tc-ulp"]["optional"] = False
113114
self.packages["tc-ulp"]["version"] = ulp_path
114115
for p in self.packages:
115-
if p in ("tl-cmake", "tl-ninja"):
116+
if p in ("tool-cmake", "tool-ninja"):
116117
tl_path = "file://" + join(IDF_TOOLS_PATH_DEFAULT, "tools", p)
117118
self.packages[p]["optional"] = False
118119
self.packages[p]["version"] = tl_path
@@ -222,7 +223,7 @@ def _add_dynamic_options(self, board):
222223

223224
debug["tools"][link] = {
224225
"server": {
225-
"package": "tl-openocd",
226+
"package": "tool-openocd",
226227
"executable": "bin/openocd",
227228
"arguments": server_args,
228229
},

0 commit comments

Comments
 (0)