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

Search found 10 matches
CCS Forum Index
Author Message
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Wed Nov 16, 2016 6:26 am   Subject: Compiler issue: Wrong value in variable
Not sure If this helps in identifyng the problem. I directly tried loading it using CCSLoad software and I found this issue
[img]
https://www.dropbox.com/sh/uz5799i7ebx3kev/AABZYL9bk0N2Zz-Y0ukm5LmBa ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Wed Nov 16, 2016 4:05 am   Subject: Compiler issue: Wrong value in variable
The example code, didn't hit the stack limit, so I didn't expect this to help, however will become necessary as the code grows. I have to repeat my belief that this is a RAM fault. By this I mean _a f ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Tue Nov 15, 2016 10:03 pm   Subject: Compiler issue: Wrong value in variable
#BUILD (stack=...)

Look for the #BUILD stack line and increase the amount specified in that line.

Increased the stack but hardly changed anything.

#include <33EP256MU806.h>
//# ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Tue Nov 15, 2016 12:31 am   Subject: Compiler issue: Wrong value in variable
[img]
https://www.dropbox.com/s/kgq9sogwj2ypc13/Capture1.PNG?dl=0
[/img]
[img]
https://www.dropbox.com/s/0ho8bccsg4ofcbj/Capture2.PNG?dl=0
[/img]

So some related info. It seems its definitely ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Mon Nov 14, 2016 11:49 pm   Subject: Compiler issue: Wrong value in variable
Since this is a dsPIC project, an obvious question is how much RAM are you setting aside for the stack? Is it the default? What happens if you increase it?

It is default and I am not sure how muc ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Mon Nov 14, 2016 11:45 pm   Subject: Compiler issue: Wrong value in variable
The comment that you checked the value, implies some form of debugger attached?.
Try the simple expedient of reversing the declaration order of the variables. So:

signed int16 countL=0;
signed i ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Mon Nov 14, 2016 5:17 am   Subject: Compiler issue: Wrong value in variable
For reference: I am using the the development board from DSP Analog Development Kit by CCS with the 12 MHz crystal. Below I have a more simplified code.


#include <33EP256MU806.h>

#fuses ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Mon Nov 14, 2016 3:00 am   Subject: Compiler issue: Wrong value in variable
Ok just to keep on updating. Seems like after a while again in main as well I face the same issue. The variable doesn't seem to store the correct value.

My guess is its some memory issue or compil ...
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Mon Nov 14, 2016 2:09 am   Subject: Compiler issue: Wrong value in variable
I just checked if I remove the function and place everything in main it works but still not sure why its not working in the function.
  Topic: Compiler issue: Wrong value in variable
AHCCS

Replies: 16
Views: 29827

PostForum: General CCS C Discussion   Posted: Mon Nov 14, 2016 1:57 am   Subject: Compiler issue: Wrong value in variable
Facing a strange issue with variable definition. I have two global unsigned int 8 variables (lsbEnc1 and lsbEnc2) both have same values but one of them skips the last bit (lsbEnc2) i.e. if I store 71 ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group