Hi

Stanley Lee wrote:
> I have moved everything to /media/sda5/LED_toggle/. However, I've been
> experiencing the same problem. The error message is shown below:
> 
> [EMAIL PROTECTED]:/media/sda5/LED_toggle$ make
> /usr/local//share/gputils/lkr/  -L/usr/local/share/sdcc/lib/pic16/
> --use-crt= crt0.o -V -Wl-s18f2620.lkr,-m -mpic16 -p18f2620 main.o -o
> LED_toggle.hex -llibio18f2620.lib -llibc18f.lib
> make: execvp: /usr/local//share/gputils/lkr/: Permission denied
> make: *** [LED_toggle.hex] Error 127

Sorry, but my Makefile was written with all tools installed under
/usr/local/ which is the default location if you just download, compile
and install them.

Few suggestions to find the problem:
1. Check if gputils are installed and where (type "wich gplink")
2. Find the location if your lkr files. Easiest way is:
find / . -name "*.lkr"

Both *must* be either in /usr/bin/ and /usr/share or in /usr/local/bin
and /usr/local/share. If this is not the case reinstall gputils and sdcc
by just typing ./configure && make install with *no* --prefix=/what/ever/

Now edit the Makefile so that TOOLSDIR is set up with the right path either
TOOLSDIR = /usr/
or
TOOLSDIR = /usr/local/
according to the place you installed the gplink and sdcc

After that pls edit one more lines in the Makefile i forgot, to make it
more generic:
LDFLAGS = -L$(TOOLSDIR)/share/sdcc/lib/pic16/

Now to the crtX problem:
If sdcc cant find the crtX.o files this is because of the wrong library
path given in the LDFLAGS variable. Afaik sdcc expects these files in
the same directory as the pic16 library.
After doing the above steps do a find / . -name "crt0*.o"
they must be either in
/usr/local/share/sdcc/lib/pic16
or
/usr/share/sdcc/lib/pic16
together with all the other pic16 library files like libc18f.lib,
pic18f2320.lib etc etc.

One hint: Never install software to unusual places. You get screwed
sooner or later.
When i install gputils i just type ./configure and make install that
all. Same for sdcc only that i do
./configure --disable-mcs51-port --disable-gbz80-port --disable-z80-port
--disable-avr-port --disable-ds400-port --disable-ds390-port
--disable-pic-port --disable-xa51-port --disable-hc08-port
to only compile sdcc for pic16. A final make install puts the stuff in
exactly the place where it is needed.

Hope this helps

jan



-------------------------------------------------------------------------
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