-
Is there any kind of specification for what a platform must provide in order to host the CLR and thus .Net applications? Clearly the CLR expects some kind of threading facility and perhaps a file system, but what else does it need? what is the minimum a platform must have for the CLR to work? If one had a bare machine without even an operating system, what would they need to have in place for the CLR to be hosted? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
In the abstract sense, Ecma 335 specifies the facilities needed for a conforming CLI implementation. But this is likely not what you're interested in. Concretely, both CoreCLR and Mono expect (in no particular order): Threading, processes, file system, sockets/networking, virtual memory, console/terminal access, date/time and timer features, environment variables, POSIX signals, etc.
Basically, an operating system. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Not sure if this addresses your concerns but take a look at https://github.com/bflattened/bflat which is capable of producing UEFI binaries directly. |
Beta Was this translation helpful? Give feedback.
-
@alexrp That Endpoint board hosts some build of Linux and I'm no fan of Linux and want to get away from Linux imposing it's own abstractions of the STM32 peripherals which is somewhat contrived and arbitrary, for example we can't use DMA from C# in any direct way because Linux denies access to the DMA resources (but does not deny access to other resources like GPIO or Timers). I'm not unfamiliar with bare metal STM32 coding so there might be scope for a project that can deliver a core OS that is enough for .Net to run and avoid all of the Linux baggage entirely. I'm reading through this but would love to get any more details or tips about this. |
Beta Was this translation helpful? Give feedback.
VirtualAlloc
/mmap
Yes, but the JIT and GC need it.
I don't see any reason why it wouldn't be workable. It might require some build system plumbing and
[UnsupportedOSPlatform(...)]
annotations, though. I think (but don't quote me on this) thatb…