Can't flash ATmega1284p on MEGA-1284P Xplained board

I have purchased the MEGA-1284P Xplained board, which features an ATmega1284p microcontroller and an AT32UC3B1256 as the board's controller. The latter contains firmware that allows flashing the ATmega1284p through the USB port on the board, as mentioned in the document "AVR364: MEGA-1284P Xplained Hardware User's Guide":

"The preprogrammed AT32UC3B1256 firmware offers features such as a boot loader for self-programming of the board controller itself, and a USART-to-USB gateway, which can be used to communicate with the target controller, the ATmega1284P."

I have installed the MightyCore (GitHub - MCUdude/MightyCore: Arduino hardware package for ATmega1284, ATmega644, ATmega324, ATmega324PB, ATmega164, ATmega32, ATmega16 and ATmega8535), as mentioned in ATMega1284P with Arduino IDE? - Microcontrollers - Arduino Forum, since I researched thoroughly before asking on this forum.

The documentation I have been able to find about this board is as follows:

In the video, you can see how the SW0 is held down, the reset is pressed, and then the SW0 is released. This is supposed to "activate" the bootloader, as mentioned in AVR370:

"The bootloader on the ATmega1284P is evoked by pushing the mechanical switch (SW0) during reset."

I have read the documentation thoroughly, both top to bottom and bottom to top, but it is clear that I am missing something, because when I attempt to flash the code from the Arduino IDE or with the avrdude tool, I receive the following response:

The MightyCore config I am using in Arduino IDE

I tried flashing the ATmega1284p using an Arduino as ISP, and in that way, I was able to achieve it. It seems that the problem occurs when trying to use the USB.

To summarize, I need to program the ATmega1284p using the USB port on the evaluation board, especially in order to open the serial monitor and view the serial.print outputs.

Hi @pabembd1409.

When you perform an "Upload Using Programmer" operation, it erases the bootloader on the microcontroller. For this reason, you must perform a "Burn Bootloader" operation when you decide you want to switch back to performing normal "Upload" operations via the USB socket on the board.

Give that a try and then add a reply here on the forum thread to let us know whether the upload still fails.

Hello, first of all, thank you for your response.

I have followed the steps you mentioned, as you can see

However, I am still getting an error

The wiring I am following is as follows:

ARDUINO NANO J4 EXPANSION HEADER XPLAINED
PIN D13(SCK) PIN PB7(SCK)
PIN D12(MISO) PIN PB6(MISO)
PIN D11(MOSI) PIN PB5(MOSI)
PIN D10(SS) PIN PD4(SS1)
PIN GND PIN GND
PIN 3.3V PIN VCC_P3V3

I'll leave you the link to the schematics of my board here so you can know exactly the environment I'm working in.

The AT32UC "bootloader" is completely unrelated to anything Arduino - it's designed to work with "Microchip Studio" (nee "Atmel Studio")
Likewise, anything in the Microchip/Atmel documentation is about using the Xplained board with the Manufacturer environment, and NOT relevant to using the Arduino environment.

Hopefully you haven't burned something weird in the 32uc. (although, that should be pretty hard to do.)

It doesn't look like the Xplained programmer is suppored directly by mightyCore.

In theory, you can use an Xplained board with Arduino by:

  1. Program the Arduino bootloader into the 1284, using either the Microchip tools, or an external programmer (eg Arduino as ISP, as you have done.)
  2. The Xplained SHOULD show up as a serial port on your system, plus perhaps some other ports. You MIGHT have to install microchip drivers to get this to happen, which MIGHT mean installing all of Microchip Studio (5G+. Windows only. Sigh.)
  3. With the Arduino bootloader on the 1284 and the Xplained Serial port selected, the Arduino IDE should be able to upload. (Please turn on "verbose" upload in the Arduino IDE preferences for further debugging info) (The Arduino bootloader works over the serial port, not "direct USB".)
  4. I don't think I have a 1284 Xplained board, but my ATmega328 Xplained "mini" boards will only run at 57600bps, instead of the 115200bps that the IDE expects. You might have better luck selecting 57600bps in the Arduino tools menu (then re-burn the bootloader into the 1284.)

The documentation I have been able to find about this board is as follows:

You'll noticed that none of them mention "Arduino." :frowning:
I don't know if there is any documentation out there on using Arduino with the Xplained boards.

