/
Windows CLI

Windows CLI

Prerequisites

Using the full functionality of Ganflasher-N requires the licence key to be entered once before first use.

The licence can be activated in the GUI or CLI.

GUI

About/License

 

CLI

Windows CLI | License activation using key

The configuration file contains a list of values necessary to connect the Gangflasher-N function to the microcontrollers connected to the USB port. By default, this file is created in the location C:\Users\Public\lastused_gfnxp_prog_setup.cfg when the Gangflasher-N GUI application is started and closed.

It is recommended to use the GUI application to correctly create and test the configuration file. A table with a description of the values contained in the configuration file can be found here:

Configuration File | Configuration File Export from GUI

The command file needed to run the autoprogram operation. Due to the flexibility of the Gangflasher application, it is possible to configure multiple types of external memory (Nor, Nand, SD Card etc.) and to load different file types (.bin, .srec, .hex) The Autoprogram function must be configured by the user.

More information on how to create an Autoprogram file can be found here:

Auto Program | Auto Program Setup

License activation using key

Layout

GangFlasher-N-CLI.exe -activate XXXX-XXXX-XXXX-XXXX

 

 

Example:

GangFlasher-N-CLI.exe -activate J38G-4YSC-9ANJ-8XGA

 

Configuration files

Configuration files should be specified with each command. Gangflasher-N requires two configuration files:

  • The first relates to the settings of the target, i.e. the MCU model and any settings related to memory and files.

  • The second configuration file contains the USB paths of the connected targets to the host computer.

These files are created in the Gangflasher GUI and saved to the default location:

C:\Users\Public

Feeding the configuration files to Ganflaher-N-CLI

Layout:

GangFlasher-N-CLI.exe -target_cfg config_file_path.cfg -usb_cfg usb_cfg_file_path.cfg

Example with default path:

Configuration file layout

Configuration File | Configuration file content

 

Connection checking

Checking the connection to the selected target (like any command) requires a configuration file and a USB path file. The configuration file is created automatically when the GUI application is opened and closed. The USB path file, on the other hand, is created after the USB scan, which is described here:

An example of a command to test a connection is given below:

-target_cfg path to the configuration file

-usb_cfg USB path file path

-cmd 2 opcode of the command to test the connection

The command response provides information on whether the connection to the target has been established and whether the flashloader is running.

 

Result of a successful Boot ROM connection

Load Flashloader

The flashloader is the firmware that provides the connection between the host computer and the memories attached to the IMXRT devices. Without the flashloader running, commands that operate on the memory will not work.

Reset

Reset means software reset and only works when Flashloader is running, the purpose of the reset is for IMXRT to return to Boot ROM.

 

Related content

Installation
More like this
GangFlasher-ST DLL basic example
GangFlasher-ST DLL basic example
More like this
GangFlasher-ST CLI
GangFlasher-ST CLI
More like this
GangFlasher-N
GangFlasher-N
More like this
Auto Program
Auto Program
More like this
GangFlasher-ST minimal Device Tree configuration from file
GangFlasher-ST minimal Device Tree configuration from file
More like this