This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28377D: Inconsistent assembly code generated when Blackhawk emulator USB560V2 system tracer is used

Part Number: TMS320F28377D

Tool/software: Code Composer Studio

I am using CCS 9.2, DSP chip TMS320F28377D, Blackhawk emulator USB560V2 system tracer. 

I have a project where the main function only calls an initialization function and then runs into an infinite loop by design. the C-code is like this:

void main(void)
{

InitCPU1();

while(1)

{

SWTimerCheck();

}

}

When I compile and load the code into RAM, I sometimes get the following assembly code


01544b: 0041526C LB _c_int00
76 InitCPU1();
main():
01544d: 7625 ESTOP0
01544e: 3163 MPYB P, T, #99
82 SWTimerCheck();
C$L1:
01544f: FF69 SPM #0
015450: 7640A641 LCR SWTimerCheck

I understand ESTOP0 is a breakpoint for halting the program by the emulator, but what is the next instruction (MPYB) for? This generated assembly code causes the program to hang.

What is weird is that sometimes it does produce the following assembly code and it works like charm.

72 LB _c_int00 ;Branch to start of boot._asm in RTS library
01544b: 0041526C LB _c_int00
76 InitCPU1();
main():
01544d: 76413163 LCR InitCPU1
82 SWTimerCheck();
C$L1:
01544f: FF69 SPM #0
015450: 7640A641 LCR SWTimerCheck

where somehow it does not add ESTOP, neither the MPYB instruction. Where is the setting that I did not do right to cause the inconsistent behavior?

Thanks a lot.

Jinhui Zhang

  • Hello Jinhui,

    Can you provide a reproducible test case? I need a self contained project that I can build myself. For the example above, I would need the source for InitCPU1() and SWTimerCheck() (and other dependencies).

    Thanks

    ki

  • Hello,
    I haven’t heard back from you, hence this issue is being closed. If you wish to continue the discussion, please post a reply with an update below (or create a new thread).

    Thanks,
    ki