Building and installing new firmware on Mac

43 views
Skip to first unread message

Mirko Buholzer

unread,
Sep 14, 2011, 6:54:07 PM9/14/11
to flysig...@googlegroups.com
Hi all 

Since I wanted to tweak my firmware of my FlySight and I am working on a mac, I went through an exercise of setting up a build environment for mac. 
To help any future mac developers I wanted to share my experience so they don't have to spend a morning ;).


After downloading and installing those 2 software packages, you should be able to make the main.hex file and install it on your device. 

Prepare your FlySight for update (http://flysight.ca/wiki/index.php?title=Starting_bootloader) - e.g. triple power cycle the device and connect it to your mac. 
Use the following 3 commands in your terminal and you are done:

dfu-programmer at90usb1287 erase
dfu-programmer at90usb1287 flash main.hex --debug 20
dfu-programmer at90usb1287 start 

As an example and test, I added the following code to Main.c - int main(void) function before if (USB_VBUS_GetStatus()): 

// Visual ident to make sure we are running our custom version
LEDs_ChangeLEDs(LEDS_ALL_LEDS, LEDS_RED);
delay_ms(250);
LEDs_ChangeLEDs(LEDS_ALL_LEDS, LEDS_GREEN);
delay_ms(250);
LEDs_ChangeLEDs(LEDS_ALL_LEDS, LEDS_RED);
delay_ms(250);
LEDs_ChangeLEDs(LEDS_ALL_LEDS, LEDS_GREEN);
delay_ms(250);

This gives you a nice visual identification that the new code is running. 

Happy hacking :), Mirko

Reply all
Reply to author
Forward
0 new messages