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.

RTOS: AM572x IDK debug issue

Tool/software: TI-RTOS

Using the am572x idk board with CCS 7.3, I flashed the SBL and NIMU_BasicClientExample_idkAM572x_armExampleproject TI RTOS app to the on-board QSPI flash. The board boot up correctly and NIMU example app works fine.

Every time the board power on, SBL copy the NIMU application and start the app. That's normal, however, I could not load a new program image to debug anymore using CCS. CCS can connect to the A15 core but load program does not stop in main() and execution of the program fails.

Thanks for your attention.

  • The RTOS team have been notified. They will respond here.
  • Hi,

    AM572x IDK EVM is configured by default to 0x8106 to enable UBOOT/Linux boot from the SDCARD. The secondary boot device selected by this boot mode is QSPI1. Do you mean load a new program with JTAG/CCS while SBL/NIMU is still in place? If this case, when you power up or do a system reset, the QSPI runs, SBL loads your NIMU example and runs already, this is not a clean system. There is no good way to resolve this, probably you need to erase the QSPI image.

    Regards, Eric
  • Eric,

    Thanks for replying. Yes, I mean load a new program with JTAG/CCS while SBL/NIMU or whatever there something is still in place.

    What do you mean by "this is not a clean system". CCS/JTAG can only load/debug program in a blank device? We only have QSPI for our production system planned, there is no SDCARD. How do you even erase the old QPSI image?

    Regards,
    Karl
  • I suspect that when you connect with CCS that the MMU is still enabled. After you connect go to Tools -> ARM Advanced Features to disable the MMU. I expect you'll be able to load new programs after having done this. However, I still think you need to be very careful here. To Eric's point about it not being a "clean system", at this point in time you're going to have stuff in the caches, peripherals in an undefined state, etc. If you're going to be doing a lot of development, the best thing might be to erase your flash so you can "start fresh" each time. In fact, you can even use a gel file such that any time you reload the program it will automatically reset the CPU, etc.
  • MMU is disabled.
    CCS/JTAG is using the Gel file, which calls AM57xxStartState() in OnPreFileLoaded() before load image.
    hotmenu AM57xxStartState()
    {
    CPSR &= ~0x20; //set to ARM mode
    CPSR = (CPSR & ~0x1F) | 0x13; //set to privledged mode
    REG_CTXA15_CP15_C1_SCTLR &= ~0x1; //disable MMU
    }

    Thanks,
  • Have you tried loading a very simple program, i.e. hello world?
  • I did. I have better luck to load a simple program to sram and erase the flash.

    For RTOS program, power cycle the board, connect, load the image and it fails, then relaunch and reload the image, it may work if I am lucky.

    If executing the Gel scripts could make a "clean system", that would be the best.

    Thanks,