CMSIS-Pack 查询
以下内容自动抽取自 sdk-headers/HFLinkDriver_pack.h ,含 6 个公开函数及全部公开类型。函数指针回调类型不单独列出,见所属结构体成员说明。
结构体
-
struct HFLink_PackAlgorithm
CMSIS-Pack Flash download algorithm information.
-
struct HFLink_PackMemory
CMSIS-Pack device memory region.
Public Members
-
char processor_name[HFLINK_PACK_PROCESSOR_TEXT_SIZE]
Processor owning the memory region; empty string for shared regions.
-
char processor_name[HFLINK_PACK_PROCESSOR_TEXT_SIZE]
-
struct HFLink_PackProcessor
CMSIS-Pack processor information.
-
struct HFLink_PackDebugAccessPath
Legacy DP/AP debug access path associated with a processor.
-
struct HFLink_PackDebugPort
CMSIS-Pack debugport declaration.
-
struct HFLink_PackAccessPort
CMSIS-Pack accessportV1/accessportV2 declaration.
-
struct HFLink_PackDebugConfig
CMSIS-Pack debugconfig merged field by field across device/subFamily/family.
Public Members
-
char protocol[HFLINK_PACK_DEBUG_PROTOCOL_SIZE]
Default debug protocol: swd, jtag, or cjtag.
-
char protocol[HFLINK_PACK_DEBUG_PROTOCOL_SIZE]
-
struct HFLink_PackSequence
CMSIS-Pack Debug Access Sequence with its processor selection metadata.
Public Members
-
char *processor_name
Empty string acts as a wildcard matching all processors.
-
char *processor_name
-
struct HFLink_PackDeviceInfo
Fully resolved device information from the installed CMSIS-Pack.
Public Members
-
char *processor_name
Processor name of the current target; NULL when no core was explicitly selected.
-
char *debug_description_path
Merged debugconfig.sdf path; also honors the legacy debugDescription field.
-
uint32_t sequence_count
Number of sequences; also the element count of the sequence_paths compatibility mirror.
-
char **sequence_paths
Path mirror kept for legacy callers; new code should use sequences.
-
char *processor_name
-
struct HFLink_PackInfo
Information about a single installed pack (for enumeration).
Public Members
-
char *key
Pack identifier: registry key; derived as "vendor.name" by default.
-
char *vendor
Pack vendor.
-
char *name
Pack name.
-
char *version
Pack version.
-
char *install_dir
Installation directory; may be NULL.
-
char *database
Relative path of the json under the Database directory; may be NULL.
-
char *key
-
struct HFLink_PackDeviceNode
Device tree leaf: one device (with overview information).
-
struct HFLink_PackSubFamily
Sub-family under a family.
-
struct HFLink_PackFamily
Family: directly attached devices plus sub-families.
-
struct HFLink_PackDeviceTree
Complete device tree of a pack (family -> subFamily -> device).
Public Members
-
char *key
Identifier of this pack (same as HFLink_PackInfo::key).
-
char *key
API
-
int HFLink_PackDevice_Query(const char *device_selector, HFLink_PackDeviceInfo **out_info)
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.
-
void HFLink_PackDevice_Free(HFLink_PackDeviceInfo *info)
Free the device pack query result.
- 参数:
info -- Query result; may be NULL.
-
int HFLink_Pack_ListInstalled(int *count, HFLink_PackInfo **out)
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.
-
void HFLink_Pack_ListInstalled_Free(HFLink_PackInfo *info, int count)
Free the result of HFLink_Pack_ListInstalled.
-
int HFLink_Pack_ListDevices(const char *pack_selector, HFLink_PackDeviceTree **out)
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.
-
void HFLink_PackDeviceList_Free(HFLink_PackDeviceTree *tree)
Free the result of HFLink_Pack_ListDevices.