Adafruit Grand Central M4 (#14749)

This commit is contained in:
Giuliano Zaro authored and Scott Lahteine committed 2019-07-28 14:48:29 -05:00
1 parent fec52e61ea
commit 290466578f
125 files changed
+2555 -99

No files matched your search

+15 -1
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