LCDs, strings and linkers (oh my)
Wed Mar 7 06:41:00 GMT 2001
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
I have built an m68k-elf cross-compiler using gcc-2.95.2, binutils-2.9.1 and
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 = 't';
stringVar = 'h';
stringVar = '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 firstname.lastname@example.org
More information about the crossgcc