Difference between revisions of "Flasher Hub (Legacy)"
(→Web interface) |
(→FTP interface) |
||
Line 120: | Line 120: | ||
= FTP interface = |
= FTP interface = |
||
+ | |||
+ | [[File: FlasherHubFTP.png | thumb | FTP Client (FileZilla) connected to Flasher Hub FTP Server]] |
||
The Flasher Hub comes with a built-in FTP server for transferring files from or to the Flasher Compacts connected to the Flasher Hub.<br> |
The Flasher Hub comes with a built-in FTP server for transferring files from or to the Flasher Compacts connected to the Flasher Hub.<br> |
||
Any FTP client software (e.g. FileZilla, etc...) can be used to connect to the Flasher Hub's FTP server.<br> |
Any FTP client software (e.g. FileZilla, etc...) can be used to connect to the Flasher Hub's FTP server.<br> |
||
− | + | <code>Host: flasherhub-<SerialNo></code><br> |
|
− | + | <code>Port: 21</code> |
|
'''Credentials for read-only access:'''<br> |
'''Credentials for read-only access:'''<br> |
||
− | + | <code>User: anonymous</code><br> |
|
− | + | <code>Pass: <None></code> |
|
'''Credentials for read/write access:'''<br> |
'''Credentials for read/write access:'''<br> |
||
− | + | <code>User: admin</code><br> |
|
− | + | <code>Pass: 1234</code> |
|
= ASCII command interface = |
= ASCII command interface = |
Revision as of 15:21, 19 March 2021
This is the user documentation for owners of a SEGGER Flasher Hub.
Contents
- 1 How Flasher Hub works
- 2 Getting started
- 3 Power supply
- 4 Web interface
- 5 FTP interface
- 6 ASCII command interface
- 6.1 Protocol
- 6.1.1 Commands
- 6.1.1.1 Specifying modules
- 6.1.1.2 AUTO Command
- 6.1.1.3 AUTO NOPATCH Command
- 6.1.1.4 AUTO PATCH Command
- 6.1.1.5 CANCEL Command
- 6.1.1.6 ERASE Command
- 6.1.1.7 FWVERSION Command
- 6.1.1.8 FWVERSIONMOD Command
- 6.1.1.9 IPCONFIG Command
- 6.1.1.10 POWERON Command
- 6.1.1.11 POWEROFF Command
- 6.1.1.12 PROGRAM Command
- 6.1.1.13 PROTVER Command
- 6.1.1.14 RESULT Command
- 6.1.1.15 SELECT Command
- 6.1.1.16 SETVTREF Command
- 6.1.1.17 START Command
- 6.1.1.18 STATUS Command
- 6.1.1.19 VERIFY Command
- 6.1.1.20 SELMODULE Command
- 6.1.1.21 SERIAL Command
- 6.1.1.22 SERIALMOD Command
- 6.1.2 Replies
- 6.1.1 Commands
- 6.1 Protocol
How Flasher Hub works
Flasher Hub makes ultra-fast high speed parallel programming ("gang programming") with up to 64 channels possible.
Flasher Hub is connected to one or more modules (Flasher Compact). Each module is connected to a target chip.
Using one of the Flasher Hub's host interfaces, flash programming operations can be triggered and responses from the Flasher Hub can be read and evaluated.
This makes the Flasher Hub a perfect fit for small-scale as well as large-scale production environments.
Getting started
Before putting the Flasher Control Server into operation, make sure to have the following devices at hand:
- Flasher Control Server
- Power supply (see below for more information)
- Externally powered USB Hub
- One or more Flasher Compacts
- Ethernet cable (not mandatory)
The Flasher Control Server is set up and good-to-go in less than 30 minutes
After making sure that the devices mentioned above are all available, the Flasher Hub can be setup:
- Connect Flasher Hub to power supply via USB-C
- Connect Flasher Hub to LAN via Ethernet cable
- Connect USB Hub to power supply
- Connect USB Hub to Flasher Hub via USB
- Connect Flasher Compact(s) to Flasher Hub via USB
- Wait for the Flasher Hub to finish booting (green LED stops flashing)
- Note the serial number of your Flasher Hub
- Open the Flasher Hub's web interface by visiting http://flasherhub-<SerialNo>/ (Make sure to replace <SerialNo> with the serial number of your Flasher Hub)
- Flasher Hub is now up and running
Preparing a module
Before a Flasher Hub module can program a target chip, it needs to know what data that should be programmed. Additionally, the module needs information on the configuration to use.
A module is prepared accordingly by downloading a Flasher data and configuration file pair into the module (.dat + .cfg files).
Both are generated using J-Flash, SEGGER's free multi-platform production programming software.
More information on J-Flash can be found on segger.com and the SEGGER Wiki
- Download and install the most recent version of the J-Link software package.
- Start J-Flash
- Create a new project
- Select a target device, target interface, target interface speed, ...
- Adjust the project settings as needed (see here for more information)
- Open the data file to be programmed in J-Flash (via drag-and-drop)
- File --> Save Flasher config file
- File --> Save Flasher data file
- File --> Save project
- Close J-Flash
- Make sure Flasher Hub is up and running and connected to the LAN
- Make sure the module that should be prepared is connected to Flasher Hub
- Connect to the Flasher Hub FTP server using a FTP Client (e.g. FileZilla)
- Download the .cfg and .dat file to the designated modules
- Done
After providing a Flasher Hub module with data and configuration file, the module is ready to be used for programming operations.
Starting production programming
After preparing the Flasher Hub modules, the Flasher Hub is ready for production programming.
The following instructions describe how to start production programming via the TELNET terminal:
- Make sure the Flasher Hub is up and running and connected to the LAN
- Make sure the Flasher Hub modules are prepared with a .dat and .cfg file
- Make sure each Flasher Hub module is connected to its target chip
- Open a terminal application (e.g. PuTTY) on a desktop PC
- Connect to the Flasher Hub's TELNET terminal
- Host name: flasherhub-<SerialNo>
- Port: 23
- Upon successful connection, the Flasher Hub sends a welcome message
- Now commands can be sent to the Flasher Hub using the ASCII command protocol explained below
- Production programming is started by sending the AUTO command and specifying the positions of the modules to address
- Enter #AUTO 1,2,3 to start production programming for the modules at positions 1, 2 and 3.
- The Flasher Hub will acknowledge the command (#ACK response)
- Now the production programming process is up and running
- As soon as a module finishes production programming, the Flasher Hub sends a response with the programming result (#RESULT:... response)
- After all modules are done programming, Flasher Hub responds with #DONE
Power supply
The Flasher Hub is powered via USB-C.
The power supply must be able to supply up to 1A at 5V to the Flasher Hub.
Note:
Undefined behavior may occur when the Flasher Hub is not powered sufficiently.
The Flasher Compacts connected to the Flasher Hub via USB must be powered externally,
e.g. via an externally powered USB hub.
Note:
Undefined behavior may occur when the Flasher Compacts are not powered sufficiently.
Web interface
The Flasher Hub comes with a built-in web interface which comes with a status overview and controls for the Flasher Hub.
The web interface can be accessed by navigating to the following location using a web browser (e.g. Mozilla Firefox, Google Chrome, ...):
http://flasherhub-<SerialNo>/
Note: The web interface is only available if the Flasher Hub is connected to the LAN.
FTP interface
The Flasher Hub comes with a built-in FTP server for transferring files from or to the Flasher Compacts connected to the Flasher Hub.
Any FTP client software (e.g. FileZilla, etc...) can be used to connect to the Flasher Hub's FTP server.
Host: flasherhub-<SerialNo>
Port: 21
Credentials for read-only access:
User: anonymous
Pass: <None>
Credentials for read/write access:
User: admin
Pass: 1234
ASCII command interface
The Flasher Hub comes with an ASCII command interface (aka. Terminal) which can be used to send commands to the Flasher Hub, as well as receive responses from the Flasher Hub.
The Terminal can be accessed by connecting to the Flasher Hub via TELNET:
Host: flasherhub-<SerialNo> Port: 23
Once a successful connection to the Flasher Hub Terminal has been established, it will handle commands as described in the protocol below.
Protocol
Commands
Commands to the Flasher Hub |
---|
#AUTO |
#AUTO NOPATCH |
#AUTO PATCH |
#CANCEL |
#ERASE |
#FWVERSION |
#FWVERSIONMOD |
#IPCONFIG |
#POWERON |
#POWEROFF |
#PROGRAM |
#PROTVER |
#RESULT |
#SELECT |
#SETVTREF |
#START |
#STATUS |
#VERIFY |
#SELMODULE |
#SERIAL |
#SERIALMOD |
#SETVTREF |
Specifying modules
Most commands affect one or more modules connected to the Flasher Hub. Those commands expect the list of modules to address as the very first parameter following the command identifier itself, e.g.
#AUTO <Modules>
There are different ways to specify the list of modules to address.
Comma-separated list
#AUTO 1,3,5 // Starts production programming for modules 1, 3 and 5. Other modules are not affected by this command
"All"
#AUTO ALL // Starts production programming for all currently connected modules
Wildcard (*)
#SELMODULE 2,4,6 // Selects modules 2, 4 and 6 for following operations using '*' [...] #AUTO * // Starts production programming for all previously selected modules (2, 4 and 6) [...] #SELMODULE 10,11,12 // Selects modules 10, 11 and 12 for following operations [...] #AUTO * // Starts production programming for all previously selected modules (10, 11 and 12)
AUTO Command
Description: Starts production programming. Production programming refers to a sequence of the following operations, specified by the current configuration (.cfg):
- Erase
- Program
- Verify
Syntax:
#AUTO <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to start production programming with |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#AUTO 1,2 | |
#ACK | |
#RESULT:1:OK (Total 13.993s, Erase 0.483s, Prog 9.183s, Verify 2.514s) | |
#RESULT:2:OK (Total 13.995s, Erase 0.483s, Prog 9.189s, Verify 2.510s) | |
#DONE |
AUTO NOPATCH Command
Description: Starts production programming but ignores an existing patch file for the programming.
Syntax:
#AUTO NOPATCH <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to start production programming with |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#AUTO NOPATCH 1,2 | |
#ACK | |
#RESULT:1:OK (Total 13.993s, Erase 0.483s, Prog 9.183s, Verify 2.514s) | |
#RESULT:2:OK (Total 13.995s, Erase 0.483s, Prog 9.189s, Verify 2.510s) | |
#DONE |
AUTO PATCH Command
Description: Starts production programming and allows patching of the content of the data to be programmed.
Syntax:
#AUTO PATCH <Modules> <NumPatches>,<Addr>,<NumBytes>:[,...]
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to start production programming with |
<NumPatches> | Number of patches that follow |
<Addr> | Address to be patched. Value is expected in hex |
<NumBytes> | Number of bytes for the current patch. Max. value is 20h (32 in decimal). Value is expected in hex |
<Data> | Data to be patched. Value is expected in hex, e.g. 2 hexadecimal characters per byte (0xAB 0xCD --> "ABCD"). |
... | <Next patch information> |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#AUTO PATCH 1 1,08000000,4:DEADBEEF | |
#ACK | |
#RESULT:1:OK (Total 10.476s, Erase 8.293s, Prog 1.832s, Verify 0.137s) | |
#DONE |
CANCEL Command
Description: Cancels an ongoing operation (e.g. erase, program, verify, ...).
Syntax:
#CANCEL <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to cancel ongoing operation for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#AUTO 1 | |
#ACK | |
#CANCEL 1 | |
#ACK | |
#RESULT:1:ERR255:Error while flashing | |
#DONE |
ERASE Command
Description: Erases all selected target flash sectors.
Syntax:
#ERASE <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to erase all selected target flash sectors for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#ERASE 1,2 | |
#ACK | |
#RESULT:1:OK (Total 2.164s, Erase 1.936s) | |
#RESULT:2:OK (Total 8.780s, Erase 8.552s) | |
#DONE |
FWVERSION Command
Description: Returns the firmware version of the Flasher Hub.
Syntax:
#FWVERSION
Example:
Command sent to Flasher Hub | Reply |
---|---|
#FWVERSION | |
#ACK | |
#OK:1.00 | |
#DONE |
FWVERSIONMOD Command
Description: Returns the firmware version for the specified modules.
Syntax:
#FWVERSIONMOD <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to return firmware version for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#FWVERSIONMOD 1,2 | |
#ACK | |
#OK:1:J-Link / Flasher Compact V5 compiled Feb 3 2021 10:44:44 | |
#OK:2:J-Link / Flasher Compact V5 compiled Feb 3 2021 10:44:44 | |
#DONE |
IPCONFIG Command
Description: Returns the Flasher Hub's current IP configuration.
Syntax:
#IPCONFIG
Example:
Command sent to Flasher Hub | Reply |
---|---|
#IPCONFIG | |
#ACK | |
#RESULT:IP address:192.168.11.35 | |
#RESULT:Subnet mask:255.255.0.0 | |
#RESULT:Gateway:0.0.0.0 | |
#RESULT:IP mode:User assigned | |
#DONE |
POWERON Command
Description: Enables the Flasher Compact's 5V target power supply for the given modules.
Syntax:
#POWERON <Modules> <PowerSource>,<Discharge>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to enable target power supply for. |
<PowerSource> | Must be 0. Parameter exists to stay compatible to Flasher ATE, which supports different power sources. |
<Discharge> | Must be 0. Parameter exists to stay compatible to Flasher ATE, which supports discharging target power. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#POWERON 1 0,0 | |
#ACK | |
#DONE |
POWEROFF Command
Description: Disables the Flasher Compact's 5V target power supply for the given modules.
Syntax:
#POWEROFF <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to disable target power supply for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#POWEROFF 1 | |
#ACK | |
#DONE |
PROGRAM Command
Description: Programs the target. Other than #AUTO, this command does not erase nor verify target flash contents.
Syntax:
#PROGRAM <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to start programming for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#PROGRAM 1,2 | |
#ACK | |
#RESULT:1:OK (Total 2.076s, Prog 1.833s) | |
#RESULT:2:OK (Total 2.132s, Prog 1.888s) | |
#DONE |
PROTVER Command
Description: Returns the version of the ASCII command protocol in use.
Syntax:
#PROTVER
Example:
Command sent to Flasher Hub | Reply |
---|---|
#PROTVER | |
#ACK | |
#OK:2.02b | |
#DONE |
RESULT Command
Description: Returns the last result of the previously executed command
Syntax:
#RESULT <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to return result for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#RESULT 1,2 | |
#ACK | |
#RESULT:1:OK (Total 2.076s, Prog 1.833s) | |
#RESULT:2:OK (Total 2.132s, Prog 1.888s) | |
#DONE |
SELECT Command
Description: Selects a specific config and data file pair which should be used to program the target.
Syntax:
#SELECT <Modules> <Filename>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to select .cfg + .dat file pair for. |
<Filename> | Name of .cfg + .dat file pair to select. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#SELECT 1,2 FWTest | |
#ACK | |
#RESULT:1:OK | |
#RESULT:2:OK | |
#DONE |
SETVTREF Command
Description: Sets a fixed voltage for I/O pins of the Flasher Compact's target interface.
Syntax:
#SETVTREF <Modules> <Voltage>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to set VTref for. |
<Voltage> | Voltage in millivolt [mV]. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#SETVTREF 1 3300 | |
#ACK | |
#DONE |
START Command
Description: Starts the target application. The Flasher Compact's configuration (.cfg file) determines the method of how the target application is started.
Syntax:
#START <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to start target application for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#START 1 | |
#ACK | |
#RESULT:1:OK (Total 0.252s) | |
#DONE |
STATUS Command
Description: Returns the current status of the Flasher Hub (READY or BUSY).
Syntax:
#STATUS
Example:
Command sent to Flasher Hub | Reply |
---|---|
#STATUS | |
#ACK | |
#STATUS:READY |
VERIFY Command
Description: Verifies target flash contents by comparing them to the data (.dat) file.
Syntax:
#VERIFY <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to verify target flash contents for. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#VERIFY 1,2 | |
#ACK | |
#RESULT:1:OK (Total 0.331s, Verify 0.117s) | |
#RESULT:2:OK (Total 0.332s, Verify 0.117s) | |
#DONE |
SELMODULE Command
Description: Selects one or more modules. Commands with the wildcard character (*) in place of the <Modules> parameter will address the modules specified by this command.
Syntax:
#SELDMOULE <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to select. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#SELMODULE 1,2,3 | |
#ACK | |
#SELECTED:1,2,3 |
SERIAL Command
Description: Returns the serial number of the Flasher Hub.
Syntax:
#SERIAL
Example:
Command sent to Flasher Hub | Reply |
---|---|
#SERIAL | |
#ACK | |
#RESULT:1021000000 | |
#DONE |
SERIALMOD Command
Description: Returns the serial number for the specified modules.
Syntax:
#SERIALMOD <Modules>
Parameters:
Parameter | Description |
---|---|
<Modules> | List of modules to select. |
Example:
Command sent to Flasher Hub | Reply |
---|---|
#SERIALMOD 1,2 | |
#ACK | |
#OK:1:1015000000 | |
#OK:1:1015000001 | |
#DONE |
Replies
Replies from the Flasher Hub |
---|
#ACK |
#NACK |
#OK |
#OK:<NumBytes>: |
#OK: |
#OK:<Module>: |
#RESULT:<Module>: |
#DONE |
#ERRxxx |