-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Uncaught out of memory error? #132
Comments
what networking library? |
ArduinoHttpClient |
Here's my whole sketch:
|
and it stops after 133 bytes? |
No it stops after ~127k bytes, with 133 bytes left to go. |
the |
Yeah but it was broken before that, I just added that to help diagnose what was going on. |
I guess it breaks even if you comment out all InternalStorage lines? |
if I comment out |
correct. Seems to fail right around 127k bytes, which is just under half the available memory. |
InternalStorage.write writes directly to flash memory. client.read reads directly from the Wiznet chip over SPI so there is no way to run out of memory. |
hmm, weird. Any other thoughts about what might be happening then? |
I suspect some timeout. I would try to use a buffer to read more bytes from client at once. It will make reading over SPI more efficient and the whole process faster. |
I'm uploading to a SAMD board (Automation Direct P1AM-100) using a very slight adeptation of the example that pulls from a web address.
Smaller binary files work just fine. My final sketch/binary is 126632 bytes (48% of available mem) and InternalStorage.open(length) seems to run just fine but then the following loop crashes:
I see length come down to the same number every time (133 at the current sketch size) and then nothing after that.
Any thoughts about what might be going on here? I'd prefer if this wasn't the upper limit of the size of my sketch.
The text was updated successfully, but these errors were encountered: