-
-
Notifications
You must be signed in to change notification settings - Fork 414
Description
Describe the problem
I have noticed when a platform is installed from git, instead of the Boards Manager (./arduino-cli core install id
), then the BoardDetails#build_properties
fails to provide sufficient information to calculate required tool paths. See arduino/arduino-ide#2071 (comment).
To reproduce
Install the esp32 platform manually via Git, and run the get board details command for esp32:esp32:esp32
(the FQBN can be espressif:esp32:esp32
if you strictly follow the steps).
The missing runtime.tools.*
is the real problem for the Git-installed platform:
341,381c340,355
< "runtime.platform.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/hardware/esp32/2.0.9",
< "runtime.hardware.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/hardware/esp32",
< "build.core.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/hardware/esp32/2.0.9/cores/esp32",
< "build.system.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/hardware/esp32/2.0.9/system",
< "build.variant.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/hardware/esp32/2.0.9/variants/esp32",
< "runtime.tools.mkspiffs-3.1.0-gcc10.3-e5f9fec.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp8266/tools/mkspiffs/3.1.0-gcc10.3-e5f9fec",
< "runtime.tools.mklittlefs-3.1.0-gcc10.3-e5f9fec.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp8266/tools/mklittlefs/3.1.0-gcc10.3-e5f9fec",
< "runtime.tools.esptool_py.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/esptool_py/4.5.1",
< "runtime.tools.esptool_py-4.5.1.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/esptool_py/4.5.1",
< "runtime.tools.mklittlefs.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/mklittlefs/3.0.0-gnu12-dc7f933",
< "runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/mklittlefs/3.0.0-gnu12-dc7f933",
< "runtime.tools.mkspiffs.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/mkspiffs/0.2.3",
< "runtime.tools.mkspiffs-0.2.3.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/mkspiffs/0.2.3",
< "runtime.tools.openocd-esp32.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/openocd-esp32/v0.11.0-esp32-20221026",
< "runtime.tools.openocd-esp32-v0.11.0-esp32-20221026.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/openocd-esp32/v0.11.0-esp32-20221026",
< "runtime.tools.riscv32-esp-elf-gcc.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.riscv32-esp-elf-gcc-esp-2021r2-patch5-8.4.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.riscv32-esp-elf-gdb.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/riscv32-esp-elf-gdb/11.2_20220823",
< "runtime.tools.riscv32-esp-elf-gdb-11.2_20220823.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/riscv32-esp-elf-gdb/11.2_20220823",
< "runtime.tools.xtensa-esp-elf-gdb.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823",
< "runtime.tools.xtensa-esp-elf-gdb-11.2_20220823.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823",
< "runtime.tools.xtensa-esp32-elf-gcc.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.xtensa-esp32-elf-gcc-esp-2021r2-patch5-8.4.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.xtensa-esp32s2-elf-gcc.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.xtensa-esp32s2-elf-gcc-esp-2021r2-patch5-8.4.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.xtensa-esp32s3-elf-gcc.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.xtensa-esp32s3-elf-gcc-esp-2021r2-patch5-8.4.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0",
< "runtime.tools.serial-monitor.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/serial-monitor/0.13.0",
< "runtime.tools.serial-monitor-0.13.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/serial-monitor/0.13.0",
< "runtime.tools.ctags.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/ctags/5.8-arduino11",
< "runtime.tools.ctags-5.8-arduino11.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/ctags/5.8-arduino11",
< "runtime.tools.mdns-discovery.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/mdns-discovery/1.0.9",
< "runtime.tools.mdns-discovery-1.0.9.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/mdns-discovery/1.0.9",
< "runtime.tools.xtensa-lx106-elf-gcc.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec",
< "runtime.tools.xtensa-lx106-elf-gcc-3.1.0-gcc10.3-e5f9fec.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec",
< "runtime.tools.serial-discovery.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/serial-discovery/1.4.0",
< "runtime.tools.serial-discovery-1.4.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/builtin/tools/serial-discovery/1.4.0",
< "runtime.tools.python3.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp8266/tools/python3/3.7.2-post1",
< "runtime.tools.python3-3.7.2-post1.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/cli/Arduino15/packages/esp8266/tools/python3/3.7.2-post1",
< "extra.time.utc": "1685646630",
< "extra.time.local": "1685653830",
---
> "build.copy_jtag_files": "0",
> "runtime.platform.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino/hardware/esp32/esp32",
> "runtime.hardware.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino/hardware/esp32",
> "build.core.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino/hardware/esp32/esp32/cores/esp32",
> "build.system.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino/hardware/esp32/esp32/system",
> "build.variant.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino/hardware/esp32/esp32/variants/esp32",
> "runtime.tools.serial-monitor.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/serial-monitor/0.13.0",
> "runtime.tools.serial-monitor-0.13.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/serial-monitor/0.13.0",
> "runtime.tools.ctags.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/ctags/5.8-arduino11",
> "runtime.tools.ctags-5.8-arduino11.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/ctags/5.8-arduino11",
> "runtime.tools.serial-discovery.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/serial-discovery/1.4.0",
> "runtime.tools.serial-discovery-1.4.0.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/serial-discovery/1.4.0",
> "runtime.tools.mdns-discovery.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/mdns-discovery/1.0.9",
> "runtime.tools.mdns-discovery-1.0.9.path": "/Users/dankeboy36/Desktop/dev/arduino-ide-esp-exception-decoder/test-resources/envs/git/Arduino15/packages/builtin/tools/mdns-discovery/1.0.9",
> "extra.time.utc": "1685646185",
> "extra.time.local": "1685653385",
diff.json.txt
installed_from_boards_manager.json.txt
installed_from_git.json.txt
If you have npm
, node
, python
, jq
installed, you can clone my repository and run the tests. It will create the test environment. It takes a few minutes.
git clone https://github.com/dankeboy36/arduino-ide-esp-exception-decoder.git cli-2197 \
&& cd cli-2197 \
&& git checkout e140fa90c88a785b766d1935156f0f1feab167ac \
&& npm i \
&& npm run test-slow
To get the complete build_proepties
from the CLI (boards manager) installation:
./test-resources/cli-releases/install/0.33.0/arduino-cli board details -b esp32:esp32:esp32 --config-file ./cli/arduino-cli.yaml --format json | jq .build_properties
To get the bogus build_proepties
from the Git installation:
./test-resources/cli-releases/install/0.33.0/arduino-cli board details -b esp32:esp32:esp32 --config-file ./git/arduino-cli.yaml --format json | jq .build_properties
Expected behavior
The BoardDetails#build_proeprties
keys are the same when the platform is installed via the boards manager and Git.
Arduino CLI version
0.33.0
Operating system
macOS
Operating system version
11.7.7
Additional context
No response
Issue checklist
- I searched for previous reports in the issue trackerI verified the problem still occurs when using the nightly buildMy report contains all necessary detailsTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Activity
[-]CLI provides insufficient BoardDetails#build_properties info when the platform is installed via Git[/-][+]CLI provides insufficient `BoardDetails#build_properties` info when the platform is installed via Git[/+]per1234 commentedon Jun 1, 2023
@dankeboy36 is this about the missing
tools.xtensa-esp-elf-gdb.path
andtools.riscv32-esp-elf-gdb.path
properties? If so, this is because for some reason themaster
branch of theespressif/arduino-esp32
repo is significantly outdated. It is missing this commit that is in the 2.0.9 release version you get from Boards Manager:espressif/arduino-esp32@8fca365
Check out the
release/v2.x
branch in yourespressif/arduino-esp32
clone and then run thetools/get.py
script again to update the toolchain. After you do that thetools.xtensa-esp-elf-gdb.path
andtools.riscv32-esp-elf-gdb.path
properties will be defined when using the manually installed ESP32 platform.me-no-dev commentedon Jun 1, 2023
runtime.tools.*
is defined by Arduino CLI and because it was causing clashes between core installed through the board manager and through git, we have recently removed those definitions in the git variant ofplatform.txt
. What you actually need istools.*
which in both cases (git/board manager) will show the correct path to tools.dankeboy36 commentedon Jun 2, 2023
Thank you!
It's about all missing
runtime.tools.*
properties.My tests check out the
2.0.9
branch fromespressif/arduino-esp32
repo. See the CI logs here. It is 3670e2b.That is a super helpful remark. I made some progress, but somewhere, there is a bug. I will reuse snippets from the attached files to #2197 (comment) to describe the situation. The FQBN is
esp32:esp32:esp32
. (I used theesp32
folder name instead ofespressif
described in the manual installation.esp32:esp32:esp32
is OK.)For
esp32:esp32:esp32
, the tool lookup logic should look fortools.xtensa-esp-elf-gdb.path
andtools.xtensa-esp32-elf-gcc.path
, and the GDB executable name isxtensa-esp32-elf-gdb
. (Let's ignore theruntime.tools.*
case for now.)Relevant
build_properties
content when installed via CLI:The expected path is
cli/Arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823/bin/xtensa-esp32-elf-gdb
. It exists ✅Relevant
build_properties
content when installed via Git:When installed from Git, the CLI's board properties response expands the
tools.xtensa-esp-elf-gdb.path
to./Arduino/hardware/esp32/esp32/tools/xtensa-esp-elf-gdb
, but this folder does not exist. ❌ It should be./Arduino/hardware/esp32/xtensa-esp-elf-gdb
. The same problem is withtools.xtensa-esp32-elf-gcc.path
. This extraesp32/tools/
segment gets into the expanded paths.I do not know the details of the property expansion, but I think this is either a bug in the CLI or my tool lookup logic should handle corner cases which I wanted to avoid and rely solely on the CLI.
me-no-dev commentedon Jun 2, 2023
Your hardware folder has wrong structure. It should be
Arduino/hardware/[vendor]/[core]
, where we recommend vendor folder to beespressif
for git builds and core folder must beesp32
. Then you runArduino/hardware/espressif/esp32/tools/get.py
to download all necessary tools (they will end up in the same tools folder)dankeboy36 commentedon Jun 2, 2023
This was the problem. When executing the
python
script, thecwd
must beArduino/hardware/espressif/esp32/tools/
. I incorrectly set it toArduino/hardware/espressif/
in my tests. Everything is working great now.Thank you!
It's not a CLI bug.