This week Jonathan and Dan chat with Frank Vasquez and Chris Simmonds about Embedded Linux, and the 4th edition of the Mastering Embedded Linux Programming book. How has this space changed in the last 20 years, and what’s the latest in Embedded Linux?
Here at Hackaday Central, we fancy that we know a little something about Linux. But if you’d tasked us to run any GUI program inside a Linux terminal, we’d have said that wasn’t possible. But, it turns out, you should have asked [mmulet] who put together term.everything.
You might be thinking that of course, you can launch a GUI program from a terminal. Sure. That’s not what this is. Instead, it hijacks the Wayland protocol and renders the graphics as text. Or, if your terminal supports it, as an image. Performance is probably not your goal if you want to do this. As the old saying goes, “It’s not that the dog can sing well; it’s that the dog can sing at all.”
If, like us, you are more interested in how it works, there’s a write up explaining the nuances of the Wayland protocol. The article points out that Wayland doesn’t actually care what you do with the graphical output. In particular, “… you could print out the graphics and give them to a league of crochet grandmas to individually tie together every single pixel into the afghan of legend!” We expect to see this tested at an upcoming hacker conference. Maybe even Supercon.
We generally don’t like Wayland very much. We use a lot of hacks like xdotool and autokey that Wayland doesn’t like. We also think people didn’t understand X11’s network abilities until it was too late. If you think of it as only a video card driver, then you get what you deserve. But we have to admit, we are humbled by term.everything.
Keeping track of time is essential, even for microcontrollers, which is why a real-time clock (RTC) peripheral is a common feature in MCUs. In the case of the STM32 family there are three varieties of RTC peripherals, with the newest two creatively called ‘RTC2′ and RTC3’, to contrast them from the very basic and barebones RTC that debuted with the STM32F1 series.
Commonly experienced in the ubiquitous and often cloned STM32F103 MCU, this ‘RTC1’ features little more than a basic 32-bit counter alongside an alarm feature and a collection of battery-backed registers that requires you to do all of the heavy lifting of time and date keeping yourself. This is quite a contrast with the two rather similar successor RTC peripherals, which seem to insist on doing everything possible themselves – except offer you that basic counter – including giving you a full-blown calendar and today’s time with consideration for 12/24 hour format, DST and much more.
With such a wide gulf between RTC1 and its successors, this raises the question of how to best approach these from a low-level perspective.
For all its friendly countenance and award-winning industrial design, there’s one thing the venerable Macintosh Plus can’t do: fit into a 1U rack space. OK, if we’re being honest with ourselves, there are a lot of things a Mac from 1986 can’t do, but the rack space is what [identity4] was focused on when they built the 2025 Rackintosh Plus.
Some folks may have been fooled by this ad to think this was an actual product.
For those of you already sharpening your pitchforks, worry not: [identity4]’s beloved vintage Mac was not disassembled for this project. This rack mount has instead become the home for a spare logic board they had acquired Why? They wanted to use a classic Mac in their studio, and for any more equipment to fit the space, it needed to go into the existing racks. It’s more practical than the motivation we see for a lot of hacks; it’s almost surprising it hasn’t happened before. (We’ve seen Mac Minis in racks, but not the classic hardware.)
Aside from the genuine Apple logic board, the thin rack also contains a BlueSCSI hard drive emulator, a Floppy Emu for SD-card floppy emulator, an RGB-to-HDMI converter to allow System 7 to shine on modern monitors, and of course a Mean Well power supply to keep everything running.The Floppy Emu required a little light surgery to move the screen so it would fit inside the low-profile rack. [identity4] also broke out the keyboard and mouse connectors to the front of the rack, but all other connectors stayed on the logic board at the rear.
Sound is handled by a single 8-ohm speaker that lives inside the rack mount, because even if the Rackintosh can now fit into a 1U space, it still can’t do stereo sound…or anything else a Macintosh Plus with 4 MB of RAM couldn’t do. Still, it’s a lovely hack. and the vintage-style advertisement was an excellent touch.
Recently, Linux has been rising in desktop popularity in no small part to the work on WINE and Proton. But for some, the year of the Linux desktop is not enough, and the goal is now for the year of the Linux phone. To that end, an Android Linux translation layer called Android Translation Layer (we never said developers were good at naming) has emerged for those running Linux on their phones.
Android Translation Layer (ATL) is still in very early days, and likely as not, remains unpackaged on your distro of choice. Fortunately, a workaround is running an Alpine Linux container with graphics pass through via a tool like Distrobox or Toolbox. Because of the Alpine derived mobile distribution postmarketOS, ATL is packaged in the Alpine repos.
In many ways, running Android apps on Linux is much easier then Windows apps. Because Android apps are architecture independent, hardware emulation is unnecessary. With such similar kernels, on paper at least, Android software should run with minimal effort on Linux. Most of what ATL provides is a Linux/Android hardware abstraction layer glue to ensure Android system calls make their way to the Linux kernel.
Of course, there is a lot more to running Android apps, and the team is working to implement the countless Android system APIs in ATL. For now, older Android apps such as Angry Birds have the best support. Much like WINE, ATL will likely devolve into a game of wack-a-mole where developers implement fresh translation code as new APIs emerge and app updates break. Still, WINE is a wildly successful project, and we hope to see ATL grow likewise!
Recently, [Solder Hub] put together a brief video that demonstrates the basics of a Hall Effect sensor — in this case, one salvaged from an old CPU fan. Two LEDs, a 100 ohm resistor, and a 3.7 volt battery are soldered onto a four pin Hall effect sensor which can toggle one of two lights in response to the polarity of a nearby magnet.
If you’re interested in the physics, the once sentence version goes something like this: the Hall Effect is the production of a potential difference, across an electrical conductor, that is transverse to an electric current in the conductor and to an applied magnetic field perpendicular to the current. Get your head around that!
Most people’s memories of programming in the 8-bit era revolve around BASIC, and not without reason. Most of the time, it was all we had. On the other hand, there were other options if you sought them out, and [Paul Lefebvre] makes the case that Goto10Retro that Action! was the best of them.
The limits of BASIC as an interpreted language are well-enough known that we needn’t go over them here. C and Pascal were available for some home computers in the 1980s, and programs written in those languages ran well, but compiling them? That was by no means guaranteed.
The text editor. Unusual for Atari at the time, it allowed scrolling along a line of greater than 40 char.
For those who lived on the Atari side of the fence, the Action! language provided a powerful alternative. Released by Optimized Systems Software in 1983, Action! was heavily optimized for the 6502, to the point that compiling and running simple programs with “C” and “R” felt “hardly slower” than typing RUN in BASIC. That’s what [Paul] writes, anyway, but it’s a claim that almost has to be seen to be believed.
You didn’t just get a compiler for your money when you bought Action!, though. The cartridge came with a capable text editor, simple shell, and even a primitive debugger. (Plus, of course, a hefty manual.) It’s the closest thing you’d find to an IDE on a computer of that class in that era, and it all fit on a 16 kB cartridge. There was apparently also a disk release, since the disk image is available online.
Unfortunately for those of us in Camp Commodore, the planned C-64 port never materialized, so we missed out on this language. Luckily our 64-bit supercomputers can easily emulate Atari 8-bit hardware and we can see what all the fuss was about. Heck, even our microcontrollers can do it.