docs: samples: Update pyocd calls to unified tool subcommands

pyocd 0.14.0 merged its command-line tools into a unified pyocd tool
with subcommands. The separate command-line tools still remain, but are
deprecated. Update all pyocd calls in samples and documentation to use
the new unified pyocd tool with subcommands.

Note that pyocd 0.15.0 has an issue with the command 'pyocd erase',
which was fixed in pyocd 0.16.0.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
diff --git a/docs/testplan-mynewt.md b/docs/testplan-mynewt.md
index 0b16fd4..5a227b9 100644
--- a/docs/testplan-mynewt.md
+++ b/docs/testplan-mynewt.md
@@ -150,8 +150,8 @@
 
 * Mass erase MCU
 
-        $ pyocd-flashtool -ce
+        $ pyocd erase --chip
 
 * Flashing image in slot 1:
 
-        $ pyocd-flashtool -se --address 0x80000 ${IMG_FILE} bin
+        $ pyocd flash -e sector -a 0x80000 ${IMG_FILE} bin
diff --git a/docs/testplan-zephyr.md b/docs/testplan-zephyr.md
index 2f7e255..bd5b34b 100644
--- a/docs/testplan-zephyr.md
+++ b/docs/testplan-zephyr.md
@@ -20,7 +20,7 @@
 
 Begin by doing a full erase, and programming the bootloader itself:
 
-    $ pyocd-flashtool -ce
+    $ pyocd erase --chip
     $ make flash_boot
 
 After it resets, look for "main: Starting bootloader", a few debug
@@ -44,7 +44,7 @@
 
 Now reset the target::
 
-    $ pyocd-tool reset
+    $ pyocd commander -c reset
 
 And you should see a revert and "hello1" running.
 
@@ -58,8 +58,8 @@
 
 We should have just booted the hello2.  Mark this as OK:
 
-    $ pyocd-flashtool -a 0x7ffe8 image_ok.bin
-    $ pyocd-tool reset
+    $ pyocd flash -a 0x7ffe8 image_ok.bin
+    $ pyocd commander -c reset
 
 And make sure this stays in the "hello2" image.
 
diff --git a/samples/zephyr/Makefile b/samples/zephyr/Makefile
index 5c3924c..938468e 100644
--- a/samples/zephyr/Makefile
+++ b/samples/zephyr/Makefile
@@ -75,7 +75,7 @@
 
 IMGTOOL = ../../scripts/imgtool.py
 ASSEMBLE = ../../scripts/assemble.py
-PYOCD_FLASHTOOL = pyocd-flashtool
+PYOCD = pyocd
 
 SOURCE_DIRECTORY := $(CURDIR)
 BUILD_DIRECTORY := $(CURDIR)/build/$(BOARD)
@@ -166,16 +166,16 @@
 # are hardcoded at this time.
 
 flash_boot:
-	$(PYOCD_FLASHTOOL) -ce -a 0 mcuboot.bin
+	$(PYOCD) flash -e chip -a 0 mcuboot.bin
 
 flash_hello1:
-	$(PYOCD_FLASHTOOL) -a 0x20000 signed-hello1.bin
+	$(PYOCD) flash -a 0x20000 signed-hello1.bin
 
 flash_hello2:
-	$(PYOCD_FLASHTOOL) -a 0x80000 signed-hello2.bin
+	$(PYOCD) flash -a 0x80000 signed-hello2.bin
 
 flash_full:
-	$(PYOCD_FLASHTOOL) -ce -a 0 full.bin
+	$(PYOCD) flash -e chip -a 0 full.bin
 
 # These test- targets reinvoke make with the configuration set to test
 # various configurations.  This will generally be followed by using
diff --git a/samples/zephyr/run-tests.go b/samples/zephyr/run-tests.go
index 45c0a19..1b1fd76 100644
--- a/samples/zephyr/run-tests.go
+++ b/samples/zephyr/run-tests.go
@@ -51,7 +51,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-good-rsa"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -70,7 +70,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello1",
 			},
@@ -82,7 +82,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-good-ecdsa"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -101,7 +101,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello1",
 			},
@@ -113,7 +113,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-overwrite"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -132,7 +132,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello2",
 			},
@@ -144,7 +144,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-bad-rsa-upgrade"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -163,7 +163,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello1",
 			},
@@ -175,7 +175,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-bad-ecdsa-upgrade"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -194,7 +194,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello1",
 			},
