Trouble uploading bootloader to Atmega644P chip ) :

Please excuse my frustration, but this has been a complete nightmare for me.

I've been working with the 'Board Programmer' code from Nick Gammons website for weeks now, and every step I take I get thrust into a weeklong headache trying to decipher all of what went wrong.

To make it worse, the last dozen or so posts I've written asking for help/support, I've received literally zero replies. Am I alone? Am I asking the wrong questions?

Is this guy still around?

I want to post on his site, but unfortunately he asks specifically to post here. well... here I am.

Ok. - Rant over, here's my real issue.

I'm trying to build a board from scratch using an "Atmel AtMega644P 20PU 1033" 20 pin chip.

I've got everything wired exactly as described on this page:
https://www.gammon.com.au/forum/?id=11637

under the "Atmega1284P minimal board" post, about 85% of the way down on the page.

When I go to upload the 'Board Programmer' Sketch, the ICSP programming mode enters just fine, but goes no further:

Atmega chip programmer.
Written by Nick Gammon.
Version 1.38
Compiled on May 24 2019 at 17:47:41 with Arduino IDE 10809.
Attempting to enter ICSP programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x96 0x0A
Processor = ATmega644P
Flash memory size = 65536 bytes.
LFuse = 0x62
HFuse = 0x99
EFuse = 0xFF
Lock byte = 0xFF
Clock calibration = 0x5D
No bootloader support for this device.
Programming mode off.
Type 'C' when ready to continue with another chip ...

I've got my decoupling capacitors in the correct spot. I've swapped a few out, still no luck.
I've ordered another chip, another set of crystals, more capacitors (18pf and 100nf or .1uF) as well as some more 10k pullup resistors.

I'm beyond lost here.
PLEASE if anyone is able to help in any way, I'll be extremely appreciative, and may buy you a coffe ( :

Here's the output from the Board Chip Detector sketch:

Atmega chip detector.
Written by Nick Gammon.
Version 1.20
Compiled on May 24 2019 at 18:09:37 with Arduino IDE 10809.
Attempting to enter ICSP programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x96 0x0A
Processor = ATmega644P
Flash memory size = 65536 bytes.
LFuse = 0x62
HFuse = 0x99
EFuse = 0xFF
Lock byte = 0xFF
Clock calibration = 0x5D
Bootloader in use: No
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 8192 bytes starting at E000

Bootloader:

Followed by about 600+ lines of 0xFF

Has anybody ever used this code?

Is anyone able to contact Nick Gammon for support?

Is there someone that I can pay $$ to help walk me through some of these things? How much?

OK I think I FINALLY figured this one out. Thanks so much for all the help!

I was updating the firmware in my 3d printer, and I stumbled across this video describing how to use an arduino to install a bootloader onto the Sanguino board.

Here's a link to that video:

I followed the steps in the first few minutes, and downloaded the "Sanguino" file from the Tools>Boards>Boards Manager tab.

^^ That was when my arduino was able to download the .json file that updates the boards menu. It now has an error finding that file??

That was about 2 months ago.

Today I (believe me it was a VERY lucky guess that led me here) was able to finally upload a bootloader onto my board. Here were the steps:

  1. After wiring everything as described on Nick Gammons page (link above), then
  2. Open the 'Arduino ISP' sketch.
    3.Upload it to your designated 'Programmer' board (in my case an Arduino UNO)
  3. Under the Tools>Boards menu, set you 'Board' to 'Sanguino'
  • Plug into the 'Programmer' Arduino board, and select the corresponding COM port.
  • Set the 'Programmer' to 'Arduino as ISP'
  1. FINALLY - click 'Burn Bootloader'

If I can get this far, I think any dummy can.

