pyocd / pyOCD

Open source Python library for programming and debugging Arm Cortex-M microcontrollers
https://pyocd.io
Apache License 2.0
1.11k stars 477 forks source link

"pyocd pack --install stm32l4a6vg" installs "Keil::STM32L4xx_DFP::2.5.0" instead of "Keil::STM32L4xx_DFP::2.2.0". Because of this I get error "Target type 'stm32l4a6vg' not recognized." #1163

Closed sternocleidomastoid closed 3 years ago

jeromecoutant commented 3 years ago

v2.5.0 is better than v2.2.0 :-)

sternocleidomastoid commented 3 years ago

I edited the title to be more accurate. Yes, it may be better but in my opinion it should not install automatically if it doesn't support the device supplied.

jeromecoutant commented 3 years ago
$ grep 'device Dname="STM32L4A6VG' Keil.STM32L4xx_DFP.2.5.0.pdsc
        <device Dname="STM32L4A6VGTx">
        <device Dname="STM32L4A6VGTxP">
        <device Dname="STM32L4A6VGYx">
        <device Dname="STM32L4A6VGYxP">

try --install stm32l4a6vgtx

sternocleidomastoid commented 3 years ago

ver 2.5.0 already supports stm32l4a6vgtx so I just changed my target to stm32l4a6vgtx instead of stm32l4a6vg to make it work. thank you so much for your help! I guess I should have understood the naming convention for stm32 first.

jeromecoutant commented 3 years ago

stm32l4a6vg was the name in v2.2, they then changed the name... don't ask me why.....

flit commented 3 years ago

The name change to add the Tx and other suffixes makes partial sense in that some STM32 devices have more than just Tx suffix. But why almost all of the target names were changed is unclear (and not all have been changed).

Either way, pyocd (or more accurately cmsis-pack-manager) will always use the latest available pack version, and it performs a contains search. There is not a clear logical case for searching old pack versions, as it could result in unexpected behaviour (finding incorrectly named devices fixed in newer versions), and would require maintaining metadata (PDSC files) for all existent pack versions, thus exploding the index size. You can always use pyocd pack --find to search for the part numbers you're looking for.