Platform Package reference: Function EwSetBlobData()
Description of the function EwSetBlobData() available in Platform Packages for C compatible target systems. This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.
Declaration
void EwSetBlobData( const void* aStartAddress, const void* aEndAddress );
Parameters
aStartAddress
Start address of the memory area containing the Blob data.
aEndAddress
End address of the memory area containing the Blob data. The address refers the byte just after the end of the Blob data. The difference between aEndAddress and aStartAddress is exact the size of the Blob file.
Discussion
The function EwSetBlobData() registers the given memory area as containing constants and resources to be used by the Embedded Wizard application. Unlike constants and resources stored in C code, the data can thus be setup after the application has be compiled and linked. Even exchanging the data retrospectively is possible. Following are the most typical scenarios:
★The entire Blob content is existing in CPU addressable flash space. In this case provide in the parameter aStartAddress and aEndAddress the start and the end addresses of the memory area containing the Blob data.
★The entire Blob content is loaded from e.g. a file system into the RAM. It is thus CPU addressable. In this case provide in the parameter aStartAddress and aEndAddress the start and the end addresses of the RAM area where the Blob data has been copied.
★The Blob content is existing in an external, not CPU addressable ROM (e.g. flash memory). In this case configure the linker to exclude an area with size at least as large as the Blob content. This address area has to be reserved for the Blob content exclusively. Then register a flash area reader to map accesses to the excluded area. In the implementation of the reader take care of loading memory pages from the external flash in RAM and provide access to so cached Blob contents. For more details see EwRegisterFlashAreaReader(). Finally, invoke EwSetBlobData() with the start and end addresses of the excluded area.
★The Blob content is stored on a file system and there not enough RAM to load the entire Blob content. In this case configure the linker to exclude an area with size at least as large as the Blob content. This address area has to be reserved for the Blob content exclusively. Then register a flash area reader to map accesses to the excluded area. In the implementation of the reader take care of loading memory pages from the file in RAM and provide access to so cached Blob contents. EwRegisterFlashAreaReader(). Finally, invoke EwSetBlobData() with the start and end addresses of the excluded area.
Embedded Wizard allows only one Blob file to be setup at the same time. Invoking the function EwSetBlobData() twice reports an error. To change the Blob content it is inevitable to restart the system. This function should be invoked before invoking EwInitGraphicsEngine() and after EwRegisterFlashAreaReader().
For more details concerning the usage of Blob files see also the chapter Blob files.