arm: async uart writes & fixes

This commit is contained in:
2022-05-17 10:17:56 -07:00
parent e9f623e754
commit e39cdc5709
13 changed files with 232 additions and 190 deletions

View File

@@ -12,9 +12,9 @@ extern unsigned char _heap_begin, _heap_end;
namespace {
void LogStats(unsigned char* heap) {
char number[] = "00000000\r\n";
UartSend("Program break now at 0x");
UartWriteBlocking("Program break now at 0x");
itoa(reinterpret_cast<int>(heap), number);
UartSend(number);
UartWriteBlocking(number);
}
} // namespace
@@ -22,7 +22,7 @@ extern "C" void* _sbrk(int increment) {
static unsigned char* heap = &_heap_begin;
unsigned char* prev_heap = heap;
if (heap + increment >= &_heap_end) {
UartSend("Heap overflow!\r\n");
UartWriteBlocking("Heap overflow!\r\n");
return reinterpret_cast<void*>(-1);
}
heap += increment;