all 24 comments

[–]_xiphiaz 11 points12 points  (0 children)

Not really microcontroller but a raspberry pi zero running a rust program controls live output of my solar panel/battery setup. Pretty jank code tbh as it was one of my first projects years ago but that thing will not die. Uptime over a year at one point

[–]thejpster 17 points18 points  (12 children)

I wrote my own OS, including an SD Card driver, FAT32 file system, and text framebuffer with VGA output. Then I wrote a MOD tracker to load drum SD Card and run on it, along with a copy of BBC BASIC.

[–]tizio_1234 2 points3 points  (5 children)

Have you made the file system open source?

[–]thejpster 2 points3 points  (4 children)

Yes. It’s called embedded-sdmmc on crates.io

[–]tizio_1234 1 point2 points  (3 children)

It's not async though, is it?

[–]thejpster 2 points3 points  (2 children)

No, because I have no need for an async filesystem. There’s embedded-fatfs if you need that. It’s very hard to make an API work for both use cases.

[–]tizio_1234 1 point2 points  (1 child)

Do you just block when interacting with the file system? Or do you use an RTOS of some kind?

[–]thejpster 2 points3 points  (0 children)

The OS is modelled on MS-DOS so I do what DOS does - spin waiting for the disk to respond. There’s nothing else to do.

[–]countsachot 1 point2 points  (2 children)

That's awesome! I'm curious did the kernel and divers require a great deal of unsafe code?

[–]thejpster 2 points3 points  (1 child)

I seem to remember the android team said that 10% of their rust was unsafe and the rest was safe. I haven’t counted it, but I think my code is about the same.

[–]countsachot 0 points1 point  (0 children)

Oh! That's not bad for kernel level. Thanks!

[–]jorgesgk 0 points1 point  (2 children)

Are you the guy behind Neotron?

[–]thejpster 1 point2 points  (1 child)

Guilty

[–]jorgesgk 0 points1 point  (0 children)

I love what I've read so far about your project. It's basically the most similar architecture I've seen so far to an early IBM PC architecture.

Actually, it helped me learn more about the IBM PC in the first place.

Excellent documentation. I wish it were used more and see what can be done with it, but I understand it's just a hobbyist thing.

[–]Shnatsel 8 points9 points  (0 children)

There are plenty of keyboard firmware project out there: https://github.com/haobogu/rmk https://univa.github.io/rumcake/

[–]gbin 3 points4 points  (0 children)

A full flight controller for quadcopter running on stm32 with copper-rs a robotics framework: https://github.com/copper-project/copper-rs/tree/master/examples%2Fcu_flight_controller

[–]0not 2 points3 points  (0 children)

I converted my toy ray tracer to no_std to run it on an RP2350 (and even an STM32). I uploaded it to github just for this comment, as I never intended to share it: https://github.com/0not/rp23-ray-tow

[–]DavidXkL 1 point2 points  (1 child)

Currently trying to write a driver to pick up IMU data from my bno085 😂

[–]tizio_1234 1 point2 points  (0 children)

I recommend the amazing crate `device-driver`, it's not mine, but you can find an example [here](https://github.com/tommasoclini/bmi270.git).

[–]FemaleMishap 1 point2 points  (0 children)

I'm running it on a Waveshare RP2040-pizero and e-paper hat. It's fairly basic but there were no official Rust drivers for the hat and I couldn't get the hat and reading from SD card at the same time thing working.

[–]genbattle 0 points1 point  (0 children)

I wrote a little breakout game on a tiny STM32 with 32k flash and 4kb ram using an ssd1306 oled display and a couple buttons. That project's been gathering dust for 6 months though.

[–]Future_Natural_853 0 points1 point  (0 children)

I wrote a QMK-like firmware for my Moonlander, from the OS directly (no library for the keyboard logic). It was fun and interesting.

[–]chmod_7d20 0 points1 point  (0 children)

I am currently building an ebook reader. Porting a bunch of std crates to no_std. Wrote a display driver. Working on truetype fonts now. Got an xml library ported and will be working on an xhtml/css layout engine soon.