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 CCS Technical Support

All sorts of Errors using CCS with MPLabX

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ScarIIV



Joined: 14 Jul 2020
Posts: 2

View user's profile Send private message

All sorts of Errors using CCS with MPLabX
PostPosted: Tue Jul 14, 2020 9:53 am     Reply with quote

Hi all,

Trying to use the CCS compiler to build some PIC firmwares. Have installed the compiler, set MPLab to use the compiler for my project, and successfully built a couple of the example firmwares which come with the compiler.

Problem is whenever I try to use it to program a pre-existing firmware, it detects hundreds of errors (not the little simple errors, either) all over the code. This is very strange as I have used a colleagues' computer to build these firmwares without difficulty. We're using the same version of compiler and MPLabX. I can't find different settings anywhere. We should be running identical compilers on identical code in identical IDEs. But mine doesn't compile.

Has anyone had a difficulty like this before? Is there a common cause or somewhere particular I need to look? Any help is appreciated. Thanks!


Here's a sample of the errors I'm getting:


Code:


*** Error 27 "C:\...\firmware-comms-handler.h" Line 62(240,241): Expression must evaluate to a constant
*** Error 43 "C:\...\firmware-comms-handler.h" Line 63(240,241): Expecting a declaration
*** Error 27 "C:\...\firmware-comms-handler.h" Line 66(66,67): Expression must evaluate to a constant
*** Error 43 "C:\...\ffirmware-comms-handler.h" Line 67(66,67): Expecting a declaration
*** Error 27 "C:\...\firmware-pdm\firmware-timer-rom-defaults.h" Line 9(68,69): Expression must evaluate to a constant
*** Error 43 "C:\...\firmware-pdm\firmware-timer-rom-defaults.h" Line 10(68,69): Expecting a declaration
*** Error 27 "C:\...\firmware-api.c" Line 33(130,131): Expression must evaluate to a constant
*** Error 76 "C:\...\firmware-api.c" Line 34(133,143): Expect ;
*** Error 27 "C:\...\firmware-api.c" Line 37(224,225): Expression must evaluate to a constant
*** Error 76 "C:\...\firmware-api.c" Line 38(227,235): Expect ;
*** Error 27 "C:\...\firmware-api.c" Line 41(13,14): Expression must evaluate to a constant
*** Error 76 "C:\...\firmware-api.c" Line 42(16,24): Expect ;
*** Error 21 "C:\...\firmware-api.c" Line 43(32,33): #ENDIF with no corresponding #IF
*** Error 27 "C:\...\firmware-api.c" Line 45(64,65): Expression must evaluate to a constant
*** Error 76 "C:\...\firmware-api.c" Line 46(67,79): Expect ;
*** Error 21 "C:\...\firmware-api.c" Line 48(171,172): #ENDIF with no corresponding #IF
*** Error 27 "C:\...\firmware-api.c" Line 50(192,193): Expression must evaluate to a constant
*** Error 76 "C:\...\firmware-api.c" Line 51(195,213): Expect ;
*** Error 12 "C:\...\firmware-api.c" Line 56(60,61): Undefined identifier  -- spi_channel_select
*** Error 12 "C:\...\firmware-api.c" Line 57(89,90): Undefined identifier  -- spi_setup_master
*** Error 21 "C:\...\firmware-api.c" Line 62(156,157): #ENDIF with no corresponding #IF
*** Error 27 "C:\...\firmware-api.c" Line 64(190,191): Expression must evaluate to a constant
*** Error 76 "C:\...\firmware-api.c" Line 65(193,211): Expect ;
*** Error 21 "C:\...\firmware-api.c" Line 69(32,33): #ENDIF with no corresponding #IF
*** Error 27 "C:\...\firmware-api.c" Line 132(157,158): Expression must evaluate to a constant
*** Error 43 "C:\...\firmware-api.c" Line 133(157,158): Expecting a declaration
*** Error 27 "C:\...\firmware-commands\firmware-commands.h" Line 28(56,57): Expression must evaluate to a constant
*** Error 28 "C:\...\firmware-commands\firmware-commands.h" Line 29(59,60): Expecting an identifier
*** Error 43 "C:\...\firmware-commands\firmware-commands.h" Line 29(91,92): Expecting a declaration
*** Error 43 "C:\...\firmware-commands\firmware-commands.h" Line 29(93,97): Expecting a declaration
*** Error 43 "C:\...\firmware-commands\firmware-commands.h" Line 29(97,98): Expecting a declaration
*** Error 48 "C:\...\firmware-commands\firmware-commands.h" Line 31(203,219): Expecting a (
*** Error 43 "C:\...\firmware-commands\firmware-commands.h" Line 31(205,209): Expecting a declaration
*** Error 43 "C:\...\firmware-commands\firmware-commands.h" Line 31(209,210): Expecting a declaration
*** Error 48 "C:\...\firmware-commands\firmware-commands.h" Line 32(25,31): Expecting a (
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Jul 14, 2020 10:11 am     Reply with quote

Could you please post your code?

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
ScarIIV



Joined: 14 Jul 2020
Posts: 2

View user's profile Send private message

PostPosted: Tue Jul 14, 2020 10:19 am     Reply with quote

bkamen wrote:
Could you please post your code?

-Ben


Sorry, but it's heavily IP'd. It's also quite a big project.

I'm sure the problem is between CCS and MPLabX though, given I know this exact code compiles elsewhere.
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Jul 14, 2020 10:21 am     Reply with quote

Then you should make a short example that blows up the same way and then post that.

Also:

We need the version of CCS and MPLABX as well as what device you're compiling for.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Jul 14, 2020 10:55 am     Reply with quote

Some questions for you..

Did you install the CCS plug-in the MPLAB-X?

Did you configure the MPLAB-X project for the processor you are using?

Did you configure MPLAB-X to use the CCS compiler for this specific project?
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Tue Jul 14, 2020 11:32 am     Reply with quote

Also, the 'traditional' MPLAB problem, that only the main code should
listed as a file to compile. The other .h/.c files need to be put in the 'header'
section, or omitted, otherwise MPLAB will try to compile each of the
files in turn, which will give inumerable errors.
So post the project layout you sre using (screen dump).
jeremiah



Joined: 20 Jul 2010
Posts: 1349

View user's profile Send private message

PostPosted: Wed Jul 15, 2020 9:27 am     Reply with quote

In addition to what others have said, make sure in the CCS project options inside the MPLABX interface that you set the paths to the Devices and Drivers subfolders of your CCS installation. It doesn't point to them by default.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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