MPLAB C18 compiler student version

Started by Alan Marconett August 14, 2008
Anyone familiar with the MPLAB C18 compiler student version? I'm trying to
compile the 696 example. I did get it to compile by simply executing the
.BAT file in the directory. MPLAB couldn't seem to do it. I think it has
something to do with the command line -p option. The batch file
doesn't use it.

I also attempted to modify the C file and linker file to compile for a
PIC18F4620, but was only partially successful. I had to mangle the 18cXXX.h
file. Seems the compiler defaults to an 18C252 "generic" compiler. Maybe
the "Student Version" is limited to this chip?

Alan KM6VV
Did you configure the project with the correct processor? The IDE does
not query the source files to find the processor. Even though you have
the correct <>.h file in the source you need to configure the project
for the correct processor. Use the Select Device to set
the correct chip. Also, there is a different linker file for each
supported device and typically two different linker files depending upon
the c018*.c file that you are using. The c018i_.c sets
everything up and works with initialized variables. The c018_.c
does not expect initialized data spaces.
So, if you were using the PIC18F4620 you would use:
c018i_4620.c if you were initializing your variables and c018_4620.c if
not. Also, you would use the 18f4620i.lkr linker file for the initialized
variable program and the 18f4620.lkr linker file otherwise.
This compiler has many many options and pragmas that can be done, you
will want to read through the documentation a bit to get a good handle
on what it can do. With the student edition though you won't get to use
the optimizing capability I believe.

have fun,
DLC

> Anyone familiar with the MPLAB C18 compiler student version? I'm trying
> to
> compile the 696 example. I did get it to compile by simply executing the
> .BAT file in the directory. MPLAB couldn't seem to do it. I think it has
> something to do with the command line -p option. The batch
> file
> doesn't use it.
>
> I also attempted to modify the C file and linker file to compile for a
> PIC18F4620, but was only partially successful. I had to mangle the
> 18cXXX.h
> file. Seems the compiler defaults to an 18C252 "generic" compiler. Maybe
> the "Student Version" is limited to this chip?
>
> Alan KM6VV
--
Dennis Clark
TTT Enterprises
I did use configure -> select to set the processor. I saw the linker file
as well. Not clear on whether I need the c018 or co18i file, I'll check
that out. Same for the linker file options.

The .BAT file offered seemed to work better, but it didn't have a p=
parameter. And the 696 C file didn't specify a processor. I'm still
looking for the proper syntax to do that in the C file. I suspect that
might be needed with other then an 18F252 processor.

I'm considering converting the 696 C file over to HiTech C, but I discovered
all the macros that were used for peripheral support. I'd like to try
running the '452 code first, before I port to another compiler and/or
processor.

Yeah, no optimizing!

Thanks!

Alan KM6VV

On Behalf Of Dennis Clark

Did you configure the project with the correct processor? The IDE does
not query the source files to find the processor. Even though you have
the correct <>.h file in the source you need to configure the project
for the correct processor. Use the Select Device to set
the correct chip. Also, there is a different linker file for each
supported device and typically two different linker files depending upon
the c018*.c file that you are using. The c018i_.c sets
everything up and works with initialized variables. The c018_.c
does not expect initialized data spaces.
So, if you were using the PIC18F4620 you would use:
c018i_4620.c if you were initializing your variables and c018_4620.c if
not. Also, you would use the linker file for the initialized
variable program and the 18f4620.lkr linker 18f4620i.lkr file otherwise.
This compiler has many many options and pragmas that can be done, you
will want to read through the documentation a bit to get a good handle
on what it can do. With the student edition though you won't get to use
the optimizing capability I believe.

have fun,
DLC

--
Dennis Clark
TTT Enterprises
> Anyone familiar with the MPLAB C18 compiler student version? I'm trying
> to
> compile the 696 example. I did get it to compile by simply executing the
> ..BAT file in the directory. MPLAB couldn't seem to do it. I think it
> has
> something to do with the command line -p option. The batch
> file
> doesn't use it.
>
> I also attempted to modify the C file and linker file to compile for a
> PIC18F4620, but was only partially successful. I had to mangle the
> 18cXXX.h
> file. Seems the compiler defaults to an 18C252 "generic" compiler. Maybe
> the "Student Version" is limited to this chip?
>
> Alan KM6VV
I thought the student version was the same as the full version, but
optimization only works for a month or something. I used (though years
ago) with MPLAB without trouble before getting a license.

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!