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

Can't get #device HIGH_INTS = TRUE to compile

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



Joined: 20 Sep 2005
Posts: 23
Location: Glasgow, Scotland, UK

View user's profile Send private message

Can't get #device HIGH_INTS = TRUE to compile
PostPosted: Tue Mar 07, 2006 3:46 am     Reply with quote

I've got dual com port circular buffer based code, which I thought was working, but I'm finding that rda2 loses chars when rda is busy receiving a 6 char packet. I've been trying to promote rda2 to be the sole high priority interrupt (18f6621, pcwh v3.235) but to no avail - the compiler won't take it.

Shouldn't it accept these line? Excuse me for not posting the full application - I'll cut it down to manageable example code.

In summary, my code does this:

#include "18f6621.h"
#device HIGH_INTS = TRUE // doesn't work - "cannot change device type this far into code - but this is line 4 of main.c (1&2 are version tracking comments), before I "#include" any of my other files

& before the rda2 isr:
#int_rda2 HIGH // compiler complains invalid interrupt directive requires #device HIGH_INTS = TRUE

I'm deliberately not using the latest version because there's a problem with fputc hanging while sending out a 10 char string in v3.242 (and CCS have promised a fix: see thread 26107) - however I have tried this on v3.242, and it didn't work there either.

To forestall the obvious questions, yes, I have looked at ex_sisr.c (my code was based on it); & I have tried #priority, and it made no difference: #priority seems to be insufficent because it seems to only arbitrates as to which int gets to run when 2 are pending when e.g. GIE get re-enabled, by installing CCS interrupt arbitration routine, the code of which is hidden : please correct me if I'm wrong!

Thanks, experts & CCS...this forum is the way to do support & a wonderful resource.
KenMacfarlane



Joined: 20 Sep 2005
Posts: 23
Location: Glasgow, Scotland, UK

View user's profile Send private message

Sorted my own problem?
PostPosted: Tue Mar 07, 2006 4:01 am     Reply with quote

This compiles:

Code:

// NoddyTester.c

#include "18f6621.h"   
#device *=16 ICD=TRUE HIGH_INTS=TRUE

#int_rda2 HIGHvoid PerBarCodeChar_ISR(void){} // rcv'd char ISR for PIN_G2


main(){}



i.e. solution is that HIGH_INTS=TRUE doesn't like embedded spaces - my excuse is that I lifted the syntax from someone else's post & that the CCS manual is pretty light sparse about this. Sorry everybody!
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