Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating numbered headings

...

This application note explains the interactive Command Line Interface (CLI) implemented by the FreeRTOS BSP.

1. Understanding FreeRTOS Command Line Interface

1.1. FreeRTOS CLI Purpose

The FreeRTOS test application integrates implementation of a FreeRTOS Command Line Interface (CLI). The CLI provides an interactive user interface on the serial console, allowing the user to run various commands from the FreeRTOS test application in interactive mode.

The FreeRTOS test application is enhanced to provide various custom CLI commands, used to validate and demonstrate the features supported by the FreeRTOS BSP. These custom CLI commands are documented in the other application notes available on the site.

1.2. FreeRTOS CLI UART Port

The FreeRTOS BSP is enhanced to implement a serial console interface on the STM32H7 USART1 port.

The serial console is configured to run at 115200 rate.

1.3. FreeRTOS CLI Source Files

Implementation of the serial console interface can be found in the Applications/FreeRTOS/freertos_stm32h750/Src/console.[ch] source files.

1.4. FreeRTOS CLI C-Binding API

The serial console interface will implement the following C-binding API:

Function

Description

Comments

int console_init(void)

Initialise the serial console interface

Serial console available on USART1, at 115200 rate

void console_putc(char c)

Print a character to the serial console

Can be called from multiple parallel threads

void console_puts(char * str)

Print a string to the serial console

Can be called from multiple parallel threads

char console_getc(void)

Get a character from the serial console

Implementation is interrupt-driven. Use shall be limited to a single thread

2. FreeRTOS CLI Sample Session

The following is a FreeRTOS sample session:

...