I'm using C to make programs for various microcontrollers (pic18, esp32, rp2040). While developing these programs, I also run this microcontroller C code on a PC by stubbing out all the microcontroller specific functions. On the PC i then setup scenario's, run the microcontroller code, and check with the C test framework unity[1] if the microcontroller C code has run correctly.
I also run the C code natively in the microcontrollers. Then I use a debugger to set breakpoints, and to inspect the internal state of the program. The debugger also decodes the memory, so I can see what the peripherals are doing.
Finally I use a CICD script to first run a testsuite on a server, and then compile the microcontroller code.
This all works fine, but C has some disadvantages compared to rust. (like memory safety and so on).
Therefore I would like to migrate from C to rust. Is this feasible?
A)Does rust have a compiler for all my microcontrollers?
B)Does rust have a debugger for all my microcontrollers?
[1]
https://www.throwtheswitch.org/unity