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.

Comments

  1. Well, 200KHz is better than 6.5KHz of my last emulator :) and uClinux is a cool idea :)

  2. Mikey says:

    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!

  3. Mikey says:

    Looking at Cortex-M0s now… wow, only $6 from digi-key. But soldering 100-pin LQFP… hmmmm…. http://search.digikey.com/us/en/cat/integrated-circuits-ics/embedded-microcontrollers/2556109?k=cortex-m0

  4. Kuy says:

    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.

  5. ScottInNH says:

    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.

  6. marcus says:

    I like this project!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 97,581 other followers