Hi Mark,
I've tried changing the heap size allocation down to 4K and I still seem to have a problem. I've traced the problem to the uMemcpy function. This function is called from the fnGetOurParameters function in the application task (fnApplication). There are two calls to uMemcpy in that function. The first call is successful. The second one hangs the system on the return. I've traced it into uMemcpy on the second call and I can see that the memory copy of the parameters into &temp_pars->temp_parameters is successful. However, when uMemcpy attempts to return to the calling function, fnGetOurParameters, it goes elsewhere. This elsewhere is at the end of the startup_gnu.s file in the default exception vectors routine where it loops forever. So, what I can see is that the application task is called, but then an exception occurs and it sits in a forever loop.
I then tried your suggestion and placed a break point in the uMalloc function. I noticed that the present_HeapSize variable cycles through the following values: 144, 220, 348, 368, 437, 460, 497, 520, 557, 580, 617, 640, 677, 700, 737, 800, and 884. After the present_HeapSize variable reaches 884 there is a pause and it recycles again starting at 144. I've defined the OUR_HEAP_SIZE constant to 4692 bytes. The system doesn't hang in the exception loop, but not it seems to cycle through the uMalloc routine forever.
I also tried placing a breakpoint in the uMallocAlign function. The debugger never stops there.
I will try to note the sizes of memory that is being allocated on each call and the calling routine tomorrow.
Any ideas on what is going on?
Johnas