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.

why this situation happens?

Hi, everyone,

I'm working on EVM DM648 now. But i find a weird question here:

if my program can run successfully, when i add some statements in the program, such as

for(i=0;i<100;i++){

    blah blah;

}

it will end up

E5821C68          C$L1:
E5821C68 0002A120            BNOP.S1       C$L1 (PC+8 = 0xe5821c68),5

but when i try it several times, it will be ok again. when i delete those statements i added, it will end up the situation above.

so can anyone tell me why this happens and how to solve it?

thanks!

kevin

  • I can think of a few possible explanations for this.

    The first, and more likely, is that there is some sort of real-time issue.  For example, maybe a driver isn't being serviced in time after adding these loops, which causes something to break.

    The second possibility is a cache coherency issue.  Depending on how much code you have, the cache contents can change.

    Another option would be to disable the compiler optimization to see if this is a code gen issue.

  • Thank you, David.

    my loop's complexity is not big, so the first might not be the reason.

    and in the build options for my project, the optimization level is none.

    But the "optimization speed versus size" was speed is the most critical. When i changed it, the problem did be sovled.

    But i feel a little confused about it. why this optimization could affect the running situation? would you please explain it more specific? or you can drop a few hints that i should go to read which document?

    thanks.