Dear list,
I am new to sdcc. I have done a few project with mpasm
using assambly for PICs.
Now, I decided to try and use sdcc using C.
I have set-up a development environment; compile with sdcc, link with
gputils. (under linux SuSe 10.1)
I would like to use a few files for a single project,
i.e. main module, i2c module, serial module and keypad handler.
Sdcc and gputils compiled from sources:
SDCC : pic16/pic14 2.6.2 #4514 (Dec 17 2006) (UNIX)
gplink-060819 alpha
Now, I run into a problem:
- at link stage I get a message:
error: missing definition for symbol "_PORTA", required by "main.o"
If I would use only one file and compile it with:
>sdcc -mpic14 -p16f627 main.c
I have a warning mesasge and it compils successfully:
Here is the other command line:
>sdcc -mpic14 -p16f627 -c main.c
>gplink -m -o firmware.hex main.o
message: using default linker script
"/home/pic/share/gputils/lkr/16f627.lkr"
error: missing definition for symbol "_PORTA", required by "main.o"
The code is quite silly:
--------------------------------
#define __16f627
#include <pic16f627.h>
typedef unsigned int config;
config at 0x2007 __CONFIG = _BODEN_OFF &
_CP_OFF &
_PWRTE_ON &
_WDT_OFF &
_LVP_OFF &
_MCLRE_ON &
_INTRC_OSC_NOCLKOUT;
void main()
{
PORTA = 0;
while (1);
}
--------------------------------
How to link it successfully?
It will make sense when using a few files and link them together.
Theblond
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user