Adafruit Grand Central M4 (#14749)

This commit is contained in:
Giuliano Zaro
2019-07-28 21:48:29 +02:00
committed by Scott Lahteine
parent fec52e61ea
commit 290466578f
125 changed files with 2555 additions and 99 deletions

View File

@ -75,7 +75,7 @@
char *end_bss = &__bss_end__,
*stacklimit = &__StackLimit,
*heaplimit = &__HeapLimit ;
*heaplimit = &__HeapLimit;
#define MEMORY_END_CORRECTION 0x200
@ -94,6 +94,20 @@
#define MEMORY_END_CORRECTION 0x10000 // need to stay well below 0x20080000 or M100 F crashes
#elif defined(__SAMD51__)
extern unsigned int __bss_end__, __StackLimit, __HeapLimit;
extern "C" void * _sbrk(int incr);
void *end_bss = &__bss_end__,
*stacklimit = &__StackLimit,
*heaplimit = &__HeapLimit;
#define MEMORY_END_CORRECTION 0x400
char *free_memory_start = (char *)_sbrk(0) + 0x200, // Leave some heap space
*free_memory_end = (char *)stacklimit - MEMORY_END_CORRECTION;
#else
#error "M100 - unsupported CPU"
#endif