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.

Strange problem in programming ARM under Linux

Other Parts Discussed in Thread: DM3730

Hi,

I am using DM3730 SDK in Linux.

In a single C file, the main function is at the bottom of the file.

Above the main function, there are many C functions called by the main function.

In every C function, there is a printf to show which function is being called.

There is no compilation error for the ARM program.

But when I run the program in Linux prompt,  the printfs show only the first few functions are being called.

What could be the problem ?

could it be the problem of  stack size or heap size ?

How to change the stack size or heap size in a Linux makefile ?

Thanks,

Mr Tan

  • The usual approach is to insert more printfs to determine which is the last function that successfully returned from being called.

    Then to insert printfs inside the next function, to determine again which point in the function is successful, and at which point things seem to stop working.

    Incidentally, to ensure that your printfs do not just add their text to an output buffer, you should make sure that each one ends with a "\n" end-of-line - this should make sure the buffer is output to the console before the 'crash' or whatever the problem is.

  • Mike had a good point: don't forget the \n.

    For the long run, it's worth installing gdb on your target platform, I found it extremely useful.