MityDSP Documentation Index
Classes | Public Types | Public Member Functions | Static Public Member Functions
MityDSP::tcDspBootloader Class Reference

Static class to provide application level wrappers for reprogramming MityDSP application and bootloader FPGA and DSP images from a running application. More...

#include <core/DspBootloader.h>

List of all members.

Classes

struct  tsNotifyEvent

Public Types

enum  teState {
  eeIdle, eeParsingHexFile, eeErasingFlash, eeProgrammingFlash,
  eeProgrammingComplete
}

Public Member Functions

MBX_Handle Mailbox ()
int ReprogramApp (int anAppID, const char *apFileName)
 This routine updates the DSP application code with the contents of the file specified by the provided FileName.
int ReprogramApp (int anAppID, char *apBuffer, int anBufLen)
 This routine updates the DSP application code with the contents of the buffer provided.
int ReprogramFpga (int anAppID, const char *apFileName)
 This routine updates the FPGA image with the contents of the file specified by the provided FileName.
int ReprogramFpga (int anAppID, char *apBuffer, int anBufLen)
 This routine updates the FPGA image with the contents of the buffer provided.
int ReprogramCLUBApp (const char *apFileName)
 This routine updates the DSP Critical Link Unified bootloader code with the contents of the file specified by the provided FileName.
int ReprogramCLUBApp (char *apBuffer, int anBufLen)
 This routine updates the DSP Critical Link Unified bootloader code with the contents of the buffer provided.
int ReprogramCLUBFpga (const char *apFileName)
 This routine updates the DSP Critical Link Unified bootloader FPGA image with the contents of the file specified by the provided FileName.
int ReprogramCLUBFpga (char *apBuffer, int anBufLen)
 This routine updates the DSP Critical Link Unified bootloader FPGA image with the contents of the buffer provided.
int ReprogramBootstrapper (const char *apFileName)
 This routine updates the DSP Critical Link Unified bootloader bootstrapper image with the contents of the file specified by the provided FileName.
int ReprogramBootstrapper (char *apBuffer, int anBufLen)
 This routine updates the DSP Critical Link Unified bootloader bootstrapper image with the contents of the buffer provided.
int DecodeFileToFLASH (const char *apFileName, unsigned int anBuffSize, unsigned int anBuffOffset, bool IsDSPCode)
 This routine Decodes an Intel HEX file into a buffer and programes it to FLASH at the offset specified.
int WriteBufferToFLASH (char *apBuffer, unsigned int anBufLen, unsigned int buffsize, unsigned int buffoffset, bool IsDSPCode)
 This routine writes a bootloader GUI image file (already decoded from the normal Intel HEX format) to the specified location in FLASH.

Static Public Member Functions

static tcDspBootloaderGetInstance (void)

Detailed Description

Static class to provide application level wrappers for reprogramming MityDSP application and bootloader FPGA and DSP images from a running application.

See also:
tcDspBootloader Page

Member Enumeration Documentation

Enumerator:
eeIdle 
eeParsingHexFile 
eeErasingFlash 
eeProgrammingFlash 
eeProgrammingComplete 

Member Function Documentation

tcDspBootloader * tcDspBootloader::GetInstance ( void  )
static
MBX_Handle MityDSP::tcDspBootloader::Mailbox ( )
inline
int tcDspBootloader::ReprogramApp ( int  anAppID,
const char *  apFileName 
)

This routine updates the DSP application code with the contents of the file specified by the provided FileName.

It is assumed that the file is consistent with a file provided to the MityGUI application.

Parameters:
[in]anAppIDApplication index to reprogram (0 through 7)
[in]apFileNameFully qualified filename of file to reprogram
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramApp ( int  anAppID,
char *  apBuffer,
int  anBufLen 
)

This routine updates the DSP application code with the contents of the buffer provided.

It is assumed that the buffer represents the decoded hex file consistent with a file provided to the MityGUI application.

Note:
NO BYTE SWAPPING should be performed (it will be done within this method as required)
Parameters:
[in]anAppIDApplication index to reprogram (0 through 7)
[in]apBufferBuffer containing decoded HEX file used by MityGUI
[in]anBufLenLength of the buffer
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramFpga ( int  anAppID,
const char *  apFileName 
)

This routine updates the FPGA image with the contents of the file specified by the provided FileName.

