You can, but I don't think you should. I can see how the ergonomics are appealing for larger software but the value seems very slim on a microcontroller. Of course I'm biased, but I actually think more of this software ought to be in assembler - whereas perhaps you'd expect I believe it should be Rust.
I think when 20% of your code is trying to energize a solenoid or wrangle a temperature sensor and another 20% is trying to make the vendor's awful LCD controller do something useful and not insane you'd be just as happy writing the mnemonics for machine code instructions and you'd spend less time staring at diagnostics trying to guess why it's doing whatever it's doing because your ten year old fork of GCC has a bug.