当前位置:网站首页>Aiot application innovation competition - Smart street lamp (developed with keil)

Aiot application innovation competition - Smart street lamp (developed with keil)

2022-06-23 03:00:00 Qinyu'an

TencentOS tiny Custom development board EVB_AIoT Quick Start Guide (Keil edition )

Revision

Date

Description

1.1

2022-1-25

The first version of the document

TencentOS tiny Custom development board EVB_AIoT Quick Start Guide (Keil edition ) One 、 Custom development board EVB_AIoT Hardware introduction 1.1: Development board Introduction 1.2: Development board feature 2 . Custom development board EVB_AIoT Software development environment preparation 2.1:Keil IDE Introduce 2.2:IDE install 2.3:NXP RT1060 official keil edition Pack Package installation 2.4: Installation and use of serial debugging assistant 2.5: Use Git Download project package 2.6: Use Keil IDE Build the first bare metal project 2.7: Problems encountered during debugging and handling methods III . stay EVB_AIoT Porting on Development Board TencentOS tiny Kernel IV . EVB_AIoT Use on development board TencentOS tiny Docking Tencent cloud IoT Explorer4.1 Steps for creating a product in the cloud 4.2: The device uploads data to the cloud 4.2.1: modify wifi Information 4.2.2: modify MQTT Device connection cloud information 4.2.3: Compiler Engineering 4.2.4: Serial port view information 1 、 Custom development board EVB_AIoT Hardware introduction 1.1: Development board Introduction 1.2: Development board feature 2 . Custom development board EVB_AIoT Software development environment preparation 2.1:Keil IDE Introduce 2.2:IDE install 2.3:NXP RT1060 official keil edition Pack Package installation 2.4: Installation and use of serial debugging assistant 2.5: Use Git Download project package 2.5: Use Keil IDE Build the first bare metal project 2.6: Problems encountered during debugging and handling methods III . stay EVB_AIoT Porting on Development Board TencentOS tiny Kernel IV . EVB_AIoT Use on development board TencentOS tiny Docking Tencent cloud IoT Explorer4.1 Steps for creating a product in the cloud 4.2: The device uploads data to the cloud 4.2.1: modify wifi Information 4.2.2: modify MQTT Device connection cloud information 4.2.3: Compiler Engineering 4.2.4: Serial port to view information 4.2.5: Cloud platform data view 5 、 Tencent connected small program operation steps 5.1 Add family 5.2 Add debug device 4.2.5: Cloud platform data view 5 、 Tencent connected small program operation steps 5.1 Add family 5.2 Add debug device

Mainly refer to this article :https://github.com/OpenAtomFoundation/TencentOS-tiny/blob/master/doc/30.TencentOS_Tiny_EVB_AIoT_QuickStart.md, There is a lot of repetition in it , If infringement is involved , Please take the reviewer off the shelf , The following is just a record of my own process .

One 、 Custom development board EVB_AIoT Hardware introduction

1.1: Development board Introduction

EVB_AIoT Tencent Internet of things operating system TencentOS tiny The team teamed up with NXP semiconductor 、 Houde Internet of things is designed with high performance AIoT Evaluation board , be used for TencentOS tiny Basic kernel and AIoT Application function experience and evaluation . ​ The development board is shown in the figure below :

1.2: Development characteristics board

built-in TencentOS Tiny Open source Internet of things operating system ;

NXP RT1062 Crossover processor , The highest dominant frequency 528M;

1M RAM 16M SDRAM 64MB qspi flash 128MB spi flash;

On board Type-C Interface CMSIS DAP Emulator ;

On board PCIE Interface , Scalable 4G Class IOT module ;

Onboard IOT Club WAN Interface Interface , Can support NB-IoT、WiFi、4G cat1、LoRa And so on ;

Onboard IOT Club E53 Interface Interface , Extensible whole system E53 sensor ;

Onboard standard 24P DVP Camera interface , Can support the highest 500 Megapixel camera ;

On board RGB Display interface , Convertible HDMI Output ;

On board high performance audio decoding chip , Do speech recognition test ;

reserve SD card 、 User key 、SPI Flash;

