Maker Pro
Maker Pro

problem with"-p" while running CC5X under MPLAB

M

Michael Lange

Jan 1, 1970
0
Hi,

I find out the easy way, to run CC5X under MPLAB IDE, but it generates
always an additional parameter -p<devicename>, and I can't vorbid that.

I can't include the header file because the CC5X then will not compile,
says "Multiple chip definitions detected". Unfortnually the CC5X accept
access to registers that not exist in the selected device. I'm really
confudsed about that.

Any comments?
CC5X is 3.2A and MPLAB 6.40

Michael.
 
J

J.K.

Jan 1, 1970
0
Michael Lange said:
Hi,

I find out the easy way, to run CC5X under MPLAB IDE, but it generates
always an additional parameter -p<devicename>, and I can't vorbid that.

I can't include the header file because the CC5X then will not compile,
says "Multiple chip definitions detected". Unfortnually the CC5X accept
access to registers that not exist in the selected device. I'm really
confudsed about that.

Any comments?
CC5X is 3.2A and MPLAB 6.40

Michael.
Hello,

i don't know about CC5X, but the MPASM assembler also uses the p<devicename>
parameter.
Maybe you could try the next header:

;*******************************
LIST P=PIC16F877
;
#include "P16F877.INC"
;*******************************

With this header the MPASM assembler recognizes every register and
bit-descriptors of the used device and gives an error on unknown ones!

JK
 
M

Michael Lange

Jan 1, 1970
0
J.K. said:
i don't know about CC5X, but the MPASM assembler also uses the p<devicename>
parameter.
Thanks for answer.

I know this, but in case of use CC5X to run inside MPLAB it isn't
helpful, to have this parameter.
If I include the header file (delivered along with CC5X) with the
defines for the PIC type I used, then it will not compile. CC5X give an
error message to me, that means the PIC is already set. If I remove the
header file statement, then only some internal defined names for
register are available. And the biggest problem, CC5X don't know about
all PICs by the command line parameter. I find out, that CC5X don't know
if a rgister for the defined PIC exists or not. So I can compile a
program for 16F630 to access PORTB without errors, but this PIC only
have PORTA and PORTC.
Since I like to port a programm from one PIC type to another, or will
made code to use for different PICs, this is very ugly to debug.

Hope someone understand.

Michael
 
J

J.K.

Jan 1, 1970
0
Hello again,

I use MPLAB V6.50 and have to set the device (menu Configure/Select Device)
the same as the p<devicename> parameter or it will not compile error-free!
I also can programm without a p<devicename> parameter, but i will have the
same problem you have.

J.K.
 
M

Michael Lange

Jan 1, 1970
0
Hi you.

Hello again,

I use MPLAB V6.50 and have to set the device (menu Configure/Select Device)
the same as the p<devicename> parameter or it will not compile error-free!
I also can programm without a p<devicename> parameter, but i will have the
same problem you have.
Some questions:
Where do you place the p<devicename> parameter in MPLAB? It will be
generatet automaticly, I think. I use 6.40, it is so much different?
Have you work with CC5X? It can easyly integratet in MPLAB, but I can't
prevent that MPLAB give this (for me) problematic parameter to CC5X,
when runnig in the IDE.

Michael
 
J

J.K.

Jan 1, 1970
0
Michael,

I use the MPASM assembler within MPLAB togetter with PICStart Plus and ICD2
debugger unit.
This parameter is in my situation not generated.
I have to select a device to work with and then insert the p<devicename> in
the next manner:


;*************************************************************************
;Heemserveen, 08-09-2004
;Auteur:
;Projekt: Encoderteller XYZ002 m.b.v. PIC16F628
;Opdrachtgever: prive!
;Contactpersoon:
;
;*************************************************************************

LIST P=PIC16F628

#include "P16F628.INC"

;*************************************************************************
;Variabelen dimensioneren, hier worden namen toegekend aan hulpregisters
;*************************************************************************
TEMPBYTE1 EQU 0x20 ;WERKREGISTER1
TEMPBYTE2 EQU 0x21 ;WERKREGISTER2
TEMPBYTE3 EQU 0x22 ;WERKREGISTER3
TEMPBYTE4 EQU 0x23 ;WERKREGISTER4
TEMPBYTE5 EQU 0x24 ;WERKREGISTER5

Above is an actual starting section of an existing program that is
functional! (Language is dutch)
Maybe you should take a closer look at '#include' statement, are you using
this?
This .INC file holds the internal registers descriptors of the used
microcontroller, maybe your problem lies there?

No, i've never worked with the CC5X programmer. (i presume.....)
Where did you buy this programmer? Search the net for sample program's that
work with this unit.
Take a look at those files to see what's included!

Hope you get it to work,

J.K.

"> Some questions:
 
M

Michael Lange

Jan 1, 1970
0
J.K. said:
;*************************************************************************
;Heemserveen, 08-09-2004
;Auteur:
;Projekt: Encoderteller XYZ002 m.b.v. PIC16F628
;Opdrachtgever: prive!
;Contactpersoon:
;
;*************************************************************************

LIST P=PIC16F628

#include "P16F628.INC"
I understand, but I can see that we think about different things. I will
tell you much more. MPLAB runs the MPASM "on a hidden command line" and
give some parameters to it (filenames and options). And one of this is
-p=PIC16F28 (as sample) that make me unhappy when running CC5X. You can
see the command line options, if you select in the MPLAB menu Project ->
Build Options -> Project. Normaly cards for General MPASM and MPLINK are
shown, additional cards only if more tools (like CC5X) are integratet.
But the "-p" can'T configuratet here. It will be automaticly added, when
MPLAB starts the MPASM or whatever.

Michael
 
J

J.K.

Jan 1, 1970
0
Michael Lange said:
I understand, but I can see that we think about different things. I will
tell you much more. MPLAB runs the MPASM "on a hidden command line" and
give some parameters to it (filenames and options). And one of this is
-p=PIC16F28 (as sample) that make me unhappy when running CC5X. You can
see the command line options, if you select in the MPLAB menu Project ->
Build Options -> Project. Normaly cards for General MPASM and MPLINK are
shown, additional cards only if more tools (like CC5X) are integratet.
But the "-p" can'T configuratet here. It will be automaticly added, when
MPLAB starts the MPASM or whatever.

Michael
Ok, now i see what youre looking for!

If you haven't already, look in the helpfile, Index > Command Line Interface

Use >> /p- << (disable processor type setting) as alternate setting
at the build options/project/MPASM Assembler tab. (or CC5X tab?)

It's the only thing i can point at, hope this works!

J.K.
 
Top