Skip to content

Commit c8489a0

Browse files
authored
Ryanwinter/rtos 6.1.7 (#251)
* update azure rtos to 6.1.7 * Remove STM markdown, point at microsoft docs. * Move NXP readme to microsoft docs
1 parent e5b724d commit c8489a0

File tree

6 files changed

+76
-795
lines changed

6 files changed

+76
-795
lines changed

MXChip/AZ3166/readme.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ For guidance on connecting additional devices, see the series [Getting started w
2828

2929
## Basic steps
3030

31-
Here are the basic steps to setup your device:
32-
3331
1. Recursively clone the repository:
3432
```shell
3533
git clone --recursive https://github.com/azure-rtos/getting-started.git

NXP/MIMXRT1050-EVKB/readme.md

Lines changed: 24 additions & 257 deletions
Original file line numberDiff line numberDiff line change
@@ -11,272 +11,39 @@ products:
1111
- azure-iot-hub
1212
---
1313

14-
# Getting started with the NXP MIMXRT1050-EVKB Evaluation kit
14+
# Connect an NXP MIMXRT1050-EVKB Evaluation kit to Azure IoT
1515

16-
**Total completion time**: 30 minutes
16+
[![Quickstart article](../../docs/media/docs-link-buttons/azure-quickstart.svg)](https://docs.microsoft.com/azure/iot-develop/quickstart-devkit-nxp-mimxrt1050-evkb)
17+
[![Documentation](../../docs/media/docs-link-buttons/azure-documentation.svg)](https://docs.microsoft.com/azure/iot-develop/)
1718

18-
In this tutorial you use Azure RTOS to connect the NXP MIMXRT1050-EVKB Evaluation kit (hereafter, the NXP EVK) to Azure IoT. The article is part of the series [Getting Started with Azure RTOS](https://go.microsoft.com/fwlink/p/?linkid=2129824). The series introduces device developers to Azure RTOS, and shows how to connect several device evaluation kits to Azure IoT.
19+
The **Quickstart** button above provides the complete steps for creating an IoT Central application and then configuring, building and flashing the device.
1920

20-
You will complete the following tasks:
21+
For guidance on connecting additional devices, see the series [Getting started with Azure RTOS](https://go.microsoft.com/fwlink/p/?linkid=2129824).
2122

22-
* Install a set of embedded development tools for programming the NXP EVK in C
23-
* Build an image and flash it onto the NXP EVK
24-
* Use Azure IoT Central to create cloud components, view properties, view device telemetry, and call direct commands.
23+
## What you need
2524

26-
## Prerequisites
25+
* The [NXP MIMXRT1060-EVK Evaluation kit](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1050-evaluation-kit:MIMXRT1050-EVK)
26+
* USB 2.0 A male to Micro USB male cable
27+
* Wired Ethernet access
28+
* Ethernet cable
2729

28-
* A PC running Microsoft Windows 10
29-
* [Git](https://git-scm.com/downloads) for cloning the repository
30-
* Hardware
31-
32-
> * The [NXP MIMXRT1050-EVKB](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-rt1050-evaluation-kit:MIMXRT1050-EVK) (NXP EVK)
33-
> * USB 2.0 A male to Micro USB male cable
34-
> * Wired Ethernet access
35-
> * Ethernet cable
36-
37-
## Prepare the development environment
38-
39-
To set up your development environment, first you clone a GitHub repo that contains all the assets you need for the tutorial. Then you install a set of programming tools.
40-
41-
### Clone the repo for the tutorial
42-
43-
Clone the following repo to download all sample device code, setup scripts, and offline versions of the documentation. If you previously cloned this repo in another tutorial, you don't need to do it again.
44-
45-
To clone the repo, run the following command:
46-
47-
```shell
48-
git clone --recursive https://github.com/azure-rtos/getting-started.git
49-
```
50-
51-
### Install the tools
52-
53-
The cloned repo contains a setup script that installs and configures the required tools. If you installed these tools in another tutorial in the getting started guide, you don't need to do it again.
54-
55-
> Note: The setup script installs the following tools:
56-
> * [CMake](https://cmake.org): Build
57-
> * [ARM GCC](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm): Compile
58-
> * [Termite](https://www.compuphase.com/software_termite.htm): Monitor serial port output for connected devices
59-
60-
To install the tools:
61-
62-
1. From File Explorer, navigate to the following path in the repo and run the setup script named *get-toolchain.bat*:
63-
64-
> *getting-started\tools\get-toolchain.bat*
65-
66-
1. After the installation, open a new console window to recognize the configuration changes made by the setup script. Use this console to complete the remaining programming tasks in the tutorial. You can use Windows CMD, PowerShell, or Git Bash for Windows.
67-
1. Run the following code to confirm that CMake version 3.14 or later is installed.
30+
## Basic steps
6831

32+
1. Recursively clone the repository:
6933
```shell
70-
cmake --version
34+
git clone --recursive https://github.com/azure-rtos/getting-started.git
7135
```
36+
1. Install the development tools:
7237

73-
## Create the cloud components
74-
75-
### Create the IoT Central Application
76-
77-
There are several ways to connect devices to Azure IoT. In this section, you learn how to connect a device by using Azure IoT Central. IoT Central is an IoT application platform that reduces the cost and complexity of creating and managing IoT solutions.
78-
79-
To create a new application:
80-
1. From [Azure IoT Central portal](https://apps.azureiotcentral.com/), select **My apps** on the side navigation menu.
81-
1. Select **+ New application**.
82-
1. Select **Custom apps**.
83-
1. Add Application Name and a URL.
84-
1. Choose the **Free** Pricing plan to activate a 7-day trial.
85-
86-
![IoT Central create an application](media/iotcentralcreate-custom.png)
87-
88-
1. Select **Create**.
89-
1. After IoT Central provisions the application, it redirects you automatically to the new application dashboard.
90-
91-
> Note: If you have an existing IoT Central application, you can use it to complete the steps in this article rather than create a new application.
92-
93-
### Create a new device
94-
95-
In this section, you use the IoT Central application dashboard to create a new device. You will use the connection information for the newly created device to securely connect your physical device in a later section.
96-
97-
To create a device:
98-
1. From the application dashboard, select **Devices** on the side navigation menu.
99-
1. Select **+ New** to bring up the **Create a new device** window.
100-
1. Leave Device template as **Unassigned**.
101-
1. Fill in the desired Device name and Device ID.
102-
103-
![IoT Central create a device](media/iotcentralcreate-device.png)
104-
105-
1. Select the **Create** button.
106-
1. The newly created device will appear in the **All devices** list. Select on the device name to show details.
107-
1. Select **Connect** in the top right menu bar to display the connection information used to configure the device in the next section.
108-
109-
![IoT Central create a device](media/iotcentraldevice-connection-info.png)
110-
111-
1. Note the connection values for the following connection string parameters displayed in **Connect** dialog. You'll add these values to a configuration file in the next step:
112-
113-
> * `ID scope`
114-
> * `Device ID`
115-
> * `Primary key`
116-
117-
## Prepare the device
118-
119-
To connect the NXP EVK to Azure, you'll modify a configuration file for Wi-Fi and Azure IoT settings, rebuild the image, and flash the image to the device.
120-
121-
### Add configuration
122-
123-
1. Open the following file in a text editor:
124-
125-
> *getting-started\NXP\MIMXRT1050-EVKB\app\azure_config.h*
126-
127-
1. Set the Azure IoT device information constants to the values that you saved after you created Azure resources.
128-
129-
|Constant name|Value|
130-
|-------------|-----|
131-
|`IOT_DPS_ID_SCOPE` |{*Your ID scope value*}|
132-
|`IOT_DPS_REGISTRATION_ID` |{*Your Device ID value*}|
133-
|`IOT_DEVICE_SAS_KEY` |{*Your Primary key value*}|
134-
135-
1. Save and close the file.
136-
137-
### Build the image
138-
139-
In your console or in File Explorer, run the script *rebuild.bat* at the following path to build the image:
140-
141-
> *getting-started\NXP\MIMXRT1050-EVKB\tools\rebuild.bat*
142-
143-
After the build completes, confirm that the binary file was created in the following path:
144-
145-
> *getting-started\NXP\MIMXRT1050-EVKB\build\app\mimxrt1050_azure_iot.bin*
146-
147-
### Flash the image
148-
149-
1. On the NXP EVK, locate the **Reset** button, the Micro USB port, and the Ethernet port. You use these components in the following steps.
150-
151-
![NXP EVK board](media/nxp-evk-board.png)
152-
153-
1. Connect the Micro USB cable to the Micro USB port on the NXP EVK, and then connect it to your computer. After the device powers up, a solid green LED shows the power status.
154-
1. Use the Ethernet cable to connect the NXP EVK to an Ethernet port.
155-
1. In File Explorer, find the binary file that you created in the previous section.
156-
1. Copy the binary file *mimxrt1050_azure_iot.bin*
157-
1. In File Explorer, find the NXP EVK device connected to your computer. The device appears as a drive on your system with the drive label **RT1050-EVK**.
158-
1. Paste the binary file into the root folder of the NXP EVK. Flashing starts automatically and completes in a few seconds.
159-
160-
> Note: During the flashing process, a red LED blinks rapidly on the NXP EVK.
161-
162-
### Confirm device connection details
163-
164-
You can use the **Termite** utility to monitor communication and confirm that your device is set up correctly.
165-
> Note: If you have issues getting your device to initialize or connect after flashing, see [Troubleshooting](../../docs/troubleshooting.md).
166-
167-
1. Start **Termite**.
168-
1. Select **Settings**.
169-
1. In the **Serial port settings** dialog, check the following settings and update if needed:
170-
* **Baud rate**: 115,200
171-
* **Port**: The port that your NXP EVK is connected to. If there are multiple port options in the dropdown, you can find the correct port to use. Open Windows **Device Manager**, and view **Ports** to identify which port to use.
172-
173-
![Termite](media/termite-settings.png)
174-
1. Select OK.
175-
1. Press the **Reset** button on the device. The button is located near the Micro USB connector.
176-
1. In the **Termite** console, check the following checkpoint values to confirm that the device is initialized and connected to Azure IoT.
177-
178-
```output
179-
Starting Azure thread
180-
181-
Initializing DHCP
182-
IP address: 10.0.0.123
183-
Mask: 255.255.255.0
184-
Gateway: 10.0.0.1
185-
SUCCESS: DHCP initialized
186-
187-
Initializing DNS client
188-
DNS address: 10.0.0.1
189-
SUCCESS: DNS client initialized
190-
191-
Initializing SNTP client
192-
SNTP server 0.pool.ntp.org
193-
SNTP IP address: 185.242.56.3
194-
SNTP time update: Nov 16, 2020 23:47:35.385 UTC
195-
SUCCESS: SNTP initialized
196-
197-
Initializing Azure IoT DPS client
198-
DPS endpoint: global.azure-devices-provisioning.net
199-
DPS ID scope: ***
200-
Registration ID: ***
201-
SUCCESS: Azure IoT DPS client initialized
202-
203-
Initializing Azure IoT Hub client
204-
Hub hostname: ***
205-
Device id: ***
206-
Model id: dtmi:azurertos:devkit:gsg;1
207-
Connected to IoTHub
208-
SUCCESS: Azure IoT Hub client initialized
209-
210-
Starting Main loop
211-
```
212-
213-
Keep Termite open to monitor device output in the following steps.
214-
215-
## Verify the device status
216-
217-
To view the device status in IoT Central portal:
218-
1. From the application dashboard, select **Devices** on the side navigation menu.
219-
1. Check the **Device status** of the device is updated to **Provisioned**.
220-
1. Check the **Device template** of the device has updated to **Getting Stared Guide**.
221-
222-
![IoT Central device status](media/azure-iot-central-device-view-status.png)
223-
224-
## View telemetry
225-
226-
With IoT Central, you can view the flow of telemetry from your device to the cloud.
227-
228-
To view telemetry in IoT Central portal:
229-
230-
1. From the application dashboard, select **Devices** on the side navigation menu.
231-
1. Select the device from the device list.
232-
1. View the telemetry as the device sends messages to the cloud in the **Overview** tab.
233-
1. The temperature is measured from the MCU wafer.
234-
235-
![IoT Central device telemetry](media/azure-iot-central-device-telemetry.png)
236-
237-
> Note: You can also monitor telemetry from the device by using the Termite terminal.
238-
239-
## Call a direct method on the device
240-
241-
You can also use IoT Central to call a direct method that you have implemented on your device. Direct methods have a name, and can optionally have a JSON payload, configurable connection, and method timeout. In this section, you call a method that enables you to turn an LED on or off.
242-
243-
To call a method in IoT Central portal:
244-
245-
1. Select **Command** tab from the device page.
246-
1. Select **State** and select **Run**. There will be no change to the devkit as there isn't an available LED to toggle.
247-
248-
![IoT Central invoke method](media/azure-iot-central-invoke-method.png)
249-
1. Unselect **State** and select **Run**. You can view the output in Termite to monitor the status of the methods.
250-
251-
## View device information
252-
253-
You can view the device information from IoT Central.
254-
255-
Select **About** tab from the device page.
256-
![IoT Central device info](media/azure-iot-central-device-about.png)
257-
258-
## Debugging
259-
260-
For debugging the application, see [Debugging with Visual Studio Code](../../docs/debugging.md).
261-
262-
## Clean up resources
263-
264-
If you no longer need the Azure resources created in this tutorial, you can delete them from the IoT Central portal. Optionally, if you continue to another tutorial in this Getting Started guide, you can keep the resources you've already created and reuse them.
265-
266-
To keep the Azure IoT Central sample application but remove only specific devices:
267-
1. Select the **Devices** tab for your application.
268-
1. Select the device from the device list.
269-
1. Select **Delete**.
270-
271-
To remove the entire Azure IoT Central sample application and all its devices and resources:
272-
1. Select **Administration** > **Your application**.
273-
1. Select **Delete**.
274-
275-
## Next Steps
38+
*getting-started\tools\get-toolchain.bat*
39+
1. Add Wi-Fi and Azure IoT configuration to the config file:
40+
41+
*getting-started\NXP\MIMXRT1050-EVKB\app\azure_config.h*
42+
43+
1. Build the binary image:
27644

277-
In this tutorial you built a custom image that contains Azure RTOS sample code, and then flashed the image to the NXP EVK device. You also used the IoT Central portal to create Azure resources, connect the NXP EVK securely to Azure, view telemetry, and send messages.
45+
*getting-started\NXP\MIMXRT1050-EVKB\tools\rebuild.bat*
46+
1. Flash the image to the device by copying the image file to the **RT1050-EVK** drive:
27847

279-
* For device developers, the suggested next step is to see the other tutorials in the series [Getting started with Azure RTOS](https://go.microsoft.com/fwlink/p/?linkid=2129824).
280-
* If you have issues getting your device to initialize or connect after following the steps in this guide, see [Troubleshooting](../../docs/troubleshooting.md).
281-
* To learn more about how Azure RTOS components are used in the sample code for this tutorial, see [Using Azure RTOS in the Getting Started Guides](../../docs/using-azure-rtos.md).
282-
>Note: Azure RTOS provides OEMs with components to secure communication and to create code and data isolation using underlying MCU/MPU hardware protection mechanisms. However, each OEM is ultimately responsible for ensuring that their device meets evolving security requirements.
48+
*getting-started\NXP\MIMXRT1050-EVKB\build\app\mimxrt1050_azure_iot.bin*;
49+
1. Configure a serial port app at baud rate **115,200** to monitor the debug output from the device

0 commit comments

Comments
 (0)