This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

LCDs, strings and linkers (oh my)


Hi all,

I have received a couple of responses to my questions about my experiences
with using strings in a program that is running on a robominds board
(68332).

I have built an m68k-elf cross-compiler using gcc-2.95.2, binutils-2.9.1 and
newlib-1.8.2.

To summarize, my problem seems to revolve around the fact that a program
bombs if my c-program includes references to strings like:

strcpy(stringVar, "this is some text");
lcd_print("this is some text");

However, the program does not bomb if I do the following:

1. Include any reference to 'printf'
2. Use the construction 'char const stringVar[] = "this is some text"
3. Build up the string in the following fashion:
   stringVar[0] = 't';
   stringVar[1] = 'h';
   stringVar[2] = 'i';
   and so on.

The responses suggest that perhaps there is a compiler flag that I could use
to make sure that strings get put in the right segments or that I may need
to rebuild the cross-compiler with some different flags.

I have looked at the man pages for gcc, as and ld and don't see any flags
that may help (but believe me, I'm not yet adept at understanding some of
these things).  Any suggestions for specific flags to use?

Also, if anyone knows of specific cross-compiler building steps that I
should consider, please let me know.

Thanks again to everyone!



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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