Open nsengupta opened 23 hours ago
Hello @nsengupta ,
This is a known issue due to a recent update to the cc-rs
crate you can find details here -> https://github.com/esp-rs/std-training/issues/266
There is a PR to fix this issue https://github.com/rust-lang/cmake-rs/pull/225 , though until it is merged, as a workaround, add cc="=1.1.31"
as a dependency under [dependencies]
in the Cargo.toml
file.
add cc="=1.1.31" as a dependency under [dependencies] in the Cargo.toml file.
Many thanks for this. I realize that if I generate using the template ( esp-rs/esp-idf-template
), this line is automatically added to the Cargo.toml
file.
However, after effecting that change in the Cargo.toml
, the code is flashed alright, but it doesn't work. Here's the output:
[2024-11-22T15:48:46Z INFO ] Serial port: '/dev/ttyUSB0'
[2024-11-22T15:48:46Z INFO ] Connecting...
[2024-11-22T15:48:46Z INFO ] Using flash stub
Chip type: esp32 (revision v3.1)
Crystal frequency: 40 MHz
Flash size: 4MB
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
MAC address: cc:7b:5c:02:4e:94
App/part. size: 509,328/4,128,768 bytes, 12.34%
[2024-11-22T15:48:48Z INFO ] Segment at address '0x1000' has not changed, skipping write
[2024-11-22T15:48:48Z INFO ] Segment at address '0x8000' has not changed, skipping write
[00:00:25] [========================================] 245/245 0x10000 [2024-11-22T15:49:14Z INFO ] Flashing has completed!
Commands:
CTRL+R Reset chip
CTRL+C Exit
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7104
load:0x40078000,len:15576
load:0x40080400,len:4
ho 8 tail 4 room 4
load:0x40080404,len:3876
entry 0x4008064c
I (32) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (32) boot: compile time Jun 7 2023 07:48:23
I (34) boot: Multicore bootloader
I (38) boot: chip revision: v3.1
I (42) boot.esp32: SPI Speed : 40MHz
I (47) boot.esp32: SPI Mode : DIO
I (51) boot.esp32: SPI Flash Size : 4MB
I (56) boot: Enabling RNG early entropy source...
I (61) boot: Partition Table:
I (65) boot: ## Label Usage Type ST Offset Length
I (72) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (79) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (87) boot: 2 factory factory app 00 00 00010000 003f0000
I (94) boot: End of partition table
I (99) esp_image: segment 0: paddr=00010020 vaddr=3c060020 size=0ffd8h ( 65496) load
E (107) esp_image: Segment 0 0x3c060020-0x3c06fff8 invalid: bad load address range
E (115) boot: Factory app partition is not bootable
E (121) boot: No bootable app partitions in the partition table
ets Jul 29 2019 12:21:46
Not sure if it is because of any specific attribute of the SoC.
Describe the bug When I execute
cargo run
, it fails to finish the buildTo Reproduce Steps to reproduce the behavior:
git pull
to be on the latest of the right branchOn branch esp32c3dkm1 Your branch is up to date with 'origin/esp32c3dkm1'
cargo run
Expected behavior The build should complete and the binary should be flashed.
Screenshots `error: failed to run custom build command for 'esp-idf-sys v0.35.0'
Caused by: process didn't exit successfully: '/tmp/cargo-installdX74wL/debug/build/esp-idf-sys-cb8b81113b1f0ce2/build-script-build' (exit status: 1) --- stdout cargo:rerun-if-env-changed=ESP_IDF_TOOLS_INSTALL_DIR cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG cargo:rerun-if-env-changed=ESP_IDF_SDKCONFIG_DEFAULTS cargo:rerun-if-env-changed=MCU cargo:rerun-if-env-changed=ESP_IDF_SYS_ROOT_CRATE cargo:rerun-if-env-changed=ESP_IDF_VERSION cargo:rerun-if-env-changed=ESP_IDF_REPOSITORY cargo:rerun-if-env-changed=ESP_IDF_CMAKE_GENERATOR cargo:rerun-if-env-changed=IDF_PATH cargo:rerun-if-env-changed=EXTRA-COMPONENTS cargo:rerun-if-env-changed=ESP_IDF_COMPONENTS cargo:rerun-if-env-changed=ESP_IDF_COMPONENT_MANAGER cargo:warning=
cargo metadata
exited with an error: error: could not findCargo.toml
in/tmp
or any parent directory Python 3.10.12 pip 24.3.1 from /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages/pip (python 3.10) Requirement already satisfied: pip in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (24.3.1) Requirement already satisfied: setuptools in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (71.0.0) Collecting setuptools Using cached setuptools-75.6.0-py3-none-any.whl.metadata (6.7 kB) Using cached setuptools-75.6.0-py3-none-any.whl (1.2 MB) Installing collected packages: setuptools Attempting uninstall: setuptools Found existing installation: setuptools 71.0.0 Uninstalling setuptools-71.0.0: Successfully uninstalled setuptools-71.0.0 Successfully installed setuptools-75.6.0 Looking in indexes: https://pypi.org/simple, https://dl.espressif.com/pypi Ignoring importlib_metadata: markers 'python_version < "3.8"' don't match your environment Collecting setuptools (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 3)) Using cached https://dl.espressif.com/pypi/setuptools/setuptools-71.0.0-py3-none-any.whl (908 kB) Requirement already satisfied: packaging in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 4)) (24.2) Requirement already satisfied: click in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 7)) (8.1.7) Requirement already satisfied: pyserial in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 8)) (3.5) Requirement already satisfied: cryptography in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 9)) (39.0.2) Requirement already satisfied: pyparsing in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 10)) (3.0.9) Requirement already satisfied: pyelftools in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 11)) (0.29) Requirement already satisfied: idf-component-manager in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (2.0.4) Requirement already satisfied: esp-coredump in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 13)) (1.12.0) Requirement already satisfied: esptool in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 14)) (4.7.0) Requirement already satisfied: esp-idf-kconfig in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 15)) (1.4.3) Requirement already satisfied: esp-idf-monitor in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 16)) (1.5.0) Requirement already satisfied: esp-idf-size in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 17)) (1.6.1) Requirement already satisfied: esp-idf-panic-decoder in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 18)) (1.2.1) Requirement already satisfied: construct in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 19)) (2.10.70) Requirement already satisfied: freertos_gdb in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from -r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 22)) (1.0.3) Requirement already satisfied: cffi>=1.12 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from cryptography->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 9)) (1.17.1) Requirement already satisfied: colorama in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (0.4.6) Requirement already satisfied: pyyaml in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (6.0.2) Requirement already satisfied: requests in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (2.32.3) Requirement already satisfied: requests-file in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (2.1.0) Requirement already satisfied: requests-toolbelt in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (1.0.0) Requirement already satisfied: tqdm in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (4.67.0) Requirement already satisfied: jsonref in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (1.1.0) Requirement already satisfied: pydantic in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (2.10.0) Requirement already satisfied: pydantic-core in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (2.27.0) Requirement already satisfied: pydantic-settings in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (2.6.1) Requirement already satisfied: typing-extensions in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (4.12.2) Requirement already satisfied: pygdbmi>=0.9.0.2 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from esp-coredump->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 13)) (0.11.0.0) Requirement already satisfied: bitstring>=3.1.6 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from esptool->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 14)) (4.2.3) Requirement already satisfied: ecdsa>=0.16.0 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from esptool->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 14)) (0.19.0) Requirement already satisfied: reedsolo<1.8,>=1.5.3 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from esptool->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 14)) (1.7.0) Requirement already satisfied: intelhex in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from esptool->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 14)) (2.3.0) Requirement already satisfied: kconfiglib>=13.7.1 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from esp-idf-kconfig->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 15)) (14.1.0) Requirement already satisfied: rich in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from esp-idf-size->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 17)) (13.9.4) Requirement already satisfied: bitarray<3.0.0,>=2.9.0 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from bitstring>=3.1.6->esptool->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 14)) (2.9.3) Requirement already satisfied: pycparser in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from cffi>=1.12->cryptography->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 9)) (2.22) Requirement already satisfied: six>=1.9.0 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from ecdsa>=0.16.0->esptool->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 14)) (1.16.0) Requirement already satisfied: annotated-types>=0.6.0 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from pydantic->idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (0.7.0) Requirement already satisfied: python-dotenv>=0.21.0 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from pydantic-settings->idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (1.0.1) Requirement already satisfied: charset-normalizer<4,>=2 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from requests->idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (3.4.0) Requirement already satisfied: idna<4,>=2.5 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from requests->idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (3.10) Requirement already satisfied: urllib3<3,>=1.21.1 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from requests->idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (1.26.20) Requirement already satisfied: certifi>=2017.4.17 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from requests->idf-component-manager->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 12)) (2024.8.30) Requirement already satisfied: markdown-it-py>=2.2.0 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from rich->esp-idf-size->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 17)) (3.0.0) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from rich->esp-idf-size->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 17)) (2.18.0) Requirement already satisfied: mdurl~=0.1 in /tmp/.embuild/espressif/python_env/idf5.1_py3.10_env/lib/python3.10/site-packages (from markdown-it-py>=2.2.0->rich->esp-idf-size->-r /tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt (line 17)) (0.1.2) Installing collected packages: setuptools Attempting uninstall: setuptools Found existing installation: setuptools 75.6.0 Uninstalling setuptools-75.6.0: Successfully uninstalled setuptools-75.6.0 Successfully installed setuptools-71.0.0 Upgrading pip and setuptools... Skipping the download of /tmp/.embuild/espressif/espidf.constraints.v5.1.txt because it was downloaded recently. Installing Python packages Constraint file: /tmp/.embuild/espressif/espidf.constraints.v5.1.txt Requirement files:/tmp/.embuild/espressif/esp-idf/v5.1.3/tools/requirements/requirements.core.txt
--- stderr Build configuration: BuildConfig { esp_idf_tools_install_dir: None, esp_idf_sdkconfig: None, esp_idf_sdkconfig_defaults: None, mcu: Some( "esp32c3", ), native: NativeConfig { esp_idf_version: Some( Tag( "v5.1.3", ), ), esp_idf_repository: None, esp_idf_cmake_generator: None, idf_path: None, extra_components: [], esp_idf_components: None, esp_idf_component_manager: None, }, esp_idf_sys_root_crate: None, } Using managed esp-idf repository: RemoteSdk { repo_url: None, git_ref: Tag("v5.1.3") } Using esp-idf v5.1.3 at '/tmp/.embuild/espressif/esp-idf/v5.1.3'
error occurred: unknown target
riscv32imc_zicsr_zifencei-esp-espidf
`Desktop (please complete the following information):
installed toolchains
stable-x86_64-unknown-linux-gnu nightly-2024-06-30-x86_64-unknown-linux-gnu nightly-x86_64-unknown-linux-gnu esp (default)
installed targets for active toolchain
riscv32imac-unknown-none-elf riscv32imafc-unknown-none-elf riscv32imc-unknown-none-elf x86_64-unknown-linux-gnu
active toolchain
nightly-x86_64-unknown-linux-gnu (overridden by '/home/nirmalya/Workspace-Rust/Embedded/Rust-Embedded-By-Omar-Companion/blinky/rust-toolchain.toml') rustc 1.84.0-nightly (bc5cf994d 2024-11-05) `
Additional context This is the picture of the SoC that I have:
This is not a bug report. I am a newbie and I don't know exactly where I am going wrong. I need help.