TI E2E Community
TI C/C++ Compiler
TI C/C++ Compiler - Forum
CCS 3.3 crazy compiler
I think, my compiler is crazy. I use 5.1.2 version of c2000 compiler with ccs and last SR.
My code looks like this:
if (GpioDataRegs.GPCDAT.bit.BIT1 == 0) // i am at home now and dont have sources, writing now by my memory :)
result = 1;
else result = 0;
Its quite simply, but it works like:
if (GpioDataRegs.GPCDAT.bit.BIT1 == 1)
result = 0;
Very interesting moment is that I _sometimes_ get in third line (else result = 0;)
I dont use any optimization and have no warnings at this place.
Assembly code looks wrong at this place, i cannot copy it now but will do it tomorrow.
May be i should just reinstall CCS? I had such problems in other place but solved it using stupid logic like : if ((A >1 ) && (A != 0))
Also, i getting a lot of errors under compiling from windows, its says that ccs is trying to read adress 0x000000. I just stop compiling and start it again.
I've solved it today, moved code to function to another file.
If you interested, you can look on screenshot, good code produced by one computer, bad by another.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.