HelloI'm using CCSv5.1 with the TI v6.0.2 compiler and I found a bug in the compiler. I managed to isolate the problem and all that is needed to reproduce is to create a "Hello World" project with CCSv5 for TMS320F28027 and write the code below.
#include <stdint.h>
/* * hello.c */void func(uint64_t arg);
void main(void){ func(5);}
void func(uint64_t arg){ int16_t buffer[4];
#if 1 // the following lines causes INTERNAL ERROR: no match for ASG __byte(buffer,2) = (int)(arg >> 0); __byte(buffer,3) = (int)(arg >> 8); __byte(buffer,4) = (int)(arg >> 16); __byte(buffer,5) = (int)(arg >> 24); __byte(buffer,6) = (int)(arg >> 32);#else // the following works uint32_t argHi, argLo;
argHi = (uint32_t)(arg >> 32); argLo = (uint32_t)(arg); __byte(buffer,2) = (int)(argLo >> 0); __byte(buffer,3) = (int)(argLo >> 8); __byte(buffer,4) = (int)(argLo >> 16); __byte(buffer,5) = (int)(argLo >> 24); __byte(buffer,6) = (int)(argHi >> 0);#endif}
I was able to reproduce this with v6.0.2, but note that the problem does not occur with compiler version 6.0.3 (released 2012-04-19), so you should try updating your tools in CCS.
Is this related to SDSCM00043653?