esp-idf-template icon indicating copy to clipboard operation
esp-idf-template copied to clipboard

cmake template: remove panic_immediate_abort for new idf versions

Open benhansen-io opened this issue 2 years ago • 3 comments

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.

benhansen-io avatar Oct 21 '22 16:10 benhansen-io

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

ivmarkov avatar Oct 21 '22 17:10 ivmarkov

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?

ivmarkov avatar Oct 21 '22 17:10 ivmarkov

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.

benhansen-io avatar Oct 21 '22 19:10 benhansen-io

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

Vollbrecht avatar Jun 21 '24 07:06 Vollbrecht