Hi,
I'm using CCS 3.3 , and running in simulation mode on C6713 device.
When creating the project I chose:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
in the setup window: "C6713 device cycle accurate simulator"
in the new project: "TMS320C67xx"
I also use DSP/Bios which defines:
utils.loadPlatform("ti.platforms.sim67xx");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My major problem is when running a C code like:
char *str = "String";
char *astr2 = "Another";
str gets the value of: "StringAno"
When running on the chip itself I get the right output...
Anyone has any idea why?
Thanks,
Zvika
Problems understanding variables
Started by ●March 22, 2008
Reply by ●March 23, 20082008-03-23
Zvika-
> I'm using CCS 3.3 , and running in simulation mode on C6713 device.
>
> When creating the project I chose:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> in the setup window: "C6713 device cycle accurate simulator"
> in the new project: "TMS320C67xx"
> I also use DSP/Bios which defines: utils.loadPlatform("ti.platforms.sim67xx");
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> My major problem is when running a C code like:
> char *str = "String";
> char *astr2 = "Another";
>
> str gets the value of: "StringAno"
When you say "gets the value of", that could be a lot of things -- C code that shows the value, C code that occurs
before, even C code that occurs after, since output usually takes a while.
What if you run just this code:
char str[] = "String";
char astr2[] = "Another";
void main() {
printf("str is %s", str);
while (1);
}
What happens? If that works, then try the first way again.
-Jeff
> When running on the chip itself I get the right output...
>
> Anyone has any idea why?
>
> Thanks,
> Zvika
> I'm using CCS 3.3 , and running in simulation mode on C6713 device.
>
> When creating the project I chose:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> in the setup window: "C6713 device cycle accurate simulator"
> in the new project: "TMS320C67xx"
> I also use DSP/Bios which defines: utils.loadPlatform("ti.platforms.sim67xx");
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> My major problem is when running a C code like:
> char *str = "String";
> char *astr2 = "Another";
>
> str gets the value of: "StringAno"
When you say "gets the value of", that could be a lot of things -- C code that shows the value, C code that occurs
before, even C code that occurs after, since output usually takes a while.
What if you run just this code:
char str[] = "String";
char astr2[] = "Another";
void main() {
printf("str is %s", str);
while (1);
}
What happens? If that works, then try the first way again.
-Jeff
> When running on the chip itself I get the right output...
>
> Anyone has any idea why?
>
> Thanks,
> Zvika