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.

Automating compiler tests using DSS



I'm doing an on-target compiler validation using DSS and hitting problem after problem. There being no reference manual for DSS, I am reduced to proceeding by blind trial and error. Attempting to load and run a Hello World program I get the screen output shown in the attachment.

What do I try now?

Rapidly losing confidence in TI's support for command-line testing,

Olwen Morgan

  • Hello Olwen,
    Can you connect/load/run successfully when doing the same steps manually via the CCS GUI?

    Also based on your emulator pack version, I assume you are using CCSv6.1.2. Is this correct?

    Thanks
    ki
  • Hi Ki,

    1. Yes, my colleague *can* successfully load and run a test program via CCS. What I am doing is independent compiler validation, which needs to be done from the command line so as to be accurately reproducible.

    2. CCS was installed using ccs_setup_6.1.1.00022.exe, so it is CCSv6.1.1 - which we have to keep because our project has to standardise on a single version of CCS as part of our safety case.

    i notice that in Windows device manager there are two entries as follows that show missing drivers:

    Other devices - PCI Serial Port
    Other devices - PCI Simple Communications Controller

    Could this possibly be the cause, as currently the first SEVERE error message seems to be about the FTDI driver?


    regards,
    Olwen
  • oh .... I forgot something ... we are also using Version 5.2.6 of the TI ARM C/C++ compiler

    Olwen
  • Thanks. I assume that your colleague was able to successfully load/run via CCS on the same machine, ruling out any issues with the HW environment and drivers.

    If I understand the output in the screenshot correctly, it looks like the debug server started up successfully, target connect was successful, and the errors occurred when program load was attempted.

    Can you have your script generate a verbose DSS log and zip it and attach it to this thread?

    ex:

    var script = ScriptingEnvironment.instance()

    // Create a log file in the current directory to log script execution

    script.traceBegin("C:\path\to\DSS_Log.xml", "DefaultStylesheet.xsl")

    // Log everything

    script.traceSetFileLevel(TraceLevel.ALL)

    Thanks

    ki

  • HI Ki,

    Did as you asked. Attached is a zip archive containing:

    1. .bat script that invokes the debug server script

    2. .js script with the debug server calls in it

    3. TraceLevel.ALL console output

    4. TraceLevel.ALL log output

    regards,

    Olwen

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/81/OnTargetResults.7z

  • Thank you. The log is very helpful.

    According to the below:

    71 30607 0 FINER load Program load successful

    72 30607 0 FINER getBoolean ENTRY ID: AutoRunToLabelOnRestart

    73 30622 15 FINER getBoolean RETURN true

    74 30622 0 FINER waitForHaltIfPropertySet Waiting for halt

    75 30622 0 FINER waitUntil ENTRY timeout: 600000 (ms)

    76 630637 600015 SEVERE logException Timed out after 600000ms

    77 630637 0 SEVERE logException Timed out after 600000ms while waiting for target to halt after an auto-run to "main

    78 630637 0 SEVERE logException Error loading "hiworld.out": Timed out after 600000ms while waiting for target to halt after an auto-run to "main

    The issue is that while the program is flashed/loaded successfully, it appears that the "auto-run to main" attempt fails (times out). Is their a 'main' in the application? If not, then it would explain why the the program never reaches main and times out. The timeout would throw an exception and if the exception is not handled, the the script would fail and terminate with error.

    The default debugger behavior is to try to auto-run to main after a program load. If there is no 'main' or if you wish to remain halted at the entry point of the application, you can disable this behavior. This can be disabled via the Debugger Properties.

    I don't see any of the errors shown in the screenshot of your first post (the various FTDI errors). I assume those did not happen on the recent run?

    Thanks

    ki

  • HI Ki,

    Thanks for your reply. Answers to your questions are:

    1. Yes, there is a main in the program. It's a standard Hello World program as follows:

    #include <stdio.h>

    int main(void)
    {
    printf("Hello world\n\n");

    return 0;
    }

    2. The absence of FTDI errors is due to my having applied a 10-minute timeout. Previously there was no timeout and the FTDI errors were the first to appear after the reset messages, appearing about an hour after the load.

    So at this point, we know there is a main in the program source code and the program appears to load OK. That makes me think that the problem may lie with the linker options specified. Where should I now look for causes?


    regards,
    Olwen
  • If there is a main and the program is loaded successfully, everything should work as expected. If you manually load this program in CCS, does it load successfully and auto-run to main?

    Would it be possible to share the hello world project you are using? You can zip up the whole project folder and attach it to this thread