I have tried to port MSP430FR5969 example to MSP430FR2355 and for some reason it always fails at pvPortMalloc and finishes in vApplicationMallocFailedHook.
FR23 has more RAM then FR59 so there is no reason to fail at this.
Things I did:
Changed vApplicationSetupTimerInterrupt (TA0CTL to TABCTL, and all those from A->B)
Changed prvSetupHardware (Configured to 1Mhz , instead of 8 in the original)
Inside Leds.c configured proper ports for two leds being used.
Stepping through code I think I’ve isolated issue to prvHeapInit which running on FR5969 returns xFreeBytesRemaining with size, and running on FR2355 returns 0.
Why the hell would it ever fail in that part of code for FR23 and not for FR59, especially because this is just array ucHeap[ configTOTAL_HEAP_SIZE ], any ideas?
I have put all of it on drive and if it all comes together I will put it to github as example for others.
For the size tried ( 14 * 1024 ) and (20*1024), no change.
Thing is that this code (in original form) is for uC with much lower RAM values , so this should work without any issue in that sense.
/* If this is the first call to malloc then the heap will require
initialisation to setup the list of free blocks. */
if( pxEnd == NULL )
{
prvHeapInit(); <-- enters here
}
What action could verify this condition and/or what could be done?