JAndrassy / ArduinoOTA

Arduino library to upload sketch over network to Arduino board with WiFi or Ethernet libraries
GNU Lesser General Public License v2.1
437 stars 89 forks source link

Still getting InternalStorage error #105

Closed ActiveByte closed 2 years ago

ActiveByte commented 3 years ago

Hey there,

I flashed the bootloader to the Uno/Nano/Mini (Big Optiboot) board. (i have a Arduino Nano ATmega328P

Afther that i'm still getting the error: 'InternalStorage' was not declared in this scope

While using ArduinoOTA.begin(Ethernet.localIP(), "arduino", "password", InternalStorage);

When i try to compile with the arduino mega optiboot board it does compile correctly. (but offcourse it can't upload that) Is there maybe a problem with the optiboot file for Uno/Nano/mini?

Thanks

JAndrassy commented 3 years ago

because https://github.com/jandrassy/ArduinoOTA/blob/bdfddb6f839e02e8eb062d9d2903bbd9e0adbf3c/src/ArduinoOTA.h#L23-L27

ActiveByte commented 3 years ago

I did a bit of digging in the code, does it mean that my arduino does not have enough memory?

JAndrassy commented 3 years ago

you need half of the flash to store the binary. if you use some networking library to transport the binary, then the binary is larger then half of the flash of ATmega328. that is why only ATmega with at least 64kB flash is supported in the ArduinoOTA library. if you have a way to transport the binary which doesn't make the sketch large, then you can use InternalStorageAVR directly