Basic steps for beginners to get started with Alibaba Cloud Haas100 development board

       The haas100 development board released at the Aliyun Yunqi Conference in September 2020 is very good. The original intention of its design is to simplify the development steps and make "building block-style" software and hardware. But in the process of running the first program, I still encountered many problems. This article starts from scratch and explains step by step how to build an environment, how to compile and burn. The most important thing is to share with everyone the problems and solutions encountered in the process.

 

table of Contents

 

1. Introduction to Haas

2. Run helloworld from scratch

(1) Prepare the computer

(Two) install python

(Three) install aos-cube

(4) Download haas development board code

(5) Compile the code

(6) Connect the development board

(7) Burning

(8) Use the serial port assistant to observe

3. Conclusion


1. Introduction to Haas

On September 18, at the 2020 Yunqi Conference, Alibaba Cloud released a HaaS development board for the Internet of Things, which is shown in the figure below.

In terms of hardware, HaaS 100’s master MCU chip HaaS 1000 is equipped with dual-core Cortex-M33, clocked at 300MHz, with 16MB of on-chip RAM and 16MB of on-chip flash (HaaS100 and HaaS1000 are a bit confusing, HaaS 1000 is an MCU Model, according to the unpacking video introduction, this MCU is customized by Alibaba Cloud, and HaaS 100 is the development board module model).

HaaS (Hardware as a service) hardware as a service. By providing users with standard hardware in IoT scenarios and software drivers and functional modules embedded in the hardware, we provide users with efficient development services for IoT devices. This product is designed to help AIoT small and medium-sized developers focus on their business and quickly assemble them with low thresholds. Software and hardware building blocks to realize the safe migration of equipment to the cloud. This design idea reminds me of arduino.

I also wrote an article about using arduino wifi module to connect to Alibaba Cloud, please refer to connection.

https://blog.csdn.net/youngwah292/article/details/104128967

2. Run helloworld from scratch

After getting the development board, we generally need to run helloworld first. This board also uses this method to get started.

(1) Prepare the computer

My computer is win7 x64, i5,4g.

(Two) install python

It is recommended to install it according to Alibaba Cloud's introduction. Choose version 2.7.14. When installing, select  pip and  add python.exe to Path two options.

Why install pip? Because it is very important, many python components are installed by it, and the command line operation is very convenient.

https://help.aliyun.com/document_detail/161038.html?spm=a2c4g.11186623.6.545.163937e2yOyiPZ

(Three) install aos-cube

aos means Alibaba Cloud operating system, cube is a cube, and Rubik's cube is Rubik's cube, which may represent many possibilities, many variations, and support for many devices. The installation command is pip install aos-cube, which runs under the command line.

The command line can be opened by "Run" --cmd.

If python does not install pip, then this command will not run. Step by step cannot be missed.

If it can run, then the following process screen will appear

It is also possible that when the download is about to end, it will prompt you that the download was not successful. For example, the error in the figure below means that the version of pip is too low.

Follow the instructions to update.

update completed

Download aos-cube again

After the download is successful, you can see that this aos-cube is installed and many supporting components are installed at the same time. Please understand the function of each component by yourself, regardless of it does not affect the use.

(4) Download haas development board code

The download speed for domestic users from here will be faster because github speed limit.

git clone https://gitee.com/alios-things/AliOS-Things.git -b dev_3.1.0_haas

Where is this code downloaded? Downloaded to the "user" directory. Mine is the Administrator directory.

(5) Compile the code

First, compile in command line mode. The Alibaba Cloud document introduces this:

"Enter the top-level directory of the code such as AliOS-Things to compile. You can directly compile the demo app in the application/example/ directory, or your own app. The following is an example of compiling helloworld_demo."

aos make helloworld_demo@haas100 -c config
aos make

When running for the first time, you need to agree to some rules

If you follow the instructions in the document and enter the top-level directory to compile, there will be problems

No problem in the routine directory

Or it can be done in the alios-things directory

(6) Connect the development board

Connect as shown below.

There is a virtual serial port on the computer, which is similar to many other development boards, used to download programs and display debugging information. The serial port number can be viewed through the device manager.

(7) Burning

This is what the Alibaba Cloud documentation says:

"After the first compilation, copy all the files in the platform/mcu/haas1000/release/write_flash_gui directory from the top-level directory of the code to the windows environment."

I didn't understand what it meant at first, mainly as follows:

What is the top-level directory of code? In fact, find the haas1000_write_flash_main in platform/mcu/haas1000/release/write_flash_gui from the alios-things directory. As for the windows environment, don't worry about it, we have downloaded it. Don't worry about the meaning of the word "copy". Double-click this program to run it.

The interface after opening is like this

Note that this burning tool may be a preliminary work, and it is not possible to set the directory to be burned.

Alibaba Cloud's help document is written like this

"After the first compilation, copy all the files in the platform/mcu/haas1000/release/write_flash_gui directory from the top-level directory of the code to the windows environment. Subsequent compiling can only replace write_flash_gui/ota_bin/ota_rtos.bin."

After experimenting, it can be understood as "First you have to compile successfully. After the compilation is successful, the ota_bin folder will appear. Every time the compilation is completed, the latest ota_rtos.bin will be generated. This bin binary file is the compiled code. It is in Store in this directory.

Then set the serial port, list the valid serial ports as shown in the figure below, and then open it.

Then choose to start downloading. If all goes well, the idle logo will appear

Unplug the power at this time (be careful not to unplug the USB cable), and then plug it in again. Start burning (burnning).

Burned successfully

(8) Use the serial port assistant to observe

I use putty, this software can also be used under LInux, it is also very convenient. Set up as shown in the figure below, I created a new configuration, named haas, you can directly double-click haas to open the running window. The baud rate is 1500000, which is close to 1500k. This speed is not supported by some other software.

After opening it, observe that the development board sends hello world! continuously and counts the number of sending times.

 

3. Conclusion

The original intention of Alibaba Cloud haas is good. It wants to make software and hardware building blocks as convenient as arduino, but the help document has a threshold and requires a certain foundation. At present, it cannot achieve the minimal interface and operation of arduino.

This article briefly introduces how beginners can run through helloworld step by step, as well as the problems I encountered after getting the board. I hope to help friends who have similar problems, don't take my detours.

With Alibaba Cloud's strong technical capabilities, I believe these problems can be solved. The help documentation can also get better and better.

 

Technology Exchange

 

 

Guess you like

Origin blog.csdn.net/youngwah292/article/details/108943898