Pumpkin, Inc.

Pumpkin User Forums

compiling demo4

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

Re: compiling demo4

Postby chaosalvo » Wed Jun 26, 2002 7:32 am

hi, good morning. I installed MPLAB 5.50 and when I try to compile demo4 it said "Command line exceeds maximum length of 150 characters"? What's going on?

thanks,

------------------
Chao

Chao
chaosalvo
 
Posts: 12
Joined: Mon Jun 24, 2002 11:00 pm
Location: Dallas

Re: compiling demo4

Postby chaosalvo » Wed Jun 26, 2002 7:55 am

Hi, sorry about the last post. I set the compiler setting to Windowed instead of Command-Line. However, the following came up, still can't find salvo.h
Somehow the -I option is not doing its job

Building D4FREE.HEX...

Compiling main.c:
Command line: "C:HTSOFTPIC18BINPICC18.EXE -FAKELOCAL -G -O -Zg9 -Isalvoinc -DSYSF -E -18C452 -C -ISALVODEMOD4SYSF -DMAKE_WITH_FREE_LIB salvodemod4main.c"
salvodemod4main.c: 41: Cannot open include file "salvo.h" (error)

MPLAB is unable to find output file "salvodemod4main.obj". This may be due to a compile, assemble, or link process failure.

Build failed.


thanks,

------------------
Chao

Chao
chaosalvo
 
Posts: 12
Joined: Mon Jun 24, 2002 11:00 pm
Location: Dallas

Re: compiling demo4

Postby Salvo Tech Support » Wed Jun 26, 2002 8:05 am

Hi Chao.

Everything looks OK ...

What version of Salvo did you install?

Have you checked with HI-TECH to see if the demo version can compile Salvo projects? It probably can, but I'm not sure ...

What files are in salvoinc?

Is everything on the C: drive? Or do you have multiple drives?

Also, could you cut-and-paste the MPLAB Project Window's (Window > Project Window) contents to this BB so we can compare it against known-good here?

Thanks,

------------------
--------
Salvo Technical Support
Please request all tech support through the Forums.

[This message has been edited by Salvo Tech Support (edited June 26, 2002).]

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: compiling demo4

Postby Salvo Tech Support » Wed Jun 26, 2002 8:09 am

Hi Chao.

