Skip to content

Commit 9570a18

Browse files
authored
Silence install log messages (#183)
1 parent 71b725a commit 9570a18

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

builder/frameworks/_embed_files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ def transform_to_asm(target, source, env):
110110
" ".join(
111111
[
112112
"riscv32-esp-elf-objcopy"
113-
if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2","esp32p4")
113+
if mcu in ("esp32c2","esp32c3","esp32c5","esp32c6","esp32h2","esp32p4")
114114
else "xtensa-%s-elf-objcopy" % mcu,
115115
"--input-target",
116116
"binary",
117117
"--output-target",
118-
"elf32-littleriscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2","esp32p4") else "elf32-xtensa-le",
118+
"elf32-littleriscv" if mcu in ("esp32c2","esp32c3","esp32c5","esp32c6","esp32h2","esp32p4") else "elf32-xtensa-le",
119119
"--binary-architecture",
120-
"riscv" if mcu in ("esp32c2","esp32c3","esp32c6","esp32h2","esp32p4") else "xtensa",
120+
"riscv" if mcu in ("esp32c2","esp32c3","esp32c5","esp32c6","esp32h2","esp32p4") else "xtensa",
121121
"--rename-section",
122122
".data=.rodata.embedded",
123123
"$SOURCE",

builder/frameworks/arduino.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _get_installed_pip_packages():
121121
env.Execute(
122122
env.VerboseAction(
123123
(
124-
'"$PYTHONEXE" -m pip install -U '
124+
'"$PYTHONEXE" -m pip install -U -q -q -q '
125125
+ " ".join(
126126
[
127127
'"%s%s"' % (p, deps[p])

builder/frameworks/espidf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def _get_installed_standard_pip_packages():
106106
env.Execute(
107107
env.VerboseAction(
108108
(
109-
'"$PYTHONEXE" -m pip install -U '
109+
'"$PYTHONEXE" -m pip install -U -q -q -q '
110110
+ " ".join(
111111
[
112112
'"%s%s"' % (p, deps[p])
@@ -1559,7 +1559,7 @@ def _get_installed_pip_packages(python_exe_path):
15591559
env.Execute(
15601560
env.VerboseAction(
15611561
(
1562-
'"%s" -m pip install -U ' % python_exe_path
1562+
'"%s" -m pip install -U -q -q -q ' % python_exe_path
15631563
+ " ".join(['"%s%s"' % (p, deps[p]) for p in packages_to_install])
15641564
),
15651565
"Installing ESP-IDF's Python dependencies",
@@ -1569,7 +1569,7 @@ def _get_installed_pip_packages(python_exe_path):
15691569
if IS_WINDOWS and "windows-curses" not in installed_packages:
15701570
env.Execute(
15711571
env.VerboseAction(
1572-
'"%s" -m pip install windows-curses' % python_exe_path,
1572+
'"%s" -m pip install -q -q -q windows-curses' % python_exe_path,
15731573
"Installing windows-curses package",
15741574
)
15751575
)
@@ -1988,7 +1988,7 @@ def _skip_prj_source_files(node):
19881988
(
19891989
board.get(
19901990
"upload.bootloader_offset",
1991-
"0x1000" if mcu in ["esp32", "esp32s2"] else ("0x2000" if mcu in ["esp32p4"] else "0x0"),
1991+
"0x1000" if mcu in ["esp32", "esp32s2"] else ("0x2000" if mcu in ["esp32c5", "esp32p4"] else "0x0"),
19921992
),
19931993
os.path.join("$BUILD_DIR", "bootloader.bin"),
19941994
),

builder/frameworks/ulp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def prepare_ulp_env_vars(env):
3737

3838
toolchain_path = platform.get_package_dir(
3939
"toolchain-xtensa-esp-elf"
40-
if idf_variant not in ("esp32c6", "esp32p4")
40+
if idf_variant not in ("esp32c5","esp32c6", "esp32p4")
4141
else "toolchain-riscv32-esp"
4242
)
4343

examples/arduino-blink/platformio.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ custom_component_remove = espressif/esp_hosted
4343
espressif/esp_diagnostics
4444
espressif/esp_rainmaker
4545
espressif/rmaker_common
46-
custom_component_add =
47-
espressif/cmake_utilities @ 0.*
46+
custom_component_add = espressif/cmake_utilities @ 0.*
4847

4948
[env:esp32-s3-arduino_nano_esp32]
5049
platform = espressif32

platform.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import os
16+
import contextlib
1617
import requests
1718
import json
1819
import subprocess
@@ -68,6 +69,14 @@ def install_tool(TOOL, retry_count=0):
6869
json_flag = bool(os.path.exists(TOOLS_JSON_PATH))
6970
pio_flag = bool(os.path.exists(TOOLS_PIO_PATH))
7071
if tl_flag and json_flag:
72+
with open(os.devnull, 'w') as devnull, \
73+
contextlib.redirect_stdout(devnull), \
74+
contextlib.redirect_stderr(devnull):
75+
rc = subprocess.run(
76+
IDF_TOOLS_CMD,
77+
stdout=subprocess.DEVNULL,
78+
stderr=subprocess.DEVNULL
79+
).returncode
7180
rc = subprocess.run(IDF_TOOLS_CMD).returncode
7281
if rc != 0:
7382
sys.stderr.write("Error: Couldn't execute 'idf_tools.py install'\n")
@@ -276,7 +285,7 @@ def _add_dynamic_options(self, board):
276285
# A special case for the Kaluga board that has a separate interface config
277286
if board.id == "esp32-s2-kaluga-1":
278287
supported_debug_tools.append("ftdi")
279-
if board.get("build.mcu", "") in ("esp32c3", "esp32c6", "esp32s3", "esp32h2"):
288+
if board.get("build.mcu", "") in ("esp32c3", "esp32c5", "esp32c6", "esp32s3", "esp32h2", "esp32p4"):
280289
supported_debug_tools.append("esp-builtin")
281290

282291
upload_protocol = board.manifest.get("upload", {}).get("protocol")

0 commit comments

Comments
 (0)