ATmega1284p-pu Avrdude.conf stk500v2 Baudrate signature byte upload problem

Hi pert, thank you for the reply.

In the Arduino IDE 1.6.7 menu>tools I selected.

Mighty Core
Board = ATmega1284
Variant = 1284
BOD = 2.7v
Pinout = Sanguino
Clock = 16Mhz external
Compiler LTO = Disabled (default)

In the Marlin firmware > configuration.h it requests a mother board to be selected. From there it goes to the boards.h . In the boards.h there is no selection for the Mighty Core.

In the configuration.h were it requested a mother board selection I tried: Gen7, Unknown, Sanguinololu, Melzi.

All ended with the error please make sure you have the right board selected.

If you know a way around this please let me know.

Thank you, Kenn

This is what is in the Marlin firmware configuration.h file.

// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#define MOTHERBOARD BOARD_GEN7_14
#endif

This is what is in the Marlin firmware boards.h file.

#ifndef BOARDS_H
#define BOARDS_H

#define BOARD_UNKNOWN -1

//
// RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
//

#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2

#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_13_SF 38 // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)

#define BOARD_RAMPS_14_EFB 43 // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
#define BOARD_RAMPS_14_EEB 44 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_RAMPS_14_EFF 45 // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS_14_EEF 46 // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_14_SF 48 // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)

#define BOARD_RAMPS_PLUS_EFB 143 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
#define BOARD_RAMPS_PLUS_EEB 144 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_RAMPS_PLUS_EFF 145 // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS_PLUS_EEF 146 // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_PLUS_SF 148 // RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)

//
// RAMPS Derivatives - ATmega1280, ATmega2560
//

#define BOARD_3DRAG 77 // 3Drag Controller
#define BOARD_K8200 78 // Velleman K8200 Controller (derived from 3Drag Controller)
#define BOARD_K8400 79 // Velleman K8400 Controller (derived from 3Drag Controller)
#define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers
#define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers
#define BOARD_MKS_BASE 40 // MKS BASE v1.0
#define BOARD_MKS_BASE_15 405 // MKS v1.5 with Allegro A4982 stepper drivers
#define BOARD_MKS_BASE_HEROIC 41 // MKS BASE 1.0 with Heroic HR4982 stepper drivers
#define BOARD_MKS_GEN_13 47 // MKS GEN v1.3 or 1.4
#define BOARD_MKS_GEN_L 53 // MKS GEN L
#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica)
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
#define BOARD_RIGIDBOARD 42 // Invent-A-Part RigidBoard
#define BOARD_RIGIDBOARD_V2 52 // Invent-A-Part RigidBoard V2
#define BOARD_SAINSMART_2IN1 49 // Sainsmart 2-in-1 board
#define BOARD_ULTIMAKER 7 // Ultimaker
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
#define BOARD_AZTEEG_X3 67 // Azteeg X3
#define BOARD_AZTEEG_X3_PRO 68 // Azteeg X3 Pro
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_RUMBA 80 // Rumba
#define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D
#define BOARD_MAKEBOARD_MINI 431 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
#define BOARD_TRIGORILLA_13 343 // TriGorilla Anycubic version 1.3 based on RAMPS EFB
#define BOARD_TRIGORILLA_14 443 // TriGorilla Anycubic version 1.4 based on RAMPS EFB
#define BOARD_RAMPS_ENDER_4 243 // Creality: Ender-4, CR-8

//
// Other ATmega1280, ATmega2560
//

#define BOARD_CNCONTROLS_11 111 // Cartesio CN Controls V11
#define BOARD_CNCONTROLS_12 112 // Cartesio CN Controls V12
#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0
#define BOARD_CHEAPTRONIC_V2 21 // Cheaptronic v2.0
#define BOARD_MIGHTYBOARD_REVE 200 // Makerbot Mightyboard Revision E
#define BOARD_MEGATRONICS 70 // Megatronics
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0
#define BOARD_MEGATRONICS_31 704 // Megatronics v3.1
#define BOARD_RAMBO 301 // Rambo
#define BOARD_MINIRAMBO 302 // Mini-Rambo
#define BOARD_MINIRAMBO_10A 303 // Mini-Rambo 1.0a
#define BOARD_EINSY_RAMBO 304 // Einsy Rambo
#define BOARD_EINSY_RETRO 305 // Einsy Retro
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
#define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_MEGACONTROLLER 310 // Mega controller
#define BOARD_SCOOVO_X9H 321 // abee Scoovo X9H
#define BOARD_GT2560_REV_A 74 // Geeetech GT2560 Rev. A
#define BOARD_GT2560_REV_A_PLUS 75 // Geeetech GT2560 Rev. A+ (with auto level probe)

//
// ATmega1281, ATmega2561
//

#define BOARD_MINITRONICS 702 // Minitronics v1.0/1.1
#define BOARD_SILVER_GATE 25 // Silvergate v1.0

//
// Sanguinololu and Derivatives - ATmega644P, ATmega1284P
//

