3137 views|7 replies

119

Posts

2

Resources
The OP
 

Pingtou Ge RVB2601 Review: Console and CDK [Copy link]

 This post was last edited by xiyue521 on 2021-7-19 01:36

1. Console and custom commands:

In the HelloWorld process , I found that I can get the commands that can be typed by typing help in the serial assistant :

Includes system commands and user commands

However, when I was doing the LED experiment, there was no response when I typed help . However, this console is indeed more convenient for debugging, and it also allows you to view the system status, so I compared the similarities and differences between the two projects.

After entering the main function, yoc is initialized first, which initializes the RX, TX pins and functions, then sets the baud rate and LOG printing level, and finally the key cli initialization, which is the initialization of the console. In the cli initialization, aos_cli_init is the system commands seen earlier , and cli_reg_cmd_ps and cli_reg_cmd_free() are user commands .



After adding these codes, compile and burn them and you can use the console commands!!

Can we define our own commands?

Following the ps and free commands, the ps command initialization function is as follows:

cli_command is a command structure with three member variables, namely the name, the specific description of the command, and the callback function.

We can customize a command and name it test : Then write the callback function: (Here argc is the number of input parameters, we print out all the input parameters for testing), and finally call the registration command function to pass in the custom command structure:

Type help in the compile and burn console and you can see that test appears in the user command:

Then enter the test command with parameters, and you can see that the result is consistent with the expected result (note that here we get a string, we can use strcmp or atoi to convert the numeric string into int form to further judge and then implement the business logic function we want):

2. About CDK:

CDK supports 4 themes and can also format code:

We can right-click the project to configure some parameters: including some output files, as well as the optimization level. The flash download settings are very similar to the KEIL settings:

We can also use the serial port assistant that comes with CDK: it’s just not very convenient when interacting.

You can also click ctrl and then click the function you want to view to jump to it, and it is very convenient to zoom in and out with the scroll wheel.

动画 (2).gif (13.43 MB, downloads: 0)

动画 (2).gif
This post is from Domestic Chip Exchange

Latest reply

nmg
What's going on with the points on floors 2-5?   Details Published on 2021-7-26 17:44
 
 

9702

Posts

24

Resources
2
 

The development tools seem quite convenient.

This post is from Domestic Chip Exchange

Comments

Pingtouge CDK is still OK, but the theme was changed to black, some fonts and icons are not clear, and you can't define the color yourself, so I changed it back.   Details Published on 2021-7-21 01:35
 
 
 

119

Posts

2

Resources
3
 
This post was last edited by xiyue521 on 2021-7-21 01:35

.

This post is from Domestic Chip Exchange
 
 
 

119

Posts

2

Resources
4
 
This post was last edited by xiyue521 on 2021-7-21 01:36

.

This post is from Domestic Chip Exchange
 
 
 

119

Posts

2

Resources
5
 
This post was last edited by xiyue521 on 2021-7-21 01:35

.

This post is from Domestic Chip Exchange
 
 
 

119

Posts

2

Resources
6
 
littleshrimp posted on 2021-7-20 08:14 The development tool looks quite convenient

Pingtouge CDK is still OK, but the theme was changed to black, some fonts and icons are not clear, and you can't define the color yourself, so I changed it back.

This post is from Domestic Chip Exchange
 
 
 

5213

Posts

239

Resources
7
 

What's going on with the points on floors 2-5?

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle

Comments

I clicked several times but it didn't seem to work.  Details Published on 2021-9-18 14:39
 
 
 

119

Posts

2

Resources
8
 
nmg posted on 2021-7-26 17:44 What's going on with the points on the 2nd to 5th floors?

I clicked several times but it didn't seem to work.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list