Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyocd defaulting to outdated Keil.SAMD21_DFP when updated Microchip.SAMD21_DFP exists #1675

Open
IvanVeloz opened this issue Feb 27, 2024 · 0 comments

Comments

@IvanVeloz
Copy link

First of all sorry title, I just wanted something that will show up on searches if someone else gets stuck. A more accurate description is would be: when multiple packages exist for a part, pyocd is silently defaulting to one package.

In my case, I tried to install a pack for the popular ATSAMD21G18A used in some of the recent Arduinos and competitors. pyocd picks up the pack "Keil.SAMD21_DFP", which seems to be very outdated (version 1.3.2 and marked as "deprecated").

⬢[ivan@toolbox ivan]$ pyocd pack install ATSAMD21G18A
0000274 I No pack index present, downloading now... [pack_cmd]
Downloading packs (press Control-C to cancel):
    Keil.SAMD21_DFP.1.3.2
Downloading descriptors (001/001)
⬢[ivan@toolbox ivan]$ pyocd pack show
  Pack              Version  
-----------------------------
  Keil.SAMD21_DFP   1.3.2  
⬢[ivan@toolbox ivan]$ pyocd list --targets
  Name                      Vendor                   Part Number                  Families                Source   
-------------------------------------------------------------------------------------------------------------------
  air001                    AirM2M                   Air001                                               builtin  
  air32f103xb               AirM2M                   Air32F103xB                                          builtin  
  air32f103xc               AirM2M                   Air32F103xC                                          builtin  
  air32f103xe               AirM2M                   Air32F103xE                                          builtin  
  air32f103xg               AirM2M                   Air32F103xG                                          builtin  
  air32f103xp               AirM2M                   Air32F103xP                                          builtin  
  atsamd21e15a              Microchip                ATSAMD21E15A                 SAM D Series, SAM D21   pack     
  atsamd21e15b              Microchip                ATSAMD21E15B                 SAM D Series, SAM D21   pack     
  atsamd21e15bu             Microchip                ATSAMD21E15BU                SAM D Series, SAM D21   pack     
  atsamd21e15l              Microchip                ATSAMD21E15L                 SAM D Series, SAM D21   pack     
  atsamd21e16a              Microchip                ATSAMD21E16A                 SAM D Series, SAM D21   pack     
  atsamd21e16b              Microchip                ATSAMD21E16B                 SAM D Series, SAM D21   pack     
  atsamd21e16bu             Microchip                ATSAMD21E16BU                SAM D Series, SAM D21   pack     
  atsamd21e16l              Microchip                ATSAMD21E16L                 SAM D Series, SAM D21   pack     
  atsamd21e17a              Microchip                ATSAMD21E17A                 SAM D Series, SAM D21   pack     
  atsamd21e18a              Microchip                ATSAMD21E18A                 SAM D Series, SAM D21   pack     
  atsamd21g15a              Microchip                ATSAMD21G15A                 SAM D Series, SAM D21   pack     
  atsamd21g15b              Microchip                ATSAMD21G15B                 SAM D Series, SAM D21   pack     
  atsamd21g15l              Microchip                ATSAMD21G15L                 SAM D Series, SAM D21   pack     
  atsamd21g16a              Microchip                ATSAMD21G16A                 SAM D Series, SAM D21   pack     
  atsamd21g16b              Microchip                ATSAMD21G16B                 SAM D Series, SAM D21   pack     
  atsamd21g16l              Microchip                ATSAMD21G16L                 SAM D Series, SAM D21   pack     
  atsamd21g17a              Microchip                ATSAMD21G17A                 SAM D Series, SAM D21   pack     
  atsamd21g17au             Microchip                ATSAMD21G17AU                SAM D Series, SAM D21   pack     
  atsamd21g18a              Microchip                ATSAMD21G18A                 SAM D Series, SAM D21   pack     
  atsamd21g18au             Microchip                ATSAMD21G18AU                SAM D Series, SAM D21   pack     
  atsamd21j15a              Microchip                ATSAMD21J15A                 SAM D Series, SAM D21   pack     
  atsamd21j15b              Microchip                ATSAMD21J15B                 SAM D Series, SAM D21   pack     
  atsamd21j16a              Microchip                ATSAMD21J16A                 SAM D Series, SAM D21   pack     
  atsamd21j16b              Microchip                ATSAMD21J16B                 SAM D Series, SAM D21   pack     
  atsamd21j17a              Microchip                ATSAMD21J17A                 SAM D Series, SAM D21   pack     
  atsamd21j18a              Microchip                ATSAMD21J18A                 SAM D Series, SAM D21   pack     
  cc3220sf                  Texas Instruments        CC3220SF                                             builtin  
  cortex_m                  Generic                  CoreSightTarget                                      builtin  
  cy8c64_sysap              Cypress                  cy8c64_sysap                                         builtin  
  cy8c64x5_cm0              Cypress                  cy8c64x5_cm0                                         builtin  
  cy8c64x5_cm0_full_flash   Cypress                  cy8c64x5_cm0_full_flash                              builtin  
  cy8c64x5_cm4              Cypress                  cy8c64x5_cm4                                         builtin  
  cy8c64x5_cm4_full_flash   Cypress                  cy8c64x5_cm4_full_flash                              builtin  

I noticed this because the version didn't match the packs I manually downloaded from the Arm website (called Microchip.SAMD21_DFP, version 3.6.144). So I typed pyocd pack find atsamd21 and got results with a mix of both packages:

