Heap 4C in extended memory; use bug

I would probably define configAPPLICATION_ALLOCATED_HEAP to 1 in a user-controlled section of FreeRTOSConfig.h. Then I would declare the heap in a user-controlled section of main.c. No need to modify heap4.c because it has an extern definition which will effectively go find your definition in main.c at link time.