Programming Ada: First Steps On The Desktop

Who doesn’t want to use a programming language that is designed to be reliable, straightforward to learn and also happens to be certified for everything from avionics to rockets and ICBMs? Despite Ada’s strong roots and impressive legacy, it has the reputation among the average hobbyist of being ‘complicated’ and ‘obscure’, yet this couldn’t be further from the truth, as previously explained. In fact, anyone who has some or even no programming experience can learn Ada, as the very premise of Ada is that it removes complexity and ambiguity from programming.

In this first part of a series, we will be looking at getting up and running with a basic desktop development environment on Windows and Linux, and run through some Ada code that gets one familiarized with the syntax and basic principles of the Ada syntax. As for the used Ada version, we will be targeting Ada 2012, as the newer Ada 2022 standard was only just approved in 2023 and doesn’t change anything significant for our purposes.

Continue reading “Programming Ada: First Steps On The Desktop”

The I960: When Intel Almost Went RISC

The i960 KA/KB/MC/XA with the main functional blocks labeled. Click this image (or any other) for a larger version. Die image courtesy of Antoine Bercovici. Floorplan from The 80960 microprocessor architecture.
The i960 KA/KB/MC/XA with the main functional blocks labeled. Click this image (or any other) for a larger version. Die image courtesy of Antoine Bercovici. Floorplan from The 80960 microprocessor architecture.

From the consumer space it often would appear as if Intel’s CPU making history is pretty much a straight line from the 4004 to the 8080, 8088 and straight into the era of Pentiums and Cores. Yet this could not be further from the truth, with Intel having churned through many alternate architectures. One of the more successful of these was the Intel i960, which is also the topic of a recent article by [Ken Shirriff].

Remarkably, the i960 as a solid RISC (Reduced Instruction Set Computer) architecture has its roots in Intel’s ill-fated extreme CISC architecture, the iAPX 432. As [Ken] describes in his comparison between the i960 and 432, both architectures are remarkably similar in terms of their instruction set, essentially taking what it could from the 432 project and putting it into a RISC-y shape. This meant that although the i960 could be mistaken as yet another RISC CPU, as was common in the 1980s, but integrated higher-level features as well, such as additional memory protection and inter-process communication. Continue reading “The I960: When Intel Almost Went RISC”

Civilian RC Car Uses Lego NXT And Ada

Back in the last century, the US Department of Defense declared that Ada was going to be used everywhere and for everything. Books were published, schools build curriculum. Working programmers, however, filled out waivers to continue working in their languages of choice. As a result, only a little bit of safety-critical software really used Ada. However, we’ve noticed a bit of a resurgence lately. Case in point: an RC car using Ada for the brains. You can watch it tool around in the video below.

This isn’t the first time we’ve heard about Ada in the past few months. Partially, this could be because of the availability of the GNU compiler, although that’s been around since 1995, so maybe there’s another explanation. Ada’s strong typing does tend to plug holes that hackers exploit, so while we would hate to say it is hack proof, it certainly is hack resistant compared to many popular languages.

Continue reading “Civilian RC Car Uses Lego NXT And Ada”

Hackaday Podcast 035: LED Cubes Taking Over, Ada Vanquishes C Bugs, Rad Monitoring Is Hot, And 3D Printing Goes Full 3D

Hackaday Editors Mike Szczys and Elliot Williams get caught up on the most interesting hacks of the past week. On this episode we take a deep dive into radiation-monitor projects, both Geiger tube and scintillator based, as well as LED cube projects that pack pixels onto six PCBs with parts counts reaching into the tens of thousands. In the 3D printing world we want non-planar printing to be the next big thing. Padauk microcontrollers are small, cheap, and do things in really interesting ways if you don’t mind embracing the ecosystem. And what’s the best way to read a water meter with a microcontroller?

Take a look at the links below if you want to follow along, and as always tell us what you think about this episode in the comments!

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 035: LED Cubes Taking Over, Ada Vanquishes C Bugs, Rad Monitoring Is Hot, And 3D Printing Goes Full 3D”

Why Ada Is The Language You Want To Be Programming Your Systems With

The Ada programming language was born in the mid-1970s, when the US Department of Defense (DoD) and the UK’s Ministry Of Defence sought to replace the hundreds of specialized programming languages used for the embedded computer systems that increasingly made up essential parts of military projects.  Instead, Ada was designed to be be a single language, capable of running on all of those embedded systems, that offered the same or better level of performance and reliability.

With the 1995 revision, the language also targeted general purpose systems  and added support for object-oriented programming (OOP) while not losing sight of the core values of reliability, maintainability and efficiency. Today, software written in Ada forms the backbone of not only military hardware, but also commercial projects like avionics and air-traffic control systems. Ada code controls rockets like the Ariane 4 and 5, many satellites, and countless other systems where small glitches can have major consequences.

Ada might also be the right choice for your next embedded project. Continue reading “Why Ada Is The Language You Want To Be Programming Your Systems With”

Programming A RISC-V Softcore With Ada

We were contacted by [morbo] to let us know about a project on the AdaCore blog that concerns programming a PicoRV32 RISC-V softcore with Ada. The softcore itself runs on a Lattice ICE40LP8K-based TinyFPGA-BX FPGA board, which we have covered in the past.

The blog post describes how to use the Community edition of the GNAT Ada compiler to set up the development environment, before implementing a simple example project that controls a strip of WS28212b RGB LED modules. There are two push buttons changing the animation and brightness of the lights.

The source can be found at the author’s Github repository, and contains both the Ada source and the Verilog source for the PicoRV32 softcore. To build the project one needs the GNAT compiler, as well as the open-source iCE40 development tools to compile the softcore.

There is a video demonstrating the finished example project, that we’ve placed below the break.

Continue reading “Programming A RISC-V Softcore With Ada”

Pen-Plotter Firmware Written Completely In Ada

[Fabian Chouteau] built a plotter out of CD-ROM parts. Yawn, you say? Besides being a beautiful physical build, this one has a twist. He wrote the software and firmware for the entire project himself, in Ada.

Ada is currently number two on our list of oddball programming languages that should be useful for embedded programming. It’s vaguely Pascal-y, but with some modern object-oriented twists. It was developed for safety-critical, real-time embedded systems (by the US Department of Defense), and is used in things like airplanes, rockets, and the French TGV trains. If that sounds like overkill for your projects, [Fabian]’s project shows that it’s still very tractable.

In his GitHub, he re-implements the GRBL G-code generator and then writes a GUI front-end for it. In his writeup, he mentions that the firmware and its simulator for the front-end use exactly the same code which is quite a nice trick, and guarantees no (firmware) surprises when moving from the modelled device to the real thing.

We looked quickly around for Ada resources and came up with: GNAT, the GNU Ada compiler, and its derivatives: GNAT for ARM (STM32-flavor), ARM-Ada (LPC21xx flavor), AVR-Ada, and MSP430-Ada.

Any of you out there use Ada in embedded work? We’d love to hear your thoughts.

Continue reading “Pen-Plotter Firmware Written Completely In Ada”