Programming Eterna Devices

The 

On-Chip Software Development Kit

 is designed to support all versions of SmartMesh IP products sold by Linear Technology. There are three product versions available, plus evaluation kit devices, as follows:

DC90xx evaluation modules are sold with default product software pre-loaded.  The LTP590x product modules are normally sold unprogrammed.  Both targets can be reprogrammed with custom applications built with this SDK.

The DC9003 and DC9018 can be programmed via USB by attaching them to the DC9006 Eterna Interface Card found in the starter kits.

In order to program chip and module products, your board must contain a 5x2 programming header as described in the Eterna Hardware Integration Guide. The Eterna chip/module can then be programmed using ESP via a DC9004A programming adapter connected to a DC9006, or by using a DC9010 Eterna Serial Programmer.  

More information can also be found in the Eterna Eval/Dev Board Set Users Guide.


Note that the DC9004A is now bundled with the DC9006 - if you purchased a DC9006 or an evaluation kit containing a DC9006 prior to its inclusion, contact Linear sales to obtain a DC9004A.

Eterna Serial Programmer Utility

The

Eterna Serial Programmer

 Utility is used to program any of the Eterna devices listed above with your custom application. This section documents how to use it in the context of the 

On-Chip Software Development Kit

.

Download the 

Eterna Serial Programmer

 utility:

  • The zip file contains two files: the ESP.exe and ftcspi.dll
  • For simplicity, place those files in the same directory as the binaries to be loaded onto the device.
  • Detailed information on how to use this tool is available in the 

    Eterna Serial Programmer Guide

Download the required software components binaries available at the following location. The memory map of the Eterna device is separated into four sections as follows;

  • The Fuse Table (includes board support parameters) with file name FT-XXXX.bin at address 0
  • The Partition Table with file name mote_part_rXXXXXX.bin at address 800
  • The Application program (developed with the 

    On-Chip Software Development Kit

    ) at address 1000
  • The Loader with file name loader_X_X_X_X_oski.bin at address 77800

If programming any board level module such as the LTP5901-IPMA or the DC9003A, use the existing Fuse Table files provided in the SmartMesh Software zip in your MyAnalog account. 

If programming on a custom made board using the QFN LTC5800-IPM, you will be responsible for creating your own custom Fuse Table file.

  • Refer to the Board Specific Integration Guide for instruction on how to create fuse tables for custom hardware or modify existing ones. Custom hardware always requires a custom fuse table to properly calibrate the 20 MHz crystal and configure the GPIOs for optimal power usage.

Normally when programming a mote via JTAG in the IAR toolchain, only the main binary is erased. If you accidentally erase a board, or are starting with an un-programmed custom board, you will need to replace the loader, partition table, and fuse table binaries before programming the main application using JTAG.


To program a device, open a Windows command prompt and navigate to the directory containing the 

Eterna Serial Programmer

 and the binaries. You will now reprogram the 

SmartMesh mote

s one-by-one.

The

Eterna Serial Programmer

allows you to list the devices connected to you computer, and select which one to reprogram (see the

Eterna Serial Programmer Guide

). For simplicity, however, we recommend you connect a single device during this procedure.

The procedure below erases the flash contents of your devices. Refer to the

Eterna Serial Programmer Guide

for optional backup instructions. 

For each 

SmartMesh mote

, follow these steps:

  1. Disconnect all devices from your computer.
  2. Connect the 

    SmartMesh mote

     to your computer.
  3. Switch the 

    SmartMesh mote

     on.
  4. In your Windows Command Prompt, issue the following commands. <<main executable>> is the main executable .bin file (not the ELF file which typically has the extension .exe or .out).

    ESP.exe -E
    ESP.exe -P FT-XXX.bin 0
    ESP.exe -P mote_part_rXXXXXX.bin 800
    ESP.exe -P <<main executable>>.bin 1000
    ESP.exe -P loader_X_X_X_X_oski.bin 77800
  5. Open the serial terminal on the 

    SmartMesh mote

    's CLI port and verify that you get the correct banner.
  6. Switch the 

    SmartMesh mote

     off.
  7. Disconnect the 

    SmartMesh mote

     from your computer.

To be able to fully reprogram devices quickly, you can create a .bat script on Windows, containing the commands above. Simply double-clicking on it will execute each command, removing the need for you to type them one-by-one.

This procedure writes the complete contents of flash memory. When developing, we recommend you follow the steps above once, then replace the main executable using IAR, as detailed in the Explore Sample Applications section. This will allow you to use IAR's debugging capabilities, such as a breakpoints and live watch.