5.10.1 Loading an image

Select from the following functions to load an image:

image_loadFile()
Loads an image into a target instance from a file. The file must be accessible under path on the host that runs the target instance. If the file is only guaranteed to be accessible on the host that runs the client, clients should use image_loadData() instead, and load the file in the client.
image_loadData()
Loads image data into a target instance. Clients can use this function to push an image into an instance with a single function call. This function is intended for images that are small enough to be transferred as one uninterruptible chunk, typically up to a few megabytes. To load an image from the client side that is larger than that, use image_loadDataPull().
image_loadDataPull()
Loads image data into a target instance. This is semantically equivalent to image_loadData(), except that the image data is not provided as an argument but is pulled by the target instance from the client by calling the callback function image_loadDataRead(). This interface enables:
  • Interruptible transfers of large images.
  • Format loaders, for example an ELF loader, to only read specific parts of images, or to skip some data, for example debug information.
  • Format loaders to read data whose size is unknown or hard to determine.
memory_write()
This is the primary method of writing raw byte data into memory at a specific address.

Note:

  • The image_load*() functions can optionally load arbitrary raw binary data, which is unformatted and without a header, into memory, by using the rawAddr and rawSpaceId arguments.
  • Target instances must return E_function_not_supported_by_instance for any image_load*() functions that they do not support.
Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.