1. Overview
OpenSDA is an open-standard serial and debug adapter. OpenSDA bridges serial and debug communications between a USB host and an embedded target processor. The hardware circuit is based on a Freescale Kinetis K20 family microcontroller (MCU) with 128 KB of embedded flash and an integrated USB controller. OpenSDA features a mass storage device bootloader offering a quick and easy mechanism for loading applications such as flash programmers, run-control debug interfaces, serial to USB converters, and more.
Open-standard Serial Debug Adapter
- Supports SWD and JTAG debug protocols
- UART serial interface for virtual serial port
- Mass-storage bootloader used to load new applications into the OpenSDA
2. OpenSDA Hardware
OpenSDA is controlled by a Kinetis K20 MCU built on the ARM Cortex-M4 core. The Kinetis K20 includes an integrated USB controller and can operate at clock rates up to 50MHz. The OpenSDA circuit includes, at a minimum, a status LED and a pushbutton. The pushbutton asserts the Reset signal to the target processor (e.g. a microcontroller, digital signal controller, or a microprocessor) and can also be used to put OpenSDA into Bootloader mode. Signal connections are available for a UART serial channel. SPI and GPIO signals provide an interface to either a JTAG or an SWD debug port on a target processor. The OpenSDA circuit is powered when plugged into a USB Host. In some designs, the OpenSDA can also control the power supply of the target processor.
3. OpenSDA Software
OpenSDA software includes a flash-resident USB mass-storage device (MSD) bootloader and a collection of applications. The MSD Bootloader is consistent across all implementations of OpenSDA, but the available applications may vary from one hardware system to another. The following sections describe the MSD Bootloader and the applications which are generally supported by most Freescale evaluation hardware systems.
3.1. MSD Bootloader
The OpenSDA MSD Bootloader provides a simple interface for programming and loading OpenSDA Applications. The Bootloader appears as a removable drive with a volume label of “BOOTLOADER” in the Host operating system. An area of flash memory is reserved for one OpenSDA Application. Programming a new application is performed by copying an SDA file (s-record or raw binary file) to the BOOTLOADER drive, which implements a pseudo-FAT16 file system. Status information is provided through text files.
Bootloader Overview:
- Flash resident bootloader
- Mass-storage USB device—no custom host drivers required
- Simple copy/paste or drag/drop interface for programming an Application binary file into the flash of the OpenSDA MCU.
- Bootloader runs if there is no Application installed or if forced by user (Reset button pressed during power on) or host-side software (method depending on Application implementation)
3.2. P&E Debug Application
The P&E Debug Application is a run-control debug interface that controls the JTAG or SWD debug interface to the target controller/processor. It also provides a virtual serial port bridging a USB CDC device to a UART serial interface on the target device. Thus, it provides debugging and a serial port all in one application. Host drivers for this application are provided with several IDE toolchains such as CodeWarrior for Microcontrollers, IAR Embedded Workbench, and Keil MDK. Drivers are also available for download from P&E Microcomputer Systems at http://www.pemicro.com/opensda.
Application Overview:
- Controls the serial and debug interfaces to the target MCU
- P&E Multilink compatible debug interface with CDC virtual serial port (composite device)
- Transparently supported by the P&E’s UNIT library
- Supported by P&Es GDB Server
- Supported by P&Es NGS layer (used by IAR, Keil, Atollic, etc.)
Purpose:
- Traditional run-control debug interface that is supported by Freescale and Ecosystem Partner IDE tools.
3.3. MSD Flash Programmer
The Mass-Storage Device (MSD) Flash Programmer offers a very easy and convenient flash programming utility for programming applications into the flash of the target processor. Like the MSD Bootloader, the MSD Flash Programming Application emulates a FAT16 file system and enumerates as a mass-storage device. It appears as a removable drive in the Host operating system with a volume label that matches the board name (e.g. FRDM-KL25Z). Raw binary and Motorola S-Record files that are copied to the drive are programmed directly into the target memory device. This is most often the flash of the target microcontroller, but it could also be another memory device such as a serial flash depending on the specific implementation.
The MSD Flash Programmer also provides a USB CDC device that bridges serial communications between the USB Host and a UART serial interface on the target processor. The drivers required to install this USB CDC device on a Windows operating system are embedded within the pseudo file system of the MSD Flash Programmer itself. Therefore, there are no drivers to install. If Windows fails to find the drivers on its own, simple point the OS to the newly installed removable drive and the drivers will be copied from there. Board and flash programming operation status are also available in text files on the removable drive. The same files that are accessible in the MSD Bootloader are also presented in the MSD Flash Programming Application.
Application Overview:
- Closed source proprietary application
- Controls the serial and debug interfaces to the target MCU
- Mass-storage USB device providing a simple target MCU flash programmer and a virtual serial port (composite device)
Purpose:
- Simple interface for serial communications and reprogramming of the target MCU. Perfect for quick programming of example applications.
Note:
- Can be used to program off-board devices within the same product family as the on-board Target MCU
If you need more information concerning OpenSDA Debug Interface, you are looking for the corresponding software to run a demo or some information about the new board Freescale FRDM-KL25Z, embedding this new feature, please visit the KNODE Dedicated Page for the Freescale FRDM-KL25Z.