I guess the next step would be follow my trials and tribulations with the next steps in this post (though in this case, I was uploading with 2 Arduino UNO's, instead of an Arduino and a board made from scratch).

AAAANNND 30 seconds later I ran into another problem.

Actually, the same I started out with, except this time there is a bootloader showing up in the serial monitor.

SO

Read post 1.
I'm still having that same issue.

FML for the love of god if someone reads this, JUST POST SOMETHING.
ANYTHING

PLEASE

I've been working with the 'Board Programmer' code from Nick Gammon

I'm trying to build a board from scratch using an "Atmel AtMega644P 20PU 1033" 20 pin chip.

The problem is that instead of being able to upload the bootloader, I get a line that reads: "No bootloader support for this device."

I've got everything wired exactly as described on this page:
https://www.gammon.com.au/forum/?id=11637

under the "Atmega1284P minimal board" post, about 85% of the way down on the page.

When I go to upload the 'Board Programmer' Sketch, the ICSP programming mode enters just fine, but goes no further:

Atmega chip programmer.
Written by Nick Gammon.
Version 1.38
Compiled on May 24 2019 at 17:47:41 with Arduino IDE 10809.
Attempting to enter ICSP programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x96 0x0A
Processor = ATmega644P
Flash memory size = 65536 bytes.
LFuse = 0xFF
HFuse = 0xDE
EFuse = 0xFD
Lock byte = 0xCF
Clock calibration = 0x5D
No bootloader support for this device.
Programming mode off.
Type 'C' when ready to continue with another chip ...

The last 3 lines are where the problem is. There should be "Bootloader support for this device"

I want to be able to program my board using this code.

I've got my decoupling capacitors in the correct spot. I've swapped a few out, still no luck.
I've ordered another chip, another set of crystals, more capacitors (18pf and 100nf or .1uF) as well as some more 10k pullup resistors.

I'm beyond lost here.
PLEASE if anyone is able to help in any way, I'll be extremely appreciative, and may buy you a coffee ( :

I'm beyond over this. I've got to get this working for my business, so I've got money in the bank for the first person who can get my board to read properly on the serial monitor, like it does on Nick's site.

I'm happy to answer any question you have regarding my setup.

Please, I'm losing my hair over this

If the fuses and signature can be read, the basic programmer connection is working.

The problem appears to be that you do not have bootloader code for that particular CPU. Which bootloader were you intending to use?

In my opinion, there is no better programmer on the market than Pololu's AVR Programmer V2.1. That programmer works with every chip, every voltage level and software package I've tried, so it really is a waste of time and effort to cobble your own together.

A Person!!! ;D

I used the 'Sanguino' board to burn the 'Arduino as ISP' bootloader.

More info here:

That was the only way to get a bootloader on there to begin with (I think that's what I did)

Now I'm trying to use Nick Gammons 'Board Programmer' sketch to upload whatever bootloader that sketch has.

I've gotten that to work with an Arduino UNO, but not my board built from scratch with the Atmega644P chip

Thanks so much!

Why are you so set on using the 'Board Programmer' sketch? I don't see any point in that. It's much better to learn the real way to use an ISP programmer, since that is much more flexible. The Nick Gammon sketch is very limiting. It has its uses for creating a standalone programmer you can use without your computer, but for what you're doing it's much better to use the ArduinoISP sketch and the Arduino IDE's Tools > Burn Bootloader. And as a bonus, that approach is already working for you!

My advice for ATmega644P is that you use the excellent MightyCore, far superior to Sanguino:

ZRGuitarPickups:
there is a bootloader showing up in the serial monitor.

What does that mean?

So that pololu board would replace my arduino UNO that I'm using as a programmer, correct?

By that logic, could swapping arduino's possibly fix the issue as well? I'll give it a try

I'll try out the MightyCore as well.

The reason that I want to use the 'Board Programmer' code, is because (based on previous attempts) without uploading that first and programming my board using that sketch, I had so many other issues when moving on to Nick's 'Hex Uploader' code.

Ultimately, I'm trying to make a very small portable programmer that will sit permanently on top of my Arduino MEGA, and upload .hex files onto it, in the field, without a computer, phone or laptop

ZRGuitarPickups:
Ultimately, I'm trying to make a very small portable programmer that will sit permanently on top of my Arduino MEGA, and upload .hex files onto it, in the field, without a computer, phone or laptop

OK, now it makes sense. That is indeed the usage for which Nick Gammon's sketches are extremely useful. Unfortunately, I have never used these sketches so I can't offer any assistance. I know others here on the forum are familiar with it so I'm sure you'll get help from one of them.

That error you are getting "No bootloader support for this device" means the board programmer sketch does not support ATmega644P. You would have to enhance the board programmer sketch to include ability for it to program a ATmega644P. Who gets $10 to put the last nail in the coffin for the board programmer sketch method? Just kidding. You can resurrect this idea if you're interested, by adding ATmega644P support to Nick's sketch. Get crackin'.

Crossroads has a nice board here:

Two display programmer supporting up to 256 files, $50.

that pololu board would replace my arduino UNO

It acts as a programming interface between a USB port on the computer used to program the target and the target, using the AVR ISP programming protocol. Very handy to burn bootloaders, or to program the target without using a bootloader.

It also acts as a separate UART serial interface for serial monitor traffic back to the programming computer.

If you plan to build an independent programming device, use the ISP protocol. Then you won't need a bootloader on the target, which frees up the bootloader memory for your application.

dmjlambert:
That error you are getting "No bootloader support for this device" means the board programmer sketch does not support ATmega644P. You would have to enhance the board programmer sketch to include ability for it to program a ATmega644P. Who gets $10 to put the last nail in the coffin for the board programmer sketch method? Just kidding. You can resurrect this idea if you're interested, by adding ATmega644P support to Nick's sketch. Get crackin'.

OK, so the ATmega644P and ATmega1284P - while even though they have the same pinouts, they are NOT swappable in THIS particular case?

But doesn't he use that exact same chip (644P) in this link, under the "Example of use with Atmega644P (Sanguino)" post?

https://www.gammon.com.au/forum/?id=11638

^^That's exactly what I'd like to accomplish, but the new Sanguino boards are too large for my purposes, as are all of the boards I've seen from CrossRoads.

Trying to keep the whole bootloader within the 1.5"-2.5" dimensions

I've ordered a 1284P board - I'll try that in place of this chip.

On another note:
I can't upload the MightyCore library because I get this error under Tools>Boards>Board Manager:

Error downloading https://downloads.arduino.cc/packages/package_index.json

Please create links instead of just putting the http addresses in as plain text.

The different MCUs are not swappable, they have different signatures and would have different bootloaders and may have different fuse settings. You would have to study the data sheets to become thoroughly familiar (I know that is time consuming and tedious, but just a good idea).

In Nick's article that you're talking about, he is using the Atmega644P in the hex file uploader sketch (which puts a user program on the target MCU), not the board programmer sketch (which bootloads and sets fuses on the target MCU).

@ZRGuitarPickups, do not cross-post. Threads merged.

The 1284 and 644 need different bootloader binaries (they live at different addresses.)

Since Nick's "board programmer" sketch needs to have a bootloader binary included in the sketch for each chip that it will program, and has limited space, it does not include a bootloader for every chip that exists. Apparently it does not include a 644p binary.

the last dozen or so posts I've written asking for help/support, I've received literally zero replies. Am I alone?

You are essentially alone. The number of people who have worked with the AVR programming software and are familiar enough with their operation to create, say, a new variety of programmer, is probably in the 10 to 20 range (out of 800k+ Ardunio users (forum members)) A fair fraction of those are "elsewhere" (Lady Ada is one, and she has her own company to run. And there are some AVRFreaks/etc users who aren't big on Arduino in general. Even in the "professional" AVR programming areas, most people will just use existing development tools rather than ever learning much about how they actually work.