cmsis-pack-manager icon indicating copy to clipboard operation
cmsis-pack-manager copied to clipboard

Include Dname in index

Open flit opened this issue 6 years ago • 1 comments

The pack index does not appear to include Dname part numbers, only Dvariant.

For instance, the NXP MIMXRT1052_DFP pack has a Dname of "MIMXRT1052xxxxB" with several Dvariants, including "MIMXRT1052CVJ5B". Only the Dvariant names are present in the index.

flit avatar Apr 11 '19 22:04 flit

This is intentional.

You can probably blame me for this bit of confusion in CMSIS-Pack specification. The necessity for the definition of variants came in after the initial version and strongly pushed for by some partner feedback.

Once we have a variant defined for a device, the Dname attribute string becomes a "group name" (just like Dfamily and DsubFamily) and the Dvariant attribute string becomes the name string by which the device is referenced/selected.

This means that in the tools you can really only select the devices specified as <variant> MIMXRT1052CVL5B MIMXRT1052CVJ5B MIMXRT1052DVL6B MIMXRT1052DVJ6B

From a tooling perspective the device index must only list 'devices' regardless of whether specified by a <device Dname=""> or <variant Dvariant=""> tag (leafs in the description tree)

In the tools every project target specifies the Device as: Dvendor + Dname (where Dname is the string specified by Dname or Dvariant in the <devices> description!)

Note: I don't yet understand why NXP chose to define these as variants rather than devices. The reason why it does not make sense to refer to a device by the name MIMXRT1052xxxxB is because this would not be specific enough e.g. for pin configuration tools. But often it also matters for conditional compilation of device header files <compile header="fsl_device_registers.h" define="CPU_MIMXRT1052CVL5B"/>

I hope this explains it. I do appreciate it is not a great design.

~ Joachim

jkrech avatar Apr 12 '19 06:04 jkrech