C# Class DVFlasher.Program

Main program Class
Afficher le fichier Open project: neuros/ti-uart-boot

Méthodes publiques

Свойство Type Description
MySP System.IO.Ports.SerialPort
cmdParams ProgramCmdParams
cmdString String
workerThread Thread
workerThreadSucceeded System.Boolean

Méthodes publiques

Méthode Description
ParseCmdLine ( String args ) : ProgramCmdParams

Parse the command line into the appropriate internal command structure

WorkerThreadStart ( ) : void

The main fucntion of the thread where all the cool stuff happens to interface with the DVEVM

bin2srec ( Stream inputStream, UInt32 startAddr ) : Byte[]

Function to convert the input filestream into an byte array in S-record format, so that it can be downloaded to the EVM board.

isFileSrec ( FileStream inputFileStream ) : System.Boolean

Check to see if filestream is an S-record by reading the first character of each line and seeing if it is 'S'

readSrec ( FileStream inputFileStream ) : Byte[]

Get the byte array if the file is already an S-record

Private Methods

Méthode Description
DispHelp ( ) : void

Help Display Function

GetEmbeddedUBLStream ( ) : Stream

Read the appropriate embedded UBL data (NAND or NOR) that will be transmitted to the DM644x.

GetFileData ( String filename, UInt32 decAddr ) : Byte[]

Function to find, read, and convert to S-record (if needed) a data file

Main ( String args ) : Int32

Main entry point of application

TransmitAPP ( ) : void

Function to transmit the application code via the UBL, which is now running on the DM644x. This code is specific to the TI supplied UBL. If the the TI supplied UBL is modified or a different boot loader is used, this code will need to be modified.

TransmitCMDSuccessful ( ) : System.Boolean

Function to transmit the CMD and command over the UART (following BOOTPSP)

TransmitErase ( ) : void

Send command and wait for erase response. (NOR and NAND global erase)

TransmitFLASHUBLandAPP ( ) : void

Function to transmit the second UBL if it is needed

TransmitUARTUBL ( ) : void

Function to Transmit the UBL via the DM644x ROM Serial boot

waitForSequence ( String str, String altStr, SerialPort sp ) : System.Boolean

Wait for null-terminated sequences from supplied serial port

waitForSequence ( String str, String altStr, SerialPort sp, System.Boolean verbose ) : System.Boolean

Waitforsequence with option for verbosity

Method Details

ParseCmdLine() public static méthode

Parse the command line into the appropriate internal command structure
public static ParseCmdLine ( String args ) : ProgramCmdParams
args String The array of strings passed to the command line.
Résultat ProgramCmdParams

WorkerThreadStart() public static méthode

The main fucntion of the thread where all the cool stuff happens to interface with the DVEVM
public static WorkerThreadStart ( ) : void
Résultat void

bin2srec() public static méthode

Function to convert the input filestream into an byte array in S-record format, so that it can be downloaded to the EVM board.
public static bin2srec ( Stream inputStream, UInt32 startAddr ) : Byte[]
inputStream Stream
startAddr System.UInt32 The starting address of the RAM location where the binary data /// encapsulated by the S-record will be stored.
Résultat Byte[]

isFileSrec() public static méthode

Check to see if filestream is an S-record by reading the first character of each line and seeing if it is 'S'
public static isFileSrec ( FileStream inputFileStream ) : System.Boolean
inputFileStream System.IO.FileStream The input filestream that encapsulates the /// input application file.
Résultat System.Boolean

readSrec() public static méthode

Get the byte array if the file is already an S-record
public static readSrec ( FileStream inputFileStream ) : Byte[]
inputFileStream System.IO.FileStream The input filestream that encapsulates the /// input application file.
Résultat Byte[]

Property Details

MySP public_oe static_oe property

Global main Serial Port Object
public static SerialPort,System.IO.Ports MySP
Résultat System.IO.Ports.SerialPort

cmdParams public_oe static_oe property

Public variable to hold needed command line and program parameters
public static ProgramCmdParams,DVFlasher cmdParams
Résultat ProgramCmdParams

cmdString public_oe static_oe property

String to hold the summary of operation program will attempt.
public static String cmdString
Résultat String

workerThread public_oe static_oe property

The main thread used to actually execute everything
public static Thread workerThread
Résultat Thread

workerThreadSucceeded public_oe static_oe property

Global boolean to indicate successful completion of workerThread
public static Boolean,System workerThreadSucceeded
Résultat System.Boolean