diff --git a/port/msp432p401lp-cc256x/main.c b/port/msp432p401lp-cc256x/main.c index 5744d16ff..785223595 100755 --- a/port/msp432p401lp-cc256x/main.c +++ b/port/msp432p401lp-cc256x/main.c @@ -101,9 +101,20 @@ int _fstat(int file){ return -1; } +extern int _end; + void * _sbrk(int incr){ - UNUSED(incr); - return NULL; + static unsigned char *heap = NULL; + unsigned char *prev_heap; + + if (heap == NULL) { + heap = (unsigned char *)&_end; + } + prev_heap = heap; + + heap += incr; + + return prev_heap; } #endif