element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Getting up and running with Arm Design Start, Debugging the ARM Cortex M1 and M3
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: adamtaylorcengfiet
  • Date Created: 16 Jun 2019 1:57 PM Date Created
  • Views 1116 views
  • Likes 1 like
  • Comments 0 comments
  • xilinx_explore
  • xilnx
  • arm m3
  • fpga
  • arm m1
Related
Recommended

Getting up and running with Arm Design Start, Debugging the ARM Cortex M1 and M3

adamtaylorcengfiet
adamtaylorcengfiet
16 Jun 2019
We have previously explored how to create the Arm Cortex M1/M3 hardware design in Vivado and how to build and run a SW when using a Xilinx FPGA. However, not every application works perfectly first time, this is where debugging comes in. In this blog we are going to examine how we can debug the Arm Cortex M1 and Cortex M3 cores, when the need arises.  There are two ways to do this, using the Arm DAP link board which uses Serial Wire Debug (SWD) or using a JTAG debugger such as a Segger J-Link

 

As I happen to have a Segger J-Link for this example I will be using a JTAG debug approach, however both approaches are very similar.

This means we have two JTAG links connected to our Arty, the first is the USB-JTAG link which configures the FPGA with its bitstream, the second my Segger J-Link. Unfortunately, the USB-JTAG is incapable of accessing the Arm Cortex M1/M3 debug interfaces, instead its debug pins are broken out to allow for external SWD or JTAG.

 

When we want to use JTAG for debugging the pin are broken out on the Arty board to both PmodC and the Shield Connector.

 

The pins are

• TMS - Shield IO-40

• TCL - Shield IO-41

• nTRST - PmodC Pin 1

• TDI - PmodC Pin 2

• TDO - PmodC Pin 3

 

Knowing the pin out of the Segger J-Link, we can use jumper cables to connect between the J-Link and the Arty A7.

image

The connections between the J-Link and the Arty can be seen as below, you should also connect the J-link to GND and VTref to the PmodC power pin.

 

image

 

To use the J-Link within the Arm Keil environment we need to configure the target options, we can do this by right clicking on the top level of the project and selecting options for Target 'm3_for_arty_a7'

image

 

 

This will open a dialog box, we can select the JLink and configure the debugger as shown below

image

 

If we need to, we can further customize the J-Link set up, this enables us to change JTAG frequency and select if we desire to download the application to flash or not. In this case we do not want to download to the application to flash.

 

image

 

image

 

Once both the debugger has been configured and connects to the ARM Cortex M1 / M3 core we are able to start a debugging session.

We can do his using the Debug menu and start a session.

 

image

 

This will open the debugging view, which enables us to see the source and disassembly and importantly the call stack and registers.

image

We can now set breakpoints, inspect variable values and continue with debugging our application. It is also possible to inspect the system tick timer directly when debugging.

image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Following these steps enables us to quickly and easily get going when we want to debug our Arm Cortex M1 and M3 solutions.

 

NOTE before you can connect to the Arm Cortex-M3 the FPGA must be configured with one. Arm Keil does not download the bitstream configuration

 

See other blogs on the Arm Cortex Design Start

• Creating the hardware design

• Creating the application SW

Read my other blogs and projects at the MicroZed Chronicles and Hackster.io

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube