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>
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 tcDspBootloader * | GetInstance (void) |
Static class to provide application level wrappers for reprogramming MityDSP application and bootloader FPGA and DSP images from a running application.
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.
[in] | anAppID | Application index to reprogram (0 through 7) |
[in] | apFileName | Fully qualified filename of file to reprogram |
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.
[in] | anAppID | Application index to reprogram (0 through 7) |
[in] | apBuffer | Buffer containing decoded HEX file used by MityGUI |
[in] | anBufLen | Length of the buffer |
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.
[in] | anAppID | Application index to reprogram (1 through 8) |
[in] | apFileName | Fully qualified filename of file to reprogram |
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.
[in] | anAppID | Application index to reprogram (0 through 7) |
[in] | apBuffer | Buffer containing decoded HEX file used by MityGUI |
[in] | anBufLen | Length of the buffer |
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.
[in] | apFileName | Fully qualified filename of file to reprogram |
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.
[in] | apBuffer | Buffer containing decoded HEX file used by MityGUI |
[in] | anBufLen | Length of the buffer |
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.
[in] | apFileName | Fully qualified filename of file to reprogram |
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.
[in] | apBuffer | Buffer containing decoded HEX file used by MityGUI |
[in] | anBufLen | Length of the buffer |
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.
[in] | apFileName | Fully qualified filename of file to reprogram |
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.
[in] | apBuffer | Buffer containing decoded HEX file used by MityGUI |
[in] | anBufLen | Length of the buffer |
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.
[in] | apFileName | Fully qualified filename of file to decode |
[in] | anBuffSize | Maximum size of the FLASH buffer |
[in] | anBuffOffset | Offset into FLASH to write the buffer |
[in] | abIsDSPCode | When true, Data is APPLICATION code |
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.
[in] | apBuffer | the buffer containing the image |
[in] | anBufLen | Length of the provided buffer |
[in] | anBlockSize | Maximum size of the FLASH buffer |
[in] | anBlockOffset | Offset into FLASH to write the buffer |
[in] | abIsDSPCode | When true, Data is APPLICATION code |