Can't start debug of P1022 with Codewarrior TAP

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

Can't start debug of P1022 with Codewarrior TAP

918 Views
cagataykaleliog
Contributor I

Hello,

We're trying to debug P1022 by using Codewarrior TAP probe (USB interface).

The error we get is "Can't reset the target. ELF is in unexpected STOP mode". 

I hope someone may have a suggestion to get rid of this error.

The board has a JTAG chain which a P1022 and a CPLD are connected to. JTAG diagnositics are OK. Both of the JTAG IDs are detected by debugger.

We probed HRESET and it remains in low state for about 2.2 seconds after we attempt to debug and then it returns to its high state. (JTAG reset is also asserted for several hundred miliseconds and then it returns to high state.)

P1022 boots from NAND flash. We attempt to debug while Linux is being loaded or after it is loaded. (We also tried to debug after we chose SD card as the boot device and took SD card out. We observed the same behaviour.) 

Linux uses one of the two cores. The Run/Pause LED on Codewarrior TAP is orange signalling a mixed state (One core runs and the other is in stop state).

Initialization file which is supposed to run before debug doesn't seem so. A sleep command we put at the beginning of the initialization script doesn't run.

Checkstop output is not asserted by the target during debugging. I guess this must be good.

P1022 doesn't have an RCW override option to try other configurations. Configuration pins of P1022 are driven by the subject CPLD at reset. We don't have programming access to the CPLD.

Do we need to use a JTAG configuration file to account for the CPLD which is in the same JTAG chain with the P1022?

(By the way, there is very little information about JTAG configuration files for multiple devices in the same chain. Since P1022 doesn't have an RCW override option, Codewarrior doesn't have a PreBoot Loader menu for P1022. So, we can't generate a JTAG configuration file automatically. JTAG configuration file's syntax is not given.)

There is not a "ccs_reset_to_debug" line in the CCS log. Does it mean that Codewarrior TAP doesn't attempt to reset the target?" 

The CCS log is as follows:

JTAG Diagnostics

 

Starting Power at Probe test ...

Test result: PASSED

 

Starting IR Scan test ...

Test result: PASSED

 

Starting Bypass Scan test ...

Test result: PASSED

 

Starting Arbitrary TAP State Move test ...

Test result: PASSED

 

Detected JTAG IDCODEs: OK

Device 0 IDCODE: 0x01805043Device 1 IDCODE: 0x068E601D

 

ccs_jtag_unlock

                serverh = 0

                cc = 0

                ccs_jtag_unlock; ccs_error = 0

ccs_config_chain

                serverh = 0

                cc = 0

                device_list: (size = 1)

                               device[0]:: core_type=mpc8572(102)

                ccs_config_chain; ccs_error = 0

ccs_get_config_chain

                serverh = 0

                device_list: (size = 3)

                ccs_get_config_chain; ccs_error = 0

ccs_get_config_chain

                serverh = 0

                device_list: (size = 3)

                               device[0]:: core_type=mpc8572(102)

                               device[1]:: core_type=Draco/m HIP8(53)

                               device[2]:: core_type=Draco/m HIP8(53)

                ccs_get_config_chain; ccs_error = 0

ccs_send_message

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                message = 3

                ccs_send_message; ccs_error = 0

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000988 0x00000000 0x00000000

                value: (size = 12)

                               00000000 00000000 F02C5A77

                ccs_in; ccs_error = -2147418097; duration=10 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000989 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=8 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x2000098a 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x2000098b 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x2000098c 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=4 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x2000098d 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x2000098e 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x2000098f 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000990 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000991 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=4 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000992 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000993 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000994 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000995 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=4 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000996 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=4 ms

                Error message: ELF is in unexpected STOP mode

ccs_in

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                ccs_io addr: (size = 4)

                               0x00000000 0x20000997 0x00000000 0x00000000

                value: (size = 12)

                               64650000 00000000 00000000

                ccs_in; ccs_error = -2147418097; duration=5 ms

                Error message: ELF is in unexpected STOP mode

ccs_read_register

                coreh = [serverh:0;cc_index:0;chain_pos:1]

                index = 287

                count = 1

                size = 4

                value: (size = 4)

                               3000A001

                ccs_read_register; ccs_error = -2147418097; duration=6 ms

                Error message: ELF is in unexpected STOP mode

ccs_reset_to_mixed

                chain_pos: (size = 3)      { 0 (halt) 1 (halt) 2 (halt) }

                ccs_reset_to_mixed; ccs_error = 39; duration=2815 ms

                Error message: Draco/m HIP8: ELF is in unexpected STOP mode

ccs_get_subcore_error

                serverh = 0

                cc = 0

                error = -2147483633

                chain_pos = 1

                ccs_get_subcore_error; ccs_error = 0; duration=2 ms

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

Best Regards,

Cagatay Kalelioglu

Labels (1)
0 Kudos
2 Replies

579 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Cagatay Kalelioglu,

HRESET exclusive to COP/JTAG header: problems arise when the core is reset and the debugger doesn’t know about it

Usually the debugger will report the processor can not be put into STOP mode.

Please refer to page 6 in the attached ppt,  the assumed logic should be

P1022_HRESET = JTAG_HRESET & BOARD_RESET

P1022_TRST = JTAG_TRST & BOARD_RESET


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

579 Views
cagataykaleliog
Contributor I

Hello Yiping Wang,

We found out that the cause of the problem was the lack of JTAG configuration file (Not a hardware issue like reset or anything).

JTAG diagnostics lists both of the devices in the JTAG chain, but it turned out that we still had to tell CodeWarrior IDE the device to be bypassed in the chain. The following command should be in the JTAG configuration file:

GENERIC <instruction register length> <bypass length> <bypass command> (i.e. "GENERIC 8 1 0xFF")

Fields of the above command are found in the BSDL file of the device to be bypassed.

I think the explanations about JTAG chains in the user guide of the CodeWarrior IDE  are not sufficient. The help file addresses the GENERIC command but the order of command parameters is misleading. 

Thank you for your help.

Have a nice day,

Cagatay Kalelioglu

0 Kudos