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: SH3 7709S optimization problem


Rod Campbell wrote:
I've been working on porting eCos to a custom 7709S platform, using the
77x9 solution engine platform as a template. I successfully created
Redboot for my platform. I've had problems running some of the demo
programs (like twothreads) - printf() does not function correctly. If I
stepped through the assembler code with Insight, I would get a SIGILL
exception in one of the stdio library functions.


If I compile with -O1 optimization instead of -O2 (the eCos default for
the 77x9 solution engine platform), this code works.  I am using eCos
2.0 and the SH3 gnu tools that come on that distribution CD (sh-elf-gcc
V 3.2.1, sh-elf-ld v 2.13.1 (eCosCentric)).

With -O1 optimization I have compiled and successfully run all the eCos
test programs (except 4 that deal with cache - see my related post "SH3
7709S cache disable problem").


Does anyone have any similar experiences or insights? Thanks.

Have you checked what the instruction actually is? Perhaps the optimiser just happens to insert an instruction that doesn't exist for the SH core on your board, e.g. an SH4 insn on an SH3.


You could try GCC 3.2.3, or you could generate an assembler file for the affected object and look at the instruction in question and see if it's getting misassembled in which case try binutils 2.14.

And let us know how you get on so we know if we need new tools.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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


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