It is assumed that the file is consistent with a file provided to the MityGUI application.

Parameters:
[in]anAppIDApplication index to reprogram (1 through 8)
[in]apFileNameFully qualified filename of file to reprogram
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramFpga ( int  anAppID,
char *  apBuffer,
int  anBufLen 
)

This routine updates the FPGA image with the contents of the buffer provided.

It is assumed that the buffer represents the decoded hex file consistent with a file provided to the MityGUI application.

Parameters:
[in]anAppIDApplication index to reprogram (0 through 7)
[in]apBufferBuffer containing decoded HEX file used by MityGUI
[in]anBufLenLength of the buffer
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramCLUBApp ( const char *  apFileName)

This routine updates the DSP Critical Link Unified bootloader code with the contents of the file specified by the provided FileName.

It is assumed that the file is consistent with a file provided to the MityGUI application.

Parameters:
[in]apFileNameFully qualified filename of file to reprogram
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramCLUBApp ( char *  apBuffer,
int  anBufLen 
)

This routine updates the DSP Critical Link Unified bootloader code with the contents of the buffer provided.

It is assumed that the buffer is a decoded file consistent with a file provided to the MityGUI application.

Parameters:
[in]apBufferBuffer containing decoded HEX file used by MityGUI
[in]anBufLenLength of the buffer
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramCLUBFpga ( const char *  apFileName)

This routine updates the DSP Critical Link Unified bootloader FPGA image with the contents of the file specified by the provided FileName.

It is assumed that the file is consistent with a file provided to the MityGUI application.

Parameters:
[in]apFileNameFully qualified filename of file to reprogram
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramCLUBFpga ( char *  apBuffer,
int  anBufLen 
)

This routine updates the DSP Critical Link Unified bootloader FPGA image with the contents of the buffer provided.

It is assumed that the buffer is consistent with a file provided to the MityGUI application.

Parameters:
[in]apBufferBuffer containing decoded HEX file used by MityGUI
[in]anBufLenLength of the buffer
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramBootstrapper ( const char *  apFileName)

This routine updates the DSP Critical Link Unified bootloader bootstrapper image with the contents of the file specified by the provided FileName.

It is assumed that the file is consistent with a file provided to the MityGUI application.

Parameters:
[in]apFileNameFully qualified filename of file to reprogram
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::ReprogramBootstrapper ( char *  apBuffer,
int  anBufLen 
)

This routine updates the DSP Critical Link Unified bootloader bootstrapper image with the contents of the buffer provided.

It is assumed that the file is consistent with a file provided to the MityGUI application.

Parameters:
[in]apBufferBuffer containing decoded HEX file used by MityGUI
[in]anBufLenLength of the buffer
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::DecodeFileToFLASH ( const char *  apFileName,
unsigned int  anBuffSize,
unsigned int  anBuffOffset,
bool  abIsDSPCode 
)

This routine Decodes an Intel HEX file into a buffer and programes it to FLASH at the offset specified.

Parameters:
[in]apFileNameFully qualified filename of file to decode
[in]anBuffSizeMaximum size of the FLASH buffer
[in]anBuffOffsetOffset into FLASH to write the buffer
[in]abIsDSPCodeWhen true, Data is APPLICATION code
Note:
this method allocates a buffer the size of anBuffSize onto the heap. It is deallocated upon exit of this routine.
Returns:
Number of Bytes Programmed, or negative number on error
int tcDspBootloader::WriteBufferToFLASH ( char *  apBuffer,
unsigned int  anBufLen,
unsigned int  anBlockSize,
unsigned int  anBlockOffset,
bool  abIsDSPCode 
)

This routine writes a bootloader GUI image file (already decoded from the normal Intel HEX format) to the specified location in FLASH.

NOTE: if byte swapping is required, the provided buffer will be modified.

Parameters:
[in]apBufferthe buffer containing the image
[in]anBufLenLength of the provided buffer
[in]anBlockSizeMaximum size of the FLASH buffer
[in]anBlockOffsetOffset into FLASH to write the buffer
[in]abIsDSPCodeWhen true, Data is APPLICATION code
Returns:
Number of Bytes Programmed, or negative number on error

  
Generated on Mon Apr 22 2013 11:33:03 for MityDSP Core by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.