AnsweredAssumed Answered

Memory overlay oddities.

Question asked by Sumetaso on Sep 7, 2010
Latest reply on Oct 4, 2010 by Sumetaso

Hi all,

 

Can anyone shine some light on this?

 

Using:

VisualDSP++ V5.0 Update 8

BF561 on a custom board.

 

Trying to do:

Use memory overlays.

 

What happens:

I keep getting either EXCAUSE 21 or EXCAUSE 23.

 

What I have checked:

I have dumped the LIVE and RUN area of the OVL that I am trying to overlay. Both match. Also checked both areas after the EXCAUSE, still identical.

Checked so I am not messing up the stack.

Verified that the PLIT loads the correct overlay into the correct memory area.

Verified the linkers view of which adresses are mapped to which functons.

Assembler debugging.

 

What I have found:

One function in the overlaid code, has a function call to a bogus address.

The function I wish to call is an assember function.

 

My C code: angle = asmatan2(delta2, delta1);

My code in assembler in the debugger : CALL -40590 /*0xFF607600*/ ;

The address of the asmatan2 function : 0xFF6000AC

 

As you all see, that is not the same address at all. ( 0xFF607600 in my case, is smack in the middle of another function, in a completely different object file, that is not included in the OVL )

So the question arises, what can I have messed up, so that the code that gets generated, messes up the addresses to function calls.

 

Note:

I also tried to add a few "printf's", just to make more calls of code outside the OVL.

Now while debugging I found a lot of "C308 *illegal opcode*;" and such here and there in the generated code.

Which to no surpise causes EXCAUSE 21 within the blink of an eye.

 

So any suggestions are welcome.

 

Regards,

//Alf

Outcomes