Microcontrollers and stuff A blog by Derk Vedelaar

8May/115

Minimus avr usb howto compile

I just bought the Minimus AVR usb development board from Deal Extreme (this is the version 1 development board). It is a nice small development board with an AVR microprocessor on board. It is used a lot by Playstation 3 modders and a lot of information can be found about this.
But I was unable to find a nice tutorial about compiling your own project.

So, after a day or so I found out how to do it (under Windows).

AVR provides a compiler that is capable of compiling projects for this microprocessor. There are a lot of open source projects out there that you can compile for this board, but I used the blink led demo code provided by minimus.

What i did:
I downloaded AVR Studio 4.18 (build 684) (registration required). This doesn't support the minimus board officially, but it worked fine for me. After installing and running AVR studio you get a prompt that asks you to create a new  project.

  • Click New Project
  • To compile C code choose GCC as project type.
  • Give your project a name and leave the other options default (""create initial file" checked and "create folder" unchecked)
  • As the AVR studio does not support minimus you can choose any debugger. I chose AVR Dragon, wich works fine.
  • Choose as device the AT90USB162
  • Click finish

You now have a project that can compile code for your minimus. Paste the code in the example C program from the minimus site in your main program and click Build -> Build from the menu or press F7.

Your compiled hex file will appair in you my documents folder/ default. You can change this if you want in the Project -> Configuration Options in AVR studio.

Now programming the device. There are instructions provided by minimus on how to do this. Click here. But I will tell in short what to do:

Download Atmel Flip from the Atmel site (FLIP 3.4.2 for Windows).

  • Install the application and run it.
  • Insert the minimus board into an usb port and wait till windows recognizes it. If this is the first time you program it, it automatically goes to programmer mode. If you programmed it before, you need to press a button combination:
    Press "Reset"; Press "Hwb"; Release "Reset"; Release "Hwb"
    Your key is now in programmer mode.
  • Press the first button in the toolbar that looks like a processor chip
  • Choose AT90USB162 from the list
  • Press the second button in the toolbar that looks like an usb cable and choose usb from the dropdown menu (or press ctrl+u).
  • Click "open" in the box. The flip software will now connect to the minimus
  • Press the third last button in the toolbar that looks like a book with an arrow pointing to it
  • Browse to your hex file
  • Check all the checkboxes on the left side of the screen "Erase" "Blank check" "Program" "Verify"
  • Press "Run" and then "Start application". The application is now running.

Good luck with compiling and running projects for this key. Links to cool open source programs for this key are always welcome in the comments.

Posted by Derk