Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Programming and debugging a bare arm microcontroller

Status
Not open for further replies.

Los Frijoles

Full Member level 1
Full Member level 1
Joined
Oct 5, 2006
Messages
98
Helped
9
Reputation
18
Reaction score
5
Trophy points
1,288
Location
Provo, Utah, United States
Visit site
Activity points
2,252
I've been messing around with a teensy 3.1 and I really like the power that the embedded ARM cores lends to projects that would normally use a "standard" microcontroller such as an AVR or PIC. I've been working on an idea for a project of mine and when considering the processor I want to use, the idea of an ARM processor came to mind.

Most of the microcontrollers I have used have some sort of proprietary interface that is more or less well documented, but require a special programmer to use. The teensy 3.1 uses a special bootloader that appears as a usb device and is programmed that way (I believe the maker called it the "Half Kay" bootloader, his own design). From what I've gathered, most ARM processors can be programmed and debugged via JTAG.

My general development process has involved breadboards, but now it seems that I will need to create a breakout board of sorts with the supporting hardware and other interesting things on it for development. I have confidence that I can successfully construct the electrical portion of this board, but I'm unsure of how to set up the board so that I can program the arm controller on the bare-metal (i.e. no special bootloader (other than the one that would be needed to start up the program), no underlying os...bare metal).

I know that at a minimum I would need to expose the JTAG interface along with a couple other pins that act as mode switchers for the processor (many of them seem to have a pin that switches between debug mode and boundary scan mode).

My questions are as follows:
  • Is exposing the JTAG interface all I would need electrically?
  • Where in the world can I find a dirt cheap JTAG cable? All the ones I can find myself are prohibitively expensive for my budget (my budget for the cable is $0-$40). Even a 9-pin serial interface is ok, so long as I can get it to work with Linux.
  • Is there software available for using JTAG on linux? I use linux exclusively, but part of the problem here is that I don't even know exactly what I am searching for.
  • I have (and have used) all the required build tools for creating binary files for ARM processors installed, but how would I go about using a JTAG interface to load one on? I assume boundary scan is used and one writes the hex file to the memory, but what I'm asking is if there are automated tools for this for linux.

For reference, I'm going to probably be using the same or a very similar microcontroller to that found on the Teensy 3.1 because I know it best from bare metal (I've done more on my raspi, but that's not bare metal). I believe its a Freescale Kinetis K20 series MK20DX128. There's plenty of documentation (~2000 pages), but the sheer volume is making it hard to find things without knowing where to start.

Basically, it comes down to if I can't get the controller to interface nicely to my Linux machine, I'll probably just go for a rather high powered AVR instead. I know that's a hurdle because many companies really only support Windows, but I've recently seen that many pieces of software from some large companies are also able to be run on Linux quite well, along with some or all of their drivers (Xilinx and Altera come to mind on this).

Thanks in advance for any advice or help.
 

Most ARM uC expose the JTAG for debugging purposes, some cores like cortex-m0 have only SWD and these two interfaces give you full debugging posibility. Beside the JTAG or SWD the chips have also bootloaders which can only be used for program download using some common peripherials like UART or SPI or USB and ethernet in more advanced chips.
On the market there are many interfaces that support both debugging interfaces. At the price 40$ you can surely find one that supports both JTAG and SWD.
On linux machine you can use openocd in conjunction with ecllipse to develop and debug aplications, arm version of gcc as compiler.
There are also windows versions available. I used these tools with STM32, Kinetis L and am3352 uC without any problems.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top