diff --git a/cmake/components/rust-{{project-name}}/CMakeLists.txt b/cmake/components/rust-{{project-name}}/CMakeLists.txt index 331bc47..9c03913 100644 --- a/cmake/components/rust-{{project-name}}/CMakeLists.txt +++ b/cmake/components/rust-{{project-name}}/CMakeLists.txt @@ -74,6 +74,7 @@ ExternalProject_Add( CARGO_CMAKE_BUILD_ESP_IDF=${idf_path} CARGO_CMAKE_BUILD_COMPILER=${CMAKE_C_COMPILER} RUSTFLAGS=${ESP_RUSTFLAGS} + MCU=${CONFIG_IDF_TARGET} cargo build --target ${RUST_TARGET} --target-dir ${CARGO_TARGET_DIR} ${CARGO_BUILD_ARG} ${CARGO_BUILD_STD_ARG} INSTALL_COMMAND "" BUILD_ALWAYS TRUE