Pumpkin, Inc.

Pumpkin User Forums

Function declared implicit

If you can't make Salvo do what you want it to do, post it here.

Function declared implicit

Postby GavinS » Wed May 11, 2005 3:29 am

O.k first up, I only rate my C skills at about 4/10. That said, could someone kindly assist me with the piece of code below. When I compile it, I get an error message "Function declared implicit" for each of the three salvo fuctions. I'm not sure what "implicit" means.

I'm using the Hi-Tech pic compiler on a win2K pc.

#include <pic.h>
#include "c:salvoincsalvo.h"

void main(void)
{
Init();
OSinit();

for(;;)
OSSched();
}

GavinS
 
Posts: 7
Joined: Tue May 10, 2005 11:00 pm
Location: Australia

Re: Function declared implicit

Postby GavinS » Thu May 12, 2005 2:41 am

Hi there again, Is it possible to use PICC without having to go through MPLab? To date I've just been using a text editor and a batch file to compile. My batch file looks like this.

@echo off
path=c:salvoinc;c:salvolib;c:salvolibhtpicc;%path%
c:ht-picinpicc.exe -16F84 myfirst.c
pause

How do I tell PICC that there are additional librarys outside of HiTechs library folder?

Thanks for assistance........
/GavinS

quote:
Originally posted by aek:
That warning means that the compiler and linker haven't found the function declarations for the functions you're using in your application.

If you follow the instruction in http://www.pumpkininc.com/content/doc/appnote/an-26.pdfit should resolve any problems you have, and you'll be able to just #include "salvo.h"


GavinS
 
Posts: 7
Joined: Tue May 10, 2005 11:00 pm
Location: Australia

Re: Function declared implicit

Postby aek » Thu May 12, 2005 7:27 am

That warning means that the compiler and linker haven't found the function declarations for the functions you're using in your application.

If you follow the instruction in http://www.pumpkininc.com/content/doc/appnote/an-26.pdfit should resolve any problems you have, and you'll be able to just #include "salvo.h"

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Function declared implicit

Postby aek » Fri May 13, 2005 2:40 am

Hi Gavin.

First, see this: http://www.pumpkininc.com/content/doc/appnote/an-22.pdf.

I don't think two paths to salvolib are doing you any good -- normally, you explicitly tell the picc command-line driver that an additional library needs to be linked in, and you specify its complete pathname+filename. See the PICC manual for more info.

Note that the demo versions of PICC have certain functionality disabled ...

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Function declared implicit

Postby aek » Fri May 13, 2005 2:45 am

I did a search of these Forums of "picc.exe" and among the results I found this: http://www.pumpkininc.com/ubb/Forum17/HTML/000021.html. You can see complete command-line syntax in there ...

------------------

[This message has been edited by aek (edited May 13, 2005).]

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Function declared implicit

Postby GavinS » Tue May 17, 2005 3:13 am

Hi there,
We've had a long weekend here, but I'm back now and I think I'm making some progress. I've installed MPLab and I can compile and play around with the tutorials ok. However the tuts are targeted at processors that I don't have resources for. I've attempted to compile my original code for a 16F84, but I'm still getting an error (see paste from MPLab below). I suspect there's a library issue that I haven't addressed.

My little app looks like this:

code:

#include "pic.h"
#include <salvo.h>
#include "main.h"

void main(void)
{
Init();
OSInit();

for (;;)
OSSched();
}



Executing: C:PICCLITEBINPICL.EXE -Q -MPLAB -C -Emain.cce -16F84A main.c -Omain.obj -IC:picMyRTOS -IC:salvoinc -G
Executing: C:PICCLITEBINPICL.EXE -Q -MPLAB -EFirstRTOS.lde -16F84A C:picMyRTOSmain.obj -OFirstRTOS.cof
Error[000] : undefined symbols:
Error[000] : _OSInit (C:picMyRTOSmain.obj)
Error[000] : _OSSched (C:picMyRTOSmain.obj)
BUILD FAILED: Wed May 18 08:08:02 2005

[This message has been edited by GavinS (edited May 17, 2005).]

[This message has been edited by aek (edited May 17, 2005).]

GavinS
 
Posts: 7
Joined: Tue May 10, 2005 11:00 pm
Location: Australia

Re: Function declared implicit

Postby aek » Tue May 17, 2005 7:22 am

You haven't linked in a Salvo library (that's where OSInit() and OSSched() will be ...).

The link I gave earlier links in the Salvo library C:SALVOLIBSFP40CMB.LIB. The one you need is likely to be different ...

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Function declared implicit

Postby GavinS » Tue May 17, 2005 7:35 am

