From 9e0b16617fc3da7c901cf415a6c448b4cd44b39d Mon Sep 17 00:00:00 2001 From: sago35 Date: Fri, 18 Sep 2020 18:38:31 +0900 Subject: [PATCH 1/2] boards/machine: unify procedures for each OS --- content/microcontrollers/feather-m4.md | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/content/microcontrollers/feather-m4.md b/content/microcontrollers/feather-m4.md index 13f35c02..bd28de84 100644 --- a/content/microcontrollers/feather-m4.md +++ b/content/microcontrollers/feather-m4.md @@ -26,7 +26,7 @@ The [Adafruit Feather M4](https://www.adafruit.com/product/3857) is a tiny ARM d The Feather M4 comes with the [UF2 bootloader](https://github.com/Microsoft/uf2) already installed. -### CLI Flashing on Linux +### CLI Flashing - Plug your Feather M4 into your computer's USB port. - Flash your TinyGo program to the board using this command: @@ -37,27 +37,6 @@ The Feather M4 comes with the [UF2 bootloader](https://github.com/Microsoft/uf2) - The Feather M4 board should restart and then begin running your program. -### CLI Flashing on macOS - -- Plug your Feather M4 into your computer's USB port. -- Flash your TinyGo program to the board using this command: - - ```shell - tinygo flash -target=feather-m4 [PATH TO YOUR PROGRAM] - ``` - -- The Feather M4 board should restart and then begin running your program. - -### CLI Flashing on Windows - -- Plug your Feather M4 into your computer's USB port. -- Flash your TinyGo program to the board using this command: - - ```shell - tinygo flash -target=feather-m4 [PATH TO YOUR PROGRAM] - ``` - -- The Feather M4 board should restart and then begin running your program. ### Troubleshooting From 9982006e4d008f802021ba05f41018849a11ff35 Mon Sep 17 00:00:00 2001 From: sago35 Date: Fri, 18 Sep 2020 18:39:08 +0900 Subject: [PATCH 2/2] boards: add cli-flashing-with-openocd --- content/microcontrollers/feather-m4.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/content/microcontrollers/feather-m4.md b/content/microcontrollers/feather-m4.md index bd28de84..51c8be1d 100644 --- a/content/microcontrollers/feather-m4.md +++ b/content/microcontrollers/feather-m4.md @@ -37,6 +37,22 @@ The Feather M4 comes with the [UF2 bootloader](https://github.com/Microsoft/uf2) - The Feather M4 board should restart and then begin running your program. +### CLI Flashing with openocd + +- Plug your Feather M4 into your computer's USB port. +- Plug the openocd debugger into your computer's USB port and connect it to the Feather M4. +- Flash your TinyGo program to the board using this command: + + ```shell + tinygo flash -target=feather-m4 -programmer cmsis-dap [PATH TO YOUR PROGRAM] + tinygo flash -target=feather-m4 -programmer jnlik [PATH TO YOUR PROGRAM] + tinygo flash -target=feather-m4 -programmer stlink-v2 [PATH TO YOUR PROGRAM] + tinygo flash -target=feather-m4 -programmer stlink-v2-1 [PATH TO YOUR PROGRAM] + ``` + +- The Feather M4 board should restart and then begin running your program. + - In some cases, restart fails on TinyGo 0.15, but when you press reset, begin running your program. + - This issue will be fixed in TinyGo 0.16 ### Troubleshooting