5 Comments

Hey there! Appreciate your writings! One thing that I was hoping to find is how are you getting your C code compiled and flashed to the MCU? Ie what programmers are you using (off shelf or home-made) etc. Any chance you are planning to write a post on that topic?

Expand full comment
author

For a variant put together by a reader, check out: https://twitter.com/rgerganov/status/1623000100229328898

I believe it's based on an earlier revision that I shared on Twitter & Mastodon, but the fundamental approach is the same.

Expand full comment

I've been reading the posts and while I appreciate the demystification part, I'm not sold on them being viable alternatives 😄

In other words, I have a new-found appreciation for everything that OS-based devices abstract away.

Anyway, thanks for writing these - you inspired me to learn more about this stuff

Expand full comment
author
Jan 31, 2023·edited Feb 1, 2023Author

In this particular example, I think it boils down to whether you have a soundcard on board or not. If you can shell out $50 for a Raspberry Pi with an audio plug and have the power budget to keep it running, then yeah, this particular project can be replaced with a small shell script.

If you don't, you're gonna be banging bits much the same way Linux or no Linux, except the task is more difficult when schedulers, garbage collectors, and other stuff gets in the way.

That said, I'm not really advocating ditching OS-based, "full computer" solutions altogether. It's just that there are interesting trade-offs, and folks often get it in their heads that it would be *nearly impossible* to do something like driving a graphics display or processing audio on an MCU.

In reality, they have options. The source code for the audio thing is ~180 lines of actual code, and it's not particularly esoteric or obtuse.

Expand full comment
author

One-part schematics here: https://lcamtuf.coredump.cx/soft/playback.pdf

Expand full comment