Bootloading Atmega32l-8au

I have never bootloaded Arduino on to a bare chip before so please excuse me if this is a bit noob-ish.

I have a board with an Atmega32l-8au chip and I want to put the Arduino booloader on it using a UsbTiny ISP programmer. I have tried setting the board to "Leonardo" in Prototype but I get an invalid chip signature message from AVRDude when I try to burn the bootloader.

Is there a board type more suitable to the Atmega32l-8au than Lenonardo, or is there a setting I can change to get the Leonardo bootloader on there? Is this even a realistic thing to be trying?

I have Googled it to death and read some other threads on here about Atmega32 but given my inexperience I am not sure if they would work for this specific chip, even if I could follow what they did...

Any help gratefully received

Bump!

Nobody got a view on this?

I'm not sure if there is a bootloader for the 32L chip. However this might help with putting it on, if you can find one:

I have tried setting the board to "Leonardo" in Prototype but I get an invalid chip signature message from AVRDude when I try to burn the bootloader.

The Leonardo has a different chip to the Atmega32L. Plus the hardware (pins) would be different so I strongly doubt that the Leonardo bootloader would work.

Someone else had recently asked the same thing.

See, ATMEGA32A-PU in place of ATMEGA328 - #16 by hiduino - Microcontrollers - Arduino Forum

Thanks for the replies. I would like to get into that but don’t have the time at the moment.

sirch:
Thanks for the replies. I would like to get into that but don't have the time at the moment.

Get into what? Solving your problem?

atmega32 = atmega32L, and the optiboot does support atmega32.

Did you Google it? I did.

About 92,500 results.

One of which was:

http://forum.arduino.cc/index.php/topic,151090.0.html

Enclosed pls find the Optiboot 4.6 with atmega32 support.

Ok, like I said originally I am new to this. Yes I Googled it ... a lot ... over several weeks.

Also like I said I tried the Leonardo, which is, according to Google, ATMega32 based but above you say it's not the same, now you seem to be saying that an ATMega32 bootloader will do.

I bought a board with this chip on it for a few quid off ebay, naively I had assumed that an ATMega32l-8au was similar enough to an ATmega32u4 (which Google tells me is what is on a Leonardo) for it to work but apparently not. I have been round the block enough times to know that I could spend weeks configuring a bootloader for this chip and still not get it to work. Or I could just chalk the few quid up to experience and buy a ATMega328 chip instead, hence saving several weeks of grief…

naively I had assumed that an ATMega32l-8au was similar enough to an ATmega32u4

Well, they are not. They are different devices.

OK, so in a fit of "who dares wins" I thought I'd try the optiboot thing.

On the optiboot website it says "create a hardware folder in your sketches folder". I did that but no additional boards appear in the list (I have to say I was skeptical...) I am running Arduino 1.0.5 which believe is fairly up-to-date.

So, fell at the first hurdle...

Getting ambitious I thought I'd give Avrdude a go. So I succeeded in uploading a little sketch that blinks the LEDs - great.

So off I went to the Optiboot folder to find the .hex file for the Atmega32, I couldn't find one.The boards.txt file has

atmega32o.name=[Optiboot] ATmega32 based board
atmega32o.upload.protocol=arduino
atmega32o.upload.maximum_size=32256
atmega32o.upload.speed=115200
atmega32o.bootloader.low_fuses=0xff
atmega32o.bootloader.high_fuses=0xde
atmega32o.bootloader.path=optiboot
atmega32o.bootloader.file=optiboot_atmega32.hex
..

but there is no optiboot_atmega32.hex in the bootloaders/optiboot folder.

fell at the -1 hurdle...

Seems to be that file attached to this post:

You can also try the reference I gave earlier.

http://forum.arduino.cc/index.php?topic=174311.msg1305374#msg1305374

See the attached files to the link.

The optiboot 5.0a includes atmega32, but with

atmega32: AVR_FREQ ?= 11059200L

So you have to adjust it to your frequency. There is none atmega32.hex in the folder, you have to compile it.

For example with (atmega32L is the version for lower voltages and 0..8MHz):

make atmega32 AVR_FREQ=8000000L BAUD_RATE=57600 UART=0 LED=B0 LED_START_FLASHES=2

Didn't get a lot of time on this this evening but I did get the Optiboot boards to appear in the Arduino IDE.

What I did was create a Hardware folder in my sketches folder. Then added an optiboot folder which contains two folders bootloaders and cores and also boards.txt.
I then just copied everything into both bootloaders and cores - I guess these ought to be split out some how. I have NOT had chance to test this yet...

So I have

[ArduinoSketches]
|

  • /hardware
    |
  • boards.txt
    |
  • /cores
    | |
    | + [files]
    |
  • /bootloaders
    | |
    | + [files]
    |

The files should be one level deeper. And you should add a variants folder for the pins_arduino.h file.

[ArduinoSketches]
|

  • /hardware
    |
  • /{younameit}
    |
  • boards.txt
    |
  • /cores
    | |
    | + /{corename}
    | |
    | + [files]
    |
  • /variants
    | |
    | + /{variantname}
    | | |
    | | + pins_arduino.h
    | + [/others]
    |
  • /bootloaders
    | |
    | + /optiboot
    | |
    | + [files]

Yes, thanks I missed out the optiboot folder:
So I have

[ArduinoSketches]
|

  • optiboot
    |
  • /hardware
    |
  • boards.txt
    |
  • /cores
    | |
    | + [files]
    |
  • /bootloaders
    | |
    | + [files]
    |

optiboot doesn't have pins_arduino.h

it does have pin_defs.h which seems to cover various processors

sirch:
optiboot doesn't have pins_arduino.h

it does have pin_defs.h which seems to cover various processors

I guess there is some confusion. Optiboot is not a board type nor mcu type. Optiboot is a bootloader code. It should be under /hardware/{boardtype or mcutype}/bootloaders/optiboot.

[ArduinoSketches]
|

  • /hardware
    |
  • /atmega32
    |
  • boards.txt
    |
  • /cores
    | |
    | + /standard
    | |
    | + [files]
    |
  • /variants
    | |
    | + /atmega32
    | |
    | + pins_arduino.h
    |
  • /bootloaders
    | |
    | + /optiboot
    | |
    | + optiboot_atmega32.hex

If you want to program the ATmega32L from the Arduino IDE then you will need more than just the Optiboot bootloader. You will need the other support files as shown above as well.
For details see, ATMEGA32A-PU in place of ATMEGA328 - #16 by hiduino - Microcontrollers - Arduino Forum