Movatterモバイル変換


[0]ホーム

URL:


Getting started with the Xilinx Avnet MicroZed Industrial IoT Kit - FreeRTOS
DocumentationFreeRTOSUser Guide
OverviewSet up the MicroZed hardwareSet up your development environmentMonitoring MQTT messages on the cloudBuild and run the FreeRTOS demo projectTroubleshooting

Getting started with the Xilinx Avnet MicroZed Industrial IoT Kit

This reference integration is hosted on the Amazon-FreeRTOS repository which is deprecated. We recommend that youstart here when you create a new project. If you already have an existing FreeRTOS project based on the now deprecated Amazon-FreeRTOS repository, see theAmazon-FreeRTOS Github Repository Migration Guide.

This tutorial provides instructions for getting started with the Xilinx Avnet MicroZed Industrial IoT Kit. If you do not have the Xilinx Avnet MicroZed Industrial IoT Kit, visit the AWS Partner Device Catalog to purchase one from ourpartner.

Before you begin, you must configure AWS IoT and your FreeRTOS download to connect your device to the AWS Cloud. SeeFirst steps for instructions. In this tutorial, the path to the FreeRTOS download directory is referred to asfreertos.

Overview

This tutorial contains instructions for the following getting started steps:

  1. Connecting your board to a host machine.

  2. Installing software on the host machine for developing and debugging embedded applications for your microcontroller board.

  3. Cross compiling a FreeRTOS demo application to a binary image.

  4. Loading the application binary image to your board, and then running the application.

Set up the MicroZed hardware

The following diagram might be helpful when you set up the MicroZed hardware:

AVNet microcontroller board with Power Good LED, User LED and push button, JTAG access, 10/100/1000 Ethernet and USB host, microSD slot, USB-UART, Done LED, Reset button, and Boot MODE jumpers highlighted.
To set up the MicroZed board
  1. Connect your computer to the USB-UART port on your MicroZed board.

  2. Connect your computer to the JTAG Access port on your MicroZed board.

  3. Connect a router or internet-connected Ethernet port to the Ethernet and USB-Host port on your MicroZed board.

Set up your development environment

To set up FreeRTOS configurations for the MicroZed kit, you must use the Xilinx Software Development Kit (XSDK). XSDK is supported on Windows and Linux.

Download and install XSDK

To install Xilinx software, you need a free Xilinx account.

To download the XSDK
  1. Go to the Software Development Kit Standalone WebInstall Client download page.

  2. Choose the option appropriate for your operating system.

  3. You are directed to a Xilinx sign-in page.

    If you have an account with Xilinx, enter your sign-in credentials and then chooseSign in.

    If you do not have an account, chooseCreate your account. After you register, you should receive an email with a link to activate your Xilinx account.

  4. On theName and Address Verification page, enter your information and then chooseNext. The download should be ready to start.

  5. Save theXilinx_SDK_version_os file.

To install the XSDK
  1. Open theXilinx_SDK_version_os file.

  2. InSelect Edition to Install, chooseXilinx Software Development Kit (XSDK) and then chooseNext.

  3. On the following page of the installation wizard, underInstallation Options, selectInstall Cable Drivers and then chooseNext.

If your computer does not detect the MicroZed's USB-UART connection, install the CP210x USB-to-UART Bridge VCP drivers manually. For instructions, see theSilicon Labs CP210x USB-to-UART Installation Guide.

For more information about XSDK, see theGetting Started with Xilinx SDK on the Xilink website.

Monitoring MQTT messages on the cloud

Before you run the FreeRTOS demo project, you can set up the MQTT client in the AWS IoT console to monitor the messages that your device sends to the AWS Cloud.

To subscribe to the MQTT topic with the AWS IoT MQTT client
  1. Sign in to theAWS IoT console.

  2. In the navigation pane, chooseTest, then chooseMQTT test client to open the MQTT client.

  3. InSubscription topic, enteryour-thing-name/example/topic, and then chooseSubscribe to topic.

Build and run the FreeRTOS demo project