One other thing -- the PICC-18 compiler is now at 8.12PL1. Can you upgrade (it's free) and see if that fixes things?

Thanks,

------------------
--------
Salvo Technical Support
Please request all tech support through the Forums.

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: compiling demo4

Postby chaosalvo » Wed Jun 26, 2002 8:14 am

Hi, the Salvo version is 3.0.4 (latest). I've been sending hi-tech support, and he/she told me to change #include to
#include "c:salvoincsalvo.h";
And it found salvo.h but it couldn't find salvocfg.h.
These files are in c:salvoinc:
portgcc.h
portmcc.h
portmwcw.h
portpicc.h
salvo.h
salvolib.h
salvolvl.h
salvomcg.h
salvoscg.h

And I only have a C: drive. Everything is in C: and in their installing directory (I was afraid to change them LOL )

I will try to upgrade it.

Project Listing
Path: C:SALVODEMOD4SYSF
Project Name: D4FREE.PJT
Target: D4FREE.HEX
Tool Suite: HI-TECH PICC-18
Processor: PIC18C452
Development Mode: Simulator

Directories
Include: SALVODEMOD4SYSF

Target Data
File List: main.obj;isr.obj;SFP800DB.lib;
Option String: -FAKELOCAL -G;-Md4free.map;-E;
Build Tool: PICC-18 Linker

Node: main.obj
Path: salvodemod4
File List: main.c;
Option String: -FAKELOCAL -G;-Md4free.map;-E;
Additional Options: -DMAKE_WITH_FREE_LIB
Build Tool PICC-18 Compiler

Node: main.c
Path: salvodemod4
Dependency List:
salvodemod4MAIN.H
salvodemod4PIC.H
salvodemod4P18CXXX.H
salvodemod4PIC18.H
salvodemod4SALVO.H

Node: isr.obj
Path: salvodemod4
File List: isr.c;
Option String: -FAKELOCAL -G;-O;-Zg9;-Isalvoinc;-DSYSF;-E;
Additional Options: -DMAKE_WITH_FREE_LIB
Build Tool PICC-18 Compiler

Node: isr.c
Path: salvodemod4
Dependency List:
salvodemod4salvo.h

Node: SFP800DB.lib
Path: salvolib

Thanks,

------------------
Chao

Chao
chaosalvo
 
Posts: 12
Joined: Mon Jun 24, 2002 11:00 pm
Location: Dallas

Re: compiling demo4

Postby aek » Wed Jun 26, 2002 8:47 am

Hi Chao.

PICC-18 Issues

All of the projects are "fully defined" and should not need any additional settings (other than defaults for the compilers and other build tools). So something else is wrong ...

That said, I really have no idea why you're experiencing this include paths problem ... The Project Window looks fine. Which OS are you running?

Looking at your build results, I believe that the fact that the signatures don't match means that -DMAKE_WITH_FREE_LIB is not actually in effect. And the fact that _Init() is undefined means that SYSF is not defined when isr.c is compiled.

All of this seems to point to the PICC-18 demo version not supporting -I and -D command-line options. I've emailed them for clarification.

How about doing a quick test? Compile this program

code:
int main (void)
{
asm(" nop");
#ifdef MYSYMBOL
#error Defined Symbols Work with PICC-18 Demo!
#endif
}

with picc18.exe test.c -DMYSYMBOL. If you get the error message, then you know that -D works on the command line.


MPLAB-C18 Issues

The projects for the MPLAB-C18 compiler are in the salvodemod4syse folder (SYSE instead of SYSF). Note that SYSE is case sensitive when used as a symbol, so your command line should be -DSYSE (plus many other things). You need a lot more than just -dSYSE to compile salvodemod4main.c for MPLAB-C18 (not a Salvo issue per se, but because we use the same source code for a wide range of different compilers), so please try the project instead: Here are build results for salvodemod4sysed4free.pjt:

code:
Building D4FREE.HEX...

Compiling main.c:
Command line: "C:mccinmcc18.exe -w2 -ms -isalvoinc -dSYSE -p=18C452 -iSALVODEMOD4SYSE
-DMAKE_WITH_FREE_LIB salvodemod4main.c"
MPLAB C18 v1.10 Copyright 2001 Microchip Technology Inc.
Errors: 0
Warnings: 0

Compiling isr.c:
Command line: "C:mccinmcc18.exe -w2 -ms -isalvoinc -dSYSE -p=18C452 -iSALVODEMOD4SYSE
-DMAKE_WITH_FREE_LIB salvodemod4isr.c"
MPLAB C18 v1.10 Copyright 2001 Microchip Technology Inc.
Errors: 0
Warnings: 0

Linking:
Command line: "C:PROGRA~1MPLABMPLINK.EXE /m d4free.map /o D4FREE.HEX /l C:MCCLIB
/k C:MCCLKR C:MCCLKR18C452.LKR salvodemod4main.o salvodemod4isr.o salvolibSFC18SFD.lib "
MPLINK 2.50, Linker
Copyright (c) 2001 Microchip Technology Inc.
Errors : 0

MP2COD 2.50, COFF to COD File Converter
Copyright (c) 2001 Microchip Technology Inc.
Errors : 0

MP2HEX 2.50, COFF to HEX File Converter
Copyright (c) 2001 Microchip Technology Inc.
Errors : 0


Build completed successfully.


The Salvo projects are all organized by the "target environment" they're designed for. Here's a short list of the subfolder names and the corresponding compilers -- full details are found in Appendix C of the Salvo User Manual:

SYSA PICC
SYSE MPLAB-C18
SYSF PICC-18
SYSH PICC
SYSI KEIL C51
SYSP IAR MSP430C

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

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

Re: compiling demo4

Postby aek » Wed Jun 26, 2002 9:06 am

Hi Chao.

OK, I got confirmation -- -I and -D (and perhaps other command-line switches) "are not available while the compiler is in demo mode."

I got this from Garth @ HI-TECH.

Sorry about this -- we weren't aware of this PICC-18 demo version limitation, either. I guess all of our PIC18 users either owned the full version prior to trying and buying Salvo, or bought them both at the same time ...

So you should be able to continue with the MPLAB-C18 demo, just be aware that because it is stack-based, the code size and speed will be quite different from the statically-allocated memory model of PICC-18. But the Salvo code will be identical.

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

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

Re: compiling demo4

Postby aek » Wed Jun 26, 2002 9:45 am

Hi Chao.

One more thing re PICC-18 demo.

You could conceivably get around the -I and -D command-line limitations of the PICC-18 demo by defining the symbols at the very start of your/the salvocfg.h, e.g.

code:
#define SYSF
#define MAKE_WITH_FREE_LIB
...(rest of salvocfg.h)

I haven't tried it, but it ought to work as long as every non-Salvo-specific source file includes salvo.h (all Salvo-specific files already do).

Not pretty, but when used in conjunction with the explicit pathnames, may just work ... Dunno if there are more limitations of the demo compiler that I'm not aware of ...

Regards,

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

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

Re: compiling demo4

Postby chaosalvo » Wed Jun 26, 2002 11:09 am

Hi, I'm tired with HI-TECH's compiler after trying everything imaginable. So I went with Microchip's compiler C18 Demo. And it worked the first time ! But it demo4 had other errors:

C:salvodemod4>c18demo main.c -i=salvoinc -i=sysf
C:salvodemod4main.c:136:Error [1105] symbol 'ADCON1_INIT' has not been defin
ed
C:salvodemod4main.c:137:Error [1105] symbol 'ADCON0_INIT' has not been defin
ed
C:salvodemod4main.c:142:Error [1105] symbol 'ADGO_BIT' has not been defined
C:salvodemod4main.c:143:Error [1105] symbol 'ADREG' has not been defined
C:salvodemod4main.c:145:Error [1105] symbol 'ADGO_BIT' has not been defined
C:salvodemod4main.c:151:Error [1105] symbol 'LED_PORT' has not been defined
C:salvodemod4main.c:191:Error [1105] symbol 'keySW' has not been defined
C:salvodemod4main.c:194:Error [1105] symbol 'LED_PORT' has not been defined
C:salvodemod4main.c:195:Error [1105] symbol 'LED_PORT' has not been defined
C:salvodemod4main.c:232:Error [1105] symbol 'LED_TRIS' has not been defined
C:salvodemod4main.c:233:Error [1105] symbol 'LED_PORT' has not been defined
C:salvodemod4main.c:240:Error [1105] symbol 'LED_PORT' has not been defined
C:salvodemod4main.c:241:Error [1105] symbol 'LED_PORT' has not been defined

but this is MUCH MUCH better than NOT being about to find SALVO.H file for the past 2 days!
Or am I wrong for saying that hi-tech's compiler's -I option is NOT working ?

Thanks everyone,

------------------
Chao

Chao
chaosalvo
 
Posts: 12
Joined: Mon Jun 24, 2002 11:00 pm
Location: Dallas

Re: compiling demo4

Postby chaosalvo » Thu Jun 27, 2002 7:39 am

Hi aek and everyone else,
It's working now after I registered. If I knew that I had to register hi-tech compiler to get to work, I wouldn't have to spent last 3 days trying to make the demo4 work because we have a registered version of the compiler. I just wish that their readme.txt were up todate .

Thanks everyone,

FYI,
#define SYSF <-- define in main.c b/ main.h

#define MAKE_WITH_FREE_LIB...(rest of salvocfg.h)

PS. We have customized product that has pic18 processor on it with LCD but not LED, how do I go about running demo4? Can I use the HI-TIDE to emulate? How?
I loaded the HEX file into the HI-TIDE, it's running but doesn't show anything. I think I got the wiring correctly

thanks so very much,
YOU GUYS ARE THE GREATEST!

------------------
Chao

[This message has been edited by chaosalvo (edited June 27, 2002).]

[This message has been edited by chaosalvo (edited June 27, 2002).]

Chao
chaosalvo
 
Posts: 12
Joined: Mon Jun 24, 2002 11:00 pm
Location: Dallas

PreviousNext

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

cron