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 C55 Simulator program halts without reset cpu?!?!!?



hi, I am developing program in C55 simulator.  It is strange that the program halts and gets no response if I load and run directly. But if I reset cpu and run it again(without reload), the program can run smoothly.  I have some I/O operations in the program. 

  •  

    Allen,

    The most likely reason is that the PC is not pointing to a valid location on program load and once you RESET the core, it picks up the right PC from the reset vector.

    Can you provide a screenshot of the disassembly on program load?

     

    Regards,

    Sidharth

  • Sidharth,

    Thanks for your help. I think I possibly find the root cause. When I intially load the .out into the simulator, the CPU register SSP and XSSP are having incorrect value (8c4098 for SSP and 8c0607 for XSSP). The memory of those address are incorrect and not initlialized. Therefore my program fails to run. After "Rset CPU",  the SSP is initialized to f800 which matches the .stack address I have specified in the link file. Can you  please help me to know how to initialize the CPU registers automatically when the .out is loaded.

     

     

  • Sidharth,

    I notice that in my program, we in fact have the below assembly codes to initalize XSP

     

    14026F c_int00:
    14026F ec314e00f800             AMAR *(#0f800h),XSP
    140275 78000002                 MOV #0,SSP

    however, what I see is AMAR *(#0f800h), XSP does not have any effect to SP register. The SP register remains no changed. But when I do reset CPU, that assembly can initialize XSP to 0f800h. why?

     

  •  

    Allen,

    Can you provide me the details of the CCS version and the C55 configuration you are using? Also, is it possible to get the failing executable? I will file this defect in Clearquest and follow up.

    Meanwhile, is it an acceptable work flow for you to RESET the CPU before executing any program?

  • Sidharth,

    Thank you. I just root cause the problem and have fixed it. The cause is that part of MMR address are mistakenly occupied by some code section. Therefore the registers start with wrong values. After I move out the code section, the problem is gone.  Thanks a lot for your support.