target-gen 0.31.0

A cli tool to create new target files for probe-rs ot of CMSIS-Packs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::Result;
use cmsis_pack::{pack_index::Vidx, utils::FromElem};

/// Fetches the master VIDX/PIDX file from the ARM server and returns the parsed file.
pub async fn get_vidx() -> Result<Vidx> {
    let reader = reqwest::Client::new()
        .get("https://www.keil.com/pack/index.pidx")
        .send()
        .await?
        .text()
        .await?;

    let vidx = Vidx::from_string(&reader)?;

    Ok(vidx)
}