5 ms·
I use Nim at work for embedded firmware development right now, and we evaluated Zig but it was a year and a half ago when we started the project, Zig just wasn’
by girvo 3y ago
I use Nim at work for embedded firmware development right now, and we evaluated Zig but it was a year and a half ago when we started the project, Zig just wasn’t as far along as it is now.
I’m currently in the process of writing a nice HAL/dev framework agnostic FreeRTOS binding in Nim, which maybe you’ll find useful once we can post it?
- SV_BubbleTime 3y agoDo neither of these languages have better concurrency tools than porting FreeRTOS?
- davidzweig 3y agoiirc the os needs to have processor specific task switching code in assembly, Freertos must have tons of ports already. Nim supposedly has nice FFI for C. The niceness of freertos is then mostly about it's.. system call design. If it's good, then you could probably progressively rewrite freertos in nim. Never used nim and been a while since I did any embedded.
- bsder 3y agoOS is not the same level of abstraction as a language. This is an active problem in embedded. Cheap microcontrollers can have multiple cores that are not even the same architecture. This means that just to get "blinky" running, you need to choose a (language, OS) tuple. And, given that "language" is generally "C", that means that your abstraction choices for OS are lousy. Side question: last I checked, FreeRTOS didn't do a great job when multiple microcontrollers were involved--especially if the communication channels or synchronization were hardware-based. Has this changed?
- girvo 3y agoFreeRTOS gives much more than just concurrency!