37.2. Cherry Shell FreeRTOS UART

37.2.1. Overview

The Cherry Shell FreeRTOS example project demonstrates the basic usage of shell in multi-thread mode. In this project, you need to connect via serial port, and the shell requires a login. The default password is 12345678. After entering the password and pressing Enter, you will enter the shell. You can use the “help” command to view the available commands and variables.

Please refrain from using serial port assistants and consider downloading and using MobaXterm

37.2.2. Board Setting

No special settings

37.2.3. Running the example

  • After the project runs successfully, the serial terminal will output the following information:

login as: cherry
cherry@hpm5301evklite's password:
other task interval 5S
other task interval 5S
other task interval 5S
other task interval 5S
other task interval 5S
  • If you manually enter the correct password “12345678” and press Enter, the terminal will output the following information:

login as: cherry
cherry@hpm5301evklite's password:
other task interval 5S
other task interval 5S
other task interval 5S
other task interval 5S
other task interval 5S

welcome to cherry shell
cherry@hpm5301evklite:/$
  • If you manually enter the command “help” and press Enter, the terminal will output the following information:

cherry@hpm5301evklite:/$ help
total function 6
  test       -> /bin
  toggle_led -> /bin
  write_led  -> /bin
  exit       -> /sbin
  help       -> /sbin
  shsize     -> /sbin

total variable 2
  $PATH r-  11
  $ZERO r-   1
cherry@hpm5301evklite:/$
  • If you manually enter the command “toggle_led” and press Enter, the LED will toggle.

  • If you manually enter the command “write_led 1” and press Enter, the LED will turn on.

  • If you manually enter the command “write_led 0” and press Enter, the LED will turn off.