target-gen 0.13.0

A cli tool to create new target files for probe-rs ot of CMSIS-Packs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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(crate) fn get_vidx() -> Result<Vidx> {
    let reader = reqwest::blocking::Client::new()
        .get("https://www.keil.com/pack/index.pidx")
        .send()?
        .text()?;

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

    Ok(vidx)
}