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.

AM2434: Run the SOC Initialization Script in Production

Part Number: AM2434
Other Parts Discussed in Thread: CCSTUDIO, UNIFLASH

Hi TI-Experts,

we are preparing production and End-Of-Line tests with the AM2434.

We plan to program the external flash inline - there is no second stage boot loader available during first startup.

So we need to run the SOC Initialization Script, e.g sdk 08.03

I only found documentation how to run the script manually using Code Composer Studio and launch the target config by hand.

Question: Is there a way to automate this process?

We need to initialize the chip and then load our flash writer toolbox into RAM (via JTAG) from a pure command line without manual steps.

Can you maybe provide an example e.g. how to proceed from a Windows PowerShell?

Thanks in advance!
Tommy

  • Hi Prasad,

    thanks for your fast response.

    So if I understand correctly, the script load_dmsc.js can run stand alone using dss.bat located in <ccs1200\ccs\ccs_base\scripting\bin>?

    What I did:

    1. Put <ccs1200\ccs\ccs_base\scripting\bin> to envrionment path var (to make dss.bat available)
    2. Put <\mcu_plus_sdk_am243x_08_03_00_18> to envrionment path var 
    3. Execute  "dss load_dsmc.js"

    I receive error message:
    SEVERE: No configuration was supplied
    SEVERE: Could not start server: DebugServer.1: No configuration was supplied
    org.mozilla.javascript.WrappedException: Wrapped com.ti.ccstudio.scripting.environment.ScriptingException: Could not start server: DebugServer.1: No configuration was
    supplied (.\load_dmsc.js#137)

    Towards your information, I added the line " debugServer.setConfig("AM2434_ALX.ccxml");" to the .js file:

    function updateScriptVars()
    {
        //### added line to run stand alone without ccs
        debugServer.setConfig("AM2434_ALX.ccxml");
        //Open a debug session
        dsMCU1_0 = debugServer.openSession( ".*MAIN_Cortex_R5_0_0" );
        dsDMSC_0 = debugServer.openSession( ".*DMSC_Cortex_M3_0" );
    }

    This seems to work for the moment.

    Is this the way to go? Is there no other solution to load a binary into RAM for produciton?

    Best regards,

    Tommy

  • Hi Tommy,

    Missing ccxml link was miss in our scripts. That's correct step.

    Regarding loading the binary -

    We do have load.js ("mcu_plus_sdk_am243x_08_03_00_18\tools\ccs_load\am243x\load.js") which shows loading of application binaries into RAM. Would that help you?

    If you need single .js file, you can merge load_dmsc and load.js into single file.

    Let me know if this is what you are looking for. Or do you want way to load application without CCS?

    Regards,

    Prasad

  • Just FYI - I have filed bug to fix scripts for missing target config info (below is JIRA ID - not accessible, just for reference).

    [MCUSDK-7904] AM243x - load.js and load_dmsc.js doesn't work without CCS 

  • Hi Prasad,

    yes I need a way to load and run application without CCS.

    Do you maybe have a tool or script available that I can simply use to load and run code on the controller?

    Best regards,

    Tommy

  • Hi Tommy,

    I see only below two options feasible for your requirement -

    1. Use UART boot mode 

    - Current Uniflash is primarily used for flashing application and bootloader but you can update the scripts for getting application image during run time.

    1. So you will not have anything on flash and board is configured in UART boot mode.

    2. During boot ROM will wait for an SBL on the UART

    3. You can pass your own application in this step - which can write to flash or directly copy application content from UART to SRAM.

     

    2. Use CCS debug server scripts as suggested in my previous response.

    - This doesn't need CCS GUI but CCS needs to installed for the tools

    Hope this helps.

    Regards,

    Prasad

  • Thanks Prasad,

    we evaluated the UART boot mode before - this is not an option for us.

    I am going to merge the CCS debug server scripts and call them in headless mode.

    Best regards,
    Tommy

  • Hi Prasad,

    sry to catch up on this topic again.

    I merged my scripts to run in a windows terminal using dss.bat from CCS.

    Problem: In 80 % of the runs I receive the error message (from load_dsmc.js):

    Fill R5F ATCM memory...
    Writing While(1) for R5F
    Loading DMSC Firmware ... C:/ti/mcu_plus_sdk_am243x_08_03_00_18/source/drivers/sciclient/soc/am64x_am243x/sysfw.bin
    DMSC Firmware Load Done...
    and may be hung. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.8.0.00235)

    WARNING: MAIN_Cortex_R5_0_0: Breakpoint Manager: Retrying with a AET breakpoint

    SEVERE: MAIN_Cortex_R5_0_0: Trouble Setting Breakpoint with the Action "Terminate Program Execution" at 0x70093890: (Error -1205 @ 0x70093890) Device memory bus has an error and may be hung. Verify that the
    memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.8.0.00235)

    WARNING: MAIN_Cortex_R5_0_0: Breakpoint Manager: Retrying with a AET breakpoint

    The same script runs without problems using CCS and the "Scripting Console". For my test I am using the launchpad in "NO_BOOT" configuration.

    Can you maybe run some tests without CCS on your side and see if there is anything missing in the .js script for terminal only?

    Any suggestions what I can adapt to make the script run more reliable?

    Best regards,

    Tommy

  • Hi Tommy,

    Are you resetting the board before running the script?

    Also, I am moving this thread to our CCS team so they can help on any suggestions. 

    Regards,

    Prasad

  • I am able to successfully run the script from the command line also (after making some above modification as mentioned in previous posts). I don't see any other issues with the script that would prevent it from running successfully from the command line vs the Scripting Console.

    Thanks

    ki

  • I should mentioned that I need to do a board reset on my AM243x LaunchPad each time before running the script. Otherwise the script gets stuck initializating the R5. This is the case regardless of if I am running from the command-line or Scripting Console.

  • Thanks for your response, I will organize a new AM243x LaunchPad and retry the tests.

  • Hi Prasad,
    Hi Ki,

    I exchanged my Launchpad and USB cable connection - it seems to work as expected.
    Sorry for inconvenience.

    Best

    Tommy

  • Glad to hear you resolved the issue and thank you for the update!