Can't connect CCS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't connect CCS

Jump to solution
6,589 Views
jasonhendrix
Contributor V

I'm trying to connect to the LS1021ATWR dev board with Code Warrior for QorIQ 10.0.8 and the TAP.  I keep getting the following error:

 

CCSProtocolPlugin::Can't connect to CCS

 

The CCS.exe is running according to task manager, and has opened port 41475 according to netstat.  I'm running on Windows 8.1, 64-bit.

 

I can access the probe's serial configuration interface through USB/serial.  If I configure an ethernet HW connection instead of USB, I get the same error.  Any suggestions on bringing the CW debugger and CCS together in harmony?

Labels (1)
0 Kudos
Reply
1 Solution
4,494 Views
addiyi
NXP Employee
NXP Employee

You are using Rev2, so it's not necessary to use steps from "Information about processor revision 1".

Check the switches on your to use jtag and not CMSIS-DAP (SW2.8 = 1), then perform following steps in ccs and provide the output:

(bin) 51 % config cc cwtap

(bin) 52 % show cc

0: CodeWarrior TAP (cwtap) CC software ver. {0.0}

(bin) 53 % ccs::config_chain {ls1020a dap sap2}

(bin) 54 % display ::ccs::get_config_chain

Chain Position 0: LS1020A

Chain Position 1: CoreSight ATB Funnel

Chain Position 2: CoreSight TMC

Chain Position 3: CoreSight TMC

Chain Position 4: CoreSight TMC

Chain Position 5: CoreSight CTI

Chain Position 6: CoreSight CTI

Chain Position 7: CoreSight CTI

Chain Position 8: CoreSight ATB Funnel

Chain Position 9: Cortex-A7

Chain Position 10: Cortex-A7 PMU

Chain Position 11: Cortex-A7

Chain Position 12: Cortex-A7 PMU

Chain Position 13: CoreSight CTI

Chain Position 14: CoreSight CTI

Chain Position 15: Cortex-A7 ETM

Chain Position 16: Cortex-A7 ETM

Chain Position 17: DAP

Chain Position 18: SAP2

(bin) 55 % ::ccs::all_run_mode

CortexA7: Execute Mode

CortexA7: Reset Mode

Adrian

View solution in original post

0 Kudos
Reply
15 Replies
4,493 Views
jasonhendrix
Contributor V

Thanks for the help, Adrian.  I can download and step through my program now.  The final steps for me were to restore the debug configuration back to the default config.  I still had it set with the JTAG config file for rev 1.  I don't know why I couldn't connect when I first created my project and tried to debug.  If it had, I wouldn't have learned all this great stuff.  I would summarize my lessons learned like so:

* If you're using rev 2 of the LS1021A process on the LS1021A-TWR dev board, the default debug configuration should work

     * I tested this with projects for both DDR and OCRAM.

* You can use Window's Resource Monitor to verify that CCS is up and has a TCP connection to the TAP

* The TAP OS is also useful - connect to it via telnet or serial over USB

* The CCS console is useful and can be accessed by right-clicking on the icon in the system tray.

Thanks again.

0 Kudos
Reply
4,492 Views
jasonhendrix
Contributor V

Still can't connect to CCS.

I updated the probe OS. findcc now recognizes the probe tip, though it does call it a Cortex-10 tip.

pastedImage_0.png

pastedImage_1.png

0 Kudos
Reply
4,495 Views
addiyi
NXP Employee
NXP Employee

You are using Rev2, so it's not necessary to use steps from "Information about processor revision 1".

Check the switches on your to use jtag and not CMSIS-DAP (SW2.8 = 1), then perform following steps in ccs and provide the output:

(bin) 51 % config cc cwtap

(bin) 52 % show cc

0: CodeWarrior TAP (cwtap) CC software ver. {0.0}

(bin) 53 % ccs::config_chain {ls1020a dap sap2}

(bin) 54 % display ::ccs::get_config_chain

