English 中文(简体)
How do I program an AVR Raven with Linux or a Mac?
原标题:

This tutorial for programming these starts with programming the Ravens and Jackdaw with a Windows box. Can I do those initial steps with avrdude on a Linux or OS X machine instead? If so, how? Is there any risk of bricking the hardware if I just try?

I have a USB JTAG ICE MKii clone, which is supposed to work for this.

I m totally new to AVR, but very experienced with C/C++ programming on Linux or OS X, up to and including kernel programming... so any hint at all would be appreciated, I can read man pages, but only if I know what I m looking for.

最佳回答

You can always try. Maybe try virtualbox so you can run windows in linux or mac.

问题回答

Actually, I should have come back to this long since and posted my solution.

Yes, you can do this.

avrdude supports everything necessary, but there s a trick: the Raven won t successfully flash if you don t erase both processors first. So, first step, erase the device.

Then (this example is for the Jackdaw usb stick, but the same steps work for each processor in the Ravens too):

avr-objcopy -O ihex -j .eeprom ravenusbstick.elf ravenusbstick-eeprom.hex
avr-objcopy -v -O ihex -R .eeprom -R .fuse ravenusbstick.elf ravenusbstick.hex
sudo avrdude -u -p usb1287 -c jtagmkII -v -P usb -Uefuse:w:0xFF:m -Uhfuse:w:0x99:m -Ulfuse:w:0xE2:m -Ueeprom:w:ravenusbstick-eeprom.hex -Uravenusbstick.hex

If this gives an error, remove the line with the error from the hex file and try again. Obviously, use the right processor type and fuse settings.





相关问题
How do I program an AVR Raven with Linux or a Mac?

This tutorial for programming these starts with programming the Ravens and Jackdaw with a Windows box. Can I do those initial steps with avrdude on a Linux or OS X machine instead? If so, how? Is ...

Using array of chars as an array of long ints

On my AVR I have an array of chars that hold color intensity information in the form of {R,G,B,x,R,G,B,x,...} (x being an unused byte). Is there any simple way to write a long int (32-bits) to char ...

Function pointer location not getting passed

I ve got some C code I m targeting for an AVR. The code is being compiled with avr-gcc, basically the gnu compiler with the right backend. What I m trying to do is create a callback mechanism in one ...

Wireless communication: AVR based embedded system and iPhone

What is the best way to realize wireless communication between an embedded system (based on an AVR controller) and the iPhone? I think there are only two options: either WiFi or BlueTooth. The range ...

Turn on PC with USB-device

I want to be able to turn my PC on and off using an IR-remote sensor that is connected via USB to the PC. The sensor is a custom PCB implemented with an AVR microprocessor and V-USB software USB-...

8 bit enum, in C

I have to store instructions, commands that I will be receiving via serial. The commands will be 8 bits long. I need to preserve transparency between command name, and its value. So as to avoid ...

热门标签