(Wow. Its looks like the 32uc on the 1284Xplained doesn't actually do "programming" or "debugging." That must mean that this is a really ancient board! The Hardware users manual mentioned 57600bps, so I'm guessing that that is probably an issue...)

There ARE some ATmega1284-based boards designed to be Arduino compatible (well, there WERE. One provider died (RIP @Crossroads), and another (WickedDevices "Wildfire") seems to have disappeared. Sigh. At one time, the 1284 was popular for 3d-printer controls, but cheaper, more powerful, higher-pin-count ARMs seem to have taken over.)

1 Like

The last I heard, @Crossroads's wife was carrying on the business so it is worth sending an email if you are interested in purchasing one of those boards:

http://www.crossroadsfencing.com/BobuinoRev17/#:~:text=ATMega1284P%20Duemilanova-style 

MCUdude/@hansibull also sells a board:

The board comes with the ATmega32 chip installed, but it is socketed and fully pin compatible with the ATmega1284P so you can remove the ATmega32 and pop in an ATmega1284P. Buying this board is a good way to support the maintenance of the excellent MightyCore and also get a useful board.

I own both boards and they are both very nice.

1 Like

First of all, thank you for the response.

I am aware of that. I was reading about it, and the conclusion I reached is that I shouldn't have a problem using Arduino to program it, since after all, it's just a wrapper for avr-gcc and avrdude. In the ATmega1284p documentation, it mentions that it's necessary to compile with avrosp, which no longer exists, but after doing some research, I found that basically, avrdude can fulfill the same function.

So, theoretically, it's not far-fetched to use Arduino.

Before getting to work, I checked the schematic to make sure that the 32uC wasn't even connected to any of the headers on the Xplained board, to avoid making mistakes. So, as you rightly said, it's quite unlikely that I could break anything.

Indeed, that is what happens
image

This is the upload verbose,I think that the compile verbose isn't necessary

Certainly, I haven't found anything, but as I mentioned at the beginning, it makes sense (to me) that you could use Arduino to program them

Thank you for the recommendation, but this specific chip has been chosen for a project, and it can't be changed at this point. The evaluation board is the least of my concerns, as the hardware team is creating one that resolves this issue (we believe that using an FT232RL, like most Arduinos, would be a simple way to fix this)

By the way, I forgot to mention that, using PUTTY, I was able to view data from the serial port with this configuration (the baud rate has to be this specific value; if I change it, the characters start appearing with strange shapes)

That's a bit of a clue. (38400bps is a standard bitrate, BTW.)

Looking at the schematic, I see an 11.0592MHz crystal, which is pretty unusual for Arduino. MightyCore does support that clock, but you'll need to select it before you do the "burn bootloader." And the UC32 connects to UART1 rather than UART0...

Also, I just remembered - the Arduino bootloader (and the urboot bootloader, which is a bit different run for a very short (~1s) timeout after hardware reset, and are thus pretty much dependent on the Arduino's "automatic reset on COM open", which won't be present on the Xplained. It'll be pretty tough to manually reset the 1284 at just the right time. You might want to investigate building a custom bootloader with a longer timeout.

So:

  1. Select 1284 cpu and Arduino as ISP "programmer" in tools menu.
  2. Select port of Arduino for "Port"
  3. Select "11.059MHz External" as "clock."
  4. Select 57600 as baud rate.
  5. Select "YES (UART1)" as "bootloader."
  6. "Burn bootloader"
  7. Select port of Xplained board for "Port"
  8. Hold down RESET on Xplained.
  9. "Upload" in Arduino IDE.
  10. Release RESET just after the compile phase finishes. (play with the timing.)

(However, the error message you're getting about "Unable to open COM port" indicates a different problem. (When posting error logs, please cut&paste the text (inside code tags) rather than posting images.))

(while beginning SW development on something like the Xplained, while you wait for your own hardware design to be finished, it might be in this case that the Xplained is too different from the HW you are designing to be much use.)

Yesterday I forgot to mention that the reason for that baud rate was because of the 11.0592MHz crystal. What I didn't know is that I could select that specific speed from the Arduino IDE, as I was selecting 16MHz. With the 11.05MHz, I can indeed visualize the data at the 57600 baud rate

Hmm, wow, it seems incredible that such a seemingly simple task is so complicated. Regarding the reset, couldn’t I 'force' the reset with a cable? The board has a pin that belongs to the JTAG and is used as a reset (in fact, I use it for Arduino as ISP). As for the bootloader... well, as a personal project I don’t mind, but right now time and speed are the priority. What frustrates me the most about all this is that this evaluation board is supposed to be ready for programming via USB. And I haven’t been able to program it from Atmel Studio either.

The reason we bought this board, I believe, is the same as most engineers might have: to test the product and get a head start before committing to the design of a PCB with a microcontroller that you don’t even know if it will meet the requirements. Moreover, the evaluation board contains 70% of the peripherals I will use, so I think in this case what you're saying doesn't apply

I think the big problem is the assumption that a "bootloader" is 1) simple, and 2) compatible with some other bootloader.

