I'm not sure if my last message went through b/c of the file limits, so I
guess I'll repeat the message except link the files to a file hosting site.
I'll start with replying to soliton's questions first. Here are the
printouts for where sdcc, gpasm and gplink are installed.
[printout]
[EMAIL PROTECTED]:~$ sdcc --print-search-dirs
programs:
/usr/local/bin
datadir:
/usr/local/bin/../share
/usr/local/share
includedir:
/usr/local/bin/../share/sdcc
/include/mcs51
/usr/local/share/sdcc/include/mcs51
/usr/local/bin/../share/sdcc/include
/usr/local/share/sdcc/include
libdir:
/usr/local/bin/../share/sdcc/lib
/usr/local/share/sdcc/lib
[EMAIL PROTECTED]:~$ gplink
Usage: gplink [options] [objects] [libraries]
Options: [defaults in brackets after descriptions]
-a FMT, --hex-format FMT Select hex file format.
-c, --object Output executable object file.
-d, --debug Output debug messages.
-f VALUE, --fill VALUE Fill unused program memory with value.
-h, --help Show this usage message.
-I DIR, --include DIR Specify include directory.
-l, --no-list Disable list file output.
-m, --map Output a map file.
-o FILE, --output FILE Alternate name of output file.
-O OPT, --optimize OPT Optimization level [1].
-q, --quiet Quiet.
-r, --use-shared Use shared memory if necessary.
-s FILE, --script FILE Linker script.
-t SIZE, --stack SIZE Create a stack section.
-v, --version Show version.
-w, --processor-mismatch Disable "processor mismatch" warning.
Default linker script path /usr/local/share/gputils/lkr
Default library path /usr/local/share/gputils/lib
Report bugs to:
<URL: http://gputils.sourceforge.net/ >
[EMAIL PROTECTED]:~$ gpasm
Usage: gpasm [options] file
Options: [defaults in brackets after descriptions]
-a FMT, --hex-format FMT Select hex file format. [inhx32]
-c, --object Output relocatable object.
-d, --debug Output debug messages.
-D SYM=VAL, --define SYM=VAL Define SYM with value VAL.
-e [ON|OFF], --expand [ON|OFF] Macro expansion.
-g, --debug-info Use debug directives for COFF.
-h, --help Show this usage message.
-i, --ignore-case Case insensitive.
-I DIR, --include DIR Specify include directory.
-l, --list-chips List supported processors.
-L, --force-list Ignore nolist directives.
-m, --dump Memory dump.
-M, --deps Output dependency file.
-n, --dos Use DOS newlines in hex file.
-o FILE, --output FILE Alternate name of output file.
-p PROC, --processor PROC Select processor.
-q, --quiet Quiet.
-r RADIX, --radix RADIX Select radix. [hex]
-u, --absolute Use absolute pathes.
-v, --version Show version.
-w [0|1|2], --warning [0|1|2] Set message level. [0]
-y, --extended Enable 18xx extended mode.
Default header file path /usr/local/share/gputils/header
Report bugs to:
<URL:http://gputils.sourceforge.net/ >
[end of printout]
As you can see, sdcc is installed in /usr/local/bin, while gplink and gpasm
are installed in /usr/local/share/gputils/.
Now, responding to jan's suggestions:
1. gputils is installed in /usr/local/bin/
2. location of the lkr files are in /usr/local/share/gputils/lkr/
3. location of crt0i.o is in /usr/local/share/sdcc/lib/pic16/. However,
there are multiple copies of them, as shown below:
[crt0*.o search results]
[EMAIL PROTECTED]:~$ sudo find / . -name "crt0*.o"
Password:
/usr/share/sdcc/sdcc/share/sdcc/lib/z80/crt0.o
/usr/share/sdcc/sdcc/share/sdcc/lib/z80/crt0_rle.o
/usr/share/sdcc/sdcc/share/sdcc/lib/src/z80/crt0.o
/usr/share/sdcc/sdcc/share/sdcc/lib/src/z80/crt0_rle.o
/usr/share/sdcc/sdcc/share/sdcc/lib/src/gbz80/crt0.o
/usr/share/sdcc/sdcc/share/sdcc/lib/src/gbz80/crt0_rle.o
/usr/share/sdcc/sdcc/share/sdcc/lib/gbz80/crt0.o
/usr/share/sdcc/sdcc/share/sdcc/lib/gbz80/crt0_rle.o
/usr/share/sdcc/sdcc/share/sdcc/lib/pic16/crt0iz.o
/usr/share/sdcc/sdcc/share/sdcc/lib/pic16/crt0.o
/usr/share/sdcc/sdcc/share/sdcc/lib/pic16/crt0i.o
/usr/share/sdcc/lib/src/z80/crt0.o
/usr/share/sdcc/lib/src/z80/crt0_rle.o
/usr/share/sdcc/lib/src/gbz80/crt0.o
/usr/share/sdcc/lib/src/gbz80/crt0_rle.o
/usr/local/share/sdcc/lib/z80/crt0.o
/usr/local/share/sdcc/lib/z80/crt0_rle.o
/usr/local/share/sdcc/lib/src/z80/crt0.o
/usr/local/share/sdcc/lib/src/z80/crt0_rle.o
/usr/local/share/sdcc/lib/src/gbz80/crt0.o
/usr/local/share/sdcc/lib/src/gbz80/crt0_rle.o
/usr/local/share/sdcc/lib/src/pic16/build/startup/crt0iz.o
/usr/local/share/sdcc/lib/src/pic16/build/startup/crt0.o
/usr/local/share/sdcc/lib/src/pic16/build/startup/crt0i.o
/usr/local/share/sdcc/lib/src/pic16/bin/crt0iz.o
/usr/local/share/sdcc/lib/src/pic16/bin/crt0.o
/usr/local/share/sdcc/lib/src/pic16/bin/crt0i.o
/usr/local/share/sdcc/lib/gbz80/crt0.o
/usr/local/share/sdcc/lib/gbz80/crt0_rle.o
/usr/local/share/sdcc/lib/pic16/crt0iz.o
/usr/local/share/sdcc/lib/pic16/crt0.o
/usr/local/share/sdcc/lib/pic16/crt0i.o
/media/sdb1/download/sdcc/share/sdcc/lib/gbz80/crt0.o
/media/sdb1/download/sdcc/share/sdcc/lib/gbz80/crt0_rle.o
/media/sdb1/download/sdcc/share/sdcc/lib/pic16/crt0.o
/media/sdb1/download/sdcc/share/sdcc/lib/pic16/crt0i.o
/media/sdb1/download/sdcc/share/sdcc/lib/pic16/crt0iz.o
/media/sdb1/download/sdcc/share/sdcc/lib/src/gbz80/crt0.o
/media/sdb1/download/sdcc/share/sdcc/lib/src/gbz80/crt0_rle.o
/media/sdb1/download/sdcc/share/sdcc/lib/src/z80/crt0.o
/media/sdb1/download/sdcc/share/sdcc/lib/src/z80/crt0_rle.o
/media/sdb1/download/sdcc/share/sdcc/lib/z80/crt0.o
/media/sdb1/download/sdcc/share/sdcc/lib/z80/crt0_rle.o
[crt0*.o search results end]
Anyway, there is one strange thing that I have found. I have modified jan's
template as shown in the attached zip file and still got the following error
message:
[error message start]
[EMAIL PROTECTED]:/media/sda5/LED_toggle$ make
/usr/local//bin/gplink -L/usr/local//share/sdcc/lib/pic16/ --use-crt=
crt0i.o -V -Wl-s18f2620.lkr,-m -mpic16 -p18f2620 main.o -o LED_toggle.hex -
llibio18f2620.lib -llibc18f.lib
/usr/local//bin/gplink: invalid option -- L
/usr/local//bin/gplink: invalid option -- /
/usr/local//bin/gplink: invalid option -- u
/usr/local//bin/gplink: unrecognized option `--use-crt= crt0i.o'
/usr/local//bin/gplink: invalid option -- V
/usr/local//bin/gplink: invalid option -- W
/usr/local//bin/gplink: invalid option -- -
/usr/local//bin/gplink: invalid option -- p
/usr/local//bin/gplink: invalid option -- i
/usr/local//bin/gplink: invalid option -- 1
/usr/local//bin/gplink: invalid option -- 6
/usr/local//bin/gplink: invalid option -- p
/usr/local//bin/gplink: invalid option -- 1
/usr/local//bin/gplink: invalid option -- 8
/usr/local//bin/gplink: invalid option -- i
/usr/local//bin/gplink: invalid option -- b
/usr/local//bin/gplink: invalid option -- i
/usr/local//bin/gplink: invalid option -- i
/usr/local//bin/gplink: invalid option -- b
/usr/local//bin/gplink: invalid option -- 1
/usr/local//bin/gplink: invalid option -- 8
/usr/local//bin/gplink: invalid option -- L
make: *** [LED_toggle.hex] Segmentation fault (core dumped)
[error message end]
However, when I have modified another Makefile and code similar to the one
Xiaofan's last reply suggested, I manage to get a hex file created in the
end. However, it had the same behaviour as the one I have made with piklab,
which is my code doesn't automatically execute whenever I apply an external
power supply. It only executes when I plug in my PICKIT2 after instructing
PICKIT2 to be on with the command "pk2 -on". I'm beginning to suspect that
this is a hardware problem, perhaps with the power on timer and the brown
out register.
Btw, the files are in http://www.mediafire.com/?4bxc9z2t94m for the software
project folder using Jan's Makefile template, and
http://www.mediafire.com/?bzz9kt467qm for the software project folder using
Xiaofan's suggested Makefile template.
Thanks for your patience,
Stanley
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user