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!!

Speak Your Mind

*

Related Hacks in Software Development

  • Getting a textured 3D scan from just a webcam
  • Detecting ASCII art across the Internet
  • Finding the average of every font
  • Do anything with the help of lucid dreaming goggles
  • Emulating ARM on an 8-pin AVR