#define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2
#define BOARD_SANGUINOLOLU_12 62 // Sanguinololu 1.2 and above
#define BOARD_MELZI 63 // Melzi
#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version)
#define BOARD_MELZI_CREALITY 89 // Melzi Creality3D board (for CR-10 etc)
#define BOARD_MELZI_MALYAN 92 // Melzi Malyan M150 board
#define BOARD_MELZI_TRONXY 505 // Tronxy X5S
#define BOARD_STB_11 64 // STB V1.1
#define BOARD_AZTEEG_X1 65 // Azteeg X1
#define BOARD_ANET_10 69 // Anet 1.0 (Melzi clone)

//
// Other ATmega644P, ATmega644, ATmega1284P
//

#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics
#define BOARD_GEN3_PLUS 9 // Gen3+
#define BOARD_GEN6 5 // Gen6
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe
#define BOARD_GEN7_CUSTOM 10 // Gen7 custom (Alfons3 Version) “GitHub - Alfons3/Generation_7_Electronics: This is part of the RepRap project, see http://www.reprap.org. Gen7 is the next generation of electronics meant to drive a RepRap machine. Focus on this generation is to allow for better replicatability while not standing back behind industry products.
#define BOARD_GEN7_12 11 // Gen7 v1.1, v1.2
#define BOARD_GEN7_13 12 // Gen7 v1.3
#define BOARD_GEN7_14 13 // Gen7 v1.4
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_SETHI 20 // Sethi 3D_1

//
// Teensyduino - AT90USB1286, AT90USB1286P
//

#define BOARD_TEENSYLU 8 // Teensylu
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
#define BOARD_PRINTRBOARD_REVF 811 // Printrboard Revision F (AT90USB1286)
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
#define BOARD_BRAINWAVE_PRO 85 // Brainwave Pro (AT90USB1286)
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84 make
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board

#define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)

#endif // __BOARDS_H

This is what happens when I use the Mighty Core and try to compile the Marlin firmware.

Arduino: 1.6.7 (Windows XP), Board: "ATmega1284, Sanguino, 1284, 2.7v, Disabled (default), 16 MHz external"

In file included from sketch\Marlin.h:21:0,

from sketch\thermistortables.h:4,

from sketch\Configuration.h:825,

from C:\Documents and Settings\Kenn\My Documents\Marlin Firmware\Marlin-1.0.2\Marlin\Marlin.ino:33:

fastio.h:4017: error: #error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request

#error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request

^

In file included from sketch\Marlin.h:23:0,

from sketch\thermistortables.h:4,

from sketch\Configuration.h:825,

from C:\Documents and Settings\Kenn\My Documents\Marlin Firmware\Marlin-1.0.2\Marlin\Marlin.ino:33:

pins.h:389: error: #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.

#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.

^

exit status 1
#error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

This is the error I get when I choose the Unknown board for the configuration.h in Marlin firmware. It tells me I have to setup the pins in the arduino.h so it can see the Mighty Core. I have never tried to setup pins this would be the first time, but I'm willing to try.


Arduino: 1.6.7 (Windows XP), Board: "ATmega1284, Sanguino, 1284, 2.7v, Disabled (default), 16 MHz external"

In file included from sketch\Marlin.h:21:0,

from sketch\thermistortables.h:4,

from sketch\Configuration.h:825,

from C:\Documents and Settings\Kenn\My Documents\Marlin Firmware\Marlin-1.0.2\Marlin\Marlin.ino:33:

fastio.h:4017: error: #error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request

#error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request

^

In file included from sketch\Marlin.h:23:0,

from sketch\thermistortables.h:4,

from sketch\Configuration.h:825,

from C:\Documents and Settings\Kenn\My Documents\Marlin Firmware\Marlin-1.0.2\Marlin\Marlin.ino:33:

pins.h:2907: error: #error Unknown MOTHERBOARD value in configuration.h

#error Unknown MOTHERBOARD value in configuration.h

^

exit status 1
#error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request

Please put your Marlin in a .zip folder and attach it to a reply here so I can take a look at what's going on.

Hi pert, thank you for the reply.

I use the Marlin Firmware 1.0.2. on Arduino IDE 1.0.5 for Windows.

I tried to attach the zip file "Marlin Firmware 1.0.2" but the forum says it's to large. Also I can not find the 1.0.2 version to download any were on the internet any more. You can only download the Marlin Firmware 1.0.2-2 now.

I also looked through the high version of Marlin but could not find a mother board for the Mighty Core.

or here

Thank you for your help, Kenn

I sent you a PM with my email address so that you can send Marlin over to me that way.

I received the firmware file from you and simply changed line 44 of Configuration.h from:

  #define MOTHERBOARD BOARD_ULTIMAKER

to:

  #define MOTHERBOARD BOARD_GEN7_14

and Marlin compiles for me without any errors.

I have emailed Marlin with only the above modification back to you to make sure you are using the working code.

Hi Pert,
Never mind about sending your version of Marlin 1.0.2 again I was able to forward it to my other email address.

I was then able to down load it.

