dfontaine:
Where do i put it in the code to actually have it update, all it does is reset the current code?
if your sketch includes the SDU library, it works like a second stage bootloader. it checks the SD card and if it finds an bin for update it applies it and resets again.
if you save the bin to card in a PC and then put it in the Arduino and the sketch in the Arduino runs with SDU library, it will load the new sketch on startup.
if you load the bin to SD in the Arduino over networks, spi, i2c, Serial, the you must reset the Arduino after saveing the bin to card to apply the update. again the sketch active in Arduino must include the SDU library
I modified the SDUBoot.ino to match the mrk specs and set the CS pin to 11 (the one i'm using) but it doesn't want to update. i just need to include the SDU.h in the sketch right?
i'm kind of running out of ideas to be honest, i even tried to integrate the SDUBoot into my code, needless to say, it didint work.
I modified the SDUBoot.ino to match the mrk specs and set the CS pin to 11 (the one i'm using) but it doesn't want to update. i just need to include the SDU.h in the sketch right?
i'm kind of running out of ideas to be honest, i even tried to integrate the SDUBoot into my code, needless to say, it didint work.
Do i have to do something with the linker script?
SDU is not a normal library. the included .h file contains only binary code of the second stage bootloader.
SDUBoot is the source code of the second stage bootloader which is first compiled to a bin. this bin is then converted to a C array and put into the SDU.h.
i can't manually push the updates, arduino has to check with a custom c++ server if any updates are available. the server then pushes the .bin file to it.
The OTA functionality is what i need but i can't use the IDE and i dont know how to push to the network port without the IDE. i figured that the server could push it to the MKR, who would then store it to the SD card and then update itself.
dfontaine:
i can't manually push the updates, arduino has to check with a custom c++ server if any updates are available. the server then pushes the .bin file to it.
The OTA functionality is what i need but i can't use the IDE and i dont know how to push to the network port without the IDE. i figured that the server could push it to the MKR, who would then store it to the SD card and then update itself.
You can do the same simpler with the InternalStorage object of the WiFi101OTA library. It has a simple interface and stores and then applies the new bin