View previous topic :: View next topic |
Author |
Message |
ELINAP
Joined: 05 Sep 2013 Posts: 14
|
Compile message error |
Posted: Wed Jun 10, 2015 5:36 am |
|
|
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
|
|
Posted: Wed Jun 10, 2015 6:13 am |
|
|
... _________________ 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: 19505
|
|
Posted: Wed Jun 10, 2015 6:18 am |
|
|
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
|
problem solved |
Posted: Wed Jun 10, 2015 8:02 am |
|
|
Thanks a lot |
|
|
|