Open the FreeRTOS demo in the XSDK IDE

  1. Launch the XSDK IDE with the workspace directory set tofreertos/projects/xilinx/microzed/xsdk.

  2. Close the welcome page. From the menu, chooseProject, and then clearBuild Automatically.

  3. From the menu, chooseFile, and then chooseImport.

  4. On theSelect page, expandGeneral, chooseExisting Projects into Workspace, and then chooseNext.

  5. On theImport Projects page, chooseSelect root directory, and then enter the root directory of your demo project:freertos/projects/xilinx/microzed/xsdk/aws_demos. To browse for the directory, chooseBrowse.

    After you specify a root directory, the projects in that directory appear on theImport Projects page. All available projects are selected by default.

  6. With all of the projects selected, chooseFinish.

  7. If you don't see theaws_bsp,fsbl, andMicroZed_hw_platform_0 projects in the projects pane, repeat the previous steps starting from #3 but with the root directory set tofreertos/vendors/xilinx, and importaws_bsp,fsbl, andMicroZed_hw_platform_0.

  8. From the menu, chooseWindow, and then choosePreferences.

  9. In the navigation pane, expandRun/Debug, chooseString Substitution, and then chooseNew.

  10. InNew String Substitution Variable, forName, enterAFR_ROOT. ForValue, enter the root path of thefreertos/projects/xilinx/microzed/xsdk/aws_demos. ChooseOK, and then chooseOK to save the variable and closePreferences.

Build the FreeRTOS demo project

Generate the boot image for the FreeRTOS demo project

JTAG debugging

  1. Set your MicroZed board's boot mode jumpers to the JTAG boot mode.

    Circuit board header connectors and jumper settings.
  2. Insert your MicroSD card into the MicroSD card slot located directly under the USB-UART port.

    Your board should look similar to the following:

    FreeRTOS evaluation board with connectivity options.
  3. In the XSDK IDE, right-clickaws_demos, chooseDebug As, and then choose1 Launch on System Hardware (System Debugger).

  4. When the debugger stops at the breakpoint inmain(), from the menu, chooseRun, and then chooseResume.

You can opt to boot your MicroZed board from a MicroSD card or from QSPI flash to run the FreeRTOS demo project. For instructions, seeGenerate the boot image for the FreeRTOS demo project andRun the FreeRTOS demo project.

Run the FreeRTOS demo project

To run the FreeRTOS demo project, you can boot your MicroZed board from a MicroSD card or from QSPI flash.

As you set up your MicroZed board for running the FreeRTOS demo project, refer to the diagram inSet up the MicroZed hardware. Make sure that you have connected your MicroZed board to your computer.

Boot the FreeRTOS project from a MicroSD card

Format the MicroSD card that is provided with the Xilinx MicroZed Industrial IoT Kit.

  1. Copy theBOOT.bin file to the MicroSD card.

  2. Insert the card into the MicroSD card slot directly under the USB-UART port.

  3. Set the MicroZed boot mode jumpers to SD boot mode.

    SD Card with three slots labeled JP1, JP2, JP3 and a coin cell battery holder.
  4. Press the RST button to reset the device and start booting the application. You can also unplug the USB-UART cable from the USB-UART port, and then reinsert the cable.

Boot the FreeRTOS demo project from QSPI flash

  1. Set your MicroZed board's boot mode jumpers to the JTAG boot mode.

    Circuit board header connectors and jumper settings.
  2. Verify that your computer is connected to the USB-UART and JTAG Access ports. The green Power Good LED light should be illuminated.

  3. In the XSDK IDE, from the menu, chooseXilinx, and then chooseProgram Flash.

  4. InProgram Flash Memory, the hardware platform should be filled in automatically. ForConnection, choose your MicroZed hardware server to connect your board with your host computer.

  5. InImage File, enter the directory path to yourBOOT.bin image file. ChooseBrowse to browse for the file instead.

  6. InOffset, enter0x0.

  7. InFSBL File, enter the directory path to yourfsbl.elf file. ChooseBrowse to browse for the file instead.

  8. ChooseProgram to program your board.

  9. After the QSPI programming is complete, remove the USB-UART cable to power off the board.

  10. Set your MicroZed board's boot mode jumpers to the QSPI boot mode.

  11. Insert your card into the MicroSD card slot located directly under the USB-UART port.

  12. Press the RST button to reset the device and start booting the application. You can also unplug the USB-UART cable from the USB-UART port, and then reinsert the cable.

Troubleshooting

If you encounter build errors that are related to incorrect paths, try to clean and rebuild the project, as described inBuild the FreeRTOS demo project.

If you are using Windows, make sure that you use forward slashes when you set the string substitution variables in the Windows XSDK IDE.

For general troubleshooting information about Getting Started with FreeRTOS, seeTroubleshooting getting started.

Windows Device Simulator
Next steps with FreeRTOS

[8]
ページ先頭

©2009-2025 Movatter.jp