C2000WARE: Launch.json for dual configuration

Part Number: C2000WARE
Other Parts Discussed in Thread: TMS320F28377D, UNIFLASH

The attached json file can build qrf_cpu01 or qrf_cpu02. Works fine. If source code is changed it also automatically uploads the binary. World is a happy place. But not for the qrf_dual configuration. 

Can I tweak the json to get same behaviour for both cpus?

Thanks

 

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "qrf_dualcore",
            "type": "ccs-debug",
            "request": "launch",
            "targetConfig": "${workspaceFolder}/qrf_cpu01/targetConfigs/TMS320F28377D.ccxml",
            "connections": [
                {
                    "name": "Texas Instruments XDS110 USB Debug Probe_0",
                    "cores": [
                        {
                            "name": "C28xx_CPU1",
                            "program": "${workspaceFolder}/qrf_cpu01/Debug/qrf_cpu01.out"
                        },
                        {
                            "name": "C28xx_CPU2",
                            "program": "${workspaceFolder}/qrf_cpu02/Debug/qrf_cpu02.out"
                        }
                    ]
                }
            ],
            "launchSettings": {
                "coresToLoadForProjectLaunch": [
                    "C28xx_CPU1",
                    "C28xx_CPU2"
                ]
            }
        },
        {
            "name": "qrf_cpu01",
            "type": "ccs-debug",
            "request": "launch",
            "projectInfo": {
                "name": "qrf_cpu01",
                "resourceId": "/qrf_cpu01"
            },
            "connections": [
                {
                    "name": "Texas Instruments XDS110 USB Debug Probe_0",
                    "cores": [
                        {
                            "name": "C28xx_CPU1",
                            "debuggerSettings": {
                                "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues>\n\n  <property id=\"Z1LINKPOINTER1\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1LINKPOINTER2\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1LINKPOINTER3\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1PSWDLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z1CRCLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z1OTPBOOTCTRL\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1GRABSECT\">\n    <curValue>3FFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1GRABRAM\">\n    <curValue>F000FFFF</curValue>\n  </property>\n\n  <property id=\"Z1EXEONLYSECT\">\n    <curValue>00007FFF</curValue>\n  </property>\n\n  <property id=\"Z1EXEONLYRAM\">\n    <curValue>000000FF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER1\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER2\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER3\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2PSWDLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z2CRCLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z2OTPBOOTCTRL\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2GRABSECT\">\n    <curValue>3FFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2GRABRAM\">\n    <curValue>F000FFFF</curValue>\n  </property>\n\n  <property id=\"Z2EXEONLYSECT\">\n    <curValue>00007FFF</curValue>\n  </property>\n\n  <property id=\"Z2EXEONLYRAM\">\n    <curValue>000000FF</curValue>\n  </property>\n\n  <property id=\"FlashFiles\">\n    <curValue></curValue>\n  </property>\n\n</PropertyValues>\n"
                            }
                        }
                    ]
                },
                {
                    "name": "Texas Instruments XDS110 USB Debug Probe",
                    "cores": [
                        {
                            "name": "C28xx_CPU1",
                            "debuggerSettings": {
                                "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues>\n\n  <property id=\"Z1LINKPOINTER1\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1LINKPOINTER2\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1LINKPOINTER3\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1PSWDLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z1CRCLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z1OTPBOOTCTRL\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1GRABSECT\">\n    <curValue>3FFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1GRABRAM\">\n    <curValue>F000FFFF</curValue>\n  </property>\n\n  <property id=\"Z1EXEONLYSECT\">\n    <curValue>00007FFF</curValue>\n  </property>\n\n  <property id=\"Z1EXEONLYRAM\">\n    <curValue>000000FF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER1\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER2\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER3\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2PSWDLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z2CRCLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z2OTPBOOTCTRL\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2GRABSECT\">\n    <curValue>3FFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2GRABRAM\">\n    <curValue>F000FFFF</curValue>\n  </property>\n\n  <property id=\"Z2EXEONLYSECT\">\n    <curValue>00007FFF</curValue>\n  </property>\n\n  <property id=\"Z2EXEONLYRAM\">\n    <curValue>000000FF</curValue>\n  </property>\n\n  <property id=\"FlashFiles\">\n    <curValue></curValue>\n  </property>\n\n</PropertyValues>\n"
                            }
                        }
                    ]
                }
            ],
            "launchSettings": {
                "coresToLoadForProjectLaunch": [
                    "C28xx_CPU1"
                ]
            }
        },
        {
            "name": "qrf_cpu02",
            "type": "ccs-debug",
            "request": "launch",
            "projectInfo": {
                "name": "qrf_cpu02",
                "resourceId": "/qrf_cpu02"
            },
            "connections": [
                {
                    "name": "Texas Instruments XDS110 USB Debug Probe_0",
                    "cores": [
                        {
                            "name": "C28xx_CPU2",
                            "debuggerSettings": {
                                "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues/>\n"
                            }
                        }
                    ]
                },
                {
                    "name": "Texas Instruments XDS110 USB Debug Probe",
                    "cores": [
                        {
                            "name": "C28xx_CPU1",
                            "debuggerSettings": {
                                "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues>\n\n  <property id=\"Z1LINKPOINTER1\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1LINKPOINTER2\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1LINKPOINTER3\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1PSWDLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z1CRCLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z1OTPBOOTCTRL\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1GRABSECT\">\n    <curValue>3FFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z1GRABRAM\">\n    <curValue>F000FFFF</curValue>\n  </property>\n\n  <property id=\"Z1EXEONLYSECT\">\n    <curValue>00007FFF</curValue>\n  </property>\n\n  <property id=\"Z1EXEONLYRAM\">\n    <curValue>000000FF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER1\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER2\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2LINKPOINTER3\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2PSWDLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z2CRCLOCK\">\n    <curValue>00000FFF</curValue>\n  </property>\n\n  <property id=\"Z2OTPBOOTCTRL\">\n    <curValue>FFFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2GRABSECT\">\n    <curValue>3FFFFFFF</curValue>\n  </property>\n\n  <property id=\"Z2GRABRAM\">\n    <curValue>F000FFFF</curValue>\n  </property>\n\n  <property id=\"Z2EXEONLYSECT\">\n    <curValue>00007FFF</curValue>\n  </property>\n\n  <property id=\"Z2EXEONLYRAM\">\n    <curValue>000000FF</curValue>\n  </property>\n\n  <property id=\"FlashFiles\">\n    <curValue></curValue>\n  </property>\n\n</PropertyValues>\n"
                            }
                        }
                    ]
                }
            ],
            "launchSettings": {
                "coresToLoadForProjectLaunch": [
                    "C28xx_CPU2"
                ]
            }
        }
    ]
}

  • Hi John,

    I'm not sure if you had the chance to look into the following webpage, but this is the documentation released by CCS team on the launch.json file.

    https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html#launch-configurations

    This should help with defining build configurations, debugger settings etc for dual core setups.

    Best regards,

    Ryan Ma

  • Yes Ryan, that was the link I used to create the Json. I did see one possible difference which was to add autoconnect, so I did that. Changed nothing...

    With my original config, if I choose the green triangle to qrf_cpu01, then everything is largely great. "Continue" starts at main, if I change some code and rebuild the code then that code uploads to cpu1. Meanwhile if I select the green triangle to qrf_cpu02 then ditto for the other other. But nothing at all happens when I choose qrf_dual -- for each core I need to go to "Run" and "Load Program". When I look at the below it really seems quite close to the TI example....

    {
    "version": "0.2.0",
    "configurations": [
       {
       "name": "qrf_dualcore",
       "type": "ccs-debug",
       "request": "launch",
       "targetConfig": "${workspaceFolder}/qrf_cpu01/targetConfigs/TMS320F28377D.ccxml",
       "connections": [
       {
          "name": "Texas Instruments XDS110 USB Debug Probe_0",
           "cores": [
          {
              "name": "C28xx_CPU1",
              "program": "${workspaceFolder}/qrf_cpu01/CPU1_FLASH/qrf_cpu01.out",
              "autoConnect": true
          },
          {
              "name": "C28xx_CPU2",
              "program": "${workspaceFolder}/qrf_cpu02/FINAL/qrf_cpu02.out",
              "autoConnect": true

          }]
       }
    ],
    "launchSettings": { "coresToLoadForProjectLaunch": [ "C28xx_CPU1", "C28xx_CPU2" ] }

    }]}

  • John - can you remove the launchSettings for the qrf_dualcore? That only applies to project debug launches.

  • I am specifically interested in debug launches. When I edit code for cpu1 and/or cpu2 then I want those cores to compile then  upload and leave me in a position to step through cpu1, and then once cpu1 has launched cpu2 I want to be able to step through cpu2. For *non* debug applications, I have no particular problem with the idea of uploading cpu1 and then uploading cpu2 on CCS, or using UniFlash. But for debugging I was hoping to get away from two separate calls to "Connect => Run => Load Program" .

  • What I have at the moment is a project qrf_cpu01 whose property "Debug" "knows about" cores C28xx_CPU1 and knows that cpu1 should only load flash to A-D and not erase E-N and the cpu1 runs to main on program restart while C28xx_CPU2 has auto-run disabled and knows not to erash flash A_D when it uploads into E-N. When I change source code on cpu1 then it automatically uploads, leaves cpu2 halted and then I can Run=>Upload cpu2 after which cpu2 is halted so then  I go to cpu1 and start it up and it releases cpu2 and then I go to cpu2 and click continue.

    I also have a project qrf_cpu2 which does the opposite: automatically loads cpu2 if it changes, etc, but wont load cpu1.

    What I want is qrf_dual that would (a) load one (or both) if either changed and (b) leave them in some usable state.

    In the grand scheme of things, I guess, it is the wait-boot that is so unsatisfying. How can I check that cpu1 can actually launch cpu2 if the only way to launch cpu2 is to click launch on the laptop. Sigh... But this last point has been raised often in this forum, so I wont start a new thread.... :-)