Today is my first shot at programming a calculator, and it's not been a perfectly smooth process.
I'm on Arch Linux, and have successfully compiled cross-sh3eb-elf-binutils, cross-sh3eb-elf-gcc, mkg3a from the AUR.
sh3eb seems to be in /usr/bin, as indicated here:
Code:
so I modified prizm_rules like so:
Code:
I then proceeded to try to compile the Hello World, courtesy of Zeldaking. I copied the example project over to projects/Hello_World/, made the Hello_World in src/ and pasted the code in. I then ran make, which gave me a pretty weird error.
[nathan@gerty Hello_World]$ make
/usr/bin/sh3eb-elf-gcc -mb -m4a-nofpu -mhitachi -nostdlib -T/home/nathan/code/PrizmSDK-0.3/common/prizm.ld -Wl,-static -Wl,-gc-sections -L/home/nathan/code/PrizmSDK-0.3/lib -lfxcg -lgcc -o /home/nathan/code/PrizmSDK-0.3/projects/Hello_World/Hello_World.bin
/home/nathan/code/PrizmSDK-0.3/lib/libfxcg.a(crt0.o): In function `main':
(.pretext+0x50): undefined reference to `_main'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/nathan/code/PrizmSDK-0.3/projects/Hello_World/Hello_World.bin] Error 1
make: *** [build] Error 2
Anyone have any clue where I went wrong?
I'm on Arch Linux, and have successfully compiled cross-sh3eb-elf-binutils, cross-sh3eb-elf-gcc, mkg3a from the AUR.
sh3eb seems to be in /usr/bin, as indicated here:
Code:
[nathan@gerty Hello_World]$ locate sh3eb
/usr/bin/sh3eb-elf-addr2line
/usr/bin/sh3eb-elf-ar
/usr/bin/sh3eb-elf-as
/usr/bin/sh3eb-elf-c++
/usr/bin/sh3eb-elf-c++filt
/usr/bin/sh3eb-elf-cpp
/usr/bin/sh3eb-elf-elfedit
/usr/bin/sh3eb-elf-g++
/usr/bin/sh3eb-elf-gcc
/usr/bin/sh3eb-elf-gcc-4.7.0
/usr/bin/sh3eb-elf-gcc-ar
/usr/bin/sh3eb-elf-gcc-nm
/usr/bin/sh3eb-elf-gcc-ranlib
/usr/bin/sh3eb-elf-gcov
/usr/bin/sh3eb-elf-gprof
/usr/bin/sh3eb-elf-ld
/usr/bin/sh3eb-elf-ld.bfd
/usr/bin/sh3eb-elf-nm
/usr/bin/sh3eb-elf-objcopy
/usr/bin/sh3eb-elf-objdump
/usr/bin/sh3eb-elf-ranlib
/usr/bin/sh3eb-elf-readelf
/usr/bin/sh3eb-elf-size
/usr/bin/sh3eb-elf-strings
/usr/bin/sh3eb-elf-strip
so I modified prizm_rules like so:
Code:
PREFIX := /usr/bin/sh3eb-elf-
I then proceeded to try to compile the Hello World, courtesy of Zeldaking. I copied the example project over to projects/Hello_World/, made the Hello_World in src/ and pasted the code in. I then ran make, which gave me a pretty weird error.
Quote:
[nathan@gerty Hello_World]$ make
/usr/bin/sh3eb-elf-gcc -mb -m4a-nofpu -mhitachi -nostdlib -T/home/nathan/code/PrizmSDK-0.3/common/prizm.ld -Wl,-static -Wl,-gc-sections -L/home/nathan/code/PrizmSDK-0.3/lib -lfxcg -lgcc -o /home/nathan/code/PrizmSDK-0.3/projects/Hello_World/Hello_World.bin
/home/nathan/code/PrizmSDK-0.3/lib/libfxcg.a(crt0.o): In function `main':
(.pretext+0x50): undefined reference to `_main'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/nathan/code/PrizmSDK-0.3/projects/Hello_World/Hello_World.bin] Error 1
make: *** [build] Error 2
Anyone have any clue where I went wrong?