5.6.11 Resources functions

Describes the following functions:

resource_getList()

Retrieves the static aspects of a resource. Debuggers usually call this function only once, after connecting to the target. If neither group nor rscId arguments are specified, all resources are returned.

Arguments

group

Type: String

Optional. Return information just for resources that are part of this resource group. If no such group is known, E_unknown_resource_group is returned. If a valid rscId is also specified, in addition to a group, only a single matching resource or an empty array (and no error) is returned.

instId

Type: NumberU64

Opaque number uniquely identifying the target instance.

rscId

Type: NumberU64

Optional. Return information just for the resource with rscId. The return value is an array with a single element. If rscId is not known, E_unknown_resource_id is returned. If group is also specified, the resource is just searched for in the group. If a valid rscId is not part of the specified group, an empty array and no error is returned.

Return value

ResourceInfo[]

Zero or more ResourceInfo Objects.

Errors

  • E_unknown_instance_id.
  • E_unknown_resource_id.
  • E_unknown_resource_group.

resource_getListOfResourceGroups()

Gets the meta information of all resource groups. Each resource group has a name, a description, and a list of ids of the resources in the group.

Arguments

instId

Type: NumberU64

Opaque number uniquely identifying the target instance.

Return value

ResourceGroupInfo[]

Zero or more ResourceGroupInfo Objects.

Errors

  • E_unknown_instance_id.

resource_read()

Reads the values of a set of resources. The semantics are peek rather than architectural read.

Arguments

instId

Type: NumberU64

Opaque number uniquely identifying the target instance.

rscIds

Type: NumberU64[]

List of opaque resource ids uniquely identifying the resources within the target instance to be read. An empty array is valid and results in an empty result array. An rscId can occur multiple times, in which case the same resource is read multiple times.

Return value

ResourceReadResult

Resource data, undefined bits, and errors. See ResourceReadResult.

Errors

  • E_unknown_instance_id.
  • E_unknown_resource_id.

resource_write()

Writes values to a set of resources. The semantics are poke rather than architectural write.

Arguments

data

Type: NumberU64[]

List of numeric resource values to be written, in the order they are specified in the rscIds argument. See ResourceReadResult.data for the encoding. If this array does not match the number of resources being written, E_data_size_error is returned.

instId

Type: NumberU64

Opaque number uniquely identifying the target instance.

rscIds

Type: NumberU64[]

List of opaque resource ids uniquely identifying the resources within the target instance to be written. An empty array is valid. The same rscId can occur more than once, in which case the same resource is written multiple times.

strings

Type: String[]

Optional. List of string resource values. Missing if no string resources are written. See ResourceReadResult.strings for the encoding. If this array does not match the number of resources being written, E_data_size_error is returned.

Return value

ResourceWriteResult

Write errors. See ResourceWriteResult.

Errors

  • E_unknown_instance_id.
  • E_unknown_resource_id.
  • E_data_size_error.
Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.