Page 1 of 1

Problems with AN-25 Building a Salvo App with MPLab C18

PostPosted: Wed Apr 04, 2007 12:59 am
by mwirth
I'm new to Salvo, and trying to get the demo app, ex1, in AN-25 to build (with the newly released C18 v3.10 -- but I don't think that's the problem).

I've done a search of these forums and fixed a couple issues, but the last one below remains. Help?

1. Please add a note to AN-25 for neophytes that salvoexex1main.c is read-only, as will be the copy that they add to their new project. They'll have to permit writes to add the "#include <p18c452.h>" to their main.c

2. Add a note to AN-25 that they'll have to add two symbol definitions in the Project > Build Options...>Project dialog, MPLAB C18 tab, Macro Definitions pane, specifically:
SYSE
MAKE_WITH_FREE_LIB

3. Doing both of these gets me closer, but now I get compile errors:
C:PICSalvomain.c:146:Warning [2074] location PROD specified in the interrupt save list is redundant
C:PICSalvomain.c:146:Warning [2074] location .tmpdata specified in the interrupt save list is redundant
C:PICSalvomain.c:44:Error [1105] symbol 'PORT' has not been defined
C:PICSalvomain.c:44:Error [1101] lvalue required
C:PICSalvomain.c:56:Error [1105] symbol 'PORT' has not been defined
C:PICSalvomain.c:56:Error [1101] lvalue required
C:PICSalvomain.c:67:Error [1105] symbol 'PORT' has not been defined
C:PICSalvomain.c:67:Error [1101] lvalue required
C:PICSalvomain.c:76:Warning [2058] call of function without prototype
C:PICSalvomain.c:78:Warning [2058] call of function without prototype
C:PICSalvomain.c:161:Error [1105] symbol 'PORT' has not been defined
C:PICSalvomain.c:161:Error [1101] lvalue required
Halting build on first failure as requested.

Any hints?

TIA,

Mike


Re: Problems with AN-25 Building a Salvo App with MPLab C18

PostPosted: Thu Apr 05, 2007 1:36 am
by mwirth
Bingo! Thanks.

The operative paragraph in the versions.txt file that you referenced is:
salvo-lite|le|pro-pic-3.2.3-d.zip is a complete set
of new Salvo libraries for use with the Microchip
MPLAB-C18 compiler v3.02 and above and MPLINK v4
or higher.

As usual, RTFM (but also all release notes :-)

Mike


Re: Problems with AN-25 Building a Salvo App with MPLab C18

PostPosted: Thu Apr 05, 2007 11:20 am
by mwirth
OK, I got further, by:
1. Changing PORT in main.c to PORTB (a defined port for this PIC chip).

Now I only get a couple warning messages during the compile.

But I get a loading error because of incompatible COFF format from the prebuilt libraries, exactly like the one in an earlier message, http://www.pumpkininc.com/ubb/Forum17/HTML/000126.html

I'm, using the Salvo Lite 3.2.3 download for PIC. Did the COFF format change again with the new C18 compiler release? Do you need to recompile the Salvo Lite libraries?

TIA,

Mike


Re: Problems with AN-25 Building a Salvo App with MPLab C18

PostPosted: Thu Apr 05, 2007 11:32 am
by aek
You need to download and install the new libraries: http://www.pumpkininc.com/salvo/lite/pic/3.2/versions.txt

-d.zip.

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


Re: Problems with AN-25 Building a Salvo App with MPLab C18

PostPosted: Mon May 28, 2007 2:14 am
by nealfoster
i had the same problem as you, and the updated libraries fixed the compile errors, but I am still getting warnings when compiling isr.c

do you still get the warnings?

C:salvodemod4isr.c:70:Warning [2074] location PROD specified in the interrupt save list is redundant
C:salvodemod4isr.c:70:Warning [2074] location .tmpdata specified in the interrupt save list is redundant


Re: Problems with AN-25 Building a Salvo App with MPLab C18

PostPosted: Mon May 28, 2007 7:57 am
by aek
Just remove those two sections from the save directive in the ISR -- the latest versions of the compiler no longer need them.

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