As implied by my post, a bootloader has to be compiled for a specific CPU frequency, baud rate, uart, "entry criteria", and "protocol."
The default Xplained bootloader is set up for 11.059MHz, 57600bps, UART1, "hold down button" entry, and AVR911 protocol.
The default Mightycore Bootloader is set up for 16MHz, 115200bps, UART0, "always enter briefly on reset", and "urboot" protocol.

You've now erased the Xplained bootloader by uploading a (probably broken) MightyCore bootloader, so the Xplained tutorials aren't going to work any more. I don't know if the original bootloader binary is still available :frowning: (Theoretically, avrdude will program things using avr911...)

And since the MightyCore bootloader probably wasn't configured correctly for the clock/baud/uart, it won't work either.

I dug out one of my Bobuino boards and did some experiments.

I can't get MightyCore 3.x (which "upgrades" the bootloader to urboot) to work at all. :frowning:
You might want to try reverting to version 2.2.2 of Mightcore (which still uses Optiboot.)

Alright, I’m starting to understand it.

But I have a question: is the bootloader I likely erased the one for the ATmega1284P or the AT32UC3B1256?

I ask because I don’t have direct access to the AT32UC3B1256, and maybe we’re assuming I erased that bootloader when that’s not the case.

If, on the other hand, you mean the one for the ATmega1284P, then I can assure you that yes, I replaced it with the MightyCore bootloader.

What I don’t understand, though, is why it doesn’t work with MightyCore when I configure it and upload it with the necessary parameters (11.059MHz, 57600bps, UART1...)

So, you're saying that the issue with the current MightyCore might be because it's using urboot instead of Optiboot?

The AT32UC3 should be OK. It acts as a USB to serial device, and that's all it does.

MightyCore has used Urboot as its bootloader for about a year, with very few complaints from users. It's designed to be used with a generic USB-to-Serial chip with hardware handshake pins available to perform a properly timed auto reset. This is probably why the AT32UC3 chip fails to upload; the reset timing isn't correct, and the Xplained board doesn't have the necessary hardware to make that happen. However, why don't just upload using a JTAG programmer and use the AT32UC3 just for the serial monitor?

And since the MightyCore bootloader probably wasn't configured correctly for the clock/baud/uart, it won't work either.

There is no "wrong" configuration really. When using the ATmega1284P, there are basically only two bootloader binaries to choose from, one that uses UART0 and one that uses UART1. The bootloader auto-detects the baud rate, and thus the clock option is irrelevant.

If you have to use Urboot or Optiboot, use a board that was designed to work with these bootloaders in the first place. It looks like the board came with the AVR911 bootloader. I'd try to use this instead.

I dug out one of my Bobuino boards and did some experiments.
I can't get MightyCore 3.x (which "upgrades" the bootloader to urboot) to work at all. :frowning:
You might want to try reverting to version 2.2.2 of Mightcore (which still uses Optiboot.)

@westfw That's weird. I didn't have to make any hardware changes to the DIP-40 board when migrating from Optiboot to Urboot. Are you sure you're using the typical 100nF capacitor, a 10k pullup, and a clamping diode?

1 Like

It's for convenience, to be able to do everything through the same USB. Additionally, there are times when I accidentally move the ISP jumpers, which causes errors, and I end up thinking I made a mistake in the code when it's actually a physical issue.

It's for convenience, to be able to do everything through the same USB. Additionally, there are times when I accidentally move the ISP jumpers, which causes errors, and I end up thinking I made a mistake in the code when it's actually a physical issue.

True, but that doesn't change the fact that the Xplained ATmega1284P is unsuited for this. Even the bootloader (ran by the 1284P) that the board came with is somewhat inconvenient, where you'll have to "manually" enter bootloader mode.

