This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Acts like a stack overflow, but doesn't look like one - how to debug?



I am writing a program to post to a PHP server from a Tiva TM4C (specifically, TM4C123GXL) using a SIM900 model. I'm writing/compiling C in Keil U4.


I have written a function,

void GSMsendGPRS(char dataToPut)

to take a string of data, append it to a URL (of my server), then post it to the PHP site. This works fine - my server is getting data.

But, upon exiting this function, my program freezes. I know the function is completing, because the last line of code is

    UARTprintf("exiting");

... and I'm getting the expected response. But the next line of code in my program does not execute.

I suspected stack overflow. So, I went into startup_rvmdk.S and increased my stack size from 

    Stack   EQU     0x00000100

to

    Stack   EQU     0x00000200...and then...
    Stack   EQU     0x00000400...and then...
    Stack   EQU     0x00001000

And the behavior is the same. So, it seems the stack overflow is not the problem?

Any tips on how to continue debugging? This has got me vexed...