[mbedmicro/pyOCD] cmsis-pack-manager integration (#610)

7 views
Skip to first unread message

Chris Reed

unread,
Apr 11, 2019, 8:38:22 PM4/11/19
to mbedmicro/pyOCD, Subscribed

The cmsis-pack-manager project is made use of by pyOCD to make it substantially easier for users to manage CMSIS-Packs.

A new pack subcommand for the pyocd tool has been added. This subcommand can be used to refresh the global pack index, list installed packs, find device part numbers in available packs, and add target support by downloading select packs.

All a user needs to do now to add support for a new target is run a command like this:

pyocd pack --update --add da1458

This will first update the global pack index, concurrently downloading all vendor indexes. Then it will install all packs that provide device part numbers matching the glob pattern 'da1458*'.

Complete usage of the pack subcommand:

usage: pyocd pack [-h] [-v] [-q] [-c] [-u] [-s] [-f GLOB] [-a GLOB] [-n]

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         More logging. Can be specified multiple times.
  -q, --quiet           Less logging. Can be specified multiple times.
  -c, --clean           Erase all stored pack information.
  -u, --update          Update the pack index.
  -s, --show            Show the list of installed devices and packs.
  -f GLOB, --find GLOB  Look up a device part number in the index using a glob
                        pattern. The pattern is suffixed with '*'. Can be
                        specified multiple times.
  -a GLOB, --add GLOB   Download pack(s) to support targets matching the glob
                        pattern. The pattern is suffixed with '*'. Can be
                        specified multiple times.
  -n, --no-download     Just list the pack(s) that would be downloaded, don't
                        actually download anything.

When the target type set by the user doesn't match an builtin target or one of the packs explicitly listed with the --pack argument or pack user option, pyOCD will check the cmsis-pack-manager installed packs.

pyocd list --targets will include any targets supported via installed cmsis-pack-manager packs.


You can view, comment on, or merge this pull request online at:

  https://github.com/mbedmicro/pyOCD/pull/610

Commit Summary

  • Sorted requirements in setup.py.
  • Target and board listing improvements.
  • Support for DFP targets managed by cmsis-pack-manager.

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Chris Reed

unread,
Apr 11, 2019, 8:38:29 PM4/11/19
to mbedmicro/pyOCD, Subscribed

/morph test

Brian Daniels

unread,
Apr 12, 2019, 11:06:56 AM4/12/19
to mbedmicro/pyOCD, Subscribed

Does the --add argument need to always be supplied with the --update argument? Or are they two separate operations?

Chris Reed

unread,
Apr 12, 2019, 12:47:33 PM4/12/19
to mbedmicro/pyOCD, Subscribed

They are separate operations. Though I'm thinking of changing --add to automatically download the index if that hasn't been done yet. Another option is to always update the index for every --find or --add operation. This is similar to how homebrew always updates its recipes (via git) before performing a requested install. Probably with a --no-update option.

Brian Daniels

unread,
Apr 12, 2019, 2:44:48 PM4/12/19
to mbedmicro/pyOCD, Subscribed

Got it, just curious. Thanks!

Chris Reed

unread,
Apr 13, 2019, 4:59:09 PM4/13/19
to mbedmicro/pyOCD, Subscribed

Changed --add to --install. Also, if either --install or --find are executed but there is not a pack index present, the index will be automatically downloaded instead of reporting an error. It only automatically downloads the index if it's not present.

Chris Reed

unread,
Apr 13, 2019, 4:59:39 PM4/13/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 13, 2019, 5:22:10 PM4/13/19
to mbedmicro/pyOCD, Push

@flit pushed 1 commit.

  • 663f944 Corrected expected targets JSON minor version in gdb_server_json_test.py.


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Chris Reed

unread,
Apr 15, 2019, 12:26:08 PM4/15/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 15, 2019, 6:14:41 PM4/15/19
to mbedmicro/pyOCD, Push

@flit pushed 2 commits.

  • 279f939 CMSIS-Pack docs.
  • 32bd646 Some misc docs fixes and small improvements.


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Chris Reed

unread,
Apr 15, 2019, 6:14:55 PM4/15/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 15, 2019, 6:19:57 PM4/15/19
to mbedmicro/pyOCD, Push

@flit pushed 1 commit.

  • 41a86cc Fix for pack targets with multiple sector sizes.


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Chris Reed

unread,
Apr 15, 2019, 6:20:22 PM4/15/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 15, 2019, 6:42:33 PM4/15/19
to mbedmicro/pyOCD, Subscribed

/morph test

Chris Reed

unread,
Apr 15, 2019, 7:04:04 PM4/15/19
to mbedmicro/pyOCD, Subscribed

Merged #610 into master.

Reply all
Reply to author
Forward
0 new messages