MEAM.Design - MAEVARM - Getting Started in Windows

With an onboard bootloader, all you need to program the M1 or M2 is a USB cable and some freely-available development software.

Development Tools

To set up the development environment on your own computer, you'll need copies of the following (all of which are free):
The first time that you plug in the board to your newly-configured system and set it to the bootloader mode, you'll need specify the USB driver for the device. Windows usually cannot find the driver on it's own, so you should point it to C:/Program Files/Atmel/Flip 3.4.7/usb.

Compile source code

Option 1: Creating a new project in AtmelStudio 6

1. Start AtmelStudio 6.0
2. Click on New Project
3. Select GCC C Executable Project, give your project a name, set the Location, then click Ok
4. Set the device to ATMEGA32U4 and click Ok
5. Within AtmelStudio, build the project (F7, or Build from the Build menu)

Option 2

For this option, you don't need to install AtmelStudio.

1. Download the template code
2. Place your source files (*.c) in atmega/src folder
3. Place your header files (*.h) in atmega/inc folder
4. Navigate command prompt (cmd) to atmega folder and execute:
5. You should see some information about your compiled files and memory usage and the last line should be
[>-----Build Successfully-----<]

Uploading your code

1. start Flip 3.4.7
2. click the button that looks like an IC, and select the ATMEGA32U4
3. plug in your microcontroller (if you haven't done so already)
4. hold the onboard button down for about two seconds (until the green LED turns on) then release (the orange LED should now be illuminated)
5. click the button that looks like a USB cable, select USB, then select Open
6. select Load Hex File from the File menu (the hex file usually lives in the default folder within your project folder)
7. click Run to upload your code to the micro
8. to run your code, press the onboard button for less two seconds (the orange LED should now be off)