CMSIS-Pack 查询

以下内容自动抽取自 sdk-headers/HFLinkDriver_pack.h ,含 6 个公开函数及全部公开类型。函数指针回调类型不单独列出,见所属结构体成员说明。

结构体

CMSIS-Pack Flash download algorithm information.

CMSIS-Pack device memory region.

Public Members

Processor owning the memory region; empty string for shared regions.

CMSIS-Pack processor information.

Legacy DP/AP debug access path associated with a processor.

CMSIS-Pack debugport declaration.

CMSIS-Pack accessportV1/accessportV2 declaration.

CMSIS-Pack debugconfig merged field by field across device/subFamily/family.

Public Members

Default debug protocol: swd, jtag, or cjtag.

CMSIS-Pack Debug Access Sequence with its processor selection metadata.

Public Members

Empty string acts as a wildcard matching all processors.

Fully resolved device information from the installed CMSIS-Pack.

Public Members

Processor name of the current target; NULL when no core was explicitly selected.

Merged debugconfig.sdf path; also honors the legacy debugDescription field.

Number of sequences; also the element count of the sequence_paths compatibility mirror.

Path mirror kept for legacy callers; new code should use sequences.

Information about a single installed pack (for enumeration).

Public Members

Pack identifier: registry key; derived as "vendor.name" by default.

Pack vendor.

Pack name.

Pack version.

Installation directory; may be NULL.

Relative path of the json under the Database directory; may be NULL.

Device tree leaf: one device (with overview information).

Public Members

Device name.

May be NULL.

Name of each download algorithm (Pname or path base); length = algorithm_count.

Sub-family under a family.

Family: directly attached devices plus sub-families.

Complete device tree of a pack (family -> subFamily -> device).

Public Members

Identifier of this pack (same as HFLink_PackInfo::key).

API

Query device information from the CMSIS-Packs installed for the current user.

参数:
  • device_selector -- UTF-8 "device name", "device@pack/version", or "device/core@pack/version".

  • out_info -- On success, receives an independently allocated result; set to NULL on failure.

返回:

HFLINK_OK or an HFLINK_ERR_PACK_* code.

Free the device pack query result.

参数:
  • info -- Query result; may be NULL.

Enumerate the CMSIS-Packs installed for the current user.

参数:
  • count -- Receives the number of entries on success (may be 0).

  • out -- Receives the array on success; set to NULL on failure. With no pack installed, *out is NULL, count is 0, and HFLINK_OK is returned.

返回:

HFLINK_OK / HFLINK_ERR_PACK_NOT_FOUND (registry missing) / HFLINK_ERR_PACK_FORMAT / HFLINK_ERR.

Free the result of HFLink_Pack_ListInstalled.

List the family/subFamily/device tree of a pack.

参数:
  • pack_selector -- Pack identifier: HFLink_PackInfo::key, the pack name, or "vendor.name".

  • out -- On success, receives an allocated HFLink_PackDeviceTree; set to NULL on failure. Free with HFLink_PackDeviceList_Free.

返回:

HFLINK_OK / HFLINK_ERR_PACK_NOT_FOUND / HFLINK_ERR_PACK_AMBIGUOUS / HFLINK_ERR_PACK_FORMAT / HFLINK_ERR_PACK_VERSION.

Free the result of HFLink_Pack_ListDevices.