Los Frijoles
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
- 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:
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 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.