• Earle F. Philhower, III's avatar
    Major multicore fixes Newlib and FreeRTOS (#640) · 66eb0613
    Earle F. Philhower, III authored
    Instead of wrapping the memory functions in the link stage, rebuild
    Newlib and enable retargetable locks.  Override the weak definitions
    in the libc.a with our own, SDK based ones.
    
    The wrapping utilized before catches app-level memory allocations
    but misses allocations inside Newlib libc (like printf/etc.).
    
    Each core needs its own _impure_ptr or else crashes like the one seen
    in parallel printf_floats can happen.  Enable it in the toolchain
    build and implement a simple swapper here.
    
    FreeRTOS SMP doesn't support Newlib's dynamic reent which is needed
    to allow save MT support.  Minor patch to FreeRTOS and update the
    FreeRTOS variant.cpp and setup to support it.
    66eb0613
FreeRTOSConfig.h 5.14 KB