Open-CMSIS-Pack / Open-CMSIS-Pack-Spec

Common Microcontroller Software Interface Standard - Pack(age) based distribution system
https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/
Apache License 2.0
50 stars 19 forks source link

Reduce DFP packs by zipping SVD files #269

Open tarek-bochkati opened 7 months ago

tarek-bochkati commented 7 months ago

I am thinking a lot on how to reduce the DFP Packs size.

I have logged these issues: [SVD] optional peripherals [Question] does SVD specification allows entity inclusions ?

but there is one simple solution, which is to have SVD files zipped inside the pack. and the tool should unzip at the runtime.

<?xml version="1.0" encoding="UTF-8"?>
<package ... >
  <vendor>STMicroelectronics</vendor>
  <name>stm32u5xx_dfp</name>
  <!-- ... -->
  <devices>
    <family Dfamily="STM32U5 Series" Dvendor="STMicroelectronics:13">
      <subFamily DsubFamily="STM32U575/585">
        <device Dname="STM32U575ZI">
          <debug svd="SVD/STM32U575.zip"/>
          <!-- ... -->
        </device>
<!-- ... -->

I have done the measurement, for STM32U5xx SVD files: zipping each file individually the size decreased from ~100MB to ~3MB

Despite that this can be complex for tools to adapt, the gain on the disk space is huge and worth investigation.