Sdu for Sodaq SARA r412 AFF

The manufacturer page for the SODAQ Sara board says : it is compatible with arduino M0.

So I wanted to run an SDU firmware update. I can download the file via http over the SARA r412 modem. But the SDU.h does not recognize the board.

So I tried with :

//#elif defined(ARDUINO_SAM_ZERO)
  #include "boot/mzero.h"


//#if defined(ARDUINO_SAMD_ZERO)
#include "boot/zero.h"

I checked on the sd card, and on the http server and on my local pc where i created the bin file. According to the programs diff and hexdump, they are same.

But, after calling NVIC_SystemReset(); which restarts the board, I am unable to see that the firmwire was upgraded. The same firmwire remains.

Update Firmwire size is 12.kB. The chip has 248KB memory. Out of that, original code (that is supposed to download the OTA firmwire) took 37 kB. So there is enough space left.

What is wrong?

Here is MWE: Arduino OTA test. - (due to character limit)