Customizable Flash Programmer User Guide

ID 683271
Date 4/28/2023
Public
Document Table of Contents

3.3.1. TCL Script Structures

The TCL script is designed to be extensible. The script is consisting of the following:

  • Main script (customizable_programmer.tcl)—This script contains the global variables, common functions, and user settings. You can execute this script using the System Console to program the .rpd file to the flash.
  • Extended script—This script stores the third-party flash commands. You may duplicate the sample script for other third-party flash devices. For example, programming NVCR for Micron flash and storing all Micron flash-specific functions using the micon_mt25q.tcl script. The cypress_s25fs_s.tcl script stores S25FS-S flash-specific functions.

Some examples of calling flash-specific functions are as follows:

  • Source the extended script (micron_mt25q.tcl) in the main script (customizable_programmer.tcl).
    Figure 5. Example of Sourcing an Extended Script in the Main Script
    Figure 6. Example of Flash-Specific Commands in the Extended Script
  • Call the clear_flag_status_register function in the main script using the following command.
    micron_mt25q::clear_flag_status_register