In portwrapper.cpp , comment out the __malloc_lock and __malloc_unlock functions. These are problematic for USB interrupts. I am not fully sure why but the disabling of the task scheduler seems to mess up something related to the interrupt handling. These function are not strictly necessary anyway, most of them are related to non-reentrant newlib nano functions
Improve USB library, making it more flexible
Remove FreeRTOS dependency in AT91 library
FreeRTOS Memory Management: Add heap_3.c (not used for now) and update heap_4.c with v10.4.2 FreeRTOS source code