Bare-metal Programming On The Teensy 3

Teensy

The Teensy 3.x series of boards are amazing pieces of work, with a tiny, breadboard-friendly  footprint, an improbable amount of IO pins, and a powerful processor, all for under $20. [Karl Lunt] loves nearly all the features of the Teensy 3, except for one: the Arduino IDE. Yes, the most terrible, most popular IDE in existence. To fix this problem, [Karl] set up a bare-metal development environment, and lucky us, he’s chosen to share it with us.

[Karl] is using CodeBench Lite for the compiler, linker, assembler, and all that other gcc fun, but the CodeSourcery suite doesn’t have an IDE. Visual Studio 2008 Express is [Karl]‘s environment of choice, but just about every other IDE out there will do the same job. Of course a make utility will be needed, and grabbing the docs for the Freescale K20 microcontroller wouldn’t be a bad idea, either.

The end result is [Karl] being able to develop for the Teensy 3.X with the IDE of his choice. He was able to quickly set up a ‘blink a LED’ program with the new toolchain, although uploading the files to the Teensy does require the Teensy Loader app.

 

Antares: One bare metal build system to rule all microcontrollers

antares-build-system

[Andrew Andrianov] has the same itch we do when it comes to the variety of inexpensive dev boards out there. They put hardware in your hands but when it comes to the IDE it tends to be a very mixed bag. Some offer hobbled copies of proprietary software, but in most cases you’re on your own for any kind of open source development environment support. He and a couple of friends are working to change that. What they’ve come up with is Antares: a single build system which can compile code for multiple microcontrollers.

The idea is to make the coding environment agnostic from the compile/burn process. This serves a few purposes; it lets you use the IDE you’re most comfortable with, be it Eclipse or emacs. It also seeks to ease the pain of writing libraries that will work with multiple different chips. So far the package supports several of the usual suspects: AVR, msp430, STM32 ARM chips, as well as AT89,and STC variants of 8051. Other chips can be added as more hands make light work (in other words, roll up your sleeves and help these guys out!). Right now development targets Linux dev platforms but OS X has been shown to work with some patches.

The link above is a rather daunting readme from the Github repo. If you need a better overview before diving in hit up the RC1 announcement on [Andrew's] blog.

Raspberry Pi plays MIDI without an operating system

For all the interesting DSP functions locked away in the Raspberry Pi, it’s still hard to imagine using the Raspberry Pi as an eminently capable software synthesizer, tracker, or sequencer. Running any of the usual Linux digital audio programs means – surprise – running Linux, and the performance penalty associated with that.

It would be much better if all these audio programs could run directly on the Raspberry Pi without an operating system, and [Joe]‘s project is right up that alley. He’s playing MIDI files without an operating system, in effect making the Raspberry Pi a very powerful embedded platform.

[Joe]‘s build is the first bare metal audio code for the Raspberry Pi. It’s actually an LV2 plugin host that will load audio plugins, read MIDI files, and shoot the resulting audio out over the 1/8″ jack on the Pi.  This work wouldn’t have been possible without a few Raspberry Pi bare metal tutorials put together by [David Welch].

Hopefully this won’t be the last we’ll see of [Joe] and his code; the Raspberry Pi has more than enough horsepower to be an amazing sampler, synth, beat machine, or the next generation of Akai MPC. All we need are a few brave coders to take up coding bare metal on the Raspberry Pi.