Two . Custom development board EVB_AIoT Software development environment preparation

It is recommended to use WIn10;

It is recommended to use WIn10;

It is recommended to use WIn10;

2.1:Keil IDE Introduce

Keil Not much here , Development STM32 SCM notes are familiar with .

2.2:IDE install

Installation is also relatively simple , No more records , The following interface can be used to start the software after installation .

2.3:NXP RT1060 official keil edition Pack Package installation

The following are the development software and tools used in the development process , If already installed keil Of , Just install pack A bag will do ,pack Package for :

NXP.MIMXRT1062_DFP.13.1.1.pack

The sharing connection is as follows :

https://share.weiyun.com/IPhP3vI5

thus , Our development board Keil The development environment has been built , You can start code development .

2.4: Installation and use of serial debugging assistant

Download tool : http://www.daxia.com/download/sscom.rar

Installation method : Serial debugging assistant sscom5.13.1 It's installation free , Extract the compressed package and use it directly .

according to PC And terminals , Select the correct serial port . ​ Open the device manager of your computer , You can see it in the port list PC Port number connected to development board .

What I'm showing here is COM63, So we need to sscom Select from tools COM63, Development board program baud rate set to 115200, So I am sscom Serial port tool selection 115200 Baud rate . The screenshot of opening the serial port is as follows :

2.5: Use Git Download project package

Git Is an open source distributed version control system , Agile for efficient handling of any small or large project .Git yes Linus Torvalds In order to help manage Linux Kernel development for the development of an open source version control software .Git And common version control tools CVS, Subversion And so on , It adopts the way of distributed version Library , No server-side software support required . For specific usage, please refer to the link .

First download Git client ;

https://git-scm.com/

Next, open the client , The software interface is as follows :

Furthermore, switch to the address folder you want to download to F:\4.Tencent_tiny, I use F:\4.Tencent_tiny; Use the following command to switch to this folder .

$ cd  F:\4.Tencent_tiny

Last , Use the clone command to clone github Download the file on the .

$ git clone https://github.com/OpenAtomFoundation/TencentOS-tiny.git

The download is completed as follows :

above Git The commands are two relatively simple commands , How do other commands work , You can choose Baidu, Google or Bing by yourself .

2.6: Use Keil IDE Build the first bare metal project

keil The project can be directly opened in the project package downloaded above , The project name I chose is :

mqttclient_iot_explorer_bh1750

The path address is :

F:\4.Tencent_tiny\TencentOS-tiny\board\TencentOS_tiny_EVB_AIoT\mqttclient_iot_explorer_bh1750

open KEIL Folder project , Execute compile download .

Open the serial debugging assistant , Check the information , Show ESP8266 Connecting to the network , thus , Can be found in keil IDE Implementation development on ,

2.7: Problems encountered during debugging and handling methods

During the whole debugging process , We also found some problems , Sum up :

1: The serial port is not recognized ;

The first problem is how to deal with it , If the serial driver is installed successfully , The serial port name is mbed Serial Port, If the serial port with this name is not found in the serial port debugging assistant , This indicates that the driver was not installed successfully ,win10 It can automatically identify ,win7 You need to download the driver .

2: Unable to find downloader ;

The second problem is how to deal with it , The downloader uses WebUSB: CMSIS-DAP, my win7 What is recognized on the system is , An exclamation mark is found , I thought it was useless , But in keil IDE The following is to identify the downloader , So it doesn't matter .

3: The program cannot be downloaded

If the download fails , May be mcu Run away , At this time, you need to configure boot Pin ,boot The configuration table is as follows :

boot0

boot1

The default mode :Flash start-up

0

1

Serial port burn mode

1

0

If your development board can't download the program , hold boot0 Set high , then boot1 Set up 0 , Looking for a bin File or use IDE debugged , And then boot The button reverts to the default mode boot0:0 boot1:1, You can download .

3、 ... and . stay EVB_AIoT Porting on Development Board TencentOS tiny kernel

There is no in-depth study , When I have time, I will implement the migration on the bare metal machine , Specifically Refer to the following articles for migration methods

https://github.com/OpenAtomFoundation/TencentOS-tiny/blob/master/doc/30.TencentOS_Tiny_EVB_AIoT_QuickStart.md

Four . EVB_AIoT Use on development board TencentOS tiny Docking Tencent cloud IoT Explorer

be based on TencentOS Tiny EVB AIoT To complete Tencent cloud IoT Explorer docking , Two parts need to be completed .

One is : Tencent cloud IoT explorer Finish project on 、 product 、 Device creation 、 Parameter configuration

Two is : be based on TencentOS Tiny Complete terminal application development , Report business data to Tencent cloud .

4.1 Steps for creating a product in the cloud

4.1.1 New projects

Sign in Tencent cloud Internet of things development platform , Select public instance , Click use now .

Click new project , Fill in the project name and introduction .

4.1.2 New product

After creating the project , Click new product ;

4.1.3 Equipment development

Click on the product name , Product development , Advanced object model settings , Because of the smart street lamp I use , Need an event to control the light switch and the brightness attribute of the current environment , So my object model is set as follows :

Then click Next , Just choose default for device development and interactive development , To equipment commissioning , You need to create a device , The order is dev001;

Click to view device information :

4.2: The device uploads data to the cloud

Network modules are required to connect Tencent cloud IOT platform , There is... On the development board WAN Interface You can extend the wifi 4G LoRa wait , Here we extend a esp8266 wifi modular , At the same time, we need a E53 Interface module , Here, select the smart street lamp module , As shown in the figure below

Engineering use Git Downloaded cases , The name is mqttclient_iot_explorer_bh1750, The specific contents are as follows :

Modify the terminal parameters according to your network environment and the product equipment information created in the cloud .

4.2.1: modify wifi Information

According to their own wifi Modify the account information ;

4.2.2: modify MQTT Device connection cloud information

According to the products obtained from cloud devices ID、 Equipment name 、 After the device key triplet , We use the following python Script to generate mqtt user name Password and other information ,python The address of the script is shown in the following figure :

Make sure your computer has been installed python, Switch to cmd Under the command box , Use the following command :

python  mqtt_config_gen.py

Enter the triple information of the device in turn , The script is automatically generated MQTT Connection information .

To get MQTT Connection information , In turn in the corresponding keil Make modifications under the project .

4.2.3: Compiler Engineering

After modifying the information , Compile, burn, and execute .

4.2.4: Serial port to view information

Press the reset key of the board , Execution procedure , From the serial port information data, it can be seen that the equipment is networked , Device upload data .4.2.4: Serial port to view information

Press the reset key of the board , Execution procedure , From the serial port information data, it can be seen that the equipment is networked , Device upload data .

4.2.5: Cloud platform data viewing

Re login Tencent Internet of things cloud platform

The cloud platform has shown that the device is online .

Click the device cloud log , You can view the light intensity value

5、 ... and 、 Tencent connected small program operation steps

5.1 Add family

Mobile phone terminal 【 WeChat 】 Search for 【 Tencent goes on and on 】 Applet , For the first time, you need to click after entering 【 my 】->【 Family management 】, Add a name you like .

5.2 Add debug device

return 【 home page 】, Click on the top right corner “ plus ” Icon :

The QR code of the device is on the cloud platform device debugging page .

Click this device to view data in real time , And issue control instructions :

4.2.5: Cloud platform data viewing

Re login Tencent Internet of things cloud platform

The cloud platform has shown that the device is online .

Click the device cloud log , You can view the light intensity value

5、 ... and 、 Tencent connected small program operation steps

5.1 Add family

Mobile phone terminal 【 WeChat 】 Search for 【 Tencent goes on and on 】 Applet , For the first time, you need to click after entering 【 my 】->【 Family management 】, Add a name you like .

5.2 Add debug device

return 【 home page 】, Click on the top right corner “ plus ” Icon :

The QR code of the device is on the cloud platform device debugging page .

Click this device to view data in real time , And issue control instructions :

See the video for details :

Tencent keeps controlling the lights _ Bili, Bili _bilibili

原网站

版权声明
本文为[Qinyu'an]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/01/202201252155117957.html