Loads a block of memory from a file.


GEL_ MemoryLoad(startAddress, page, length, “fileName”, “[bitsize]**”, “[swap]”)**


startAddress is the first address in the block.

page identifies the type of memory to fill: 0 (Program memory), 1 (Data memory) or 2 (I/O space)

For processors that do not have more than one type of memory, use 0 for this Parameters. For simulated targets, the I/O space Parameters is not supported.

length defines the number of words to fill.
Note: This parameter is ignored when loading binary (.bin) and Coff files. The entire file is loaded regardless.

fileName names the file to store the target data. The fileName must be enclosed in quotation marks.

bitsize is optional if the file is not raw binary. If the file is raw binary, it indicates the bit size of the data type to interpret the data as before loading to target. This is important when doing automated endianess conversion when loading data to the target. Since, the file data is assumed to be little endian; when loading on to a big endian target some bytes may need to be swapped.

8 - Read data one byte at time. No need to swap

16 - Read data two bytes at a time. Swap bytes when loading to big endian target

32 - Read data 4 bytes at a time. Swap bytes when loading to big endian target

swap - swap the data before applying automated endiannes conversion to load to target. This effectivly disables the automated endiannes conversion.


You can use GEL_MemoryLoad() to load a block of target memory from a specified file. The block of data is specified by the startAddress, page, and length. If the filename contains a *.out for the file extension, COFF format is used; otherwise, if we are loading from data file (.dat) Code Composer Studio debugger uses the header information in the file to determine the file format. If we are reading from a binary file (.bin) the assumption is that the data is stored in little endian format to perform automated endiannes conversion when loading to target. The bitsize and swap options could be used to further tweak how the data is interpreted and load from a big endian format. See GEL_MemoryLoad2 for additional formats suppport


Synchronous from GEL: Yes

Completely synchronous: Yes


GEL_MemoryLoad(0x1000, 1, 0x100, “c:\mydir\myfile.dat”);

Related Topics