diff --git a/libs/core/codal.cpp b/libs/core/codal.cpp index a214ab00..a5fafe4e 100644 --- a/libs/core/codal.cpp +++ b/libs/core/codal.cpp @@ -31,6 +31,7 @@ void platform_init() { } void initMicrobitGC() { + uBit.init(); if (device_heap_size(1) > NON_GC_HEAP_RESERVATION + 4) gcPreAllocateBlock(device_heap_size(1) - NON_GC_HEAP_RESERVATION); } @@ -43,9 +44,6 @@ struct FreeList { }; static void initCodal() { - - uBit.init(); - // repeat error 4 times and restart as needed microbit_panic_timeout(4); }