Chain Position 0: LS1020A

Chain Position 1: CoreSight ATB Funnel

Chain Position 2: CoreSight TMC

Chain Position 3: CoreSight TMC

Chain Position 4: CoreSight TMC

Chain Position 5: CoreSight CTI

Chain Position 6: CoreSight CTI

Chain Position 7: CoreSight CTI

Chain Position 8: CoreSight ATB Funnel

Chain Position 9: Cortex-A7

Chain Position 10: Cortex-A7 PMU

Chain Position 11: Cortex-A7

Chain Position 12: Cortex-A7 PMU

Chain Position 13: CoreSight CTI

Chain Position 14: CoreSight CTI

Chain Position 15: Cortex-A7 ETM

Chain Position 16: Cortex-A7 ETM

Chain Position 17: DAP

Chain Position 18: SAP2

(bin) 55 % ::ccs::all_run_mode

CortexA7: Execute Mode

CortexA7: Reset Mode

Adrian

0 Kudos
Reply
4,496 Views
jasonhendrix
Contributor V

SW2.8 = 1, here is my CCS output:

(bin) 44 % config cc cwtap

(bin) 45 % show cc

0: CodeWarrior TAP (cwtap) CC software ver. {0.0}

(bin) 46 % ccs::config_chain {ls1020a dap sap2}

(bin) 47 % display ::ccs::get_config_chain

Chain Position 0: LS1020A

Chain Position 1: CoreSight ATB Funnel

Chain Position 2: CoreSight TMC

Chain Position 3: CoreSight TMC

Chain Position 4: CoreSight TMC

Chain Position 5: CoreSight CTI

Chain Position 6: CoreSight CTI

Chain Position 7: CoreSight CTI

Chain Position 8: CoreSight ATB Funnel

Chain Position 9: Cortex-A7

Chain Position 10: Cortex-A7 PMU

Chain Position 11: Cortex-A7

Chain Position 12: Cortex-A7 PMU

Chain Position 13: CoreSight CTI

Chain Position 14: CoreSight CTI

Chain Position 15: Cortex-A7 ETM

Chain Position 16: Cortex-A7 ETM

Chain Position 17: DAP

Chain Position 18: SAP2

(bin) 48 % ::ccs::all_run_mode

CortexA7: Execute Mode

CortexA7: Execute Mode

(bin) 49 %

0 Kudos
Reply
4,496 Views
addiyi
NXP Employee
NXP Employee

It looks fine. Now, please create a new Bareboard project, make sure Board type is LS1021ATWR, build the project. Open the ccs console and enter log v command, then try to debug the project and provide the ccs log. Also, if you get Can't connect to ccs error at first attempt, try again (I saw "Can't connect to ccs" happens at first attempt).

Adrian

0 Kudos
Reply
4,496 Views
jasonhendrix
Contributor V

I won't post the log output because it's copious, but more importantly, I hit the breakpoint in main in the new bareboard project.  I'll pull at that thread a little bit.

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

Here's some evidence that the TAP probe is attached and alive:

pastedImage_0.png

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

Still can't connect to CCS.

One last bit of info - the CCS Log:

ccs_open

  ipaddr = 127.0.0.1

  port = 41475

  timeout = 60

  serverh = 0

  ccs_open; ccs_error = 0

ccs_get_connection_count

  serverh = 0

  count = 1

  ccs_get_connection_count; ccs_error = 0

ccs_available_connections

  serverh = 0

  count = 0

  ccs_available_connections; ccs_error = 0

ccs_available_connections

  serverh = 0

  count = 0

  ccs_available_connections; ccs_error = 0

ccs_config_cc

  serverh = 0

  config_string = cwtap:0

  ccs_config_cc; ccs_error = 0

ccs_available_connections

  serverh = 0

  count = 1

  ccs_available_connections; ccs_error = 0

ccs_cc_version

  serverh = 0

  cc = 0

  version.major = 0

  version.minor = 0

  ccs_cc_version; ccs_error = 0

