CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Unknown device type
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

Unknown device type
PostPosted: Wed Feb 06, 2008 5:29 pm     Reply with quote

I am using PCH Compiler V4.066

When I compile any of the examples in the Example directory I get the following error:

C:\PROGRA~1\PICC\devices\18f452.h, Line 2
Unknown device type

I am using the command line complier and I am trying to use the compiler inside of MPLAB v8.00. I have installed the plugin so CCS will work within MPLAB.

It does not seem to matter which device I try to compile for I get the same error that there is an unknown device.

I have read other posts and most people do not have the MPLAB plugin installed or there is a pre-existing installation of the CCS demo. Neither of these problems are the case here. Also, the PIC18F452 is in the supported list.

Does anyone know how I can fix this or have any idea what I can do? Thank you in advance.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 5:34 pm     Reply with quote

Did you use the Project Wizard in MPLAB to make the project ?
If you selected 18F452 as the PIC in the wizard, it should setup
the project correctly.

Go to the Configure menu in MPLAB, and go to Select Device
and make sure that it's set for 18F452.
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

PostPosted: Wed Feb 06, 2008 5:40 pm     Reply with quote

Yes I did use the project wizard and yes I did select 18F452 from the configure menu.

The project is set up correctly.

I have even tried to compile the examples using the command line and cannot get it to compile. I get the same error for every file.
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

PostPosted: Wed Feb 06, 2008 5:59 pm     Reply with quote

I just want to reiterate that this is not a problem with MPLAB. I am trying to compile from the windows command prompt. The command I am entering is:

Ccsc.exe +P "\Program Files\ PICC\Examples\EX_AD_12.C"

And the error returned is:

C:\PROGRA~1\PICC\devices\18F452.h, Line 2
Unknown device type

I am using the +P option so the ccs C compiler output will stay on the screen.

I have tried reinstalling the PCH compiler and this has not fixed my problem. I have not edited any of the example files. The actual error is comming from line 2 of the file "18f452" in the devices folder. Line 2 is:

#device PIC18F452

If any more information is required I would be happy to send it out.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 6:04 pm     Reply with quote

1. In what order did you install the programs ?
The "plug-in" should be installed last.

2. Are you running the demo ?
The demo doesn't support the 18F452.
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

PostPosted: Wed Feb 06, 2008 6:06 pm     Reply with quote

1. I Installed PCHUPD then I installed the plugin.

2. This is not the demo version, I purchased the retail version of PCH earlier today. It is version 4.066
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 6:11 pm     Reply with quote

Quote:

I just want to reiterate that this is not a problem with MPLAB. I am trying
to compile from the windows command prompt. The command I am
entering is:

Ccsc.exe +P "\Program Files\ PICC\Examples\EX_AD_12.C"

I apologize for not reading your post in detail. I will now look at your
problem of using PCH in a command prompt. (and not in MPLAB).
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 6:17 pm     Reply with quote

OK, the problem is that you're not specifying the compiler (PCM, PCH, etc).

To see a list of options for the command line compiler, type the following
in a C: prompt window:
Quote:
CCSC /?

This will bring up a help window and you will see immediately the
command line parameter that you need to add, to select PCH.
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

PostPosted: Wed Feb 06, 2008 6:18 pm     Reply with quote

Hey no problem.

I also tried to compile the examples for the PIC18F458 with the retail version of PCH. To do this I changed the # define statement in the example to:

Code:
#include <18F458.h>


My error is the same just for a different device:

C:\PROGRA~1\PICC\devices\18F458.h, Line 2
Unknown device type

So this error is not just for the 18F452.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 6:42 pm     Reply with quote

It works for me. Edit the Ex_ad12.c file, and change the line where
it has
Code:
#include <18F452.h>

to
Code:
#include <18F458.h>


Open a command prompt window and change to this directory:
Quote:
c:\Program Files\Picc

Then type:
Quote:
ccsc +FH +P "c:\Program Files\Picc\Examples\Ex_ad12.c"
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

PostPosted: Wed Feb 06, 2008 6:52 pm     Reply with quote

Thank you for the response, but I still get the same error:

Code:
C:\PROGRA~1\PICC\devices\18F458.h, Line 2
Unknown device type


I am developing for the 18F452, I was just trying to compile for another device that I know "should" compile(18f458).

Is there anything else I can try?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 6:59 pm     Reply with quote

If it keeps giving that error, then I don't think you have PCH installed.
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

PostPosted: Wed Feb 06, 2008 7:09 pm     Reply with quote

Copying from my receipt:
Quote:
Products
1 x PCH Command-line Compiler for PIC18 MCU parts
- Software Updates (Maintenance): 30 days of Maintenance
- Products: PCH Software (Windows)


I downloaded PCH from your website through a link that was given to me in an email.

The installer is named "pchupd.exe"

When I type in the command
Quote:
ccsc +FH +P "c:\Program Files\Picc\Examples\Ex_ad12.c"


The CCS C compiler comes up in a purple window and says at the top
Quote:
CCS C Compiler
PCH Compiler V4.066


I am pretty sure that PCH is installed. If you want me to paste what I am compiling (which is the unmodified example code that comes with the compiler) to the fourm, I will be more then happy to do so.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 7:18 pm     Reply with quote

Did you get a license file from CCS ? The filename will be:
Quote:
pch.crg

It has to be placed in this directory:
Quote:
c:\Program Files\Picc

CCS will email you the license file, shortly after you buy the compiler.


Also, what O/S are you using ? Is this being done on Vista ?
milk3422



Joined: 06 Feb 2008
Posts: 10

View user's profile Send private message AIM Address

PostPosted: Wed Feb 06, 2008 7:21 pm     Reply with quote

I did get the email with pch.crg attached and I placed it in the directory
Quote:
C:\Program Files\PICC


The operating system I am using is Windows XP SP2
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group