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/AM5728: Automated firmware testing

Hi Rahul,
I got files. Thank a lot.
I read that DFU requires target USB port configuration.

So the question now "Will DFU work with Industrial IDK?!" www.ti.com/.../sprw282a.pdf

The DFU/FW download requirement that we are discussing is for automating system testing during development or for production environment. We need any simple way to download test firmware to a EVB and then to the target board. It is OK to modify hardware and change boot options if required.

I'd like to go the same way as your system team, JTAG, UART or USB. Everything that can workout, even if it not optimal. 

 



Thanks
Rasty

  • Rasty,

    I split the thread from the DFU related thread to discuss test automation as we discussed offline.

    We have a couple of methods that our system test team deploys to automate SDK test:

    Automate loading code over JTAG:  The CCS package supports debug server scripting that allows you to load binaries and test the code in an automated way. The CCS installation comes with some examples but we can check with system test team if they can provide some reference scripts. Details and examples of debug scripting is provided in the article Debug Server scripting

    http://processors.wiki.ti.com/index.php/Debug_Server_Scripting

     

    program_evm.js
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    // factory_defaults dss script
    // Import the DSS packages into our namespace to save on typing
    importPackage(Packages.com.ti.debug.engine.scripting);
    importPackage(Packages.com.ti.ccstudio.scripting.environment);
    importPackage(Packages.java.lang);
    importPackage(Packages.java.io);
    importPackage(Packages.java.util);
    // Create our scripting environment object - which is the main entry point into
    // any script and the factory for creating other Scriptable ervers and Sessions
    var script = ScriptingEnvironment.instance()
    var debugScriptEnv = ScriptingEnvironment.instance();
    // program_evm environment.
    testEnv = {};
    // Get the Debug Server and start a Debug Session
    var debugServer = script.getServer("DebugServer.1");
    //***************Functions define***************************
    function isFile(path)
    {
    try
    {
    file = new java.io.FileReader(path);
    }
    catch (ex)
    {
    return false;
    }
    return true;
    }
    //****************Get New Time Stamp***********************
    function localTime()
    {
    // get time stamp
    var currentTime = new Date();
    var year = currentTime.getFullYear();
    var month = currentTime.getMonth() + 1;
    month = month + "";
    if (month.length == 1)
    {
    month = "0" + month;
    }
    var day = currentTime.getDate();
    var hour = currentTime.getHours();
    var minute = currentTime.getMinutes();
    minute = minute + "";
    if (minute.length == 1)
    {
    minute = "0" + minute;
    }
    var second = currentTime.getSeconds();
    second = second + "";
    if (second.length == 1)
    {
    second = "0" + second;
    }
    return (year+"_"+month+"_"+day+"_"+hour+minute+second);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Serial loader or SD card loading: Serial loader loads application over UART on boards that support UART booting. On Sitara boards which support SD card booting, the system test team has a custom muxed SD HW that allows them to load built application binaries from host into SD card and then switch the mux so that target access the files.

    Location in Processor SDK RTOS 5.0: 

    pdk_am57xx_1_0_11\packages\ti\board\utils\uartAppLoader

    This has been described here:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/Foundational_Components.html#uart-apploader 

    1. Copy PRSDK MLO and uart apploader app to sdcard
    2. Insert sdcard into sd slot of idkAM572x board
    3. Power cycle the board
    4. Transfer application image to be tested over UART using xmodem protocol.

    Example output:

    "

    HW used in test automation:

    Here is a link to the network-enabled power switch we use:

    https://dlidirect.com/products/web-power-switch-7

     Here are API links:  https://www.digital-loggers.com/rest.htmlhttps://www.digital-loggers.com/scripts.html

    Regards,

    Rahul

  • Rasty,

    I split the thread from the DFU related thread to discuss test automation as we discussed offline.

    We have a couple of methods that our system test team deploys to automate SDK test:

    Automate loading code over JTAG:  The CCS package supports debug server scripting that allows you to load binaries and test the code in an automated way. The CCS installation comes with some examples but we can check with system test team if they can provide some reference scripts. Details and examples of debug scripting is provided in the article Debug Server scripting

    http://processors.wiki.ti.com/index.php/Debug_Server_Scripting

    Examples of debug Server scripting are provided here:

    Load TI utility: http://processors.wiki.ti.com/index.php/Loadti  
    Program EVM script : http://processors.wiki.ti.com/index.php/Program_EVM_UG#Sample_DSS_Script_Output 

    4431.program_evm.js
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    // factory_defaults dss script
    // Import the DSS packages into our namespace to save on typing
    importPackage(Packages.com.ti.debug.engine.scripting);
    importPackage(Packages.com.ti.ccstudio.scripting.environment);
    importPackage(Packages.java.lang);
    importPackage(Packages.java.io);
    importPackage(Packages.java.util);
    // Create our scripting environment object - which is the main entry point into
    // any script and the factory for creating other Scriptable ervers and Sessions
    var script = ScriptingEnvironment.instance()
    var debugScriptEnv = ScriptingEnvironment.instance();
    // program_evm environment.
    testEnv = {};
    // Get the Debug Server and start a Debug Session
    var debugServer = script.getServer("DebugServer.1");
    //***************Functions define***************************
    function isFile(path)
    {
    try
    {
    file = new java.io.FileReader(path);
    }
    catch (ex)
    {
    return false;
    }
    return true;
    }
    //****************Get New Time Stamp***********************
    function localTime()
    {
    // get time stamp
    var currentTime = new Date();
    var year = currentTime.getFullYear();
    var month = currentTime.getMonth() + 1;
    month = month + "";
    if (month.length == 1)
    {
    month = "0" + month;
    }
    var day = currentTime.getDate();
    var hour = currentTime.getHours();
    var minute = currentTime.getMinutes();
    minute = minute + "";
    if (minute.length == 1)
    {
    minute = "0" + minute;
    }
    var second = currentTime.getSeconds();
    second = second + "";
    if (second.length == 1)
    {
    second = "0" + second;
    }
    return (year+"_"+month+"_"+day+"_"+hour+minute+second);
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Serial loader or SD card loading: Serial loader loads application over UART on boards that support UART booting. 

    Location in Processor SDK RTOS 5.0: 

    pdk_am57xx_1_0_11\packages\ti\board\utils\uartAppLoader

    This has been described here:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/Foundational_Components.html#uart-apploader 

    1. Copy PRSDK MLO and uart apploader app to sdcard

    2. Insert sdcard into sd slot of idkAM572x board
    3. Power cycle the board
    4. Transfer application image to be tested over UART using xmodem protocol.

    Example output:

    "

    HW used in test automation:

    Here is a link to the network-enabled power switch we use:

    https://dlidirect.com/products/web-power-switch-7

     Here are API links:  https://www.digital-loggers.com/rest.htmlhttps://www.digital-loggers.com/scripts.html

    Regards,

    Rahul