Skip to content

Build errors in esp-idf-svc when adding ESP IDF components in a mixed C++ / Rust project. #263

@Ant01n3

Description

@Ant01n3

Hello, thansk for this project!

I have a mixed project C++ / Rust because I would like to use the FastLED library as a component. Everything compiled and worked very well when doing the tests with only FastLED.

However I wanted to extend the project and use MQTT and the ethernet port on my EPS board. But when adding the necessary components in the CMakeList file, I encounter errors when building the esp-idf-svc crate (no external crate esp_sntp_init, cannot find struct ip_addr_t, etc).

I am quite probably doing a silly error but I cannot find where. What I did :

  • doing a idf.py fullclean,
  • doing a idf.py set-target esp32
  • running again idf.py menuconfig to enable the FreeRTOS backward compatibility I need for FastLED.
  • cleaning any build cache.
  • idf.py build -> the process stops when compiling the rust dependencies, at the esp-idf-svc crate.

I also tested creating a blank new project :

  • cargo generate --vcs none --git https://github.com/esp-rs/esp-idf-template cmake
  • modifying the components/rust-esp32_test/CMakeList.txt RUST_DEPS : set(RUST_DEPS "pthread" "driver" "vfs" "esp_eth" "esp_netif" "esp_event" "mqtt")
  • idf.py set-target esp32
  • idf.py build

I have the same errors. There are 77 errors all related to crates or structs or functions not found, I can post a list if needed.

My ESP IDF version is 5.2 (I tried also 5.1 without success).

Sorry if I missed something in the readme files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions