diff --git a/docs/Meadow/Getting_Started/Deploying_Meadow.OS/index.md b/docs/Meadow/Getting_Started/Deploying_Meadow.OS/index.md index 2a2640482..fbcc42afc 100644 --- a/docs/Meadow/Getting_Started/Deploying_Meadow.OS/index.md +++ b/docs/Meadow/Getting_Started/Deploying_Meadow.OS/index.md @@ -1,7 +1,7 @@ --- layout: Meadow sidebar_label: Deploy Meadow.OS -title: Meadow.OS Deployment +title: Deploying Meadow.OS subtitle: Flashing the Meadow with the latest OS via Meadow.CLI --- @@ -10,48 +10,51 @@ When you receive your Meadow board, it will need to have the latest Meadow.OS up -### Install .NET SDK +[//]: # (Whenever editing these OS sections, make sure any common instructions are edited in the other OS/IDE sections as well to keep them in sync with each other.) -Download and install version 8 [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet). +### Step 1 - Create a Wilderness Labs Account -### Install or update Meadow CLI -To install Meadow CLI, execute the following command in your console: +In order to download the latest version of Meadow.OS, you will need to [register for a **Wilderness Labs Account**](https://identity.wildernesslabs.co/signin/register). -```console -dotnet tool install WildernessLabs.Meadow.CLI --global -``` +### Step 2 - Install .NET SDK -To update Meadow CLI, if already installed, execute the following command in your console: +Download and install version 8 [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet). -```console -dotnet tool update WildernessLabs.Meadow.CLI --global -``` +### Step 3 - Install Meadow.CLI + +The way we flash Meadow boards (among other things) is via our command-line-interface tool called [Meadow.CLI](../../Meadow_Tools/Meadow_CLI/). Make sure you have it installed to continue. -### Install dfu-util +### Step 4 - Install dfu-util From a console with admin rights, execute following command: ```console meadow install dfu-util ``` -### Put the device into DFU Bootloader mode. -To update the OS, Meadow must be in _DFU bootloader_ mode. To enter this mode, the `BOOT` button needs to be held down while the board boots up. This can be accomplished one of two ways. +### Step 5 - Put the device into DFU Bootloader mode -**If the board is disconnected:** hold the `BOOT` button down and connect the board to your computer via a Micro USB Cable. +To flash your board with the latest OS, Meadow must be in _DFU bootloader_ mode. To enter this mode, the `BOOT` button needs to be held down while the board boots up. This can be accomplished one of two ways. -**If the board is connected:** hold the `BOOT` button down, and then press and release the `RST` (Reset) button. Then release the `BOOT` button. +* **If the board is disconnected:** hold the `BOOT` button down and connect the board to your computer via a Micro USB Cable. + +* **If the board is connected:** hold the `BOOT` button down, and then press and release the `RST` (Reset) button. Then release the `BOOT` button. ![Meadow board with boot button labeled at the end of the header on the battery JST side of the board.](./wildernesslabs_meadow_boot_button.jpg) -### Install Meadow USB drivers +### Step 6 - Install Meadow USB drivers + +#### Checking Meadow USB drivers Before flashing a Meadow board, open the Device Manager and check: -- When connecting the board while holding down the BOOT button to power it on in **Bootloader mode** it should show up as a `STM32 BOOTLOADER` device under `Universal Serial Bus Devices` section. -- When connecting it normally it should show up as a `USB Serial Device (COMX)` under the `Ports (COM & LPT)` section -![Meadow drivers shown in Bootloader and regular mode](meadow_driver_state.png) +- When the board is in **Bootloader mode** it should show up as a `STM32 BOOTLOADER` device under `Universal Serial Bus Devices` section. +- When the board is connected normally it should show up as a `USB Serial Device (COMX)` under the `Ports (COM & LPT)` section + + ![Meadow drivers shown in Bootloader and regular mode](meadow_driver_state.png) -If the board is in this state you can skip the next step and move on to the [Download Meadow OS and network binaries](#download-meadow-os-and-network-binaries). +If the board is in this state you can head over to the next step. + +#### Updating Meadow USB drivers If Meadow shows as **Meadow F7 Micro (COMX)** in regular mode, right-click on it and select **Uninstall Device**, and make sure to select *Attempt to remove the driver for this device* like so: @@ -60,25 +63,38 @@ If Meadow shows as **Meadow F7 Micro (COMX)** in regular mode, right-click on it Now to flash Meadow OS, *dfu-util* is recommended. However, the default Windows USB driver for ST devices is not compatible with *dfu-util*, so it needs to be replaced. For more in-depth information on this, check out [Scott Hanselman's post](https://www.hanselman.com/blog/how-to-fix-dfuutil-stm-winusb-zadig-bootloaders-and-other-firmware-flashing-issues-on-windows). Follow these steps: 1. Download and run [Zadig](https://zadig.akeo.ie/) -1. Connect the Meadow device holding the BOOT button pressed to power it on in **Bootloader mode**. +1. Connect the Meadow device holding the BOOT button pressed to power it on in **Bootloader mode**. 1. In Zadig, click *Options* > *List All Devices* 1. Select **STM32 BOOTLOADER** in the dropdown 1. Click *Replace Driver* - ![Zadig showing STM32 Bootloader device selected and WinUSB driver chosen with a Replace Driver button.](./zadig1.png) + ![Zadig showing STM32 Bootloader device selected and WinUSB driver chosen with a Replace Driver button.](./zadig1.png) 1. After the installation is complete, driver should be *WinUSB* - ![Zadig showing the replaced driver as WinUSB with a Reinstall Driver button.](./zadig2.png) + ![Zadig showing the replaced driver as WinUSB with a Reinstall Driver button.](./zadig2.png) + +Your board is now ready to flash it with latest Meadow.OS version. + +### Step 7 - Log in to your Wilderness Labs account + +Use the following command to log into your Wilderness Labs Account: + +```console +meadow login +``` + +This will open a web browser where you'll need to enter your account credentials. If successful, you'll receive a confirmation on the CLI. + +### Step 8 - Download Meadow.OS -### Download Meadow OS and network binaries -Execute the following command in your console: +Now we can download the latest Meadow.OS binary files with the command: ```console meadow firmware download ``` -### Flash Meadow.OS and Coprocessor Firmware +### Step 9 - Flash Meadow.OS Once connected the Meadow device via the USB cable and having put the device into DFU Bootloader mode, execute the following command in your console: @@ -93,14 +109,19 @@ Your board is now ready to have a Meadow application deployed to it! -### Install .NET SDK +[//]: # (Whenever editing these OS sections, make sure any common instructions are edited in the other OS/IDE sections as well to keep them in sync with each other.) + +### Step 1 - Create a Wilderness Labs Account + +In order to download the latest version of Meadow.OS, you will need to [register for a **Wilderness Labs Account**](https://identity.wildernesslabs.co/signin/register). + +### Step 2 - Install .NET SDK Download and install version 8 [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet) for your Mac's processor architecture. -Even if you are working on an ARM-based computer, such as Apple M1, M1 Pro, or M2 CPUs, you should still install the x86 version of the .NET SDK. +### Step 3 - Install or update Meadow CLI -### Install or update Meadow CLI -To install Meadow CLI, execute the following command in your terminal: +To install [Meadow CLI](/Meadow/Meadow_Tools/Meadow_CLI/) as a .NET tool, execute the following command in your terminal: ```console dotnet tool install WildernessLabs.Meadow.CLI --global @@ -112,14 +133,7 @@ To update Meadow CLI, if already installed, execute the following command in you dotnet tool update WildernessLabs.Meadow.CLI --global ``` -If you are working on an ARM-based Mac (M1, M1 Pro, M2 CPU), you will also need to explicitly add the x64 version of `libusb` and add an additional location to your `PATH` variable that aren't added by default on those systems. - -```console -arch -arm64 brew install libusb -export PATH=/usr/local/share/dotnet/x64/:$PATH -``` - -### Install dfu-util +### Step 4 - Install dfu-util To install `dfu-util`, we'll be using **Homebrew**. If you don't have it yet, [install Homebrew](https://brew.sh/) first. @@ -129,7 +143,7 @@ Execute the following command in your terminal: brew install dfu-util ``` -### Download Meadow OS and network binaries +### Step 5 - Download Meadow OS and network binaries Execute the following command in your terminal: @@ -145,19 +159,24 @@ If your terminal cannot find the `meadow` command, it means the .NET SDK didn't export PATH="$PATH:$HOME/.dotnet/tools" ``` -### Put the device into DFU Bootloader mode. +### Step 6 - Put the device into DFU Bootloader mode + To update the OS, Meadow must be in _DFU bootloader_ mode. To enter this mode, the `BOOT` button needs to be held down while the board boots up. This can be accomplished one of two ways. **If the board is disconnected:** hold the `BOOT` button down and connect the board to your computer via a Micro USB Cable. -**If the board is connected:** hold the `BOOT` button down, and then press and release the `RST` (Reset) button. Then release the `BOOT` button. +**If the board is connected:** hold the `BOOT` button down, and then press and release the `RST` (Reset) button. Then release the `BOOT` button. ![Meadow board with boot button labeled at the end of the header on the battery JST side of the board.](./wildernesslabs_meadow_boot_button.jpg) -### Flash Meadow.OS and Coprocessor Firmware +> NOTE: On macOS Sonoma and newer, you may need to allow USB device access for both regular Meadow mode and bootloader mode. If you release the `BOOT` button before allowing the USB access in bootloader mode, your device may not be available for writing the firmware. Repeat the above process after alowing for USB access to get into bootloader mode again. + +### Step 7 - Flash Meadow.OS and Coprocessor Firmware + Now you have two options, please try the option 1 first: -#### Option 1 (from bootloader mode) +#### Option 1 (from bootloader mode) + Once connected the Meadow device via the USB cable and having put the device into DFU Bootloader mode, execute the following command in your terminal: ```console @@ -165,37 +184,44 @@ meadow firmware write ``` #### Option 2 (from normal mode) + This following will only work if you have a newer version of Meadow OS installed. It is recommended to try option 1 first. Reset the device (push the RST button or disconnect and reconnect) and identify the serial port name that the Meadow is connecting on. -Execute the following command in your terminal: +Execute the following Meadow CLI command in your terminal to determine the port your Meadow device is using. ```console -ls /dev/tty.usb* +meadow list ports ``` -The port should be something like `/dev/tty.usbmodem01`. -Once you've identified the port name, run the following command in your console replacing [PORT] with the serial port name: +On macOS, you should see a port like `/dev/tty.usbmodem336F336D30361`. +Once you've identified the port name, run the following command in your console, replacing `{port}` with the serial port name to send all future `meadow` commands to that device. ```console -meadow config route [PORT] +meadow config route {port} ``` -**NOTE: If the process hangs on _Opening port '[PORT]'..._, hit the RST button on the device.** +**NOTE: If the process hangs on _Opening port '{PORT}'..._, hit the RST button on the device.** -Unplug and replug Meadow to give it a full restart. -Your board is now ready to have a Meadow application deployed to it! +Unplug and replug Meadow to give it a full restart. Your board is now ready to have a Meadow application deployed to it! +[//]: # (Whenever editing these OS sections, make sure any common instructions are edited in the other OS/IDE sections as well to keep them in sync with each other.) + Please note: Linux may require `sudo` to access USB devices. -### Install .NET SDK +### Step 1 - Create a Wilderness Labs Account + +In order to download the latest version of Meadow.OS, you will need to [register for a **Wilderness Labs Account**](https://identity.wildernesslabs.co/signin/register). + +### Step 2 - Install .NET SDK Download and install version 8 [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet). -### Install or update Meadow CLI +### Step 3 - Install or update Meadow CLI + To install Meadow CLI, execute the following command in your terminal: ```console @@ -208,38 +234,44 @@ To update Meadow CLI, if already installed, execute the following command in you dotnet tool update WildernessLabs.Meadow.CLI --global ``` -### Install dfu-util +### Step 4 - Install dfu-util + Execute the following command in your terminal: ```console sudo apt-get install dfu-util ``` -### Install libusb +### Step 5 - Install libusb + Execute the following command in your terminal: ```console sudo apt-get install libusb-1.0-0-dev ``` -### Download Meadow OS and network binaries +### Step 6 - Download Meadow OS and network binaries + Execute the following command in your terminal: ```console meadow firmware download ``` -### Put the device into DFU Bootloader mode. +### Step 7 - Put the device into DFU Bootloader mode + To update the OS, Meadow must be in _DFU bootloader_ mode. To enter this mode, the `BOOT` button needs to be held down while the board boots up. This can be accomplished one of two ways. **If the board is disconnected:** hold the `BOOT` button down and connect the board to your computer via a Micro USB Cable. -**If the board is connected:** hold the `BOOT` button down, and then press and release the `RST` (Reset) button. Then release the `BOOT` button. +**If the board is connected:** hold the `BOOT` button down, and then press and release the `RST` (Reset) button. Then release the `BOOT` button. ![Meadow board with boot button labeled at the end of the header on the battery JST side of the board.](./wildernesslabs_meadow_boot_button.jpg) -### Enable access to the device -To be able to access the device a udev rule needs to be added. +### Step 8 - Enable access to the device + +To be able to access the device a udev rule needs to be added. + * Go to the folder `/etc/udev/rules.d` * Create the file `50-meadow.rules` * Add the following to the file: @@ -262,10 +294,12 @@ Bus 001 Device 009: ID 0483:df11 STMicroelectronics STM Device in DFU Mode The format for the IDs is `idVendor:idProduct`. Please note that you need to disconnect and reconnect the Meadow to make the rules take affect. -### Flash Meadow.OS and Coprocessor Firmware +### Step 9 - Flash Meadow.OS and Coprocessor Firmware + Now you have two options, please try the option 1 first: -#### Option 1 (from bootloader mode) +#### Option 1 (from bootloader mode) + Once connected the Meadow device via the USB cable and having put the device into DFU Bootloader mode, execute the following command in your terminal: ```console @@ -273,10 +307,11 @@ meadow firmware write ``` #### Option 2 (from normal mode) + This following will only work if you have a newer version of Meadow OS installed. It is recommended to try option 1 first. Reset the device (push the RST button or disconnect and reconnect) and identify the serial port name that the Meadow is connecting on. -To get access to the port your user needs to be added to the group `dialout`. +To get access to the port your user needs to be added to the group `dialout`. This is done with the command: ```console diff --git a/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig1.png b/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig1.png index 1b75ad5d1..625fb9465 100644 Binary files a/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig1.png and b/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig1.png differ diff --git a/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig2.png b/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig2.png index 701c3ed7e..653079e0d 100644 Binary files a/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig2.png and b/docs/Meadow/Getting_Started/Deploying_Meadow.OS/zadig2.png differ diff --git a/docs/Meadow/Getting_Started/Desktop/Hello_Ft232/index.md b/docs/Meadow/Getting_Started/Desktop/Hello_Ft232/index.md index 374b05823..18d9662cf 100644 --- a/docs/Meadow/Getting_Started/Desktop/Hello_Ft232/index.md +++ b/docs/Meadow/Getting_Started/Desktop/Hello_Ft232/index.md @@ -22,7 +22,7 @@ Download and Install [Visual Studio](https://visualstudio.microsoft.com/) for ei Open Visual Studio’s Extensions Manager and install the [VS 2022 Tools for Meadow](https://marketplace.visualstudio.com/items?itemName=WildernessLabs.vsmeadow2022) Extension. -### Step 4 - Create your first Meadow.Windows application +### Step 4 - Create your first Meadow application In **Visual Studio**, open the **Create a new project** window. When you search for **Meadow**, you will see a list of project templates, click on **Meadow.Windows + FT232H App (Wilderness Labs)**: @@ -32,7 +32,7 @@ This project creates a Meadow.Windows app that has a Windows Forms (WinForms) wi ![FT232H connected to an RGB LED](wildernesslabs_desktop_ft232_fritzing.png) -### Step 5 - Run a Meadow.Windows Application +### Step 5 - Run a Meadow Application Right-click the new project and select **Set as Startup project** @@ -42,6 +42,12 @@ And as for the FT232H with the RGB LED, you should see something like this: ![RGB LED flashing](wildernesslabs_desktop_ft232.gif) +### Step 6 - Check out additional samples + +You can check more samples in our [Meadow.Desktop.Samples](https://github.com/WildernessLabs/Meadow.Desktop.Samples) GitHub repo. + +![Meadow.Desktop.Samples GitHub Repository](../../Common_Assets/wildernesslabs-meadow-desktop-samples.jpg) + @@ -61,7 +67,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -88,14 +94,14 @@ Lets verify everything is set up by deploying your first Meadow application. Open VSCode in a new Terminal within enter the following command to create a new Meadow.Windows project: ```console -dotnet new WinFormsHardware -n WinFormsHardwareDemo +dotnet new WinFormsHardware --name WinFormsHardwareDemo ``` This Meadow.Windows application controls an RGB LED connected to a FT232H IO Expander that you can connect to your machine via USB-C, and opens a 320x240 pixel WinForms window saying `Hello, World` using MicroLayout. ![Create new Meadow Application](wildernesslabs_desktop_ft232_fritzing.png) -### Step 5 - Deploy your application +### Step 5 - Run a Meadow Application With no code changes, let's run this app on your machine. @@ -119,5 +125,11 @@ And a WinForm window should show up in the center of the screen saying `Hello, W ![Create new Meadow Application](wildernesslabs_desktop_winforms.png) +### Step 6 - Check out additional samples + +You can check more samples in our [Meadow.Desktop.Samples](https://github.com/WildernessLabs/Meadow.Desktop.Samples) GitHub repo. + +![Meadow.Desktop.Samples GitHub Repository](../../Common_Assets/wildernesslabs-meadow-desktop-samples.jpg) + \ No newline at end of file diff --git a/docs/Meadow/Getting_Started/Desktop/Hello_Simulator/index.md b/docs/Meadow/Getting_Started/Desktop/Hello_Simulator/index.md index 1643f1e76..20765f0c3 100644 --- a/docs/Meadow/Getting_Started/Desktop/Hello_Simulator/index.md +++ b/docs/Meadow/Getting_Started/Desktop/Hello_Simulator/index.md @@ -22,7 +22,7 @@ Download and Install [Visual Studio](https://visualstudio.microsoft.com/) for ei Open Visual Studio’s Extensions Manager and install the [VS 2022 Tools for Meadow](https://marketplace.visualstudio.com/items?itemName=WildernessLabs.vsmeadow2022) Extension. -### Step 4 - Create your first Meadow.Windows application +### Step 4 - Create your first Meadow application In **Visual Studio**, open the **Create a new project** window. When you search for **Meadow**, you will see a list of project templates, click on **Meadow.Windows App (Wilderness Labs)**: @@ -30,12 +30,18 @@ In **Visual Studio**, open the **Create a new project** window. When you search This project creates a Meadow.Windows app that has a Windows Forms (WinForms) window showing a Hello World text using [MicroLayout](../../../Meadow.Foundation/Libraries_and_Frameworks/MicroLayout/index.md). -### Step 5 - Run a Meadow.Windows Application +### Step 5 - Run a Meadow Application Right-click the new project and select **Set as Startup project** ![Meadow.Windows App running](wildernesslabs-meadow-windows-hello.jpg) +### Step 6 - Check out additional samples + +You can check more samples in our [Meadow.Desktop.Samples](https://github.com/WildernessLabs/Meadow.Desktop.Samples) GitHub repo. + +![Meadow.Desktop.Samples GitHub Repository](../../Common_Assets/wildernesslabs-meadow-desktop-samples.jpg) + @@ -55,7 +61,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -82,12 +88,12 @@ Lets verify everything is set up by deploying your first Meadow application. Open VSCode in a new Terminal within enter the following command to create a new Meadow.Windows project: ```console -dotnet new WinForms -n WinFormsDemo +dotnet new WinForms --name WinFormsDemo ``` This Meadow.Windows application opens a 320x240 pixel WinForms window saying `Hello, World` using MicroLayout. -### Step 5 - Deploy your application +### Step 5 - Run a Meadow Application With no code changes, let's run this app on your machine. @@ -107,5 +113,11 @@ A WinForm window should show up in the center of the screen saying `Hello, World ![Create new Meadow Application](wildernesslabs_desktop_winforms.png) +### Step 6 - Check out additional samples + +You can check more samples in our [Meadow.Desktop.Samples](https://github.com/WildernessLabs/Meadow.Desktop.Samples) GitHub repo. + +![Meadow.Desktop.Samples GitHub Repository](../../Common_Assets/wildernesslabs-meadow-desktop-samples.jpg) + \ No newline at end of file diff --git a/docs/Meadow/Getting_Started/Hello_World/index.md b/docs/Meadow/Getting_Started/Hello_World/index.md index dc2ecdc2d..2a2cf15b6 100644 --- a/docs/Meadow/Getting_Started/Hello_World/index.md +++ b/docs/Meadow/Getting_Started/Hello_World/index.md @@ -95,11 +95,13 @@ You'll also need to install the Meadow IDE Extension for Visual Studio for Mac. ![Visual Studio for Mac Extension Manager showing the Meadow extension in the Gallery search results.](meadow_extension.png) #### Known issue when updating the Meadow Extension on MacOS + Occasionally, when updating the extension, or if you install the extension manually from file, Visual Studio for Mac will end up with a corrupt extensions database and you may have more than 1 Meadow extension installed. The extension will not work correctly if this happens. To fix this do the following: + 1. Shut down Visual Studio for Mac. -2. Within Finder, go to `~/Library/Caches/VisualStudio/17.0/` for VS2022 (use Command+Shift+G` to get a path entry both that you can paste this path into). +2. Within Finder, go to `~/Library/Caches/VisualStudio/17.0/` for VS2022 (use Command+Shift+G` to get a path entry that you can paste this path into). 3. you should see a `addin-db-*` directory. Delete it. 4. Restart Visual Studio for Mac. It will then recreate the addin-db-* directory from scratch. VS will take a little longer to start-up. @@ -185,7 +187,7 @@ After selecting the device deployment target the first time, the selected serial Depending on your system configuration and installed .NET versions. You may need to add a `global.json` file to your project's directory to tell it to use .NET 6.0: -``` +```json "sdk": { "version": "6.0.101", "allowPrerelease": false, @@ -197,7 +199,7 @@ Depending on your system configuration and installed .NET versions. You may need Optionally, you can also create a `launch.json` file to keep your debug configuration, instead of always running it dynamically. Select the Debug icon from the Visual Studio Code Activity Bar on the left, and use the button to create a launch.json file. Choose `Meadow` again from the list, and the default launch settings will be created for you. -``` +```json { "version": "0.2.0", "configurations": [ diff --git a/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/index.md b/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/index.md index 1fa0b6f8e..076e0ad32 100644 --- a/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/index.md +++ b/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/index.md @@ -1,11 +1,13 @@ --- layout: Meadow sidebar_label: Hello, CCM DevKit -title: Hello, Meadow Core-Compute Module (CCM) DevKit +title: Hello, Meadow CCM DevKit subtitle: Create, deploy, and understand your first Meadow application. --- -![](wildernesslabs_ccm_getting_started.jpg) +![Meadow Core-Compute Module Dev Kit Getting Started Guide](wildernesslabs_ccm_getting_started.jpg) + +This guide shows you how to set up your [Meadow Core-Compute Module (CCM) DevKit](https://store.wildernesslabs.co/collections/frontpage/products/meadow-f7v2-core-compute-breakout-board) board from unboxing all the way to deploying your fist Meadow app from either Visual Studio 2022 or Visual Studio Code. @@ -24,7 +26,7 @@ Open Visual Studio’s Extensions Manager and install the [VS 2022 Tools for Mea ### Step 4 - Deploy latest version of Meadow.OS -Use the [Meadow.CLI](https://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) to deploy [Meadow.OS](https://developer.wildernesslabs.co/Meadow/Getting_Started/Deploying_Meadow/) to your board to ensure it’s running with the latest version available. +Use the [Meadow.CLI](../../../Meadow_Tools/Meadow_CLI/) to deploy [Meadow.OS](../../Deploying_Meadow%2EOS/) to your board to ensure it’s running with the latest version available. ### Step 5 - Create your first Meadow application @@ -67,7 +69,7 @@ Open VSCode’s Extensions Manager and install [VSCode Tools for Meadow](https:/ ### Step 4 - Deploy latest version of Meadow.OS -Use the [Meadow.CLI](https://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) to deploy [Meadow.OS](https://developer.wildernesslabs.co/Meadow/Getting_Started/Deploying_Meadow/) to your board to ensure it’s running with the latest version available. +Use the [Meadow.CLI](../../../Meadow_Tools/Meadow_CLI/) to deploy [Meadow.OS](../../Deploying_Meadow%2EOS/) to your board to ensure it’s running with the latest version available. ### Step 5 - Install Meadow Project Templates @@ -77,7 +79,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -104,7 +106,7 @@ Lets verify everything is set up by deploying your first Meadow application. Open VSCode and in a new Terminal within, enter the following command to create a new Meadow F7 Feather project: ```console -dotnet new CoreComputeModule -n CcmDemo +dotnet new CoreComputeModule --name CcmDemo ``` What this Meadow application does is creates an `RgbPwmLed` object on the CCM Dev Kit's onboard RGB LED and cycles through different colors. diff --git a/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/wildernesslabs_ccm_getting_started.jpg b/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/wildernesslabs_ccm_getting_started.jpg index fc12e1c51..88a0d065f 100644 Binary files a/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/wildernesslabs_ccm_getting_started.jpg and b/docs/Meadow/Getting_Started/MCUs/Core_Compute_Module_DevKit/wildernesslabs_ccm_getting_started.jpg differ diff --git a/docs/Meadow/Getting_Started/MCUs/F7_Feather/index.md b/docs/Meadow/Getting_Started/MCUs/F7_Feather/index.md index bb136dc16..a589e984a 100644 --- a/docs/Meadow/Getting_Started/MCUs/F7_Feather/index.md +++ b/docs/Meadow/Getting_Started/MCUs/F7_Feather/index.md @@ -5,7 +5,9 @@ title: Hello, Meadow F7 Feather subtitle: Create, deploy, and understand your first Meadow application. --- -![](wildernesslabs_feather_getting_started.jpg) +![Meadow F7 Feather Getting Started Guide](wildernesslabs_feather_getting_started.jpg) + +This guide shows you how to set up your [Meadow F7 Feather](https://store.wildernesslabs.co/collections/frontpage/products/meadow-f7-feather) board from unboxing all the way to deploying your fist Meadow app from either Visual Studio 2022 or Visual Studio Code. @@ -24,17 +26,17 @@ Open Visual Studio’s Extensions Manager and install the [VS 2022 Tools for Mea ### Step 4 - Deploy latest version of Meadow.OS -Use the [Meadow.CLI](https://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) to deploy [Meadow.OS](https://developer.wildernesslabs.co/Meadow/Getting_Started/Deploying_Meadow/) to your board to ensure it’s running with the latest version available. +Use the [Meadow.CLI](../../../Meadow_Tools/Meadow_CLI/) to deploy [Meadow.OS](../../Deploying_Meadow%2EOS/) to your board to ensure it’s running with the latest version available. ### Step 5 - Create your first Meadow application In **Visual Studio**, open the **Create a new project** window. When you search for **Meadow**, you will see a list of project templates, click on **Meadow F7 Feather App (Wilderness Labs)**: -![Create new Meadow Application](../../Common_Assets/wildernesslabs_meadow_projects.png) +![Visual Studio create a new project window showing several Meadow project temlates.](../../Common_Assets/wildernesslabs_meadow_projects.png) Once the new project is loaded, right-click on the toolbar area and select the **Meadow Device List** item. -![Display Meadow Devices Toolbar](../../Common_Assets/wildernesslabs_meadow_toolbar.png) +![Selecting the Meadow Device List item to show in the Visual Studio toolbar.](../../Common_Assets/wildernesslabs_meadow_toolbar.png) This is your device selector to deploy applications to Meadow devices. @@ -42,7 +44,7 @@ This is your device selector to deploy applications to Meadow devices. Connect your board if disconnected, and in the **Meadow devices** drop down it should list its corresponding COM port. Once selected, click on the play **Debug button** to start transferring the application to your board. -![Display Meadow Devices Toolbar](../../Common_Assets/wildernesslabs-vswin-usage.jpg) +![Meadow Devices dropdown in the Visual Studio toolbar showing a selected device port.](../../Common_Assets/wildernesslabs-vswin-usage.jpg) :::caution ⚠️ **Note**: When deploying a project for the first time, the transfer will take several minutes, since it's transferring all the necessary libraries to run the application. Once the app is running for the first time, deployment will be faster as it will transfer only the files that have been changed. @@ -50,13 +52,13 @@ Connect your board if disconnected, and in the **Meadow devices** drop down it s Once all the files are transferred to your device, the app will start in debug mode and you should see Meadow’s onboard RGB LED lighting up in different colors. -![Meadow Feather F7 running](wildernesslabs_feather_blinky.gif) +![Animation showing Meadow Feather F7 running Blinky and cycling between colors on the onboard LED.](wildernesslabs_feather_blinky.gif) ### Step 7 - Check out additional samples You can check more samples in our [Meadow.Project.Samples](https://github.com/WildernessLabs/Meadow.Project.Samples) GitHub repo. -![Meadow.Project.Samples GitHub Repository](wilderness-labs-meadow-project-samples.jpg) +![Several Meadow devices wired up to components and running various sample projects.](wilderness-labs-meadow-project-samples.jpg) @@ -75,7 +77,7 @@ Open VSCode’s Extensions Manager and install [VSCode Tools for Meadow](https:/ ### Step 4 - Deploy latest version of Meadow.OS -Use the [Meadow.CLI](https://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) to deploy [Meadow.OS](https://developer.wildernesslabs.co/Meadow/Getting_Started/Deploying_Meadow/) to your board to ensure it’s running with the latest version available. +Use the [Meadow.CLI](../../../Meadow_Tools/Meadow_CLI/) to deploy [Meadow.OS](../../Deploying_Meadow%2EOS/) to your board to ensure it’s running with the latest version available. ### Step 5 - Install Meadow Project Templates @@ -85,7 +87,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -107,25 +109,25 @@ Meadow.Windows App WinForms [C#] Meadow/Console ### Step 6 - Create your first Meadow application -Lets verify everything is set up by deploying your first Meadow application. +Lets verify everything is set up by deploying your first Meadow application. Open VSCode and in a new Terminal within, enter the following command to create a new Meadow F7 Feather project: ```console -dotnet new F7Feather -n F7FeatherDemo +dotnet new F7Feather --name F7FeatherDemo ``` What this Meadow application does is creates an `RgbPwmLed` object on the onboard RGB LED and cycles through different colors. -![Create new Meadow Application](../../Common_Assets/wildernesslabs_meadow_vscode_blinky.png) +![Source code for a new Blinky application.](../../Common_Assets/wildernesslabs_meadow_vscode_blinky.png) ### Step 7 - Deploy your application -With no code changes, let's deploy this app to your new board. +With no code changes, let's deploy this app to your new board. In the bottom toolbar, click on the COM port button that will open a drop down menu at the top, where you’ll select the corresponding port your board is using. -![Create new Meadow Application](../../Common_Assets/wildernesslabs_meadow_vscode_deploy.jpg) +![Deploying an app to the COM3 port.](../../Common_Assets/wildernesslabs_meadow_vscode_deploy.jpg) :::caution ⚠️ **Note**: When deploying a project for the first time, the transfer will take several minutes, since it's transferring all the necessary libraries to run the application. Once the app is running for the first time, deployment will be faster as it will transfer only the files that have been changed. @@ -133,7 +135,7 @@ In the bottom toolbar, click on the COM port button that will open a drop down m Once all the files are transferred to your device, the app will start in debug mode and you should see Meadow’s onboard RGB LED lighting up in different colors. -![Meadow Feather F7 running](wildernesslabs_feather_blinky.gif) +![Animation showing Meadow Feather F7 running Blinky and cycling between colors on the onboard LED.](wildernesslabs_feather_blinky.gif) ### Step 8 - Check out additional samples @@ -142,4 +144,4 @@ You can check more samples in our [Meadow.Project.Samples](https://github.com/Wi ![Meadow.Project.Samples GitHub Repository](wilderness-labs-meadow-project-samples.jpg) - \ No newline at end of file + diff --git a/docs/Meadow/Getting_Started/MCUs/Project_Lab/index.md b/docs/Meadow/Getting_Started/MCUs/Project_Lab/index.md index 8a14ecc41..68ad999a4 100644 --- a/docs/Meadow/Getting_Started/MCUs/Project_Lab/index.md +++ b/docs/Meadow/Getting_Started/MCUs/Project_Lab/index.md @@ -5,7 +5,9 @@ title: Hello, Meadow Project Lab subtitle: Create, deploy, and understand your first Meadow application. --- -![](wildernesslabs_projectlab_getting_started.jpg) +![Meadow Project Lab Getting Started Guide](wildernesslabs_projectlab_getting_started.jpg) + +This guide shows you how to set up your [Meadow Project Lab](https://store.wildernesslabs.co/collections/frontpage/products/project-lab-board) board from unboxing all the way to deploying your fist Meadow app from either Visual Studio 2022 or Visual Studio Code. @@ -24,7 +26,7 @@ Open Visual Studio’s Extensions Manager and install the [VS 2022 Tools for Mea ### Step 4 - Deploy latest version of Meadow.OS -Use the [Meadow.CLI](https://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) to deploy [Meadow.OS](https://developer.wildernesslabs.co/Meadow/Getting_Started/Deploying_Meadow/) to your board to ensure it’s running with the latest version available. +Use the [Meadow.CLI](../../../Meadow_Tools/Meadow_CLI/) to deploy [Meadow.OS](../../Deploying_Meadow%2EOS/) to your board to ensure it’s running with the latest version available. ### Step 5 - Create your first Meadow application @@ -75,7 +77,7 @@ Open VSCode’s Extensions Manager and install [VSCode Tools for Meadow](https:/ ### Step 4 - Deploy latest version of Meadow.OS -Use the [Meadow.CLI](https://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) to deploy [Meadow.OS](https://developer.wildernesslabs.co/Meadow/Getting_Started/Deploying_Meadow/) to your board to ensure it’s running with the latest version available. +Use the [Meadow.CLI](../../../Meadow_Tools/Meadow_CLI/) to deploy [Meadow.OS](../../Deploying_Meadow%2EOS/) to your board to ensure it’s running with the latest version available. ### Step 5 - Install Meadow Project Templates @@ -85,7 +87,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -112,7 +114,7 @@ Lets verify everything is set up by deploying your first Meadow application. Open VSCode and in a new Terminal within, enter the following command to create a new Project Lab project: ```console -dotnet new ProjectLab -n ProjectLabDemo +dotnet new ProjectLab --name ProjectLabDemo ``` This project creates a Project Lab demo app that will activate all its onboard sensors (environmental, light and motion sensors, button states) and show its readings periodically on its 320x240 SPI display. diff --git a/docs/Meadow/Getting_Started/MCUs/index.md b/docs/Meadow/Getting_Started/MCUs/index.md index 3d5a65611..1326399dd 100644 --- a/docs/Meadow/Getting_Started/MCUs/index.md +++ b/docs/Meadow/Getting_Started/MCUs/index.md @@ -19,6 +19,6 @@ subtitle: Create, deploy, and understand your first Meadow application. ## Shared Steps -* [Install Meadow.CLI](/Meadow/Getting_Started/Meadow%2ECLI/) +* [Install Meadow.CLI](../../Meadow_Tools/Meadow_CLI/) * [Install IDE Extensions](../IDE_Extensions/) * [Deploy Meadow.OS](../Deploying_Meadow%2EOS/) \ No newline at end of file diff --git a/docs/Meadow/Getting_Started/Meadow.CLI/index.md b/docs/Meadow/Getting_Started/Meadow.CLI/index.md index ff8c04b54..9cfcc1e00 100644 --- a/docs/Meadow/Getting_Started/Meadow.CLI/index.md +++ b/docs/Meadow/Getting_Started/Meadow.CLI/index.md @@ -5,51 +5,4 @@ title: Installing Meadow.CLI subtitle: Installing the Meadow Command-Line-Interface (CLI). --- -![](wildernesslabs_meadow_cli_getting_started.jpg) - -The Meadow Command-Line-Interface (Meadow.CLI) provides a way to interact with the board and perform functions via a terminal/command-line window. - -### Pre-requisites - -Download and install the latest version of the [.NET runtime](https://dotnet.microsoft.com/en-us/download). - -### Installation - -Meadow.CLI can be installed via the dotnet tool from a nuget package at the terminal: - -```console -dotnet tool install WildernessLabs.Meadow.CLI --global -``` - -To update, simply change the install keyword to update: - -```console -dotnet tool update Wildernesslabs.Meadow.CLI --global -``` - -You can confirm the Meadow.CLI was successfully installed by typing `meadow`. - -```console -C:\Users\ramir>meadow -meadow v2.0.0.6 - -USAGE - meadow [options] - meadow [command] [...] - -OPTIONS - -h|--help Shows help text. - --version Shows version information. - -COMMANDS - app build Compile a Meadow application - app debug Debug a running application - app deploy Deploy a built Meadow application to a target device - app run Builds, trims and deploys a Meadow application to a target device - app trim Runs an already-compiled Meadow application through reference trimming - . - . - . -``` - -For more usage information, head over to the Meadow.CLI documentation. \ No newline at end of file +This content has moved to [here](/Meadow/Meadow_Tools/Meadow_CLI/). diff --git a/docs/Meadow/Getting_Started/SBCs/Jetson_Nano/index.md b/docs/Meadow/Getting_Started/SBCs/Jetson_Nano/index.md index 4ed1b2f33..3ea248888 100644 --- a/docs/Meadow/Getting_Started/SBCs/Jetson_Nano/index.md +++ b/docs/Meadow/Getting_Started/SBCs/Jetson_Nano/index.md @@ -24,7 +24,7 @@ Open Visual Studio’s Extensions Manager and install the [VS Linux Debugger](ht Make sure you go through their Getting Started instructions to properly configure the target device (Jetson Nano) and how to use the extension to build and deploy the Meadow.Linux application over the network. -### Step 4 - Create your first Meadow.Linux application +### Step 4 - Create your first Meadow application In **Visual Studio**, open the **Create a new project** window. When you search for **Meadow**, you will see a list of project templates, click on **Meadow.Linux Jetson Nano App (Wilderness Labs)**: @@ -32,7 +32,7 @@ In **Visual Studio**, open the **Create a new project** window. When you search This is a minimal Meadow.Linux application that it'll output a few strings on a terminal to confirm the application is running correctly. -### Step 5 - Deploy your application +### Step 5 - Run a Meadow Application Once the application is deployed successfully, open a terminal on the Jetson Nano and go to inside the project's folder and type: @@ -79,7 +79,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -106,14 +106,14 @@ Lets verify everything is set up by deploying your first Meadow application. Open VSCode and in a new Terminal within, enter the following command to create a new Meadow.Linux project that will run on your Raspberry Pi: ```console -dotnet new JetsonNano -n JetsonNanoDemo +dotnet new JetsonNano --name JetsonNanoDemo ``` This Meadow.Linux application shows a basic Meadow app structure with an `Initialize` and `Run` methods with logging strings to confirm in the output the application ran successfully. ![Raspberry Pi VS Code](wildernesslabs_raspberry_pi_vscode.png) -### Step 5 - Run your application +### Step 5 - Run a Meadow Application Lets run this application as is on your Raspberry Pi. In a terminal inside the project folder, build the project with the command: diff --git a/docs/Meadow/Getting_Started/SBCs/RaspberryPi/index.md b/docs/Meadow/Getting_Started/SBCs/RaspberryPi/index.md index ae98aa00e..1439b05b3 100644 --- a/docs/Meadow/Getting_Started/SBCs/RaspberryPi/index.md +++ b/docs/Meadow/Getting_Started/SBCs/RaspberryPi/index.md @@ -24,7 +24,7 @@ Open Visual Studio’s Extensions Manager and install the [VS Linux Debugger](ht Make sure you go through their Getting Started instructions to properly configure the target device (Raspberry Pi) and how to use the extension to build and deploy the Meadow.Linux application over the network. -### Step 4 - Create your first Meadow.Linux application +### Step 4 - Create your first Meadow application In **Visual Studio**, open the **Create a new project** window. When you search for **Meadow**, you will see a list of project templates, click on **Meadow.Linux Raspberry Pi App (Wilderness Labs)**: @@ -32,7 +32,7 @@ In **Visual Studio**, open the **Create a new project** window. When you search This is a minimal Meadow.Linux application that it'll output a few strings on a terminal to confirm the application is running correctly. -### Step 5 - Deploy your application +### Step 5 - Run a Meadow Application Once the application is deployed successfully, open a terminal on the Raspberry Pi and go to inside the project's folder and type: @@ -79,7 +79,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -106,14 +106,14 @@ Lets verify everything is set up by deploying your first Meadow application. Open VSCode and in a new Terminal within, enter the following command to create a new Meadow.Linux project that will run on your Raspberry Pi: ```console -dotnet new RaspberryPi -n RaspberryPiDemo +dotnet new RaspberryPi --name RaspberryPiDemo ``` This Meadow.Linux application shows a basic Meadow app structure with an `Initialize` and `Run` methods with logging strings to confirm in the output the application ran successfully. ![Raspberry Pi VS Code](wildernesslabs_raspberry_pi_vscode.png) -### Step 5 - Run your application +### Step 5 - Run a Meadow Application Lets run this application as is on your Raspberry Pi. In a terminal inside the project folder, build the project with the command: diff --git a/docs/Meadow/Getting_Started/SBCs/SeeedStudio_ReTerminal/index.md b/docs/Meadow/Getting_Started/SBCs/SeeedStudio_ReTerminal/index.md index f1bc701f6..65c5caaff 100644 --- a/docs/Meadow/Getting_Started/SBCs/SeeedStudio_ReTerminal/index.md +++ b/docs/Meadow/Getting_Started/SBCs/SeeedStudio_ReTerminal/index.md @@ -24,7 +24,7 @@ Open Visual Studio’s Extensions Manager and install the [VS Linux Debugger](ht Make sure you go through their Getting Started instructions to properly configure the target device (reTerminal) and how to use the extension to build and deploy the Meadow.Linux application over the network. -### Step 4 - Create your first Meadow.Linux application +### Step 4 - Create your first Meadow application In **Visual Studio**, open the **Create a new project** window. When you search for **Meadow**, you will see a list of project templates, click on **Meadow.Linux reTerminal App (Wilderness Labs)**: @@ -32,7 +32,7 @@ In **Visual Studio**, open the **Create a new project** window. When you search When this application runs, it'll show a 320x240 window in the center of the reTerminal's screen with a label saying `Hello World` using [MicroLayout](../../../Meadow.Foundation/Libraries_and_Frameworks/MicroLayout/index.md). -### Step 5 - Deploy your application +### Step 5 - Run a Meadow Application Once the application is deployed successfully, open a terminal on the reTerminal and go to inside the project's folder and type: @@ -81,7 +81,7 @@ Open a Terminal and enter the following command to install a list of Meadow proj dotnet new install WildernessLabs.Meadow.Template ``` -When installed, you’ll see a list of Templates available +When installed, you’ll see a list of templates available ```console The following template packages will be installed: @@ -103,19 +103,19 @@ Meadow.Windows App WinForms [C#] Meadow/Console ### Step 4 - Create your first Meadow application -Lets verify everything is set up by deploying your first Meadow application. +Lets verify everything is set up by deploying your first Meadow application. Open VSCode and in a new Terminal within, enter the following command to create a new Meadow.Linux project that will run on your Raspberry Pi: ```console -dotnet new reTerminal -n reTerminalDemo +dotnet new reTerminal --name reTerminalDemo ``` This Meadow.Linux application shows a basic Meadow app structure with an `Initialize` and `Run` methods with logging strings to confirm in the output the application ran successfully. ![Raspberry Pi VS Code](wildernesslabs_reterminal_vscode.jpg) -### Step 5 - Run your application +### Step 5 - Run a Meadow Application Lets run this application as is on your Raspberry Pi. In a terminal inside the project folder, build the project with the command: diff --git a/docs/Meadow/Meadow_Basics/Meadow_CLI/index.md b/docs/Meadow/Meadow_Basics/Meadow_CLI/index.md index 15b8ba384..9e80eecf3 100644 --- a/docs/Meadow/Meadow_Basics/Meadow_CLI/index.md +++ b/docs/Meadow/Meadow_Basics/Meadow_CLI/index.md @@ -4,139 +4,4 @@ title: Meadow.CLI subtitle: Command-Line-Interface for Meadow --- -The Meadow Command-Line-Interface (`Meadow.CLI`) provides a way to interact with the board and perform functions via a terminal/command-line window. - -The Meadow.CLI tool supports deployment workflows as well as device and file management including file transfers, and MCU reset. - -In addition to being able to be used from a terminal window, the `Meadow.CLI.Core` library can also be used programmatically, within a .NET application. In fact, the IDE extensions use that directly. You can find the source [here](https://github.com/wildernesslabs/Meadow.CLI). - -## Installation and Updating - -`Meadow.CLI` can be installed via the `dotnet` tool from a nuget package at the terminal: - -```bash -dotnet tool install WildernessLabs.Meadow.CLI --global -``` - -To update, simply change the `install` keyword to `update`: - -```bash -dotnet tool update WildernessLabs.Meadow.CLI --global -``` - -## Executing Commands - -Once installed, Meadow.CLI is accessible from a terminal prompt via the `meadow` command, and command arguments are passed via a fluent syntax, for instance, the following command will download the latest Meadow.OS: - -```bash -meadow download os -``` - -## Enumerating Commands & Help - -This guide covers a few of the most common commands, but there are many more to explore. For a complete list of commands, execute the following from a terminal window: - -```bash -meadow --help -``` - -Additionally, you can get additional help information for any given command by passing `--help` (or `-h` shortened) as an option to that command. For instance, the following will provide guidance on the `listen` command: - -```bash -meadow listen --help -``` - -## Working with Ports - -When a Meadow device is hooked up to a host computer, it exposes it communicates via a serial port (e.g. `COM3` on Windows or `UART3` on macOS/Linux) over USB. If you only have one Meadow device plugged in, Meadow.CLI will attempt to locate the port and send commands via that. However, if you have multiple devices, you may need to manually specify the port. - -To list serial ports, execute the following: - -```bash -meadow list ports -``` - -You can then specify which port to use via for future commands with the `config route` command. Then, after configuring which port to use, future commands will be directed to that port. - -```bash -meadow config route /dev/tty.usbmodem336F336D30361 -``` - -You only need to configure the desired port once; all subsequent commands will remember the specified port. - -## Common Tasks - -### Download the Latest Meadow.OS and Flash to the Device - -To download the latest Meadow.OS, execute the following: - -```bash -meadow firmware download -``` - -Once it's downloaded, it can be deployed to the device by executing the following: - -```bash -meadow firmware write -``` - -### Deploy a Meadow App - -To deploy an app to the device, execute the following, replacing [Path] with the path to your `app.exe`: - -```bash -meadow app deploy -f [Path]/app.exe -``` - -### Working with Files - -#### Listing Files on the Device - -To get a list of all the files on the device, execute the following: - -```bash -meadow file list -``` - -#### Writing a File to the Device - -To write a file, or files, to the device execute the following, replacing [Filename] with the full path of the file to write: - -```bash -meadow file write -f [Filename] -``` - -Multiple files can be specified with multiple `-f` parameters: - -```bash -meadow file write -f [Filename1] -f [Filename2] -``` - -#### Delete a File from the Device - -Files can also be deleted: - -```bash -meadow file delete -f [Filename] -``` - -As with file uploading, multiple files can be specified with multiple `-f` parameters: - -```bash -meadow file delete -f [Filename1] -f [Filename2] -``` - -All of the files on the file system can be deleted without reformatting the flash: - -```bash -meadow file delete all -``` - - -### Get Meadow's device information - -To get information about the device, including OS version, execute the following: - -```bash -meadow device info -``` +This content has moved to [here](/Meadow/Meadow_Tools/Meadow_CLI/). diff --git a/docs/Meadow/Meadow_Basics/Troubleshooting/MeadowOSDeployment/index.md b/docs/Meadow/Meadow_Basics/Troubleshooting/MeadowOSDeployment/index.md index c60fbb62f..382dec4f4 100644 --- a/docs/Meadow/Meadow_Basics/Troubleshooting/MeadowOSDeployment/index.md +++ b/docs/Meadow/Meadow_Basics/Troubleshooting/MeadowOSDeployment/index.md @@ -12,7 +12,7 @@ Starting with a review of the OS components and boot sequence, we will move on t The main tools that will be used here are: -* `meadow` [command line tool (CLI)](http://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) +* `meadow` [command line tool (CLI)](http://developer.wildernesslabs.co/Meadow/Meadow_Tools/Meadow_Cli/) * `dfu-util` which is normally deployed as part of the `meadow` CLI deployment process. ## Meadow OS Start Sequence diff --git a/docs/Meadow/Meadow_Basics/Troubleshooting/index.md b/docs/Meadow/Meadow_Basics/Troubleshooting/index.md index c3a3626db..095f42de6 100644 --- a/docs/Meadow/Meadow_Basics/Troubleshooting/index.md +++ b/docs/Meadow/Meadow_Basics/Troubleshooting/index.md @@ -69,11 +69,11 @@ If your application does not execute, please check your project settings and if The Meadow CLI tool can be used to diagnose and fix a number of issues that can appear during the beta phase. -A list of command can be found in the [Meadow CLI](http://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) documentation. +A list of command can be found in the [Meadow CLI](http://developer.wildernesslabs.co/Meadow/Meadow_Tools/Meadow_Cli/) documentation. ### Check Files Deployed to Meadow -Use the `meadow file list` command to verify that all of the required files have been deployed to Meadow. The list of expected files can be found at the end of the [Meadow CLI](http://developer.wildernesslabs.co/Meadow/Meadow_Basics/Meadow_CLI/) documentation page. +Use the `meadow file list` command to verify that all of the required files have been deployed to Meadow. The list of expected files can be found at the end of the [Meadow CLI](http://developer.wildernesslabs.co/Meadow/Meadow_Tools/Meadow_Cli/) documentation page. As noted above, the main application assembly should be _App.exe_. diff --git a/docs/Meadow/Meadow_Basics/index.md b/docs/Meadow/Meadow_Basics/index.md index d3a7930de..7e65e16a7 100644 --- a/docs/Meadow/Meadow_Basics/index.md +++ b/docs/Meadow/Meadow_Basics/index.md @@ -10,7 +10,7 @@ This section covers the fundamentals of creating Meadow applications. * [Input & Output (IO)](/Meadow/Meadow_Basics/IO) * [Units of Measure](/Meadow/Meadow_Basics/Units) * [Events and `IObservable` Pattern](/Meadow/Meadow_Basics/Events_and_IObservable/) -* [Meadow.CLI](/Meadow/Meadow_Basics/Meadow_CLI) +* [Meadow.CLI](/Meadow/Meadow_Tools/Meadow_CLI/) * [Troubleshooting](/Meadow/Meadow_Basics/Troubleshooting) * [Meadow Hardware](/Meadow/Meadow_Basics/Hardware) diff --git a/docs/Meadow/Meadow_Tools/Meadow.CLI/index.md b/docs/Meadow/Meadow_Tools/Meadow_CLI/index.md similarity index 57% rename from docs/Meadow/Meadow_Tools/Meadow.CLI/index.md rename to docs/Meadow/Meadow_Tools/Meadow_CLI/index.md index 1f798c98f..1deab620e 100644 --- a/docs/Meadow/Meadow_Tools/Meadow.CLI/index.md +++ b/docs/Meadow/Meadow_Tools/Meadow_CLI/index.md @@ -5,28 +5,87 @@ title: Meadow.CLI subtitle: Command-Line-Interface for Meadow --- -![Meadow.CLI Command Line Interface](wildernesslabs_meadow_cli_getting_started.jpg) +![Meadow.CLI command-line interface running in a terminal window.](wildernesslabs_meadow_cli_getting_started.jpg) -The Meadow Command-Line-Interface (`Meadow.CLI`) provides a way to interact with the board and perform functions via a terminal/command-line window. +The Meadow Command-Line-Interface (`Meadow.CLI`) provides a way to interact with the board and perform functions via a terminal/command-line window. The Meadow.CLI tool supports deployment workflows as well as device and file management including file transfers, and MCU reset. In addition to being able to be used from a terminal window, the `Meadow.CLI.Core` library can also be used programmatically, within a .NET application. In fact, the IDE extensions use that directly. You can find the source [here](https://github.com/wildernesslabs/Meadow.CLI). +Some Meadow.CLI commands [registering for a **Wilderness Labs Account**](https://identity.wildernesslabs.co/signin/register). + ## Installation and Updating -`Meadow.CLI` can be installed via the `dotnet` tool from a nuget package at the terminal: + + + +### Install .NET SDK + +Download and install the latest [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0). + +### Install or update Meadow CLI + +Install the Meadow.CLI using the `dotnet tool` command. From a terminal, install the Meadow.CLI from the NuGet package. + +```console +dotnet tool install WildernessLabs.Meadow.CLI --global +``` + +To update to the latest version, change the `install` keyword to `update`. + +```console +dotnet tool update WildernessLabs.Meadow.CLI --global +``` + + + + +### Install .NET SDK + +Download and install version 8 [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet) for your Mac's processor architecture. + +### Install or update Meadow CLI + +To install Meadow CLI, execute the following command in your terminal: + +```console +dotnet tool install WildernessLabs.Meadow.CLI --global +``` + +To update Meadow CLI, if already installed, execute the following command in your terminal: + +```console +dotnet tool update WildernessLabs.Meadow.CLI --global +``` + + + + + +Please note: Linux may require `sudo` to access USB devices. + +### Install .NET SDK + +Download and install the latest [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0). + +### Install or update Meadow CLI +To install Meadow CLI, execute the following command in your terminal: ```console dotnet tool install WildernessLabs.Meadow.CLI --global ``` -To update, simply change the `install` keyword to `update`: +To update Meadow CLI, if already installed, execute the following command in your terminal: ```console -dotnet tool update Wildernesslabs.Meadow.CLI --global +dotnet tool update WildernessLabs.Meadow.CLI --global ``` + + + + ## Executing Commands Once installed, Meadow.CLI is accessible from a terminal prompt via the `meadow` command, and command arguments are passed via a fluent syntax, for instance, the following command will download the latest Meadow.OS: @@ -40,13 +99,13 @@ meadow firmware download This guide covers a few of the most common commands, but there are many more to explore. For a complete list of commands, execute the following from a terminal window: ```console -meadow -h +meadow --help ``` -Additionally, you can get additional help information for any given command by passing `-h` as option to that command. For instance, the following will provide guidance on the `listen` command: +Additionally, you can get additional help information for any given command by passing `--help` (or `-h` shortened) as an option to that command. For instance, the following will provide guidance on the `listen` command: ```console -meadow listen -h +meadow listen --help ``` ## Working with Ports @@ -59,13 +118,89 @@ To list serial ports, execute the following: meadow port list ``` -You can then specify the port via the `meadow port select` command. If it detects only one port, it'll select it automatically, but If multiple Meadow devices are connected, the command will list them and it'll prompt which port should select: +You can then specify which port to use with the `meadow config route` command. , replacing `{port}` with the port you found above. + +```console +meadow config route {port} +``` + +You only need to configure the desired port once; all subsequent commands will remember the specified port. + +## Common Tasks + +### Download the Latest Meadow.OS and Flash to the Device + +To download the latest Meadow.OS, execute the following: + +```console +meadow firmware download +``` + +Once it's downloaded, it can be deployed to the device by executing the following: + +```console +meadow firmware write +``` + +### Deploy a Meadow App + +To deploy an app to the device, execute the following, replacing `{path}` with the path to your app's built `App.dll` file: + +```console +meadow app deploy -f {path}/App.dll +``` + +### Working with Files + +#### Listing Files on the Device + +To get a list of all the files on the device, execute the following: + +```console +meadow file list +``` + +#### Writing a File to the Device + +To write a file, or files, to the device execute the following, replacing [Filename] with the full path of the file to write: + +```console +meadow file write -f [Filename] +``` + +Multiple files can be specified with multiple `-f` parameters: ```console -meadow port select +meadow file write -f [Filename1] -f [Filename2] ``` -You only need to specify the port once; all subsequent commands will remember the specified port. +#### Delete a File from the Device + +Files can also be deleted: + +```console +meadow file delete -f [Filename] +``` + +As with file uploading, multiple files can be specified with multiple `-f` parameters: + +```console +meadow file delete -f [Filename1] -f [Filename2] +``` + +All of the files on the file system can be deleted without reformatting the flash: + +```console +meadow file delete all +``` + +### Get Meadow's device information + +To get information about the device, including OS version, execute the following: + +```console +meadow device info +``` ## List of Commands @@ -91,7 +226,7 @@ You only need to specify the port once; all subsequent commands will remember th * `meadow cloud package list` - Lists all Meadow Packages (MPAK) * `meadow cloud package publish` - Publishes a Meadow Package (MPAK) * `meadow cloud package upload` - Upload a Meadow Package (MPAK) to Meadow.Cloud - + ### Device commands * `meadow device clock` - Gets or sets the device clock (in UTC time) @@ -136,6 +271,6 @@ You only need to specify the port once; all subsequent commands will remember th ## Support -Having trouble using Meadow.CLI? +Having trouble using Meadow.CLI? * File an [issue](https://github.com/WildernessLabs/Meadow.Desktop.Samples/issues) with a repro case to investigate, and/or -* Join our [public Slack](http://slackinvite.wildernesslabs.co/), where we have an awesome community helping, sharing and building amazing things using Meadow. \ No newline at end of file +* Join our [public Slack](http://slackinvite.wildernesslabs.co/), where we have an awesome community helping, sharing and building amazing things using Meadow. diff --git a/docs/Meadow/Meadow_Tools/Meadow.CLI/wildernesslabs_meadow_cli_getting_started.jpg b/docs/Meadow/Meadow_Tools/Meadow_CLI/wildernesslabs_meadow_cli_getting_started.jpg similarity index 100% rename from docs/Meadow/Meadow_Tools/Meadow.CLI/wildernesslabs_meadow_cli_getting_started.jpg rename to docs/Meadow/Meadow_Tools/Meadow_CLI/wildernesslabs_meadow_cli_getting_started.jpg diff --git a/docs/Meadow/Release_Notes/Beta3/index.md b/docs/Meadow/Release_Notes/Beta3/index.md index 8bc23e3d6..27e46765b 100644 --- a/docs/Meadow/Release_Notes/Beta3/index.md +++ b/docs/Meadow/Release_Notes/Beta3/index.md @@ -522,7 +522,7 @@ You can now set the speed of the I2C bus. Somehow we missed this when we launche ### Meadow.CLI Docs -We've published a [guide for the Meadow.CLI (Command Line Interface)](/Meadow/Meadow_Basics/Meadow_CLI/). +We've published a [guide for the Meadow.CLI (Command Line Interface)](/Meadow/Meadow_Tools/Meadow_Cli/). ### Meadow.Foundation diff --git a/src/sidebars/meadowOsSidebar.js b/src/sidebars/meadowOsSidebar.js index e7a1a08c6..d75f309da 100644 --- a/src/sidebars/meadowOsSidebar.js +++ b/src/sidebars/meadowOsSidebar.js @@ -121,7 +121,6 @@ const meadowOsSidebar = [ }, "Meadow/Meadow_Basics/Units/index", "Meadow/Meadow_Basics/Events_and_IObservable/index", - "Meadow/Meadow_Basics/Meadow_CLI/index", { type: "category", @@ -170,7 +169,7 @@ const meadowOsSidebar = [ id: "Meadow/Meadow_Tools/index", }, items: [ - "Meadow/Meadow_Tools/Meadow.CLI/index", + "Meadow/Meadow_Tools/Meadow_CLI/index", "Meadow/Meadow_Tools/VSWin/index", "Meadow/Meadow_Tools/VSCode/index" ],