Author |
Message |
Topic: Option invalid Wrong pins for H/W |
lukeevanslx
Replies: 2
Views: 4722
|
Forum: General CCS C Discussion Posted: Sun Feb 10, 2013 9:24 pm Subject: Option invalid Wrong pins for H/W |
Ah, thanks. |
Topic: Option invalid Wrong pins for H/W |
lukeevanslx
Replies: 2
Views: 4722
|
Forum: General CCS C Discussion Posted: Sun Feb 10, 2013 8:52 pm Subject: Option invalid Wrong pins for H/W |
Hi
I have this code:
#use i2c(Master,Fast,sda=PIN_C7,scl=PIN_C6,force_hw,stream=ACCEL)
which compiled properly under 4.112, but gives the error:
"Option invalid Wrong pins for H/W" und ... |
Topic: How to detect Stack Overrun (possible variable corruption) |
lukeevanslx
Replies: 13
Views: 23615
|
Forum: General CCS C Discussion Posted: Tue Jun 19, 2012 6:11 am Subject: How to detect Stack Overrun (possible variable corruption) |
How do I detect stack overrun (eg. the stack is corrupting variables)?
What symbols am I looking for in the .lst file?
Or does CCS actually use the stack for auto variables, or are auto allocation ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Mon Jun 18, 2012 1:49 am Subject: How to Declare an Uninitialised Variable |
Yes, thanks all it's been an insightful discussion.
lukeevanslx, I don't understand your latest questions because it has been clarified, that the default behaviour of the CCS compiler is not to initi ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Mon Jun 18, 2012 12:46 am Subject: How to Declare an Uninitialised Variable |
You can refer to a variable declared in main, from any routine that is called by main, just as if it is global, by using the syntax main.variable_name.
Is there a reference in the CCS material to t ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Sun Jun 17, 2012 4:59 pm Subject: How to Declare an Uninitialised Variable |
?
But in relation to the actual behaviour of the CCS compiler and how to assess that, it's your advice which is the most recent and practical. (Despite not being what I wanted to hear.)
Subse ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Sun Jun 17, 2012 4:51 pm Subject: How to Declare an Uninitialised Variable |
PCM Programmer, would the explicit use of the auto storage class keyword, on a global variable, guarantee it is not initialised?
If not, it seems reasonable to allow a compiler-specific, non-standa ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Thu Jun 14, 2012 4:04 am Subject: How to Declare an Uninitialised Variable |
You are right.
My bad. It is what is done with static variables that are not explicitly initialised that is not explicitly specified. And that is the whole point of the thread. |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Thu Jun 14, 2012 1:54 am Subject: How to Declare an Uninitialised Variable |
C, is quite explicit, that variables that are _not_ initialised explicitly, and are not static or extern, are left uninitialised.
No, it does not say that. That has been inferred. What i ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Wed Jun 13, 2012 4:27 pm Subject: How to Declare an Uninitialised Variable |
Thanks all.
That makes at least 5 people now holding their breath that the compiler doesn't change its behaviour in a future revision.
*Not* declaring a variable as static says nothing about abo ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Mon Jun 11, 2012 6:15 pm Subject: How to Declare an Uninitialised Variable |
The #byte and #word (etc) options looked like the best options for guaranteeing behaviour.
However the variable I wish to persist is a struct.
"It may depend on the PIC and the compiler versi ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Mon Jun 11, 2012 5:56 pm Subject: How to Declare an Uninitialised Variable |
Thanks.
Am I to understand then, that variables which are not declared as 'static', are not touched by startup code? This is not explicitly stated.
Usually a non-standard compiler directive such as ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Mon Jun 11, 2012 5:38 pm Subject: How to Declare an Uninitialised Variable |
Thanks for that.
I've re-read the material.
Nowhere does it explicitly say how to declare a variable that is uninitialised.
OK, so to declare without initialisation is something like:
int iMyVar; ... |
Topic: How to Declare an Uninitialised Variable |
lukeevanslx
Replies: 39
Views: 39774
|
Forum: General CCS C Discussion Posted: Mon Jun 11, 2012 5:00 pm Subject: How to Declare an Uninitialised Variable |
Hi
Using CCS for PIC 18F.
How do I declare an uninitialised variable?
Thanks |
|