This tutorial was extracted from Erich Styger blog http://mcuoneclipse.wordpress.com with his agreement.
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
P&E has released information and firmware instructions for using the OpenSDA, see pemicro.com/opensda. Future has posted a very useful article about using OpenSDA here. So time to upgrade OpenSDA bootloader and firmware v10.1. My FRDM-KL25Z board is a pre-production board, and I assume the production boards expected next week will have the new firmware on it. But it is always useful to know how to change/upgrade the firmware, as I expect there will be new versions of it in the future.
OpenSDA
In the Freedom board, there is a Kinetis K20 (K20DX) which runs OpenSDA:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
Freedom Board
The OpenSDA is a firmware running on the K20 which runs a bootloader:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
OpenSDA Block Diagram
The bootloader is pre-programmed on the board, and is entered if pressing the SW1/Reset button on the Freedom Board. The booloader enumerates as MSD (Mass Storage Device, like a USB Memory stick). Using that bootloader different applications are programmed on the board. These OpenSDA applications are files with *.SDA extension.
Note: I believe the only way to change the OpenSDA Bootloader itself is using the JTAG connector for the K20, although I have not seen the sources or project for it. According to the Freedom production board pictures on Element14, this JTAG header is *not* populated on the board. But adding that JTAG header should not be a big deal if needed.
The P&E firmware includes two different applications:
- DEBUG_APP_*.SDA: this enables OpenSDA to act as a debugging interface (similar to what OSBDM does).
- MSD-<board>*.SDA: Application which turns the board into an MSD (Mass Storage Device, like a USB memory stick). This MSD application can be used to program different application to the target chip, see here. With this bootloader loaded, it is possible to program S19 files to the target processor. Element14 has published a set of such files here.
Downloading the new firmware
Downloading the new OpenSDA firmware package from the P&E OpenSDA site gives me these files:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
OpenSDA Firmware package
As explained above, there is one generic debug SDA application, plus three MSD applications which allow me to program the target processor with S19 applications. The MSD applications depend on the target processor to be programmed.
Programming OpenSDA firmware
To program an new OpenSDA *.SDA application is simple:
1. Press the reset/SW1 button on the Freedom board while powering the board (plugging in the K20 USB connector).
2. The green LED near the K20 starts blinking
3. The K20 enumerates as MSD device and is named ‘Bootloader’:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
Enumerated Bootloader
4. Simply drag&drop or copy the *.SDA application file to the Bootloader device to program it to the board:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
drag and drop new SDA application file
5. Re-power the board, and now the new SDA application is running
OpenSDA Debug Application
In case of the DEBUG_APP_*.SDA, the OpenSDA acts as a debug interface for example supported in CodeWarrior for MCU10.3. The beta is expected to be out very soon.
This applications enumerates as debug interface and offers a USB CDC mode:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
OpenSDA Debug Devices in Windows Device Manager
The OpenSDA Debug connection is offered as a choice in the CodeWarrior New Project wizard:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
OpenSDA Debug Connection in CodeWarrior
Using the OpenSDA connection in the debugger is very similar to any of the P&E run control devices:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
OpenSDA in Eclipse Debug Launch Configuration
OpenSDA Application Bootloader
If using the OpenSDA MSD (e.g. MSD-FRDM-KL25Z_v103_Pemicro.SDA for the Freedom Board), then I can simply program S19 files to the target board. Element14 already has such S19 files available here:
<html><head><title>Jive SBS</title></head>
<body><font face="arial,helvetica,sans-serif">
<b>Error</b><br><font size="-1">
An general error occurred while processing your request.
</font></font></body></html>
Element14 SREC files for OpenSDA
Like above: press SW1 while power-on, and then simply copy the SREC file to the bootloader and reset the board. Simple as that.
I expect that there will be a growing community providing such SREC files. For sure I will offer my applications that way as well.