I saw .NET "Microframework"-based code running just fine on an RTOS decades ago. I've even seen CPython (ab)used on an RTOS.
Go back far enough and there were Real Time Lisps. (Not to mention Lisps even had hardware garbage collectors designed for them.)
Garbage collection can happen in real time programming just fine, there's just often not been enough demand for real time programming focused garbage collectors.
.NET "Microframework" didn't last not because it wasn't good at what it did, real time embedded programming, but because there weren't enough C++ developers interested in learning C# for embedded programming skills they already thought they knew.
Go back far enough and there were Real Time Lisps. (Not to mention Lisps even had hardware garbage collectors designed for them.)
Garbage collection can happen in real time programming just fine, there's just often not been enough demand for real time programming focused garbage collectors.
.NET "Microframework" didn't last not because it wasn't good at what it did, real time embedded programming, but because there weren't enough C++ developers interested in learning C# for embedded programming skills they already thought they knew.