Hello,
I'm currently trying to set up heap_usenewlib_NXP.c with my project in MCUXpresso. I'm following Nadler's article here https://nadler.com/embedded/newlibAndFreeRTOS.html. What's confusing me is "Exclude from all builds any current sbrk implementation". I'm using NewlibNano and I think it is precompiled. So, is it even possible to exclude sbrk? My use-case is a single FreeRTOS task running tests on a MIMXRT1170-EVK board. Some of the tests I'm running use the STL, which use malloc. I tried overwriting the malloc family of functions to use only FreeRTOS heap management, but this doesn't work as some newlib functions will not use my custom malloc implementation (strong linked?).
Since I don't think the sbrk provided in heap_usenewlib_NXP was being used, I tried only using the implementation of FreeRTOS's memory API (the functions at the bottom of https://github.com/DRNadler/FreeRTOS_helpers/blob/master/heap_useNewlib_NXP.c). But, this is resulting in MMARVALID and DACCVIOL errors.
All I want is a single FreeRTOS task to run these tests, with a working heap.
Any help would be greatly appreciated,
Thanks!