Project Description

Introduction

Generate projects from the command line: fast, repeatable, and ready for automation and production.

Overview

    •  Creates FlashRunner project files (.prj) without using the GUI
    •  It reads the device database (Devices.smh), selects the correct driver
       and protocol, and builds the project by combining defaults with user
       overrides

    •  It is designed for scripting and automation: ideal for batch scenarios
        (e.g., production) where speed, consistency, and integration into
        existing workflows matter

Quick start

    •  Choose the device (part number) and channels
    •  Add optional overrides
    •  Generate to a file or to STDOUT

fr_prjGenerator.exe -device MT25QL512 -c 1,2,3,4 -filename STDOUT

What is it

fr_prjGenerator is a command-line tool that automatically creates a project starting from structured inputs (device, parameters, commands, data source). It produces a complete .prj file that is ready to be executed by the programming system.

Functionality

    •  Generate a complete .prj (driver, voltage limits, IDCODE mask,
       memory map, FRB data source, command sequence)

    •  Apply targeted overrides via #TCSETPAR (e.g., protocol/CMODE,
        PROTCLK frequency, VPROG0 voltage)

    •  Define the exact operational sequence via #TPCMD (connect,
        blankcheck, mass erase, program, verify, disconnect)

    •  Print the project to STDOUT (no file generation) for quick inspection
       or pipeline/script integration

    •  Production-oriented options: relay barrier handling and blank-page
        skipping for FRB data (when enabled)

Typical use cases

    •  Automation and scripting (batch generation, CI, internal tools,
        integration with production systems)

    •  Multi-channel production (1–32): fast and consistent project
        generation across multiple lines

    •  Quick validation: generate to STDOUT to review the .prj content
        before execution

    •  Standardization: reduces hand-crafted projects with inconsistent
        configurations across sites or teams

Key benefits

    •  Speed: removes GUI steps and reduces project setup time
    •  Repeatability: the same inputs produce the same .prj, supporting QA
        and production traceability

    •  Technical consistency: leverages database defaults/limits
        (Devices.smh) and performs basic checks on critical parameters

    •  Integration: STDOUT plus CLI options simplify logging, parsing, and
        pipeline-based generation

    •  Control: you can rely on a minimal sequence or enforce a fully explicit
        command flow

 

Practical examples

Example A – Generate to STDOUT for MT25QL512 (channels 1–4, QUAD-SPI, PROTCLK 25 MHz):

fr_prjGenerator.exe -device MT25QL512 -c 1,2,3,4 -filename STDOUT -param “#TCSETPAR CMODE QUAD-SPI #TCSETPAR PROTCLK 25000000” -command “#TPCMD CONNECT #IFERR TPCMD BLANKCHECK F #THEN TPCMD MASSERASE F #THEN TPCMD BLANKCHECK F #TPCMD PROGRAM F #TPCMD VERIFY F R #TPCMD VERIFY F S #TPCMD DISCONNECT” -frbFile 16MB.frb

Example B – Generate a project for MT25QL512 (channels 1–4, QUAD-SPI, PROTCLK 25 MHz):

fr_prjGenerator.exe -device MT25QL512 -c 1,2,3,4 -filename MT25QL512.prj -param “#TCSETPAR CMODE QUAD-SPI #TCSETPAR PROTCLK 25000000” -command “#TPCMD CONNECT #IFERR TPCMD BLANKCHECK F #THEN TPCMD MASSERASE F #THEN TPCMD BLANKCHECK F #TPCMD PROGRAM F #TPCMD VERIFY F R #TPCMD VERIFY F S #TPCMD DISCONNECT” -frbFile 16MB.frb

 

CLI options

Option
What it sets
Notes

-device

Target device part number

Selects the target device (part number)

-c / -channel

Channels (1–32) or mask

Only enabled channels

-param “…”

Parameter overrides (#TCSETPAR)

E.g.: CMODE, PROTCLK, VPROG0

-command “…”

Command sequence (#TPCMD)

If omitted: minimal sequence

-frbFile

FRB data source

Must be available on the FlashRunner

-ignoreBlank YES/NO

Skip blank pages in FRB

Requires -frbFile

-relayBarrier YES/NO

Relay barrier handling

Adds #RLYCLOSE and #RLYOPEN

-filename <path|STDOUT>

Project output

STDOUT prints the project to the terminal

 

Conclusions

The FlashRunner CLI Project Generator has been introduced to address the need for faster and more repeatable project creation in automation and production environments.

By enabling the generation of complete project files directly from the command line, it removes manual setup steps while preserving full control over device parameters and programming sequences.

This approach allows engineering and production teams to standardize project creation, reduce configuration variability, and integrate FlashRunner workflows more easily into existing scripts and manufacturing pipelines. The result is a more consistent and scalable setup, especially in multi-channel and batch programming scenarios.

 

Appendix

The FlashRunner CLI Project Generator can be used in combination with the prj_executor by leveraging the STDOUT output mode.
When the project is generated using -filename STDOUT, the resulting .prj content is printed line by line to the standard output instead of being written to a file. This output can then be directly consumed by another tool or process.
In this configuration, prj_executor invokes the FlashRunner CLI Project Generator internally, reads the generated project as a stream from STDOUT, and forwards it line by line to the programmer for execution. This allows the complete project generation and execution flow to be performed without creating intermediate .prj files.

This approach is particularly useful in automated environments, where projects need to be generated dynamically and executed immediately, for example in scripting or CI pipelines.

An example implementation of a tool using STDOUT to generate and execute a project is shown below:

prj_executor -t 192.168.1.100:1234 -g -device ESP8684-WROOM-02C-H4 -c 1 -x “#TPCMD CONNECT #TPCMD MASSERASE X #TPCMD BLANKCHECK X #TPCMD PROGRAM X #TPCMD VERIFY X S #TPCMD DISCONNECT” -i YES -b 64KB.frb -param “#TCSETPAR PROTCLK 115200”

 

Executor options

Option
What it sets
Notes

-transfer

Transfer connection string

LAN or Serial COM

-g

Project generator arguments

All fr_prjGenerator arguments must be placed after -g

-AvoidTPEND

TPEND handling

User must send TPEND externally after each run

-timeout

Execution timeout

Timeout (seconds) for a single project run

-verbose

Verbose output

Enables detailed execution logs

-version

Version information

Displays tool version

-help

Help output

Displays usage and option list