View previous topic :: View next topic |
Author |
Message |
Andreas
Joined: 25 Oct 2004 Posts: 136
|
CCS Compiler and MPLABX |
Posted: Thu Oct 08, 2015 12:41 pm |
|
|
Hello Friends
Has anybody an idea how it might be possible to set the Syntax checker of the MPLABX to recognize CCS Labels ?
a sample:
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=Ser1,errors)
The Label "Ser1" is not recognized by the MPLABX IDE !
Any Idea ??
best regards
Andreas |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1343
|
|
Posted: Thu Oct 08, 2015 4:04 pm |
|
|
Well it doesn't highlight it on my copy of MPLABX just putting that line in, but a suggestion:
Code: |
#define DESCRIPTION_STREAM_NAME Ser1
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=DESCRIPTION_STREAM_NAME,errors)
|
Usually MPLABX is happier if you have predefined the names. Also, it helps later maintenance to have a more readable stream name, something like GPS_STREAM, or DBG_STREAM, etc. |
|
|
Andreas
Joined: 25 Oct 2004 Posts: 136
|
|
Posted: Thu Oct 08, 2015 11:48 pm |
|
|
Thanks jeremiah !
Yes, that helps a lot !
I wasnt Aware that MPLABX is much more Syntax sensitive than MPLAB.
best regards
Andreas |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19486
|
|
Posted: Fri Oct 09, 2015 12:48 am |
|
|
This was why all the 'bif' definitions got added to the include files. Tells MPLAB-X that these are 'built in functions', and gives it the syntax for the variables. Otherwise just about every line of code gets complaints flagged up. |
|
|
|