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.

Is there anyone can tell me what these lines for?

Hi guys,

I'm trying to do something on F28335. 

My code runs forever, and when i pause it, i find it gets stuck at these lines:

           C$$IO$$:

0x009EE5:   7700        NOP

0x009EE6:   FF69        SPM        0

0x009EE7:   8BBE        MOVL       XAR1,*--SP

          <source line is not available>

0x009EE8:   0006        LRETR

          <source line is not available>

can anyone tell me what's the function of these lines?

  • I'm not sure of those lines, but this sounds familiar to a problem if you switch your code from running in RAM to running in Flash and you don't handle RAM functions (functions that get copied into RAM and run from there).

     

    Check the disassembly to make sure it matches the source code.  If the disassembly is different, see the illegal_isr() thread.

  • Thanks for your help Andrew.

    This problem disappear when i comment off some codes, which are simply some for loops.

    It looks like if i have a shorter code length, the code works fine.

    I have this problem when calling the time function in <time.h>, and i had checked that this time function was in RAM.

     

     

    i=time(0);

    0x0098D1:   D400        MOVB       XAR4,#0

    0x0098D2:   7640A352    LCR        time <--------------------------This step hurts.

    0x0098D4:   D009        MOVB       XAR0,#9

    0x0098D5:   9692        MOV        *+XAR2[AR0],AL

    This is  the disassembly. And they are the same if the code works or not.

    If i add some codes, which are simply some for loops, it simply does not work anymore...

     Do you have any idea of this?

     

     

  • Is this code you wrote or sample code?

     

    Yes, I now see the address and that code is in RAM.  If you're using 28335_RAM_lnk.cmd for linking your program into RAM entirely, then my suggestion won't be helpful.  If you're using 28335.cmd to store the program in Flash, then you might need to add the RAM function support.

  • Thank you Andrew.  :D

    I'm using  28335_RAM_lnk.cmd for linking.