Why not use something like rust over this? Rust should provide the safety missing in C while also providing higher abstractions and a safe macro system with about the same performance as C
looking through them comments in an earlier HN post https://news.ycombinator.com/item?id=6268291 on running rust on the arduino DUE they link to zero.rs that should make it possible to run without any runtime