Giter VIP home page Giter VIP logo

Comments (6)

N3xed avatar N3xed commented on July 18, 2024

See esp-rs/esp-idf-sys#114 (comment) for reference.
Also to note is that you don't have to vendor esp-idf components anymore with remote components.

from esp-idf-hal.

 avatar commented on July 18, 2024

For remote components,
I've tried this

Also to note is that you don't have to vendor esp-idf components anymore with remote components.

And add this :

[package.metadata.esp-idf-sys.extra_components.0.remote_component]
# The name of the remote component. Corresponds to a key in the dependencies of
# `idf_component.yml`.
name = "littlefs"
# The version of the remote component. Corresponds to the `version` field of the
# `idf_component.yml`.
version = "1.13.0"
# A git url that contains this remote component. Corresponds to the `git`
# field of the `idf_component.yml`.
#
# This field is optional.
git = "https://github.com/joltwallet/esp_littlefs"
# A path to the component.
# Corresponds to the `path` field of the `idf_component.yml`.
#
# Note: This should not be used for local components, use
# `component_dirs` of extra components instead.
#
# This field is optional.
# path = "path/to/component"
path = "excomponent/little"

# A url to a custom component registry. Corresponds to the `service_url`
# field of the `idf_component.yml`.
#
# This field is optional.
# service_url = "https://componentregistry.company.com"

in my Cargo.toml in the root directory, but nothing happened after I ran the Cargo build (nothing with the name littlefs came up in the bindings.rs or anywhere else).
Am I missing something?

from esp-idf-hal.

N3xed avatar N3xed commented on July 18, 2024

I don't know if you already did this, but you still need a bindings_header, so a C header file that includes the relevant littlefs bindings. Otherwise, no bindings to littlefs APIs will be generated (e.g. the bindings.h in esp-rs/esp-idf-sys#114 (comment)).

E.g.

[[package.metadata.esp-idf-sys.extra_components]]
# Name and version from registry https://components.espressif.com/components/joltwallet/littlefs
remote_component = {name = "joltwallet/littlefs", version = "1.13.0"}
# The C header file in the src directory, that includes the relevant littlefs headers for bindings generation.
bindings_header = "src/bindings.h"

esp-idf-sys is probably not rebuilt from the cargo.toml changes, so you have to cargo clean -p esp-idf-sys to force a rebuild of esp-idf-sys and the generated bindings (this should work to force a rebuild of esp-idf-sys, if not do a whole clean rebuild cargo clean).

from esp-idf-hal.

N3xed avatar N3xed commented on July 18, 2024

Its also good to compile with cargo build -vv (the -vv flag) so that the build script output of esp-idf-sys is shown, which displays the build components etc.

from esp-idf-hal.

 avatar commented on July 18, 2024

Now it is interesting and easy to use .
Thank you .(I tried both ways and got answer from both ) .
And in the second way ("Remote" one) It adds "Components_esp32s3.lock" during building and everything has been built.

dependencies:
  idf:
    component_hash: null
    source:
      type: idf
    version: 5.1.1
  joltwallet/littlefs:
    component_hash: f7813d2c2ddde8bc74cd9d044f063d758672f8504ca56132f518ff1438c9a051
    source:
      service_url: https://api.components.espressif.com/
      type: service
    version: 1.13.0
manifest_hash: 901bba517a4f6d0ff5dfd02a5aaff14e4eb6faa3517d481644bf6b99992f04fe
target: esp32s3
version: 1.0.0

from esp-idf-hal.

 avatar commented on July 18, 2024

Thanks to "N3xed" , Got the result that I wanted.

from esp-idf-hal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.