This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

lpc2103 sprintf problem

Hi I do have problems with the sprintf function and the Keil compiler. The program works nicely until I increase the amount of functions, even if I don't use them. First I get the
"%02d,%d"
into the buffer if I define one extra function but the program stops working if I define more functions.

I made my own, incomplete sprintf function and then it works perfectly.

I have tried to play the size of the following parameters in the Startup.s file:
USR_Stack_Size EQU 0x00000400
Heap_Size EQU 0x00000400
but without any success.

If anyone has any clue I would be very thankful.

Regards
Gudjon

Parents
  • what do you mean by "the program stops working"? does your processor enter an exception mode? if so, you can try to figure out what the last instruction executed was before the exception by looking at R14 minus 8 (when in abort or under exception modes). if no exception occurs - what does happen? again, what does "stops working" mean?

Reply
  • what do you mean by "the program stops working"? does your processor enter an exception mode? if so, you can try to figure out what the last instruction executed was before the exception by looking at R14 minus 8 (when in abort or under exception modes). if no exception occurs - what does happen? again, what does "stops working" mean?

Children
No data