C# 클래스 DVFlasher.Program

Main program Class
파일 보기 프로젝트 열기: neuros/ti-uart-boot

공개 프로퍼티들

프로퍼티 타입 설명
MySP System.IO.Ports.SerialPort
cmdParams ProgramCmdParams
cmdString String
workerThread Thread
workerThreadSucceeded System.Boolean

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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

메소드 상세

ParseCmdLine() 공개 정적인 메소드

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.
리턴 ProgramCmdParams

WorkerThreadStart() 공개 정적인 메소드

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

bin2srec() 공개 정적인 메소드

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.
리턴 Byte[]

isFileSrec() 공개 정적인 메소드

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.
리턴 System.Boolean

readSrec() 공개 정적인 메소드

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.
리턴 Byte[]

프로퍼티 상세

MySP 공개적으로 정적으로 프로퍼티

Global main Serial Port Object
public static SerialPort,System.IO.Ports MySP
리턴 System.IO.Ports.SerialPort

cmdParams 공개적으로 정적으로 프로퍼티

Public variable to hold needed command line and program parameters
public static ProgramCmdParams,DVFlasher cmdParams
리턴 ProgramCmdParams

cmdString 공개적으로 정적으로 프로퍼티

String to hold the summary of operation program will attempt.
public static String cmdString
리턴 String

workerThread 공개적으로 정적으로 프로퍼티

The main thread used to actually execute everything
public static Thread workerThread
리턴 Thread

workerThreadSucceeded 공개적으로 정적으로 프로퍼티

Global boolean to indicate successful completion of workerThread
public static Boolean,System workerThreadSucceeded
리턴 System.Boolean