3 ms·
You can run uC Linux without an MMU, but you won't get memory safety. Better microcontrollers (that includes the RP2040 and RP2350) have an MPU (memory protecti
by crest 2y ago
You can run uC Linux without an MMU, but you won't get memory safety. Better microcontrollers (that includes the RP2040 and RP2350) have an MPU (memory protection unit) to implement memory safety, but almost no microcontroller has a real MMU (only the MIPS derived PIC32 come to mind). An MPU is far more visibly exposed to the programmer than a paging MMU that combines access control with address space virtualisation. To make it even more annoying the ARMv6M architecture isn't intended to recover from memory usage faults. You have to use really dirty tricks to "fake it" (return from the hard fault into an unimplemented exception, infer the address and cause the fault before you can recover), but it's possible. It's not even that slow. Depending on your usecase a fast warm-start of the whole chip may be preferable to restarting single tasks (e.g. just set the hardware watchdog countdown timer to 1 and spin until it happens).