EasyManua.ls Logo

Elprotronic MSP430 - Page 76

Default Icon
119 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
- Texas Instruments text format, Motorola *.s19 format and Intel *.hex format. When file is
downloaded then contents of this file is analysed. Only code memory location valid for the MSP430
microcontroller family will be downloaded to the internal Code buffer. Any code data located outside
memory space of the MSP430 microcontroller will be ignored and warning message will be created.
When the F_ReadCodeFile function is used then the full Code buffer is filled with data 0xFF and
all flags are cleared (empty flag) first. When the valid data are taken from the code buffer, the data
is saved in buffer and flag modified from empty to used.
Syntax:
MSPPRG_API INT_X F_ReadCodeFile( int file_format, char * FileName );
MSPPRG_API INT_X F_Read_CodeFile( int file_format, CString FileName );
file_format:
FILE_TI_FORMAT (1) for TI (*.txt) format
FILE_MOTOROLA_FORMAT (2) for Motorola (*.s19, *.s28 or *.s37)
FILE_INTEL_FORMAT (3) for Intel (*.hex)
FILE_IAR_D43_FORMAT (4) for IAR (UBROF9) *.d43 format
or FILE_DEBUG_A43_FORMAT (5) for IAR HEX or Motorola debug format
FileName: file name including path, file name and extention
note: F_Read_CodeFile is available only when the Multi-FPA dll is used.
Return value:
(0xFFFe & info) | state
where state is defined as follows:
0 - FALSE
1 - TRUE
-2 (0xFFFFFFFE) - FPA_INVALID_NO
info is defined as follows:
warning -> CODE_IN_ROM
CODE_IN_RAM
CODE_OUT_OF_FLASH
CODE_OVERWRITTEN
error -> INVALID_CODE_FILE
OPEN_FILE_OR_READ_ERR
Example:
int st;
....................
st = F_ReadCodeFile( FILE_TI_FORMAT, “c:\test\demofile.txt” );
if(( st & 1 ) == TRUE )
{
....................
}
76

Table of Contents