I tried compiling your version of marlin firmware 1.0.2 and I get the same compiling error please select Gen7 board.

Thank you, Kenn

I'm sorry to hear you're still getting an error.

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper in the Arduino Web Editor). Click that button. Paste the error in a message here using code tags. If the text exceeds the forum's 9000 character limit, save it to a text file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

Once I have that information, I'll be able to investigate the issue.

Hi Pert,
I attached the error of compiling your Marlin firmware 1.0.2 you sent me.

Thank you, Kenn

pert marlin 1.0.2 marlin upload error 030719.txt (7.36 KB)

That file contains the source code from the file Arduino.h. That's not the error output I need.

Hi Pert,
Sorry about that this should be the right file.

Thank you, Kenn

error 030719 pert marlin 1.0.2.txt (1.5 KB)

I just compiled the version of Marlin I sent you using the same IDE version (1.6.7) and the same exact board selection and it compiles without any error. The only difference is that I'm using Windows 10 and you're using Windows XP.

I would recommend that you try using Arduino IDE 1.8.8. There were a lot of bugs around the time of Arduino IDE 1.6.7 due to a major reorganization of the way the Arduino IDE worked. It's possible that one of those bugs is causing you to get an error and me not to.

Hi Pert, thank you for the reply.

I switch to my Linux 17.2 Mint computer and which also has Arduino 1.6.7. I installed Sanguino and tried compiling but got a signature byte error again. I then realized Sanguino only goes up to 16Mhz so I installed the Mighty Core into the Arduino IDE 1.6.7 on the Linux computer.

I then compiled the Marlin sketch again with the Mighty Core and it went through fine no errors.

Then I tried uploading the sketch to the 1284p chip but got a signature byte error again. I suddenly realized I had left the 328p chip in the Arduino Uno. So I took the 328p chip out the Arduino Uno and tried to up load the sketch again but got the same signature byte error.

Tomorrow I will try updating the Marlin firmware and see what that does. Then I will try updating the Arduino IDE to 1.8.8 and see if that works.

Thank you, Kenn

KennTech:
I installed the Mighty Core into the Arduino IDE 1.6.7 on the Linux computer.

I then compiled the Marlin sketch again with the Mighty Core and it went through fine no errors.

Very strange that it works on your Linux computer but not the Windows one. Well, at least now you have proof that it's possible to compile Marlin for the MightyCore boards.

KennTech:
Then I tried uploading the sketch to the 1284p chip but got a signature byte error again. I suddenly realized I had left the 328p chip in the Arduino Uno. So I took the 328p chip out the Arduino Uno and tried to up load the sketch again but got the same signature byte error.

I don't understand this. It sounds like you're using the Uno as a USB to TTL serial adapter. However, my understanding was that your Gen7 board has an onboard USB to TTL serial adapter, the MCP2200. So why are you using the Uno to upload?

Hi Pert, Thank you for the reply.

I collect computer on trash night. I have 4 laptops running Windows XP. I have 1 full height tower running Windows XP plus I have 4 desktop computers running Linux. I also build my own computers.

Yes the Gen7 has a MCP2200 chip, but I was having trouble uploading through it. I decided to go with the Arduino Uno as a programmer because it's more portable and it eliminates the possibility of interference from the extra components on the Gen7 board. I also can upload the bootloader and sketches with the Arduino Uno.

At the time it seemed to be the best choice.

Thank you, Kenn.

KennTech:
I collect computer on trash night.

Good work! It’s a shame how many working computers get thrown away. Yes, maybe they don’t have the same performance as the newest computers, but they are capable of doing most of the tasks that the average person needs.

KennTech:
So I took the 328p chip out the Arduino Uno and tried to up load the sketch again but got the same signature byte error.

Please do this:

  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload
  • After the upload fails you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the forum toolbar).

Hi Pert, Thank you for the reply.

What I found out this morning.

I went on to the Laptop with Windows Xp service pack 3 and updated to the Arduino IDE 1.8.8.

After that I opened the latest version of Marlin firmware 1.1.x and tried to compile it using the Mighty Core and 1284p setting. It compiled fine with out errors.

But when I tried to compile the Marlin firmware 1.1.x with the Mighty Core and 1284 setting it error out but never finished the error it just hung in mid stream. So I tried to compile it again with the verbose output and it completed the error.

So I went to the Linux Mint 17.5 computer and tried the Arduino 1.6.7 v with the Mighty Core and 1284 setting and tried to compile Marlin 1.1.x and got a error as well.

Both computers are now saying the FastIO’s are not defined for the Mighty Core 1284 setting.

Just a recap.

When I upload the bootloader the software wants signature byte 0x1e 0x97 0x05 the 1284p setting.

When I upload the sketch the software wants signature byte 0x1e 0x97 0x06 the 1284 setting.

What I can read on top of the chip is “ATmega1284 U-35452B 1802YRW”.

It’s starting to sound like it can’t identify the 20Mhz chip.

Thank you, Kenn.

Windows xp marlin1.1.x compile error 1284 on 030819.txt (515 KB)