Hardware‎ > ‎The Critterbot Robot‎ > ‎

Flashing the Firmware

Flashing the AVR microcontrollers

The purpose of this page is to explain / guide the reflashing of the AVRs. It is not, in its current state, meant to be a step-by-step guide
to reflashing the AVRs.

Used Mike Sokolsky's Eclipse. The upload to AVR button does wonder.
The CritterbotAVRPower and CritterbotAVRMotor projects (on Mike's directory)  can be built and flashed directly.

You need to set the proper switch (there are four of them, SW1, SW2, POWER, MOTOR) on the bottom board.
Only one switch (POWER or MOTOR) should be on. On the picture, the switch POWER is on.

To reflash the power AVR from the command line:

avrdude -pm324p -cavrisp2 -P usb -Uflash:w:CritterbotAVRPower.hex:a

The AVRs are different types. The motor AVRs are m168, the power AVR is m324p.
The programmer will report a difference in signature if you try to reprogram the wrong one.

1. The flat ribbon cable must be disconnected
2. The Critterbot must be powered (not necessarily via batteries)
3. Disconnect power before disconnecting the serial programmer.
4. Note that Walter is powered on even though the ribbon cable is disconnected.

Flashing the ARM

  1. The arm firmware is available from google code.  The current code is on walter in ~root/arm_firmware.
  2. Get arm-elf-gcc (note: at the moment a version of 4.1 is required to get a binary with a size of ~40k)
  3. Copy a correct Makefile compatible with the version of arm-elf-gcc (with cp Makefile.XXX Makefile)
  4. Compile it with make and make bin from the arm folder 
  5. Run: arm_ui (put the ARM in user interface)
  6. Run: program ./bin/main.boot to upload the program binary onto the arm
  7. kermit -c
  8. (in kermit) > bootloader program