Hi!
I got the crazy(?) idea to start a project with one of Microchip's PIC32 MIPS-MCUs. As I'm very familiar with their Harmony framework, I'd like to use that. Now this sounds quite like a disaster to come. But maybe not. The Harmony framework is a bunch of state-machines that get called in a main-loop. Within this main-loop, there is also a single call to the - what they call - APP_main. Certainly, within this APP_main, there are quite a few calls to the framework. Toggling ports, ISRs, timers etc. But most of the work happens within their framework that is written in C (source is available and open).
So is it feasable to write wrappers around those C-calls of the framework in Rust plus link my APP_main against their C-code. Note, that within the APP_main, there will be a loop that will call my own state-machines, written in Rust like the APP_main.
All the complicated setup of the MCU would happen in C and I would need no interfacing to these routines. APP_main is just a function call like any other call.
So is this completely insane, almost insane or just a piece of cake (I doubt the later is true).
I'm aware that there is a crate mips_mcu, but this one is less than bare metal and would require to completely rewrite their framework.
Any experiences?