MSPM0L1306: Debug CCXML with SWD Password

Part Number: MSPM0L1306
Other Parts Discussed in Thread: MSPM0G3507

Tool/software:

Hello,

I have a project configured for SWD access with password.

I have the .ccxml file in the project defined with the JTAG password:

But the launch.json doesn't seem to reference this file, and when I connect it gives me a DAP error while trying to connect.

How do I get CCS to use the ccxml file I specified?

{
            "name": "empty_LP_MSPM0L1306_nortos_ticlang",
            "type": "ccs-debug",
            "request": "launch",
            "projectInfo": {
                "name": "empty_LP_MSPM0L1306_nortos_ticlang",
                "resourceId": "/empty_LP_MSPM0L1306_nortos_ticlang"
            },
            "connections": [
                {
                    "name": "Texas Instruments XDS110 USB Debug Probe",
                    "cores": [
                        {
                            "name": "CORTEX_M0P",
                            "debuggerSettings": {
                                "data": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n<PropertyValues>\n\n  <property id=\"FlashEraseSelection\">\n    <curValue>Erase MAIN and NONMAIN memory (see warning above)</curValue>\n  </property>\n\n</PropertyValues>\n"
                            }
                        }
                    ]
                }
            ]
        },

  • Hi Munan,

    For project debug sessions (as oppose to project-less ones) CCS implicitly uses the ccxml file located in the project's targetConfigs folder. In your case it is empty_LP_MSPM0L1306_nortos_ticlang/targetConfigs/MSPM0L1306.ccxml

    If you select  MSPM0L1306.ccxml and press "Start Project-less Debug" from the context menu, it should add something like this to the launch.json:

    {
                "name": "MSPM0L1306.ccxml",
                "type": "ccs-debug",
                "request": "launch",
                "targetConfig": "${workspaceFolder}\\empty_LP_MSPM0L1306_nortos_ticlang\\targetConfigs\\MSPM0L1306.ccxml"
    }
     
    Michael
  • Hi Michael,

    The thing I'm not getting is that with the ccxml in the project it's not actually sending the SWD password on JTAG connection so I get debug access port errors.

    I have to manually use the script menu to get it to send the password. Why is the SWD password not being sent if it's configured in the CCXML?

    Munan

  • I see. Our engineering team will investigate. Does it work if the ccxml file is not in the project? Also, what's CCS version where you see this issue? Do you know if this ever worked in previous versions?

  • Hi Michael,

    I thought the project-less debug ccxml worked, but I just tried launching a project-less debug session with the same ccxml after resetting the launchpad and it gives me the same error message of not being able to connect to the target.

    I can again manually call the script to send the password and then the debugger will connect.

    I am on CCSv 20.2.0.12_1.8.0

    And I thought the SWD password worked in a previous CCSv20 release but now I'm not sure if I was lucky because I didn't reset, or if it actually worked. 

    Munan

  • I have the same issue with MSPM0G3507.

    Is this a bug with CCS 20.2.0?

    Robert

  • Hey Folks,

    I saw this app note:

    Realization of Password-Protected Debug Based on Software

    But it looks like there's no actual linked gel script in this app note.

    Can we get a clarification on what's in these gel scripts?

    Munan

  • Hi Munan,

    We usually call the script manually to access the password protected MCU.

    We haven't tried to auto call the script or modified the .ccxml to realize the same function automatically.

    From my understanding, .ccxml modification is not workable in CCS  which I think STDO will look into.

    I am on personal leave, and can take a look after I am back to office.

    Anyway, have you tried to input the password in interface window?

    And have you tried to modify the gel script?

    Regards,

    Zoey

  • Hi Zoey,

    According to my experiments these days, CCS 20.2 will not use the passwords in "Device Properties" automatically. For a password locked device, I have to do several steps to load a program.

    1. Right-click on MSPM0G3507.ccxml and select popup menu item "Start Project-less Debug". This will start a debug session but not connected.

    2. Open "menu > View > GEL Files". This seems the only way to populate "hotmenu" functions from mspm0g3507.gel to "menu > Scripts > MSPM0G3507_Commands".

    3. Click on menu > Scripts > MSPM0G3507_Commands > MSPM0_Mailbox_DebugAccessPasswordAuthentication_Auto. This will unlock the device.

    4. Close current debug session.

    5. Start a new Project Debug session to load program.

     

    There are two issues here.

    1. The input password in MSPM0G3507.ccxml file is not automatically used when a project debug session is started.

    2. The GEL commands are not loaded automatically into "menu > Scripts".

    Hope that these issues can be fixed in next CCS release.

    Robert.