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

Compile message error

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



Joined: 05 Sep 2013
Posts: 14

View user's profile Send private message

Compile message error
PostPosted: Wed Jun 10, 2015 5:36 am     Reply with quote

Hi, I'm using CCS V5.011. Someone can explain me the signification of this error message:

"Can not set this option this far into code"

This append in a multi file project and when compiling the "name_project.H" file

If someone have an idea.

Thx by advance
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed Jun 10, 2015 6:13 am     Reply with quote

...
_________________
Google and Forum Search are some of your best tools!!!!


Last edited by dyeatman on Wed Jun 10, 2015 6:29 am; edited 1 time in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Wed Jun 10, 2015 6:18 am     Reply with quote

It means exactly what it says. You can't set the option this far into the code.

In CCS, you generally need the following layout:

1) Processor include
2) #device statements (set ADC resolution etc.)
3) Fuses
4) Clock settings
(these can all obviously be merged into a single include)
5) Then #use statements
6) Then include things - these now _must not_ contain anything in 1 to 4. There can be duplicates of some things in 5.

The warning comes if (for instance), you set a fuse, or have a #device setting after any of 3, 4 or 5.

The basic structure needs to stay this way whatever way you actually lay things out.

It sounds as if you have got past 4, then included name_project.h, which includes something from 1 to 4.
ELINAP



Joined: 05 Sep 2013
Posts: 14

View user's profile Send private message

problem solved
PostPosted: Wed Jun 10, 2015 8:02 am     Reply with quote

Thanks a lot
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