Programming AtMega1284P requires -F parameter

I am trying to update my 3D printer ANET v1.7 board using an Arduino Uno as a bootloader. The Uno is programmed with the ISP program as per instructions. My computer is Kubuntu 20.04 with Arduino IDE 1.8.19. .
The Uno is connected to the ANET board correctly I think.
The Board selected is the MightyCore ATMega1284.

When I try and download the program to the board, I get the error message:
"
Sketch uses 64276 bytes (49%) of program storage space. Maximum is 130048 bytes.
Global variables use 2537 bytes (15%) of dynamic memory, leaving 13847 bytes for local variables. Maximum is 16384 bytes.
avrdude: Expected signature for ATmega1284P is 1E 97 05
Double check chip, or use -F to override this check.
Wrong microcontroller found. Did you select the right board from the Tools > Board menu?
"
How do I use the '-F' parameter?

PS difference between ATMega1284 and P variant is that the P variant is low power.

Don't use -F! You have chosen incorrect chip/board or there is a communication error.
The error just means that there is different signature bytes read out from the chip as expected one.
ATMega1284 and ATMega1284P have different signature. See the datasheet. You have to modify the board.txt.
And yes, the difference is low power.

Thanks for that warning. I'll do as you suggest.

P.

Trying to find an appropriate 'boards.txt'
I find:
eterm@peterm-MBB-34204H:~$ find /home -name "boards.txt"
/home/peterm/.arduino15/packages/arduino/hardware/avr/1.8.6/boards.txt
/home/peterm/.arduino15/packages/MightyCore/hardware/avr/2.1.3/boards.txt
/home/peterm/Arduino/Hardware/anet/avr/boards.txt
/home/peterm/Downloads/anet-board-master/hardware/anet/avr/boards.txt
/home/peterm/Downloads/arduino-1.8.19/hardware/arduino/avr/boards.txt
/home/peterm/3D_Printing/CTC-Prusa-i3-Pro-B-Anet-board/anet/avr/boards.txt
find: ‘/home/lost+found’: Permission denied

And there is nothing that shows me these codes 1E 97 05 in any of these files.

[Just a thought] The last one refers to a Sanguino board. Perhaps that is what I should be specifying.

Peter

Sorry, I'm not using Mighty but as I see, there is already implementation for both.
Tools -> Variant -> you can select between 1284P (default) and 1284.

Interesting. The variant was already set to 1284P.
I set it to 1284 and got tons of error messages on the Verify.

Peter

First, change your "upload" setting to "verbose" in the preferences, and the message will report what signature is being seen, as well as the expected signature.
What you need to do if you got 1E 97 06 is much different than if you got FF FF FF.

I discovered that my plug in to the ANET board that I was trying to program was in the incorrect place, so i moved it, and now my Arduino UNO is dead. 3 LEDs on (pwr,Tx,Rx) and unable to communicate.

So this problem can be closed. Thank you all for your help and advice.

Back on this problem: I have a new UNO. It is programmed as an Arduino ISP AVRISP. The connection to the ANET board is using the ICSP pins to the socket on the ANET. Only five wires are used (not the +V one) straight through.

When I try and program the card with the Marlin 2 firmware I get the error message:
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
An error occurred while uploading the sketch
this check."

So I tried to program the ANET card with a Bootloader and got the message
"Error while burning bootloader.
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override this check. "

So I guess the question is, how to override the fact that the signature is 0x000000 and get it to accept the Marlin firmware? or what other steps do I need to take? Is any more information needed to enable someone to give help.
Thanks, PM

Double / triple check the wiring. 0x000000 usually indicates a wiring problem.

If your target board has anything connected to the SPI pins, that can interfere with uploads using the programmer.

Thanks for advice. Yes there was a wiring error, two lines of connecting cable not on pins at UNO end.
However, the ANET board came back to life and is showing the original firmware.
I tried to program UNO as ISP with ISCP cable connected and it didn't like it, but took that off and it programmed.

Connected ICSP cable and tried to program ANET with MArlin 2 firmware using 'Arduino as ISP (MightyCore)' and get "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00"

Changed programmer to AVRISP (MightyCore and got the same.
I think that I have been here before.

Next move I think is to separate Reset line from ICSP pins and plug it into digital pin 10.
I'll see if that has any effect.
PM

Connected ICSP reset line to pin 10, changed programmer to 'Arduino as ISP (MightyCore)' It compiled with many fewer warnings.
I got this response:
avrdude: Expected signature for ATmega1284P is 1E 97 05
Double check chip, or use -F to override this check.
Wrong microcontroller found. Did you select the right board from the Tools > Board menu?

  • I have the right board an ATmega 1284P.
  • How do I find out what the signature of my ANET board is as a first step?

If there is ATmega1284P chip, its signature is 0x1E9705. However, the reading is 0x00 all the time so it is most likely a wiring problem, no connection to the target chip.

At the moment I am using a straight through cable from the Aruino UNO to the ANET Board. One question that has always bothered me is whether the MISO on one card should go through to MOSI on the other and vice versa, in effect creating a cross-over cable. This has never been explicitly explained anywhere that I have found. I'll try it.

Using a crossover cable for MOSI/MISO and checking all the connections, I still get the same error as a couple of messages ago about the signature.