Bootloading Arduino by writing BL directly to Flash sectors?

Hi all,

recently I ordered some arduino chips (Atmega328) online and I burnt one chip by wrong connection. After restoring circuit I found out that none of other chips works. Programmer not responding, reset didnt work....

So I thought that these chips might be blank (even seller marked them as with arduino bootloader). I have parallel programmer (on USB) - using this for copying and writing various EPROMS/Flash and other memories.
Its MiniPro TL866

http://www.autoelectric.cn/EN/TL866_main.html

It have inbuilt support with some MCUs like Atmega328 and I can read/write all the memory. It only shows me 32k and 1k sectors as data and code memory in this case. It also shows fuses.

Can I use this access to write Arduino bootloader to factory new chips (by just writing appropriate HEX dump to appropriate adress)?

Or its only way to bootload via ISP ?

I would say you could load the bootloader and set the fuses with that device.

CrossRoads:
I would say you could load the bootloader and set the fuses with that device.

I hope so :slight_smile:

So I did this:

Copied from Arduino IDE file ATmegaBOOT_168_atmega328.hex and converted it from Intel Hex to binary raw format. Then, I loaded this binary into chip from first address. Rest of memory filled with FF and verified against original file. All OK.
But after placing chip into test socket, I still cant get bootloader response.

Maybe wrong fuses settings?

I am afraid I will need another working chip with bootloader to make a working dump to clone.... :frowning:

Any ideas?

ATmegaBOOT_168_atmega328_converted.bin.txt (1.9 KB)

ATmegaBOOT_168_atmega328_from_IDE.hex.txt (5.4 KB)

dump.BIN.txt (32 KB)

The normal bootloader is the optboot one. For the fuses, see the boards file:

uno.bootloader.low_fuses=0xFF
uno.bootloader.high_fuses=0xDE
uno.bootloader.extended_fuses=0x05
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.bootloader.file=optiboot/optiboot_atmega328.hex

You cannot just use the hex?

But from the hex file it states as start address 7E00...

septillion:
You cannot just use the hex?

But from the hex file it states as start address 7E00...

Yeah, I am idiot :smiley: I firt loaded Intel Hex and thought that it was not loaded, didnt see data starting from 7E00. Ok, thank you for noticing me about this ! :slight_smile:

I will try changing fuses from boards and use Optiboot. I hope it will work....

OK, so loaded Optiboot Hex from IDE from 7E00 and set fuses according to this page:
~~http://www.martyncurrey.com/arduino-atmega-328p-fuse-settings/~~
(written settings in attachements)
But still no response from programmer. I am running out of ideas. Could it be damaged chip? If i can reliably read & write whole 32k memory I dont think so.
I think that loading dump from other chip would be the only solution.

IT WORKS !!! :slight_smile:

There was obvious problem with programmer not responding as before. I had to try reset many times until it loaded sketch as usual on finished boards :slight_smile:

chip_wth_optiboot.BIN.txt (32 KB)