Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nano IOT 33 - WifiOTA Sketch Download #145

Closed
JEG8 opened this issue Mar 21, 2022 · 4 comments
Closed

Nano IOT 33 - WifiOTA Sketch Download #145

JEG8 opened this issue Mar 21, 2022 · 4 comments

Comments

@JEG8
Copy link

JEG8 commented Mar 21, 2022

Hello,

I am using OTA sketch download using the example code provided (OTASketchDownloadWifi).

The example sketch uses 38724 bytes (14%) of program storage space. I am trying to download a sketch that uses 148164 bytes (56%) of program storage space. Maximum storage on my device is 262144 bytes. I am receiving the following error.

Update status code: 200
Server returned update file of size 147676 bytes
There is not enough space to store the update. Can't continue with update.

Is there any way that I can make this work besides reducing the size of my update?

Thanks for any help you can provide and thank you for this library.

@JAndrassy
Copy link
Owner

you can use SD card to store the update binary (or to store the data which are now in the sketch and make it big)

@JEG8
Copy link
Author

JEG8 commented Mar 22, 2022

Thank you. I had the same thought but when I try to use OTASketchDownload_SD for the Arduino Nano 33 IOT, it says the board is unsupported. I think this is due to the SDU library not supporting the board.

\Arduino15\packages\arduino\hardware\samd\1.8.13\libraries\SDU\src\SDU.cpp:44:4: error: #error "Unsupported board!"
#error "Unsupported board!"
^~~~~

What do you recommend I use for storing the binary to the SD?

The SDU Library has the following in SDU.cpp

#include <Arduino.h>

#include "SDU.h"

attribute ((section(".sketch_boot")))
unsigned char sduBoot[0x4000] = {
#if defined(ARDUINO_SAMD_ZERO)
#include "boot/zero.h"
#elif defined(ARDUINO_SAMD_MKR1000)
#include "boot/mkr1000.h"
#elif defined(ARDUINO_SAMD_MKRZERO)
#include "boot/mkrzero.h"
#elif defined(ARDUINO_SAMD_MKRFox1200)
#include "boot/mkrfox1200.h"
#elif defined(ARDUINO_SAMD_MKRGSM1400)
#include "boot/mkrgsm1400.h"
#elif defined(ARDUINO_SAMD_MKRWAN1300)
#include "boot/mkrwan1300.h"
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#include "boot/mkrwifi1010.h"
#elif defined(ARDUINO_SAMD_MKRNB1500)
#include "boot/mkrnb1500.h"
#elif defined(ARDUINO_SAM_ZERO)
#include "boot/mzero.h"
#else
#error "Unsupported board!"
#endif
};

@JAndrassy
Copy link
Owner

@JEG8
Copy link
Author

JEG8 commented Mar 22, 2022

arduino/ArduinoCore-samd#645

Thank you. I followed the steps and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants