AnsweredAssumed Answered

___lib_setup_c overwriting code

Question asked by ABH2012 on Apr 20, 2012
Latest reply on Apr 30, 2012 by CraigG

I started using VisualDSP++ 5.0 for a product with ADSP21065L.

My problem is that I get a strange overwriting of some specific memory cells in external SRAM memory, when the lib_setup_c() function is run as the first thing after restart.

 

This is what happens:

 

I use the standard header file 06x_hdr.asm included with VisualDSP++ 5.0 in a C project.

In the emulator I insert a breakpoint just before CALL ___lib_setup_c;

I verify that the C program code in addresses from 0x208BB to 0x208C4 is ok. This memory area is seg_pmco placed in external 32-bit wide SRAM, and is in the middle of my C program.

I then run the code in CALL ___lib_setup_c until execution stops at another breakpoint inserted just after CALL ___lib_setup_c; still in 06x_hdr.asm.

Then I can see in the Program Memory Window in VisualDSP that the 10 x 48-bit words from 0x208BB to 0x208C4 are all set to 0x000000000000.

 

Both the VisualDSP++ 5.0 Emulator and Simulator gives the same result.

 

I have all the C code, the stack and heap placed in external memory. It always was so with the old tools and it worked without problems.

 

Attached is a test project that does the same thing as described above.

I wonder if you can tell me what is wrong?

 

Thanks,

Arne

Attachments

Outcomes