You copied the Doc URL to your clipboard.

How to use the SWJIM that comes with Cortex-M3 for a chip-level design

Article ID: 103489934

Published date: 24 Jul 2017

Last updated: -

Applies to: Cortex-M3

Problem/Question

How can I use the SWJIM which comes with Cortex-M3 for my chip-level design?

Scenario

This scenario is only for chip designers who have licensed the processor RTL for inclusion in their chip designs. The components referenced here are part of the RTL deliverable bundle delivered to RTL licensees.

Answer

The SWJIM (Serial Wire / JTAG Interface Manager) allows you to execute a sequence of debug accesses through a CoreSight DAP (Debug Access Port) during simulation.

ARM recommends that you run the example system that was delivered with your Cortex-M3 processor. This will help you gain familiarity with the processor and the debug and trace capabilities provided before you try to port this test capability to your chip-level test bench.

The Cortex-M3 example system provides some test programs containing both a 'C' program to run on the target processor and a DAP Macro Language (DAPML) program to run on the SWJIM in a combined '.cdapml' source file. It is straightforward to connect the SWJIM to the debug port on the boundary of your chip-level design, and to use the provided "cdapml" test programs as a starting point to build your own debug test.

Open your Cortex-M3 installation directory and perform a linux find: find . -name "*SWJ*"

You will find the SWJIM located under "./example/coresight/logical/SWJIM/". The procedure to use this module is already coded in the example design provided with the Cortex-M3 processor, located under './example/'.

The cdapml programs are located at "./example/Software/*.cdapml" under your top level Cortex-M3 (AT420... or AT425...) installation. In the 'example' directory, use: 'grep run_ex README' to see a quick list of example invocation of the 'run_example' script. You can find more information in the relevant chapter (Appendix A) of the Cortex-M3 Integration and Implementation Manual.

The 'run_example' script goes to the ./Software/ directory and runs 'make'. The Makefile includes a call to 'Crack_cdapml.pl' to split off the DAPML portion of the source code and copy it into ./coresight/tests/. (Or you could write your DAPML as a separate file and skip this step of splitting it out of a '.cdapml' source file.) It then goes to the ./coresight/tests/ directory and runs 'make' there. This Makefile runs the three conversion scripts to prepare the DAPML source into the executable format required by the components of the SWJIM. The SWJIM, the BST, and the DAPML language are documented in the PDF files located in ./coresight/doc'.

Workaround

No workaround.

Example

No example.

Related Information

None.

Was this page helpful? Yes No