|
From: Raphael N. <rn...@we...> - 2007-11-08 12:55:49
|
Hi Alan, > But still getting the old error: > pro_man.asm:1185: error: Symbol not previously defined (INTCON). Your main problem is, that SDCC (currently) does not emit plain extern INTCON but the mangled extern _INTCON (note the leading underscore). You need to replace all references to C-defined entities (BSR, INTCON, ...) with an underscore-prefixed variant (_BSR, _INTCON) throughout the whole project. Furthermore, C symbols are also declared as _SYMBOL rather than SYMBOL, thus inline assembler must refer to int foobar; as _asm movff _foobar, _STATUS_save _endasm; I attached a picos18-archive with modifications to make it compile on SDCC; you may want to diff it against your version to find the numberous changes throughout the code base. Be warned: Though I could compile the project, I could not test test it. There may be subtle conversion errors that you might already have worked around... I also changed the device to 18f4520, for different devices, you need to adjust (a) devices.inc and (b) the ARCH variable in Makefile. It is probably cleaner to avoid devices.inc altogether... Regards, Raphael |