If I were you, I'd connect a dedicated USB to serial adapter board to the Xplained board. If you keep everything at 3.3V, even the USB to serial voltage levels, you can connect the AVR reset pin directly to the RTS or the DTR pin on the USB to serial chip. Avrdude 7.2 and newer supports this feature where you don't need a series capacitor to generate the correctly timed pulse (MightyCore uses Avrdude 8.0). UART0 should be available. This will let you use the board just like any other Arduino.

Thanks for the advice, but I focus more on firmware than hardware. The hardware team is making a PCB to address this issue

If they make the PCB according to the minimal setup in the MightyCore repo, then you'll be fine regardless if you're using Urboot or Optiboot. Urboot is superior (smaller, faster, has auto baud support, EEPROM upload support etc.), but Optiboot works well too.

I have the dip-based Uno-shaped bobuino board, and it works fine with version 2.2 ("burn Bootloader" followed by an upload), but not at all with version 3.x (same sequence; bootloader upload is successful...) (I can go back and forth between 2.2 and 3.x and have the same results.)

(I also have had no luck getting the 3.x (urboot) to upload to any chips that still contain Optiboot, even though I thought there were supposed to be some backward-compatibility hacks. Sigh.)

Maybe it's a MacOS thing.

(Burn Bootloader)

/Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/tools/avrdude/7.2-arduino.1/bin/avrdude -C/Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/avrdude.conf -v -patmega1284p -cstk500v1 -P/dev/cu.usbserial-FTD61T6Q -b19200 -e -Ulock:w:0xff:m -Uefuse:w:0xfd:m -Uhfuse:w:0xd7:m -Ulfuse:w:0xf7:m 

avrdude: Version 7.2-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is /Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/avrdude.conf
         User configuration file is /Volumes/MacOS/HD-Users/BillW/.avrduderc
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-FTD61T6Q
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega1284P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom                 65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash                  65    10   128    0 yes    131072  256    512  4500  4500 0x00 0x00
           lfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9705 (probably m1284p)
avrdude: erasing chip

avrdude: processing -U lock:w:0xff:m
avrdude: reading input file 0xff for lock
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lock ...
avrdude: 1 byte of lock written
avrdude: verifying lock memory against 0xff
avrdude: 1 byte of lock verified

avrdude: processing -U efuse:w:0xfd:m
avrdude: reading input file 0xfd for efuse
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte efuse ...
avrdude: 1 byte of efuse written
avrdude: verifying efuse memory against 0xfd
avrdude: 1 byte of efuse verified

avrdude: processing -U hfuse:w:0xd7:m
avrdude: reading input file 0xd7 for hfuse
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte hfuse ...
avrdude: 1 byte of hfuse written
avrdude: verifying hfuse memory against 0xd7
avrdude: 1 byte of hfuse verified

avrdude: processing -U lfuse:w:0xf7:m
avrdude: reading input file 0xf7 for lfuse
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lfuse ...
avrdude: 1 byte of lfuse written
avrdude: verifying lfuse memory against 0xf7
avrdude: 1 byte of lfuse verified

avrdude done.  Thank you.

/Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/tools/avrdude/7.2-arduino.1/bin/avrdude -C/Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/avrdude.conf -v -patmega1284p -cstk500v1 -P/dev/cu.usbserial-FTD61T6Q -b19200 -Uflash:w:/Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/bootloaders/urboot/atmega1284p/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b7/urboot_atmega1284p_pr_ee_ce.hex:i -Ulock:w:0xff:m 

