Skip to content

Commit dd2916f

Browse files
JAndrassysandeepmistry
authored andcommitted
SDU for Arduino M0
1 parent 691b288 commit dd2916f

File tree

5 files changed

+1202
-0
lines changed

5 files changed

+1202
-0
lines changed

libraries/SDU/extras/SDUBoot/SDUBoot.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
#include <SD.h>
2020
#include <FlashStorage.h>
2121

22+
#ifdef ARDUINO_SAM_ZERO
23+
#define SDU_START 0x4000
24+
#else
2225
#define SDU_START 0x2000
26+
#endif
2327
#define SDU_SIZE 0x4000
2428

2529
#define SKETCH_START (uint32_t*)(SDU_START + SDU_SIZE)
@@ -90,3 +94,4 @@ int main() {
9094
asm("bx %0"::"r"(resetHandlerAddress));
9195
}
9296

97+

libraries/SDU/extras/SDUBoot/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ buildSDUBootSketch "arduino:samd:mkrfox1200" "$OUTPUT_PATH/mkrfox1200.h"
2828
buildSDUBootSketch "arduino:samd:mkrgsm1400" "$OUTPUT_PATH/mkrgsm1400.h"
2929
buildSDUBootSketch "arduino:samd:mkrwan1300" "$OUTPUT_PATH/mkrwan1300.h"
3030
buildSDUBootSketch "arduino:samd:mkrwifi1010" "$OUTPUT_PATH/mkrwifi1010.h"
31+
buildSDUBootSketch "arduino:samd:mzero_bl" "$OUTPUT_PATH/mzero.h"

libraries/SDU/src/SDU.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ unsigned char sduBoot[0x4000] = {
3636
#include "boot/mkrwan1300.h"
3737
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
3838
#include "boot/mkrwifi1010.h"
39+
#elif defined(ARDUINO_SAM_ZERO)
40+
#include "boot/mzero.h"
3941
#else
4042
#error "Unsupported board!"
4143
#endif

0 commit comments

Comments
 (0)