Skip to content

SDU for Arduino M0 #344

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

Merged
merged 2 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libraries/SDU/extras/SDUBoot/SDUBoot.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
#include <SD.h>
#include <FlashStorage.h>

#ifdef ARDUINO_SAM_ZERO
#define SDU_START 0x4000
#else
#define SDU_START 0x2000
#endif
#define SDU_SIZE 0x4000

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


1 change: 1 addition & 0 deletions libraries/SDU/extras/SDUBoot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ buildSDUBootSketch "arduino:samd:mkrfox1200" "$OUTPUT_PATH/mkrfox1200.h"
buildSDUBootSketch "arduino:samd:mkrgsm1400" "$OUTPUT_PATH/mkrgsm1400.h"
buildSDUBootSketch "arduino:samd:mkrwan1300" "$OUTPUT_PATH/mkrwan1300.h"
buildSDUBootSketch "arduino:samd:mkrwifi1010" "$OUTPUT_PATH/mkrwifi1010.h"
buildSDUBootSketch "arduino:samd:mzero_bl" "$OUTPUT_PATH/mzero.h"
2 changes: 2 additions & 0 deletions libraries/SDU/src/SDU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ unsigned char sduBoot[0x4000] = {
#include "boot/mkrwan1300.h"
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
#include "boot/mkrwifi1010.h"
#elif defined(ARDUINO_SAM_ZERO)
#include "boot/mzero.h"
#else
#error "Unsupported board!"
#endif
Expand Down
Loading