Not to worry, found it. It's just "global" :-)
Alan.
On Thu, 2010-11-11 at 16:09 +0000, Alan Hourihane wrote:
> Oh, yes, and I did try to use .globl in the asm file but it doesn't like
> it...
>
> test.asm:4:Error [179] Unknown opcode ".globl"
>
> Is there a different directive to define _asmtest as global ?
>
> Thanks,
>
> Alan.
>
> On Thu, 2010-11-11 at 13:04 +0000, Alan Hourihane wrote:
> > Hi,
> >
> > I'm having trouble linking C and assembly routines together and getting
> > missing definitions. Here's the sample code....
> >
> > main.c
> >
> > extern void asmtest(void);
> >
> > main()
> > {
> > asmtest();
> >
> > return 0;
> > }
> >
> > and test.asm
> >
> > list PE=18f2420
> > include "p18f2420.inc"
> >
> > code 0x100
> > _asmtest
> > bra _asmtest
> >
> > end
> >
> > Now if I compile things as so...
> >
> > gpasm -c test.asm
> >
> > then...
> >
> > sdcc -mpic16 -p18f2420 -o test main.c test.o
> >
> > I get this output from sdcc....
> >
> > message: using default linker script
> > "/usr/share/gputils/lkr/18f2420.lkr"
> > error: missing definition for symbol "_asmtest", required by "main.o"
> >
> > Is there a declaration I'm missing someplace as I thought asmtest should
> > work ?
> >
> > Thanks,
> >
> > Alan.
> >
> >
> > ------------------------------------------------------------------------------
> > Centralized Desktop Delivery: Dell and VMware Reference Architecture
> > Simplifying enterprise desktop deployment and management using
> > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
> > client virtualization framework. Read more!
> > http://p.sf.net/sfu/dell-eql-dev2dev
> > _______________________________________________
> > Sdcc-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user