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 loading binary file runs for ever

Other Parts Discussed in Thread: AM3359

Hello,

The loading of binary file to memory does sometimes shows as it is runing for ever in CCS V5.2.0.00069.

In the picture below it shows 96% processed. This is showed for ever although the loading has already finished. This is kind of critical as user does not get any feedback that it was successfully loaded.

  • Hi,

    I can't reproduce this here, therefore the error may be caused by the file itself, or by a combination of device and emulator used. Can you send this information and the .bin file so I can try to reproduce it here? 

    Also, you said it only happens sometimes... If you can identify the surrounding conditions of the failing scenario that would help - for example, if the failure happens the second time the code runs, or if only happens right after a reset...

    Regards,

    Rafael

  • Hello Rafael,

    Attached is the .bin file. We use the XDS510 USB from Spectrum Digital. The target is an AM335x ICE board (Rev 1.0A).
    I have tested again today and it worked at the first try. I did the following:

    1. Connect to target
    2. Loaded GEL file and executed "AM3359_ICE_Initialization"
    3. Loaded "SPI_Flashing_Tool.out"
    4. Run
    5. Typed the filename of the binary file
    6. Entered offset
    7. Loaded binary file to 0x8100000

    After this it worked. I have tried to reload several times and it worked. Then I restarted the target by pressing "Restart" in CCS. After entering filename and offset the memory load runs for ever (96% displayed all the time).

    Hope this helps.
    Regards,
    Patrick

    Memory load problem.zip
  • Patrick,

    Thanks for sending the .bin file - I don't see anything particularly bad with it.

    Unfortunately I don't have an ICE with me to test the code entirely, but I have a theory to why it does not work:

    The process of loading/reloading the firmware to the target causes all global variables to be properly initialized and therefore the code runs fine. The "Restart" button simply resets the PC (program counter) to the entry point (or main, depending on the debug configurations) but leaves everything else untouched (memory, peripheral registers, etc.).

    Therefore, if the code expects a specific system status when executing (variables, peripheral registers, etc.), it may fail to execute properly if things are previously initialized. This is not uncommon.

    In this case, you found a workaround yourself: always make sure the code is reloaded before running.

    Best regards,

    Rafael

  • Rafael,

    Please note that this error does not have to do with code on the target that is not running properly. Instead it is the memory load function of the CCS V5 that has a problem and does not work all the time. Maybe it is just a GUI problem but it is kind of difficult behaviour if I do not get a correct feedback from CCS wheather code was loaded successfully or not. I just wanted to show in which case I have seen the problem.

    Regards,
    Patrick

  • Patrick,

    Duh! You are right... (I must be working too much). I will try to get a board and reproduce this here.

    Cheers,

    Rafael