DSPRelated.com
Forums

erratic behaviour-code composer

Started by bhad...@yahoo.com September 27, 2007
Hi,

I am new to this platform.
I am using the tms320vc33.
I am using code composer version.4.10.36

I have written an inialization code in (C and asm) for dsp.
When I startup, the cpu registers are showing some default values and not zero.

If I start to trace with these values, at the end of some function calls the trace goes to some unspecified location.

But if I make the cpu registers zero and load another .out file of another project, then the trace works fine.

I guess some setting is changing, and I would be thankful to u if you could point out what is wrong.something to do with memory mapping?

Thanx
Bhaduri
Hello Bhaduri

Look for C_INT00 in the compilers source library. When the CPU is reset
most of the regsiters are not set to any particular value. In
particular the compiler needs to establish some of these registers for
its run time stack, data page and perform a copying process where load
time data is copied to the run time address. By looking at the C_INT00
code you should begin to see how the C-environment works.

By 'zeroing the registers' all you have done is set the base address to
zero. When objects are created, the also happen to start with a default
starting point of zero. If you then forget to specify a linker command
file everything is refrenced to zero. And, if your target system is in
uP mode and has memory starting at zero... at appears to work. But this
may not be what you intended. Maybe you missed linking your objects?

How do I know this? When the C30 EVM was the norm for everyone learning
this architecture, this was a simple way for everyone to get a piece of
code up and running without using the linker.

Regards,
Keith Larson
Smith & Larson Audio
www.woofertester.com

b...@yahoo.com wrote:

> Hi,
>
> I am new to this platform.
> I am using the tms320vc33.
> I am using code composer version.4.10.36
>
> I have written an inialization code in (C and asm) for dsp.
> When I startup, the cpu registers are showing some default values and
> not zero.
>
> If I start to trace with these values, at the end of some function
> calls the trace goes to some unspecified location.
>
> But if I make the cpu registers zero and load another .out file of
> another project, then the trace works fine.
>
> I guess some setting is changing, and I would be thankful to u if you
> could point out what is wrong.something to do with memory mapping?
>
> Thanx
> Bhaduri
>
>