This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Re: Printf function error
- From: Kelvin Lawson <klawson at ad-holdings dot co dot uk>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 24 Feb 2004 10:44:49 +0000
- Subject: Re: [ECOS] Re: Printf function error
- References: <s03b1d82.001@EMAIL>
Hi Aniket,
There are a few issues that are fixed for SuperH in the latest sources
in CVS. To be sure you have all the fixes it might be best to download
them. However here are some things I had to get round with v2.0:
The new toolchain generated subsections under bss (bss.XXX) - these were
missed by the SH linker script. See the patch:
http://sources.redhat.com/ml/ecos-patches/2003-07/msg00087.html
The toolchain also seems to treat common symbols differently. If you are
building the FreeBSD stack you may have problems linking because of
icmpstat appearing in multiple places. The workaround for this was to
declare it in ip_icmp.c and make it an extern for other object files.
Again with the FreeBSD stack, if you're building the httpd monitor
(monitor.c), you may have to fix some strings that are split over
multiple lines.
I also had stack alignment problems fixed by:
http://sources.redhat.com/ml/ecos-discuss/2003-04/msg00089.html
Cheers,
Kelvin.
Aniket S Joshi wrote:
Hi Kelvin,
Thanks for your valuable & Informative reply.
Sorry for the late response.
Now I am updating the GCC with new version.
meanwhile pls send me the details of changes required for ECOS 2.0 so that after GCC updation i will implement that changes in code also.
Are you still working on Sh-7729 + ECOS combination?
Thanks once again
Regards
Aniket
Kelvin Lawson <klawson@ad-holdings.co.uk> 02/20/04 08:04PM >>>
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