⬢[ivan@toolbox ivan]$ pyocd pack find atsamd21
  Part            Vendor      Pack                   Version   Installed  
--------------------------------------------------------------------------
  ATSAMD21E15A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E15B    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E15BU   Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E15CU   Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21E15L    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E16A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E16B    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E16BU   Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E16CU   Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21E16L    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E17A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21E17D    Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21E17DU   Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21E17L    Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21E18A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G15A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G15B    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G15L    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G16A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G16B    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G16L    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G17A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G17AU   Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G17D    Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21G17L    Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21G18A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21G18AU   Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21J15A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21J15B    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21J16A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21J16B    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21J17A    Microchip   Keil.SAMD21_DFP        1.3.2     False      
  ATSAMD21J17D    Microchip   Microchip.SAMD21_DFP   3.6.144   False      
  ATSAMD21J18A    Microchip   Keil.SAMD21_DFP        1.3.2     False  

Seems like some parts are only available on Microchip.SAMD21_DFP. So I tried installing support for one of those parts, and I also got the original part I was looking for, with the Microchip pack.

  ⬢[ivan@toolbox ivan]$ pyocd pack install ATSAMD21J17D
Downloading packs (press Control-C to cancel):
    Microchip.SAMD21_DFP.3.6.144
Downloading descriptors (001/001)
⬢[ivan@toolbox ivan]$ pyocd list --targets
  Name                      Vendor                   Part Number                  Families   Source   
------------------------------------------------------------------------------------------------------
  air001                    AirM2M                   Air001                                  builtin  
  [...]
  air32f103xp               AirM2M                   Air32F103xP                             builtin  
  atsamd21e15a              Microchip                ATSAMD21E15A                 SAMD21     pack     
  atsamd21e15b              Microchip                ATSAMD21E15B                 SAMD21     pack     
  atsamd21e15bu             Microchip                ATSAMD21E15BU                SAMD21     pack     
  atsamd21e15cu             Microchip                ATSAMD21E15CU                SAMD21     pack     
  atsamd21e15l              Microchip                ATSAMD21E15L                 SAMD21     pack     
  atsamd21e16a              Microchip                ATSAMD21E16A                 SAMD21     pack     
  atsamd21e16b              Microchip                ATSAMD21E16B                 SAMD21     pack     
  atsamd21e16bu             Microchip                ATSAMD21E16BU                SAMD21     pack     
  atsamd21e16cu             Microchip                ATSAMD21E16CU                SAMD21     pack     
  atsamd21e16l              Microchip                ATSAMD21E16L                 SAMD21     pack     
  atsamd21e17a              Microchip                ATSAMD21E17A                 SAMD21     pack     
  atsamd21e17d              Microchip                ATSAMD21E17D                 SAMD21     pack     
  atsamd21e17du             Microchip                ATSAMD21E17DU                SAMD21     pack     
  atsamd21e17l              Microchip                ATSAMD21E17L                 SAMD21     pack     
  atsamd21e18a              Microchip                ATSAMD21E18A                 SAMD21     pack     
  atsamd21g15a              Microchip                ATSAMD21G15A                 SAMD21     pack     
  atsamd21g15b              Microchip                ATSAMD21G15B                 SAMD21     pack     
  atsamd21g15l              Microchip                ATSAMD21G15L                 SAMD21     pack     
  atsamd21g16a              Microchip                ATSAMD21G16A                 SAMD21     pack     
  atsamd21g16b              Microchip                ATSAMD21G16B                 SAMD21     pack     
  atsamd21g16l              Microchip                ATSAMD21G16L                 SAMD21     pack     
  atsamd21g17a              Microchip                ATSAMD21G17A                 SAMD21     pack     
  atsamd21g17au             Microchip                ATSAMD21G17AU                SAMD21     pack     
  atsamd21g17d              Microchip                ATSAMD21G17D                 SAMD21     pack     
  atsamd21g17l              Microchip                ATSAMD21G17L                 SAMD21     pack     
  atsamd21g18a              Microchip                ATSAMD21G18A                 SAMD21     pack     
  atsamd21g18au             Microchip                ATSAMD21G18AU                SAMD21     pack     
  atsamd21j15a              Microchip                ATSAMD21J15A                 SAMD21     pack     
  atsamd21j15b              Microchip                ATSAMD21J15B                 SAMD21     pack     
  atsamd21j16a              Microchip                ATSAMD21J16A                 SAMD21     pack     
  atsamd21j16b              Microchip                ATSAMD21J16B                 SAMD21     pack     
  atsamd21j17a              Microchip                ATSAMD21J17A                 SAMD21     pack     
  atsamd21j17d              Microchip                ATSAMD21J17D                 SAMD21     pack     
  atsamd21j18a              Microchip                ATSAMD21J18A                 SAMD21     pack     
  cc3220sf                  Texas Instruments        CC3220SF                                builtin  
  cortex_m                  Generic                  CoreSightTarget                         builtin  
  cy8c64_sysap              Cypress                  cy8c64_sysap                            builtin  
  [...]
  ytm32b1me0                YTMicro                  YTM32B1ME0                              builtin  

I think it may be picking up Keil instead of Microchip because K comes before M in the alphabet, and the list could be alphabetical.

Ideally, pyocd would detect there are multiple matches, and let you choose what pack you want to install for that name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant