打印
[MCU]

TI CC3220 with Amazon FreeRTOS

[复制链接]
625|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
AWS IoT
  • Amazon has the broadest and deepest portfolio of IoT services
  • AWS IoT [Link]
AmazonFreeRTOS
  • An operating system for microcontrollers that makes small, low-power edge devices easy to program, deploy, secure, connect, and manage
  • AmazonFreeRTOS is based on the FreeRTOS kernel
  • Extends it with software libraries that make it easy to securely connect your small, low-power devices to AWS cloud services like AWS IoT Core or to more powerful edge devices running AWS Greengrass.
  • Amazon FreeRTOS architecture is shown here
TI CC3220 with Amazon FreeRTOS
  • Amazon tutorial: [Getting Started with the Texas Instruments CC3220SF-LAUNCHXL]
  • Amazon FreeRTOS supports two IDEs for the TI CC3220SF-LAUNCHXL development kit: Code Composer Studio and IAR Embedded Workbench. In this tutorial, we will use Code Composer Studio.
  • Step1: Install Code Composer Studio
  • Step2: Install the SimpleLinkCC3220 SDK
  • Step3: Install Uniflash from http://www.ti.com/tool/UNIFLASH
    • CCS Uniflashis a standalone tool used to program on-chip flash memory on TI MCUs.
    • Uniflash has a GUI, command line, and scripting interface.

Step4: Install the Latest Service Pack
  • On your TI CC3220SF-LAUNCHXL, place the SOP jumper on the middle set of pins (position = 1) and reset the board.
  • StartUniflash, and from the list of configurations, choose CC3220SF-LAUNCHXL. Choose Start Image Creator.
  • Choose New Project
  • On the Start new project page, enter a name for your project. For Device Type, choose CC3220SF. For Device Mode, choose Develop, and then choose Create Project
  • Disconnect your serial terminal (if previously connected) and on the right side of the Uniflashapplication window, choose Connect.
  • From the left column, choose Service Pack.
  • Choose Browse, and then navigate to where you installed the CC3220SF SimpleLinkSDK. The service pack is located atti\simplelink_cc32xx_sdk_VERSION\tools\cc32xx_tools\servicepack-cc3x20\sp_VERSION.bin
  • Click the burn button then choose Program Image (Create & Program) to install the service pack.
Step5: Download Amazon FreeRTOS
  • Browse to the AWS IoT console
    https://console.aws.amazon.com/iotv2/
  • In the navigation pane, choose Software.
  • Under AmazonFreeRTOSDevice Software, choose Configure download.
  • Under Software Configurations, find Connect to AWS IoT- TI, and then
    • If you are using Code Composer Studio, choose Download.
    • Unzip the downloaded file to your hard drive. When unzipped, you have a directory named AmazonFreeRTOS.

Step6: AWS Account and Permissions
  • Go to IAM console: https://console.aws.amazon.com/iam/home
  • From the navigation pane, choose Users (choose one from the list)
  • Choose Add permissions.
  • Choose Attach existing policies directly
  • In the search box, enter AmazonFreeRTOSFullAccess, choose it from the list, and then choose Next: Review.
  • Choose Add permissions
  • Attach the AWSIoTFullAccesspolicy to your IAM user
Step7: Create an AWS IoT policy
  • Go to AWS IoT console: https://console.aws.amazon.com/iotv2/
  • In the navigation pane, choose Secure, choose Policies, and then choose Create
  • Add the following statements
  • Review the final policy document (with all the previous statements)
Step8: To create an IoT thing, private key, and certificate for y**ice
  • In the navigation pane, choose Manage, and then choose Things.
  • Choose Create a single thing.
  • On the Add y**ice to the thing registry page, enter a name for your thing, and then choose Next.
  • On the Add a certificate for your thing page, under One-click certificate creation, choose Create certificate
  • Choose One-click certificate creation
  • Download your private key and certificate by choosing the Download links for each
  • Choose Activate to activate your certificate
  • Download Root CA
  • Make sure your Root CA file is not empty
  • In the IoT console, choose Attach a policy to attach a policy to your certificate that grants y**ice access to AWS IoT operations
  • Click Register Thing
Step9: configure your AWS IoT endpoint
  • Browse to the AWS IoT console
  • In the navigation pane, choose Settings
  • The AWS IoT endpoint is displayed in Endpoint. It should look like <1234567890123>-ats.iot.<us-east-1>.amazonaws.com
  • open AWS downloaded <BASE_FOLDER>\demos\common\include\aws_clientcredential.h and specify values for the following #define constants:
    • clientcredentialMQTT_BROKER_ENDPOINT Your AWS IoT endpoint: a53l6idwvzofq-ats.iot.us-west-2.amazonaws.com
    • •clientcredentialIOT_THING_NAME The AWS IoT thing name of your board: FreeRTOS-TICC3220a
  • Open the aws_clientcredential.h file
  • Specify values for the following #define constants:
    • clientcredentialWIFI_SSID The SSID for your Wi-Fi network
    • clientcredentialWIFI_PASSWORD The password for your Wi-Fi network
    • clientcredentialWIFI_SECURITY The security type of your Wi-Fi network
  • AmazonFreeRTOSis a C language project, and the certificate and private key must be specially formatted to be added to the project
  • open <BASE_FOLDER>\tools\certificate_configuration\CertificateConfigurator.html
    • Under Certificate PEM file, choose the <ID>-certificate.pem.crt that you downloaded from the AWS IoT console
    • Under Private Key PEM file, choose the <ID>-private.pem.key that you downloaded from the AWS IoT console
    • Choose Generate and save aws_clientcredential_keys.h, and then save the file in <BASE_FOLDER>\demos\common\include. This overwrites the existing file in the directory

Step10: Build and Run Amazon FreeRTOSSamples
  • Open TI Code Composer, import Amazon FreeRTOS project
  • You will see the following project architecture
Step11: Final test
  • AWS IoT Console, In the navigation pane, choose Test to open the MQTT client. In Subscription topic, enter freertos/demos/echo, and then choose Subscribe to topic
  • In TI CC3220 board
    • Make sure the Sense On Power (SOP) jumper on your Texas Instruments CC3220SF-LAUNCHXL is in position 0
    • Use a USB cable to connect your Texas Instruments CC3220SF-LAUNCHXL to your computer
    • From Project, choose Build Project to make sure the project compiles without errors or warnings
    • In TI Code Composer, from Run, choose Debug
    • When the debugger stops at the breakpoint in main(), go to the Run menu, and choose Resume
  • In AWS IoT Console, you will see the data has been received by the AWS IoT subscription
  • Open terminal, you will see the following results

使用特权

评论回复

相关帖子

沙发
manufact| | 2019-12-23 18:18 | 只看该作者
感谢楼主分享资料

使用特权

评论回复
板凳
consumption| | 2019-12-27 16:35 | 只看该作者
感谢楼主分享资料,学习一下

使用特权

评论回复
地板
zhangmangui|  楼主 | 2019-12-27 22:23 | 只看该作者
资料比较完善   来自外网收集

使用特权

评论回复
5
sensitivity| | 2019-12-29 10:23 | 只看该作者
感谢楼主分享的资料

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:欢迎进入【TI DSP 论坛】 & 【DSP 技术】           TI忠诚粉丝!

935

主题

26376

帖子

588

粉丝