Custom JTAG chains in CW 11(.2.5)

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

Custom JTAG chains in CW 11(.2.5)

Jump to solution
1,281 Views
Joris_V
Contributor I

Hello all,

We have a custom LS1012A board with the processor itself and two Eth PHYs in a JTAG chain. Currently I use the CodeWarrior Development studio for QorIQ LS series - ARM V8 ISA (Version: 11.2.5).

My problem is that I cannot access the LS1012A from CodeWarrior (CW) with this custom JTAG chain active. I have not yet found a way in the documentation to specify a custom JTAG chain in CW such that I can debug (and program the flash memory through) the LS1012A. In previous CW versions we could specify a custom chain in a JTAG configuration file. Is this even possible (or necessary) in this CW version? And if not possible, will it be supported in the future?

Just to clarify, I am able to debug the LS1012A when I have physically bypassed the two Eth PHYs in the chain. We also are able to scan the custom chain correctly using third party JTAG tooling. So functionally the JTAG chain itself should not be the problem I think. However, this bypass would not be our desired solution.

Thanks in advance!

0 Kudos
Reply
1 Solution
1,029 Views
addiyi
NXP Employee
NXP Employee

First of all check in ccs devices visible in jtag check. For doing that open ccs console and execute:

source IDcode.tcl

<follow_to_indication>

You must see an output and there you must notice the IDCODE for SoC and the other devices. If you not see your devices that means there are not detected by teh JTAG.

In the next step you will edit the "Target Initialization File " and add your custom JTAG configuration. Note that the exemple is for LS2085.
At the end of the file, add (see attached image):

from session_launcher.base_launch import BaseLaunch
In the next step you will edit the "Target Initialization File " and add your custom JTAG configuration.
At the end of the file, add (see attached image):

from session_launcher.base_launch import BaseLaunch

class AdvancedLaunch(BaseLaunch):

    def run_board_initialization(self):
        run_init_file()

    def _configure_probe(self):
        super(AdvancedLaunch, self)._configure_probe()
        gdb.execute("monitor ctx id :ccs set prop jtag_chain <custom JTAG config>")

NOTE
This is a python code snippet, so please mind the PEP8 guide in using 4 spaces per indentation level, not tabs.
(See the attached image)

Example (only the last line added):
gdb.execute("monitor ctx id :ccs set prop jtag_chain LS2085A; Generic 4 1 0xf")

Note:
Each non-Freescale device used in a scan chain is declared as "Generic" and it takes the following three parameters:

    JTAG Instruction Length
    Bypass Command
    Bypass Length

The values for these three parameters are available in the device's data sheet or can be obtained from the manufacturer of the device.

After you changed the file, make sure you save it, then hit the "Connect(reset and execute target initialization script )" button.
You will be connected to the target and the chain will be configured.

class AdvancedLaunch(BaseLaunch):

    def run_board_initialization(self):
        run_init_file()

    def _configure_probe(self):
        super(AdvancedLaunch, self)._configure_probe()
        gdb.execute("monitor ctx id :ccs set prop jtag_chain <custom JTAG config>")

NOTE
This is a python code snippet, so please mind the PEP8 guide in using 4 spaces per indentation level, not tabs.
(See the attached image)

Example (only the last line added):
gdb.execute("monitor ctx id :ccs set prop jtag_chain LS2085A; Generic 4 1 0xf")

Note:
Each non-Freescale device used in a scan chain is declared as "Generic" and it takes the following three parameters:

    JTAG Instruction Length
    Bypass Command
    Bypass Length

The values for these three parameters are available in the device's data sheet or can be obtained from the manufacturer of the device.

After you changed the file, make sure you save it, then hit the "Connect(reset and execute target initialization script )" button.
You will be connected to the target and the chain will be configured.

Adrian

View solution in original post

2 Replies
1,030 Views
addiyi
NXP Employee
NXP Employee

First of all check in ccs devices visible in jtag check. For doing that open ccs console and execute:

source IDcode.tcl

<follow_to_indication>

You must see an output and there you must notice the IDCODE for SoC and the other devices. If you not see your devices that means there are not detected by teh JTAG.

In the next step you will edit the "Target Initialization File " and add your custom JTAG configuration. Note that the exemple is for LS2085.
At the end of the file, add (see attached image):

from session_launcher.base_launch import BaseLaunch
In the next step you will edit the "Target Initialization File " and add your custom JTAG configuration.
At the end of the file, add (see attached image):

from session_launcher.base_launch import BaseLaunch

class AdvancedLaunch(BaseLaunch):

    def run_board_initialization(self):
        run_init_file()

    def _configure_probe(self):
        super(AdvancedLaunch, self)._configure_probe()
        gdb.execute("monitor ctx id :ccs set prop jtag_chain <custom JTAG config>")

NOTE
This is a python code snippet, so please mind the PEP8 guide in using 4 spaces per indentation level, not tabs.
(See the attached image)

Example (only the last line added):
gdb.execute("monitor ctx id :ccs set prop jtag_chain LS2085A; Generic 4 1 0xf")

Note:
Each non-Freescale device used in a scan chain is declared as "Generic" and it takes the following three parameters:

    JTAG Instruction Length
    Bypass Command
    Bypass Length

The values for these three parameters are available in the device's data sheet or can be obtained from the manufacturer of the device.

After you changed the file, make sure you save it, then hit the "Connect(reset and execute target initialization script )" button.
You will be connected to the target and the chain will be configured.

class AdvancedLaunch(BaseLaunch):

    def run_board_initialization(self):
        run_init_file()

    def _configure_probe(self):
        super(AdvancedLaunch, self)._configure_probe()
        gdb.execute("monitor ctx id :ccs set prop jtag_chain <custom JTAG config>")

NOTE
This is a python code snippet, so please mind the PEP8 guide in using 4 spaces per indentation level, not tabs.
(See the attached image)

Example (only the last line added):
gdb.execute("monitor ctx id :ccs set prop jtag_chain LS2085A; Generic 4 1 0xf")

Note:
Each non-Freescale device used in a scan chain is declared as "Generic" and it takes the following three parameters:

    JTAG Instruction Length
    Bypass Command
    Bypass Length

The values for these three parameters are available in the device's data sheet or can be obtained from the manufacturer of the device.

After you changed the file, make sure you save it, then hit the "Connect(reset and execute target initialization script )" button.
You will be connected to the target and the chain will be configured.

Adrian

1,029 Views
Joris_V
Contributor I

Thank you Adrian!

The 'source IDcode.tcl' step in ccs reported merely two unrecognized devices (it was the IDcodes of the LS1012A and DAP shifted by 6 bits I think), as I presume that the ethernet PHYs don't support this JTAG instruction.

Just as a note to other people: make sure you also get the order of the JTAG chain correct or else you might get a somewhat unrelated error. My final solution was appending the following at the end of my target initialization file:

from session_launcher.base_launch import BaseLaunch
class AdvancedLaunch(BaseLaunch):
    def run_board_initialization(self):
        run_init_file()
    def _configure_probe(self):
        super(AdvancedLaunch, self)._configure_probe()
        gdb.execute("monitor ctx id :ccs set prop jtag_chain Generic 3 1 0x7; Generic 3 1 0x7; LS1012A")
0 Kudos
Reply