From: Bernhard H. <ber...@be...> - 2001-12-24 14:05:14
|
> I use the following SDCC version > SDCC : mcs51/gbz80/z80/avr/ds390/pic14 2.3.0 (Sep 20 2001) (UNIX) > with Win32 and these command line options: > sdcc -I..\share\sdcc\include --code-loc 0x8000 <file.c> > (from the directory sdcc\bin) > > When running SDCC even with a very simple program containing only an > endless loop, I get the following warning: > > ?ASlink-Warning-Undefined Global '__sdcc_external_startup' referenced by > module'a01' Show sdcc the path to the libraries. sdcclib.lib contains the file _startup, which in turn contains the symbol (or function) _sdcc_external_startup. You can pass the necessary parameter to sdcc with: -L..\share\sdcc\lib\small > In the help files it is said that this __sdcc_external_startup function is > invoked by the runtime library and it can be overwritten. I tried this, > too, but without success. In the runtime library I found this function > together with some initializations. These initializations seem to be mapped > into the _main function in the generated assembler file, but without the > label, which is called, but not defined, elsewhere in the asm file. Simply copy the contents of _startup.c into your source-file, and the linker will be happy too. Please note, that the compiler adds an underscore to each symbol, which is declared in the C-source: main -> _main, _sdcc_external_startup -> __sdcc_external_startup. > Thank you very much, merry Christmas! Merry Christmas! Bernhard |