Scott Mabin
Scott Mabin
I might have figured part of this out, at least the difference between pio & espressif tools chains for RISCV. Espressif: ``` .embuild/espressif/tools/riscv32-esp-elf/esp-2021r2-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc -dumpspecs | grep "\-lnosys" -lc -lnosys -lc...
That's how to add it currently, though you may need some `#ifdef` statements to make sure it's only included if the relevant component is enabled.
Correct, this crate utilizes esp-idf functions and creates safe Rust wrappers around them. If you would like to try, you can create a wrapper around the [MCPWM api](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/mcpwm.html#api-reference) and submit...
> Do you think looking at something like ledc.rs and its correlation to the idf would be a good starting point for how to design the api? Yes! I would...
So we don't produce bindings for everything in esp-idf, we have a whitelist in [this file, inside esp-idf-sys](https://github.com/esp-rs/esp-idf-sys/blob/master/src/include/esp-idf/bindings.h). What you'll need to do is modify esp-idf-sys to include the mcpwm...
Did you actually try to use the MCPWM functions in the HAL? I think the docs are built for the esp32c3, which doesn't have the MCPWM peripheral so it won't...
I've also seen this happen with rust-analyzer, to the point where I disabled it for esp-idf based projects. Would be great to figure this out.
Haven't had a chance to test but this setting might help: ```rust rust-analyzer.cargo.buildScripts.useRustcWrapper (default: true) ``` > Use RUSTC_WRAPPER=rust-analyzer when running build scripts to avoid checking unnecessary things.
Looks like there are changes to the MCPWM interface, confirmed by https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/peripherals.html#mcpwm.
I believe this should now be fixed, at least a fresh clone from mainline works for me now.