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/BEAGLEBOARD-X15: CCS 7.4 gdb_agent_console reports "No CPUs that support GDB are defined in configuration file" if a relative path to the board data file is given

Part Number: BEAGLEBOARD-X15
Other Parts Discussed in Thread: AM5728

Tool/software: Code Composer Studio

When attempting to use the gdb_agent_console from CCS 7.4 with TI Emulators 7.0.100.0 under Windows 10 with a board data file generated by a CCS test data connection for an AM5728 connected to a Blackhawk USB560-M, initially attempted to give a relative path to the board data file. However, using a relative path causes a "No CPUs that support GDB are defined in configuration file" error to be reported:

C:\Users\mr_halfword\E2E_example_projects\AM5728_GCC_class_variables>c:\ti\ccs740\ccsv7\ccs_base\common\uscif\gdb_agent_console.exe targetConfigs\testBoard_bh560usbm.dat
No CPUs that support GDB are defined in configuration file

If an absolute path to the same target data file is given then the gdb_agent_console initializes without error:

C:\Users\mr_halfword\E2E_example_projects\AM5728_GCC_class_variables>c:\ti\ccs740\ccsv7\ccs_base\common\uscif\gdb_agent_console.exe c:\Users\mr_halfword\E2E_example_projects\AM5728_GCC_class_variables\targetConfigs\testBoard_bh560usbm.dat
CPU Name             Port
--------             ----
c66xx_dsp1          :55000
c66xx_dsp2          :55001
cortex_m4_ipu1_c0   :55002
cortex_m4_ipu1_c1   :55003
cortex_m4_ipu2_c0   :55004
cortex_m4_ipu2_c1   :55005
cortexa15_0         :55006
cortexa15_1         :55007

Starting all cores
CPU Name             Status
--------             ------
cortexa15_1          Waiting for client
c66xx_dsp1           Waiting for client
c66xx_dsp2           Waiting for client
cortex_m4_ipu1_c0    Waiting for client
cortexa15_0          Waiting for client
cortex_m4_ipu2_c1    Waiting for client
cortex_m4_ipu2_c0    Waiting for client
cortex_m4_ipu1_c1    Waiting for client

When the SysInternals Process Monitor was used to trace the file I/O performed by gdb_agent_console, in the failure case with a relative board data file then gdb_agent_console made some attempts to open C:\ti\ccs740\ccsv7\ccs_base\common\uscif\targetConfigs\testBoard_bh560usbm.dat, which failed with PATH NOT FOUND.

Using Processor Explorer to look at the working gdb_agent_console shows that the currently directory is set to c:\ti\ccs740\ccsv7\ccs_base\common\uscif\. I.e. the problem seems to be that at some point gdb_agent_console changes the working directory of the process away from that where it was started, leading to a failure to open a relative board data file given on the command line.

I think this may be the same issue for which DBGTRC-3927 was raised in the original thread, and a work-around for the defect could be to always specify an absolute path for the board data file.

The attached zip file contains the board data file used, and the Process Monitor capture for the failure cause with a relative board data file path. ccs740_gdb_agent_relative_path.zip

  • Chester Gillon said:
    Using Processor Explorer to look at the working gdb_agent_console shows that the currently directory is set to c:\ti\ccs740\ccsv7\ccs_base\common\uscif\. I.e. the problem seems to be that at some point gdb_agent_console changes the working directory of the process away from that where it was started, leading to a failure to open a relative board data file given on the command line.

    Chester, it does seem that gdb_agent_console is treating C:\ti\ccs740\ccsv7\ccs_base\common\uscif\ as the base directory for relative paths, no matter which directory
    the command was invoked from. I'll have to confirm with the experts whether this is intended behavior or a bug. Due to the holidays it may be until late next week or 
    early the week after before I can post an update. Thanks for your patience.

  • AartiG said:
    Chester, it does seem that gdb_agent_console is treating C:\ti\ccs740\ccsv7\ccs_base\common\uscif\ as the base directory for relative paths, no matter which directory
    the command was invoked from.

    I found that the gdb_agent_console from CCS 8.2.0.00005 under Linux with TI Emulators 8.0.27.9 has the same issue.

    gdb_agent_console was run under the native Eclipse debugger, with a breakpoint set on the chdir() function which shows that the TI_SDS::uEnvironment::SetWorkingDirectory() function which is in <ccs_install_root>/ccsv8/ccs_base/common/uscif/libgdb_agent_xds.so is changing the current working directory to be <ccs_install_root>/ccsv8/ccs_base/common/uscif:

    [The expression is the string which is passed to the chdir() function]

    I.e. this appears to be deliberate action within the libgdb_agent_xds.so to change the current working directory.

  • Chester,

    AartiG said:
    it does seem that gdb_agent_console is treating C:\ti\ccs740\ccsv7\ccs_base\common\uscif\ as the base directory for relative paths, no matter which directory the command was invoked from.

    I confirmed that this is how GDB agent works, ie it assumes CCS base path when resolving relative paths.