|
From: | Trampas |
Subject: | [avr-gcc-list] sprintf_P not working? |
Date: | Thu, 30 Nov 2006 20:03:32 -0500 |
I am not sure what version of the AVR libc I am using but I
noticed in my code that sprintf_P does not appear to work. Here is a simple example: 157: sprintf_P(str1,"%s",data); +000002C9: 939F PUSH R25 Push
register on stack +000002CA: 938F PUSH R24 Push
register on stack +000002CB: E080 LDI R24,0x00 Load
immediate +000002CC: E091 LDI R25,0x01 Load
immediate +000002CD: 939F PUSH R25 Push
register on stack +000002CE: 938F PUSH R24 Push
register on stack +000002CF: E584 LDI R24,0x54 Load
immediate +000002D0: 2EE8 MOV R14,R24 Copy
register +000002D1: E08C LDI R24,0x0C Load
immediate +000002D2: 2EF8 MOV R15,R24 Copy
register +000002D3: 92FF PUSH R15 Push
register on stack +000002D4: 92EF PUSH R14 Push
register on stack +000002D5: 940E2DEE CALL 0x00002DEE Call
subroutine After using the sprintf_P str1 is not the same as data. I know that I can use strcpy or other functions but I use
sprintf_P in other locations as well that seem to fail too. Trampas |
[Prev in Thread] | Current Thread | [Next in Thread] |