Pumpkin, Inc.

Pumpkin User Forums

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

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

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

Postby mwirth » Wed Apr 04, 2007 12:59 am

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

Mike Wirth
Palo Alto, CA
mwirth
 
Posts: 3
Joined: Mon Apr 02, 2007 11:00 pm
Location: Palo Alto

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

Postby mwirth » Thu Apr 05, 2007 1:36 am

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

Mike Wirth
Palo Alto, CA
mwirth
 
Posts: 3
Joined: Mon Apr 02, 2007 11:00 pm
Location: Palo Alto

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

Postby mwirth » Thu Apr 05, 2007 11:20 am

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

Mike Wirth
Palo Alto, CA
mwirth
 
Posts: 3
Joined: Mon Apr 02, 2007 11:00 pm
Location: Palo Alto

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

Postby aek » Thu Apr 05, 2007 11:32 am

You need to download and install the new libraries: http://www.pumpkininc.com/salvo/lite/pic/3.2/versions.txt

-d.zip.

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

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

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

Postby nealfoster » Mon May 28, 2007 2:14 am

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

nealfoster
 
Posts: 7
Joined: Wed May 16, 2007 11:00 pm
Location: sc, ca, usa

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

Postby aek » Mon May 28, 2007 7:57 am

Just remove those two sections from the save directive in the ISR -- the latest versions of the compiler no longer need them.

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

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


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 1 guest