avrdude: Version 7.2-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is /Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/avrdude.conf
         User configuration file is /Volumes/MacOS/HD-Users/BillW/.avrduderc
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-FTD61T6Q
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega1284P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom                 65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash                  65    10   128    0 yes    131072  256    512  4500  4500 0x00 0x00
           lfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9705 (probably m1284p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
         To disable this feature, specify the -D option.
avrdude: erasing chip

avrdude: processing -U flash:w:/Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/bootloaders/urboot/atmega1284p/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b7/urboot_atmega1284p_pr_ee_ce.hex:i
avrdude: reading input file /Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/bootloaders/urboot/atmega1284p/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b7/urboot_atmega1284p_pr_ee_ce.hex for flash
         with 396 bytes in 2 sections within [0x1fe00, 0x1ffff]
         using 2 pages and 116 pad bytes
avrdude: writing 396 bytes flash ...
Writing | ################################################## | 100% 0.16s
avrdude: 396 bytes of flash written
avrdude: verifying flash memory against /Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/bootloaders/urboot/atmega1284p/watchdog_1_s/autobaud/uart0_rxd0_txd1/led+b7/urboot_atmega1284p_pr_ee_ce.hex
Reading | ################################################## | 100% 0.00s
avrdude: 396 bytes of flash verified

avrdude: processing -U lock:w:0xff:m
avrdude: reading input file 0xff for lock
         with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lock ...
avrdude: 1 byte of lock written
avrdude: verifying lock memory against 0xff
avrdude: 1 byte of lock verified

avrdude done.  Thank you.

Upload:

 avrdude -vvvv -patmega1284p -curclock -P/dev/cu.usbserial-FTD61T6Q -b115200 -D -xnometadata -Ueeprom:w:/tmp/Arduino1.8.13Build/Blink.ino.eep:i -Uflash:w:/tmp/Arduino1.8.13Build/Blink.ino.hex:i
Avrdude version 8.0
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is /usr/local/etc/avrdude.conf
User configuration file /Volumes/MacOS/HD-Users/BillW/.avrduderc does not exist

Libreadline is used; avrdude -t -c urclock should work interactively
Nometadata set
Using port            : /dev/cu.wchusbserial3120
Using programmer      : urclock
Setting baud rate     : 115200
 205 ms: enter urclock_getsync()
Ser_send: 0 [30]   [20]
Ser_recv(): programmer is not responding
 232 ms: sleeping for 32 ms
Ser_send:   [20]   [20]
Ser_recv: . [14] . [10]
Ser_send:   [20]   [20]
Ser_recv: . [14] . [10]
Ser_send:   [20]
Ser_recv(): programmer is not responding
Ser_send:   [20]
 390 ms: all good, ready to rock
AVR part              : ATmega1284P
Programming modes     : SPM, ISP, HVPP, JTAG

Memory       Size  Pg size
--------------------------
eeprom       4096        8
flash      131072      256
signature       3        1

Variants         Package  F max   T range        V range       
---------------------------------------------------------------
ATmega1284P-AN   TQFP44   20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]
ATmega1284P-AU   TQFP44   20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]
ATmega1284P-AUR  TQFP44   20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]
ATmega1284P-MN   QFN44    20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]
ATmega1284P-MU   VQFN44   20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]
ATmega1284P-MUR  VQFN44   20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]
ATmega1284P-PN   PDIP40   20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]
ATmega1284P-PU   PDIP40   20 MHz  [-40 C, 85 C]  [1.8 V, 5.5 V]

Programmer type       : Urclock
Description           : Urboot bootloaders using urprotocol
Protocol              : STK500v1 skeleton
Ser_send: P [50]   [20]
Ser_recv: . [14]
Ser_recv: . [10]

AVR device initialized and ready to accept instructions
Avr_signature(urclock, m1284p)
Reading |                                                    | 0% 0.00 s 
Avr_read_mem(urclock, m1284p, signature, NULL)
Ser_send: u [75]   [20]
Ser_recv: . [14]
Ser_recv: . [10] . [14] . [1e]
Ser_recv: . [97]
Reading | -------------------------------------------------- | 0% 0.02 s 
Error urclock_res_check() urclock.c 985: protocol expects OK byte 0x10 but got 0x97 in urclock_read_sig_bytes()
Error avr_signature() avr.c 1220: unable to read signature data for part ATmega1284P (rc = -1)
Error main() main.c 1645: unable to read signature data (rc = -1)
use -F to override this check
Ser_send: Q [51]   [20]
Ser_recv: . [05]
Error urclock_disable() urclock.c 2215: protocol expects sync byte 0x14 but got 0x05

Avrdude done.  Thank you.
WWHackintosh<8780> /Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/tools/avrdude/7.2-arduino.1/bin/avrdude -C/Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/avrdude.conf -vvvv -patmega1284p -curclock -P/dev/cu.wchusbserial3120 -b9600 -D -xnometadata -Ueeprom:w:/tmp/Arduino1.8.19Build/Blink.ino.eep:i -Uflash:w:/tmp/Arduino1.8.19Build/Blink.ino.hex:i 

