On 10/3/07, Stanley Lee <[EMAIL PROTECTED]> wrote:
> Sorry for another spam. I have taken Xiaofan's suggestion and modified my
> code and the Makefile to compile for PIC18F2620 instead of the architecture
> in the example code. However, I have been getting error message with the "
> crt0.o" file. I've tried all three combinations of "crt0.o", "crt0i.o", and
> "crt0iz.o", but still similar error complaints as shown below:
>
> [EMAIL PROTECTED]:/media/sdb1/LED_toggle$ make
> gplink -w -I/usr/share/sdcc/lib/pic16 -c -s
> /usr/share/gputils/lkr/18f2620.lkr  -o LED_toggle.hex
> main.o crt0.o pic18f2620.lib libsdcc.lib
> crt0.o: No such file or directory
> make: *** [LED_toggle.hex] Error 1
>
> Really sorry for the spam. Hopefully I can get into a situation to reduce
> the amount of help emails needed.
>

Hello Stanley,

crt0.o is in the sdcc/lib/pic16 directory so you need to tell the
linker where to search this file, or put the file in current
directory. But I don't think this is the proper way to compile using
sdcc.

I usually set the environment variables so that it point to certain directories.
for sdcc:
SDCC_HOME
SDCC_INCLUDE
SDCC_LIB
and for gputils:
GPUTILS_HEADER_PATH
GPUTILS_LKR_PATH
GPUTILS_LIB_PATH
I tested it on Windows though, but it should work on Linux as well.
I have OpenBSD box, but could not tested it right now.

Perhaps you could show us your search dirs by excecuting this command:
sdcc --print-search-dirs

and you could also see the gplink and gpasm default search dir, by
just executing both of programs without any options followed.
Just run:
gpasm
gplink

see in the bottom of the message you find:

Default header file path NOT SET

Default linker script path NOT SET
Default library path NOT SET

If you set the environment variables correctly, it will show the correct path.
-- 
soliton
------------------------------------
Diskusi di http://phimega.com/forums

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to