diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2017-09-22 18:05:51 -0700 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2017-09-22 21:05:51 -0400 |
| commit | 6839fff31303463d5c7942387fa498895edf1abf (patch) | |
| tree | f4c5b94c6534c8d5c65ea6b7209cd2d681508f5f /atmel-samd/reset.c | |
| parent | 3ad01ddb04b160b74b4baee9fce043da17dbcef5 (diff) | |
Move to ASF4 and introduce SAMD51 support. (#258)3.0.0-alpha.0
* atmel-samd: Remove ASF3. This will break builds.
* atmel-samd: Add ASF4 for the SAMD21 and SAMD51.
* Introduce the supervisor concept to facilitate porting.
The supervisor is the code which runs individual MicroPython VMs. By
splitting it out we make it more consistent and easier to find.
This also adds very basic SAMD21 and SAMD51 support using the
supervisor. Only the REPL currently works.
This begins the work for #178.
Diffstat (limited to 'atmel-samd/reset.c')
| -rw-r--r-- | atmel-samd/reset.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/atmel-samd/reset.c b/atmel-samd/reset.c index 442774a5f..0aef56d4c 100644 --- a/atmel-samd/reset.c +++ b/atmel-samd/reset.c @@ -27,10 +27,16 @@ #include "flash_api.h" #include "reset.h" -#include "asf/sam0/utils/cmsis/samd21/include/samd21.h" +#include "include/sam.h" // Copied from inc/uf2.h in https://github.com/Microsoft/uf2-samd21 +#ifdef SAMD21 #define DBL_TAP_PTR ((volatile uint32_t *)(HMCRAMC0_ADDR + HMCRAMC0_SIZE - 4)) +#else + #ifdef SAMD51 + #define DBL_TAP_PTR ((volatile uint32_t *)(HSRAM_ADDR + HSRAM_SIZE - 4)) + #endif +#endif #define DBL_TAP_MAGIC 0xf01669ef // Randomly selected, adjusted to have first and last bit set void reset_to_bootloader(void) { |
