RCC toolchain problem with leon2
Luca Cinquepalmi
cinquepalmi at planetek.it
Thu Apr 19 16:28:17 UTC 2012
Hi all,
I compiled a simple "Hello word" C program with sparc-rtems-gcc v4.10.
I tested it with TSIM sparc simulator and it works.
I also developed a toolchain to load program on a leon2 board that convert
a .exe file into a .hex file but the program doesn't work.
The same program, compiled with sparc-elf-gcc and converted with the same
toolchain works with no problem.
Here's summerized my toolchain:
CC = sparc-rtems-gcc
CFLAGS = -msoft-float -qleon2 -mcpu=v8
LIBS = -lgcc -lm -msoft-float
LDFLAGS = -mcpu=v8
$(CC) $(LDFLAGS) $(SOURCES) $(LIBS) -o $@.exe
cp $@.exe u$@.exe
sparc-rtems-objdump -d $@.exe > $(OUTDIR)/$@.disas
sparc-rtems-strip $@.exe
sparc-rtems-objcopy --remove-section=.comment $@.exe
sparc-rtems-objdump -s $@.exe > $@.dat
sparc-rtems-size $@.exe
Dat2Hex.pl $@.dat text > code.hex
Dat2Hex.pl $@.dat data > data.hex
cat code.hex data.hex > program.hex
I have two question:
1) can the toolchain also be used for sparc-rtems-gcc?
2) shall I necessary use mkprom to create a loadble program or
another kind of toolchain can be used?
Thank a lot for your answer
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120419/de732cf8/attachment.html>
More information about the users
mailing list