MCUdude / MegaCore

Arduino hardware package for ATmega64, ATmega128, ATmega165, ATmega169, ATmega325, ATmega329, ATmega640, ATmega645, ATmega649, ATmega1280, ATmega1281, ATmega2560, ATmega2561, ATmega3250, ATmega3290, ATmega6450, ATmega6490, AT90CAN32, AT90CAN64 and AT90CAN128
Other
384 stars 118 forks source link

ArduinoOTA problems on Mega2560 using Megacore >= 3 #212

Closed jegjessing closed 7 months ago

jegjessing commented 7 months ago

Hi. I have this very simple program. It works fine if I burn the bootloader with from MegaCore 2.2.x. But, if I burn the bootloader from MegaCore 3.x (urboot) then it never gets to "Done", it keeps rebooting and keeps printing "Mjello"

Is there some ArduinoOTA/urboot issue I'm not aware of?

#include <ArduinoOTA.h>

void setup() {
  Serial.begin(115200);
  while (!Serial);
  delay(500);
  Serial.println("Mjello");

}

boolean done = false;
void handleDownload()
{
  byte b;
  if (done) return;

  b = 12;
  InternalStorage.open(70002);
  delay(1000L);
  InternalStorage.write(b);
  Serial.println("Done");

  done = true;
}

void loop() {
  // put your main code here, to run repeatedly:
  handleDownload();

}

Thanks in advance

MCUdude commented 7 months ago

The ArduinoOTA project has not been updated to support Urboot yet. There's not much I can do about this, but maybe the ArduinoOTA developers will look into it. Meanwhile, you'll have to use MegaCore v2

jegjessing commented 7 months ago

Thanks for a quick and precise answer