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/TDA3: Scripting Console: "GEL: Unable to open file:" wrong path assembling of .xem4 file

Part Number: TDA3


Tool/software: Code Composer Studio

Hi all,

I try to initiate and load all the TDA3 cores via the scripting console in CCS 7.0.0.00042. (I use the XDS560v2 STM). When I start loading the targets by calling loadTargets_IPU_0(), the script stops with an error:

...

Cortex_M4_IPU1_C0: GEL Output: --->>> TDA3xx End All Pad Configuration for RGMII usage on EVM Platform <<<---
Cortex_M4_IPU1_C0: GEL Output: --->>> TDA3xx End All Pad Configuration for Vision Platform <<<---
Cortex_M4_IPU1_C0: GEL Output: --->>> TDA3xx Target Connect Sequence DONE !!!!! <<<---
Cortex_M4_IPU1_C0: GEL Output: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Cortex_M4_IPU1_C0: GEL Output: For STM based tracing on TI EVMs,
Cortex_M4_IPU1_C0: GEL Output: run 'TDA3x EVM I2C EXPANDER CONTROL -> Enable_Trace_Pins()' function from Scripts menu on M4/CS_DAP_DebugSS
Cortex_M4_IPU1_C0: GEL Output: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Cortex_M4_IPU1_C0: GEL: Unable to open file: D:\ti\ccsv7\eclipse\C:\SDK\bin\tda3xx-evm\vision_sdk_ipu1_0_debug.xem4

The abstract of the script:

importPackage(Packages.com.ti.debug.engine.scripting)
importPackage(Packages.com.ti.ccstudio.scripting.environment)
importPackage(Packages.java.lang)
importPackage(java.io);
importPackage(java.lang);

...
function updateScriptVars() { baseDir = "C:\\SDK\\bin\\tda3xx-evm\\"; IPU_0_en = 1; IPU_0_exe = "vision_sdk_ipu1_0_debug.xem4" dsIPU_0 = debugServer.openSession( ".*Cortex_M4_IPU1_C0" ); } function loadTargets_IPU_0() { updateScriptVars(); dsIPU_0.target.connect(); if(IPU_0_en) dsIPU_0.memory.loadProgram( baseDir + IPU_0_exe ); }

It's no big deal but I don't know where the script assembles the path variable and adds the eclipse default path at the beginning of the baseDir variable.
I hope you have enough information to give me a hint!

Thanks in advance!

Best regards,

Sebastian

  • Sebastian,

    Interesting. I just tested the loadProg API on the scripting console and was able to successfully load the program. I passed an explicit path as in:

    loadProg("C:\\Users\\user\\workspace\\project\\Debug\\project.out");

    Can you manually launch the debugger, connect to the IPU core and try the command above? Perhaps it may uncover some strange issue if the "D:\ti\ccsv7\eclipse" is also included in this invocation.

    Can you just confirm one thing? You are opening the scripting console from the CCS GUI and loading a .js file into it, right?

    Regards,

    Rafael

  • Rafael,
    thank you for your answer.
    Yes I've used the scripting console and have loaded the .js file.

    When I (try to) load an .out file it seems to use the correct path.

    ...
    Cortex_M4_IPU1_C0: GEL: Encountered a problem loading file: C:\SDK\bin\v_linux.out Could not determine target type of file

    It was not a correct type of out file, but the error shows a correct path. (I never have used out files before)

    Regards,
    Sebastian
  • Sebastian,

    Interesting. Some legacy APIs treat the extensions in a different manner.

    Just as a test, can you try to set up the variable as shown in the Memory section of the Debug Server API document?

    The path to this document is shown in the URL box of the browser.

    I haven't tested it, but this can potentially help you get rid of the base directory.

    Hope this helps,

    Rafael

  • Desouza,

    it's an similar behavior.

    I have adapted the script as following:

    baseDir = "C:\\SDK\\bin\\tda3xx-evm\\";
    env.setCurrentDirectory(baseDir);

    and it reacts with:

    Could not set Current Directory, "D:\ti\ccsv7\eclipse\C:\SDK\bin\tda3xx-evm" does not exist (C:\SDK\launch_sdk_tda3xx.js#42)

     Any other idea?

    Regards and thank you,

    Sebastian

  • Sebastian,

    Please apologize for the delay; I was sidetracked by other issues.

    I did some tests today and was able to load the code using a very similar scenario as yours. Apart from an innocuous error message, the attached script loaded the code to the target without problems.

    Please check attached the script/binary I used and the exact procedure I followed.

    Hope this helps,

    Rafael

    JS_test.zip

  • Hi,

    Just a remark: the error message was caused by the use of C-style comments ( /* */ ). Changing these to C++ style ( // ) removes the error.

    Regards,
    Rafael