esp-rs / esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.
380 stars 45 forks source link

cmake template: remove panic_immediate_abort for new idf versions #63

Closed benhansen-io closed 1 month ago

benhansen-io commented 1 year ago

build-std-features=panic_immediate_abort causes panics to not print their error messages which is a bad developer experience. Similar to the Cargo template, do not set this flag for newer espidf versions.

ivmarkov commented 1 year ago

On the other hand it erases 100 to 200K from the final binary.

ivmarkov commented 1 year ago

Perhaps we need a .cargo/config.toml for the cmake-first build as well? This way we can put the immediate abort setting as commented out by default, but propery explained with comments?

benhansen-io commented 1 year ago

I introduced a minimal .cargo/config.toml to the cmake build. I agree it is better. I add a comment about binary size to that file to both the cargo and cmake build.

Vollbrecht commented 1 month ago

currently already removed in cmake builds with "std" + "std and hal" builds. So this PR is outdated. Thanks for your initial contribution!