avrdude: Version 7.2-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is /Applications/Arduino-1.8.19.app/Contents/Java/portable/packages/MightyCore/hardware/avr/3.0.1/avrdude.conf
         User configuration file is /Volumes/MacOS/HD-Users/BillW/.avrduderc
         User configuration file does not exist or is not a regular file, skipping

avrdude: libreadline is used; avrdude -t -c urclock should work interactively
avrdude: nometadata set
         Using Port                    : /dev/cu.wchusbserial3120
         Using Programmer              : urclock
         Overriding Baud Rate          : 9600
avrdude:  215 ms: enter urclock_getsync()
avrdude: send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude:  245 ms: sleeping for 32 ms
avrdude: send:   [20]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude:  304 ms: sleeping for 64 ms
avrdude: send:   [20]   [20] 
avrdude: recv: . [a0] . [8d] 
avrdude: send:   [20]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude:  418 ms: sleeping for 256 ms
avrdude: send:   [20]   [20] 
avrdude: recv: . [a0] . [8d] 
avrdude: send:   [20] 
avrdude: recv: . [a0] 
avrdude:  698 ms: all good, ready to rock
         AVR Part                      : ATmega1284P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom                 65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash                  65    10   128    0 yes    131072  256    512  4500  4500 0x00 0x00
                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse                   0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock                    0     0     0    0 no          1    1      0  9000  9000 0x00 0x00
                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration             0     0     0    0 no          1    1      0     0     0 0x00 0x00

         Programmer Type : Urclock
         Description     : Urclock programmer for urboot bootloaders using urprotocol
         Urboot protocol for ATmega1284P
avrdude: send: P [50]   [20] 
avrdude: recv: . [a0] 
avrdude: recv: . [8d] 
avrdude: AVR device initialized and ready to accept instructions
Reading |                                                    | 0% 0.00 s 
avrdude: ur_readEF(urclock, ATmega1284P, flash, 0x7ffee239fe40, 0x01fffa, 6, F)
avrdude: send: . [03] . [fa] . [ff] . [01] . [06]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude urclock_recv() [urclock.c:1899] warning: programmer is not responding
Reading | -------------------------------------------------- | 0% 0.51 s 
avrdude avr_signature() [avr.c:1155] error: unable to read signature data for part ATmega1284P, rc=-1
avrdude main() [main.c:1368] error: unable to read signature data, rc=-1
avrdude: send: Q [51]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude urclock_recv() [urclock.c:1899] warning: programmer is not responding

avrdude done.  Thank you.

@westfw I'm using macOS as well and have no issues. However, it looks like you're using the WCH drivers and not the default Apple driver. I've tried the WCH driver, but they made uploading much slower and were less reliable. IMO, Apple's original drivers work best.

You can also try with a higher baud rate, 250000 baud for instance. I've had issues in the past when using slow baud rates.

Oh, and try updating to the latest MightyCore version through the Boards manager. It's using Avrdude 8.0, which is the most recent version.

If you still can't figure it out, please open an issue over at the Urboot repo. I'm sure Stefan is keen to figure out why it doesn't work with your setup.

I also have had no luck getting the 3.x (urboot) to upload to any chips that still contain Optiboot, even though I thought there were supposed to be some backward-compatibility hacks. Sigh.

Backward compatibility will only work if you're using a "known" bootloader binary. This list can be extended if you want to provide a PR, and Avrdude 8.0 contains most/all bootloaders Arduino boards ship with, plus the most used binaries from my Arduino cores.

it looks like you're using the WCH drivers and not the default Apple driver.

I'm running High Sierra on a Hackintosh, and I don't think it has a "default Apple Driver"

You can also try with a higher baud rate, 250000 baud for instance.

No such luck. Don't forget that the identical hardware works fine with the Optiboot in MightyCore 2.2.2

try updating to the latest MightyCore version through the Boards manager. It's using Avrdude 8.0, which is the most recent version.

Um. That's what was failing... (I am still using 1.8.x, though. Does the 2.x IDE load a later version than 3.0.3?) (Hmm. I had backed down to 3.0.1 to see if that would help. Nope. Neither 3.0.1 nor 3.0.3 works.)

Backward compatibility will only work if you're using a "known" bootloader binary.

Yeah, I had already been made aware of that, since many of my other boards run non-standard versions of Optiboot (me being the Optiboot maintainer, and all...)
But in this case, it was the old MightCore Optiboot, which surely ought to be one of the recognized versions.