Emulating ARM On An 8-pin AVR

Falling on the heels of some fabulous ‘lets see what we can emulate on an AVR’ builds we’ve seen, [Dimitri] emulated an ARM Cortex-M0 on an 8-pin ATtiny85.

The emulator is written entirely in AVR assembly. Unfortunately, the instruction set of ATtinys don’t have a multiply instruction, so that had to emulated in a separate piece of code. Even with this addition, the emulator is very small; the core is just over 1300 instructions and small enough to fit on the Flash of the very small ‘tiny85.

Unlike the ATMega running Linux we saw last month, [Dimitri] won’t be doing anything crazy like making the tiniest and worst Linux computer ever. The Cortex-M0 doesn’t have a MMU, so Linux is out of the question. [Dimitri] could go with μCLinux, with the addition of a I2C EEPROM and RAM, but don’t expect a speed demon for an emulated ARM running at 200kHz.

[Dimitri] put all the code up on his webpage, and the installation is just running ‘make.’  It looks easy enough to get up and running very quickly, so we’re sure some bored hardware guru will come up with something interesting to do with this code.

9 thoughts on “Emulating ARM On An 8-pin AVR

  1. That’s really cool! Looks like there is an ATMega version too that can take advantage of the built in multiply instruction. Nice!

    FYI: The ~200 KHz is on a 16 MHz ATTiny85 (So I’m betting it’s much faster on a 20 MHz ATMega!). Not bad for running 32-bit apps on an 8-bit MCu!

    1. The NXP LPC11** (Cortex M0) and LPC13** (M3) come in 48-pin LQFP packages that are very solderable by amateurs. Breakout boards can be found quite inexpensively. Or, if you’ve got a hot-air tool, you can use the 32-pin QFN variants which are even more compact and awesome.

  2. For those who are wondering, ARM Cortex-M0 chips are actually very close in price to the ATtiny85 (less expensive in large quantities), are many, many times faster and have more memory, I/O and features. Moreover, Cortex chips have debugging capabilities that don’t suck.

  3. I like these projects a lot. For a couple of projects all I want is an ultra mega cheap Linux board that’s going to do one thing (run some Linux utility, such as DDNS updates) without actually porting that code from Linux to AVR.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.