ccs_set_timeout

  serverh = 0

  timeout = 60

  ccs_set_timeout; ccs_error = 0

ccs_get_config_chain

  serverh = 0

  device_list: (size = 0)

  ccs_get_config_chain; ccs_error = 0

ccs_config_server

  serverh = 0

  cc = 0

  server_config = 0

  value = 10000

  ccs_config_server; ccs_error = 0

ccs_config_chain

  serverh = 0

  cc = 0

  device_list: (size = 4)

  device[0]:: core_type=Generic Device(0); device_descr=[ir_length:8;dr_bypass_length:1;bypass_instruction:0xFF,0x00,0x00,0x00]

  device[1]:: core_type=LS1020A(273)

  device[2]:: core_type=DAP(232)

  device[3]:: core_type=SAP2(272)

  ccs_config_chain; ccs_error = 0

ccs_get_config_chain

  serverh = 0

  device_list: (size = 4)

  ccs_get_config_chain; ccs_error = 0

ccs_get_config_chain

  serverh = 0

  device_list: (size = 4)

  device[0]:: core_type=Generic Device(0)

  device[1]:: core_type=LS1020A(273)

  device[2]:: core_type=DAP(232)

  device[3]:: core_type=SAP2(272)

  ccs_get_config_chain; ccs_error = 0

ccs_available_connections

  serverh = 0

  count = 1

  ccs_available_connections; ccs_error = 0

ccs_delete_cc

  serverh = 0

  count = 0

  ccs_delete_cc; ccs_error = 0

ccs_close

  serverh = 0

  ccs_close; ccs_error = 0

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

I figured out how to add an initialization script for the Initialization and Memory tabs (click in the table cell in the right-most column in the "core" row. see attached picture).  No change in the ccs connection problem, however.

pastedImage_0.png

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

From the CCS console, I can sorta add a command converter, but trying to debug from CW removes the command converter:

pastedImage_0.png

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

Still getting the error "Can't connect to CCS Server".  But I did find the CCS console and it claims the connection was opened momentarily and then closed.  I'll try attaching a picture:

pastedImage_0.png

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

Thanks for the response.  Unfortunately, I can't perform step  7, because:

"/LS102xA_Rev1_ConfigChain.cfg/LS1021A/C...Initialize target script is undefined."

That's the message that appears at the top of the "Hardware or Simulator Target" window as soon as I select the "Initialize Target" checkbox in the Initialization tab or the "Memory Configuration" checkbox in the Memory tab.

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

See post below for solution to the "script is undefined" problem.  You have to click in the table cell for the core and the script and then you will get a browse button.

0 Kudos
Reply
4,495 Views
addiyi
NXP Employee
NXP Employee

Please refer to bolow section from LS1021A_TWR_README.txt:

Information about processor revision 1

#--------------------------------------------#

To debug a target with this processor revision you must use the CFG file "LS102xA_Rev1_ConfigChain.cfg" that can be found at the location

[CW install path]/ARMv7/ARM_Support/Configuration_Files/jtag_chains/. This file will be imported following the next steps:

1. Open "Debug Configurations..." and select your project;

2. Click on the "Edit..." button which can be found next to the drop list called "Connection" from the "Target Settings" view;

3. Click on the "Edit..." button which can be found next to the drop list called "Target";

4. Click on the "Edit..." button which can be found next to the drop list called "Target type";

5. Click "Import..." and then "File System..." and select the file specified above and then click OK until you return

to "Hardware or Simulator Target" window;

6. Select in the "Hardware or Simulator Target" window the initialization and memory files from the project;

7. Click OK until you return to "Debug Configurations..." window and click "Debug".

Adrian

0 Kudos
Reply
4,495 Views
jasonhendrix
Contributor V

Am I using processor rev 1?  How do I tell?  Here is the U-boot banner from my dev-kit:

pastedImage_0.png

0 Kudos
Reply