Missing sprintf for SH1 ?

山田 淳 jun@cew.co.jp
Fri Apr 11 04:39:00 GMT 2003


Although I am evaluating on CPU board of SH1 SH7034 of Hitachi, sprintf function does not operate correctly.
buf after execution is still NULL.
If an assembler is seen, the address is copied to buf, without the second parameter (fmt) going into a register 5 (r5) correctly.
Why does it operate in this way?
What should be changed into making it operate correctly?
Please let me know someone.
I ask of you.
cygwin dll 1.3.15-2
binutils 2.13.1
gcc-core 2.95.3
newlib 1.11.0 

void    function( void ){
    char    buf[30];    
  char    *title = "test\r\n";
    char    *fmt = "%s";
    int     ret;    

    ret = sprintf(buf, fmt, title); 


jun yamada

More information about the Newlib mailing list