This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Printf function error


Hi Aniket,

I found the same issue with GCC 3.2.1 on SH3. I also found that in some cases it generated bad code with optimisation turned off. Since moving to GCC 3.3.2 I haven't come across any code generation problems. I'd recommend you download the latest sources and rebuild the toolchain.

I used these instructions for building the toolchain:
	http://ecos.sourceware.org/build-toolchain.html

But used the latest version of the sources:
	. binutils-2.14
	. newlib-1.12.0
	. gcc-core-3.3.2
	. gcc-g++-3.3.2
	. insight-6.0

I had to apply the following patches to GCC and Insight:
	. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13068
	. http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00433.html
	. http://sources.redhat.com/ml/insight/2003-q4/msg00034.html

I also found some issues with the eCos v2.0 release when using the new sh-elf toolchain. I would use the latest eCos sources from CVS in order to avoid these. I can send you details of what changes are required to v2.0 if you like though.

Cheers,
Kelvin.


John Dallaway wrote:


Hi Aniket

Aniket S Joshi wrote:

I am tring to run the example program "towthreads.c" But it is giving output as follows

Entering twothreads' cyg_user_start()
function
Beginning execution; thread data is 0
Beginning execution; thread data is 1
Thread 00000000000000000000000000000000000000..........


This is a manifestation of a code optimisation issue in GCC 3.2.1 (and possibly other versions) targetting sh-elf. The eCosPro Developer's Kit for SuperH targets ships with a patched toolchain to address this problem.

John Dallaway
eCosCentric Limited




-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]