From 3bb94f51b8edf396aa404702f80464f2a414acdc Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 17 Jul 2019 12:45:44 +0700 Subject: [PATCH] fix RAMSTART, RAMSIZE, RAMEND for samd51 and same21 --- cores/arduino/avr/io.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cores/arduino/avr/io.h b/cores/arduino/avr/io.h index 33d20cdd..63acda20 100644 --- a/cores/arduino/avr/io.h +++ b/cores/arduino/avr/io.h @@ -25,8 +25,14 @@ #ifndef _IO_H_ #define _IO_H_ -#define RAMSTART (HMCRAMC0_ADDR) -#define RAMSIZE (HMCRAMC0_SIZE) +#ifdef HSRAM_ADDR + #define RAMSTART (HSRAM_ADDR) + #define RAMSIZE (HSRAM_SIZE) +#else + #define RAMSTART (HMCRAMC0_ADDR) + #define RAMSIZE (HMCRAMC0_SIZE) +#endif + #define RAMEND (RAMSTART + RAMSIZE - 1) #endif