Looking for xSerialPortInit() implementation

Hello community,
I’m a newby for FreeRTOS, but have experiences in RTOS embedded programming, which I did proffessionally for several years in the 80’th and 90’th, so I’m not a bloody newby.

I’m trying to implement a small proof-of-concept multi task application, using FreeRTOS V202212.01 on an Rpi pico board (RP2040), using its PIO “coprocessor” to read out and process incremental encoder signals. To make things easyer and more flexible, I want to add a command line interpreter to operate that system via the UARTs, using Minicom, developing in Linux.

The RPI pdk examle blink was easy to build, as well as UART examles from the pdk, showing how to use the UART. So I started to add FreeRTOS and found the FreeRTOS_Plus_CLI_Demos, containing the UARTCommandConsole.c and the accompanying FreeRTOS_CLI.c interpreter, exactly what I’m looking for as a start point.

But, searching half of the Internet, I couldn’t find a single implementation of the function xSerialPortInit() or it’s ‘minimal’ sibling xSerialPortInitMinimal() with viewer parameters.

I even couldn’t find any code implementation in the numerous vendor subdirectories of the Demo example folders in Github. The last reference I found about that things was from 2008 and it looks as if the hardware initalisation of the UART and it’s FreeRTOS-API is coded now elsewhere, but I can’t find any hints.

Could one of yours give me some hints? Tx in advance!

Hi @hbechtold
Welcome to the FreeRTOS Community Forums !

I see multiple implementation of xSerialPortInitMinimal() in FreeRTOS/FreeRTOS/Demo folder. Attaching 2 of them here for your reference :

  1. xSerialPortInitMinimal()
  2. xSerialPortInit()

Let us know if these implementations provide a solution to your issue.

Thanks.

Hi karahulx,
thank you very much for that quick reply! Indeed, there are 40 versions of serial.c in the Demo folders. I just didn’t search for ‘serial.c’ in my cloned repo, but, using grep, for ‘xSerialPortInit’ , which isn’t implemented within the sources of that RP2040 demo subprojcts. Scanning through these 40 file matches on Git-Hub, there is no special version for an ARM-CORTEX-M0+, but for a lot of other, more powerfull, ARM uC’s .
So I will search for the best matching API version and try to port that for the RP2040, or the PRI-pico, respectively. But this will take some time …

Horst