Newlib : stdio : fprintf and sprintf

J.B.W.Webber J.B.W.Webber@kent.ac.uk
Sat Jun 8 16:40:00 GMT 2013


Hi,
I am trying to compile an APL compiler aplc for a range of new machines.
On the Adapteva Parallella with Epiphany multi-core chip, which uses Newlib, I am having problems.

The Apl to C translation is going fine, but there are problems in the .c to .elf or .out translation.
Specifically the following two compiling on the Parallella Armv7, generating code for the Epiphany, appear to act as no-ops :
                fprintf(aplcout,"%c",trs1.value.cp[i3]);
                sprintf(pointer,"%c",trs1.value.cp[i3]);
I am not sure what version this sdk is; the esdk on the Parallella is esdk.4.13.03.30.

I have also downloaded and compiled the latest sdk from GitHub for my laptop;
When this is generating code under Cygwin, for the Epiphany,
                fprintf(aplcout,"%c",trs1.value.cp[i3]); works
                sprintf(pointer,"%c",trs1.value.cp[i3]); does nothing

The full table :
Build on PC under Cygwin for Cygwin : Works
Build on PC under Cygwin for Cygwin : run using e-run : Works
Build on Arm under Linux for Armv7-Linux : Works
Build on Arm under Linux for Linux : run using e-run : No output : fprintf(aplcout,"%c",trs1.value.cp[i3]); failing
Build on Arm under Linux for Epiphany cores : No output :   sprintf(pointer,"%c",trs1.value.cp[i3]); failing
Build on PC under Cygwin for Armv7-Linux : run using e-run : Works : fprintf(aplcout,"%c",trs1.value.cp[i3]);  works
Build on PC under Cygwin for Epiphany cores : No output : sprintf(pointer,"%c",trs1.value.cp[i3]); failing.

Simpler statements like printf(...) and sprintf(pointer,"Text") do work.

Is it possible for someone to have a look at these functions and 
a) Determine if my suppositions are correct.
b) If so, create fixed versions ?
Cheers,
                Dr. Beau Webber



More information about the Newlib mailing list