@@ -206,7 +206,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-no-bootcheck"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -225,7 +225,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello1",
 			},
@@ -237,7 +237,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-wrong-rsa"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -256,7 +256,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello1",
 			},
@@ -268,7 +268,7 @@
 			{
 				commands: [][]string{
 					{"make", "test-wrong-ecdsa"},
-					{"pyocd-flashtool", "-ce"},
+					{"pyocd", "erase", "--chip"},
 					{"make", "flash_boot"},
 				},
 				expect: "Unable to find bootable image",
@@ -287,7 +287,7 @@
 			},
 			{
 				commands: [][]string{
-					{"pyocd-tool", "reset"},
+					{"pyocd", "commander", "-c", "reset"},
 				},
 				expect: "Hello World from hello1",
 			},
diff --git a/samples/zephyr/run-tests.sh b/samples/zephyr/run-tests.sh
index a6794d6..e2e4a9c 100755
--- a/samples/zephyr/run-tests.sh
+++ b/samples/zephyr/run-tests.sh
@@ -33,7 +33,7 @@
 echo '--------------------------------------------------------'
 echo '------------------------ GOOD RSA ----------------------'
 make test-good-rsa
-pyocd-flashtool -ce
+pyocd erase --chip
 echo "Flashing bootloader"
 make flash_boot
 echo "Expected result: unable to find bootable image"
@@ -47,14 +47,14 @@
 echo "Expected result: hello2 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello1 runs"
 ok_yn
 
 echo '--------------------------------------------------------'
 echo '------------------------ GOOD ECDSA --------------------'
 make test-good-ecdsa
-pyocd-flashtool -ce
+pyocd erase --chip
 make flash_boot
 echo "Expected result: unable to find bootable image"
 ok_yn
@@ -67,14 +67,14 @@
 echo "Expected result: hello2 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello1 runs"
 ok_yn
 
 echo '--------------------------------------------------------'
 echo '------------------------ OVERWRITE ---------------------'
 make test-overwrite
-pyocd-flashtool -ce
+pyocd erase --chip
 make flash_boot
 echo "Expected result: unable to find bootable image"
 ok_yn
@@ -87,14 +87,14 @@
 echo "Expected result: hello2 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello2 runs"
 ok_yn
 
 echo '--------------------------------------------------------'
 echo '------------------------ BAD RSA -----------------------'
 make test-bad-rsa-upgrade
-pyocd-flashtool -ce
+pyocd erase --chip
 make flash_boot
 echo "Expected result: unable to find bootable image"
 ok_yn
@@ -107,14 +107,14 @@
 echo "Expected result: hello1 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello1 runs"
 ok_yn
 
 echo '--------------------------------------------------------'
 echo '------------------------ BAD ECDSA ---------------------'
 make test-bad-ecdsa-upgrade
-pyocd-flashtool -ce
+pyocd erase --chip
 make flash_boot
 echo "Expected result: unable to find bootable image"
 ok_yn
@@ -127,14 +127,14 @@
 echo "Expected result: hello1 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello1 runs"
 ok_yn
 
 echo '--------------------------------------------------------'
 echo '------------------------ NO BOOTCHECK ------------------'
 make test-no-bootcheck
-pyocd-flashtool -ce
+pyocd erase --chip
 make flash_boot
 echo "Expected result: unable to find bootable image"
 ok_yn
@@ -147,14 +147,14 @@
 echo "Expected result: hello1 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello1 runs"
 ok_yn
 
 echo '--------------------------------------------------------'
 echo '------------------------ WRONG RSA ---------------------'
 make test-wrong-rsa
-pyocd-flashtool -ce
+pyocd erase --chip
 make flash_boot
 echo "Expected result: unable to find bootable image"
 ok_yn
@@ -167,14 +167,14 @@
 echo "Expected result: hello1 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello1 runs"
 ok_yn
 
 echo '--------------------------------------------------------'
 echo '------------------------ WRONG ECDSA -------------------'
 make test-wrong-ecdsa
-pyocd-flashtool -ce
+pyocd erase --chip
 make flash_boot
 echo "Expected result: unable to find bootable image"
 ok_yn
@@ -187,7 +187,7 @@
 echo "Expected result: hello1 runs"
 ok_yn
 echo "Resetting"
-pyocd-tool reset
+pyocd commander -c reset
 echo "Expected result: hello1 runs"
 ok_yn