Hi, Thats what I thought too. According to the document RM-PICC.PDF the correct library for a 16F84a is one of the 40a librarys. I tried adding sfp40aaa.lib to the MPlab project file list which caused even more errors(see paste below). I've tried a couple of the 40a lib files with the same result.


btw, thanks for help with this. I'd dearly love to get this working.

Deleting intermediary files... done.
Executing: C:PICCLITEBINPICL.EXE -Q -MPLAB -C -Emain.cce -16F84A main.c -Omain.obj -Ic:picmyrtos -Ic:salvoinc -DSYSA -DMAKE_WITH_FREE_LIB -G
Executing: C:PICCLITEBINPICL.EXE -Q -MPLAB -EFirstRTOS.lde -16F84A C:picMyRTOSmain.obj C:salvolibhtpiccsfp40aaa.lib -MFIRSTR~1.MAP -FAKELOCAL -OFirstRTOS.cof
Error[000] : undefined symbols:
Error[000] : _OScTcbP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSeligQP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSlostTicks (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSdelayQP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSsigQinP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OStimerTicks (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSsigQoutP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5DE (0x5DC+2), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5E0 (0x5DC+4), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5E2 (0x5DC+6), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5E4 (0x5DC+8), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5E6 (0x5DC+10), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5E8 (0x5DC+12), size 1, value 0x81)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5EA (0x5DC+14), size 1, value 0x82)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5EC (0x5DC+16), size 1, value 0x83)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5EE (0x5DC+18), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5F0 (0x5DC+20), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x6E8 (0x6DE+10), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x6EA (0x6DE+12), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x6F2 (0x6DE+20), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x6F4 (0x6DE+22), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x6FC (0x6DE+30), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x710 (0x6DE+50), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x718 (0x6DE+58), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x71C (0x6DE+62), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x728 (0x6DE+74), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x730 (0x6DE+82), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x732 (0x6DE+84), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Fixup overflow in expression (loc 0x734 (0x6DE+86), size 1, value 0x80)
Error[000] C:salvolibhtpiccsfp40aaa.lib(sched.obj) 18 : Too many errors
BUILD FAILED: Wed May 18 12:58:07 2005


quote:
Originally posted by aek:
You haven't linked in a Salvo library (that's where OSInit() and OSSched() will be ...).

The link I gave earlier links in the Salvo library C:SALVOLIBSFP40CMB.LIB. The one you need is likely to be different ...


GavinS
 
Posts: 7
Joined: Tue May 10, 2005 11:00 pm
Location: Australia

Re: Function declared implicit

Postby aek » Tue May 17, 2005 9:07 am

You need salvosrcmem.c as one of the files in your project ...

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Function declared implicit

Postby GavinS » Tue May 17, 2005 9:43 am

Hhmmm, well that reduced the number of "Undefined symbol" errors from 6 to 4(see paste below). I must be still missing something, but when I compare my project settings to that of the tutorial projects, I don't see a lot of difference.

Am I using the correct lib file for a 16F84 or can I use any of the 40a series lib files?

-Cheers and thanks.....

Executing: C:PICCLITEBINPICL.EXE -Q -MPLAB -C -Emain.cce -16F84A main.c -Omain.obj -Ic:picmyrtos -Ic:salvoinc -DSYSA -DMAKE_WITH_FREE_LIB -G
Executing: C:PICCLITEBINPICL.EXE -Q -MPLAB -C -Emem.cce -16F84A mem.c -Omem.obj -Ic:picmyrtos -Ic:salvoinc -DSYSA -DMAKE_WITH_FREE_LIB -G
Executing: C:PICCLITEBINPICL.EXE -Q -MPLAB -EFIRSTR~1.LDE -16F84A C:picMyRTOSmain.obj C:salvosrcmem.obj C:salvolibhtpiccsfp40aaa.lib -MFIRSTR~1.MAP -FAKELOCAL -OFirstRTOS.cof
Error[000] : undefined symbols:
Error[000] : _OSlostTicks (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSdelayQP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSsigQinP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] : _OSsigQoutP (C:salvolibhtpiccsfp40aaa.lib: init.obj)
Error[000] C:salvolibhtpiccsfp40aaa.lib(init.obj) 13 : Fixup overflow in expression (loc 0x5DE (0x5DC+2), size 1, value 0x94)

quote:
Originally posted by aek:
You need salvosrcmem.c as one of the files in your project ...


GavinS
 
Posts: 7
Joined: Tue May 10, 2005 11:00 pm
Location: Australia

Next

Return to Coding

Who is online

Users browsing this forum: No registered users and 3 guests

cron