Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

FreeRTOS+CLI Erorr in FreeRTOS_CLIProcessCommand

Posted by zhaleksey on August 17, 2017

I have some problem with CLI. If i have some my commands, I can call only one command. There are some own commands. static const CLICommandDefinitiont TERMINALHALSPICommands[] = {{ .pcCommand = "HALSPITransmit", .pcHelpString = "HALStatusTypeDef HALSPITransmit(SPIHandleTypeDef *hspi, uint8t *pData, uint16t Size, uint32t Timeout)nrExample: HALSPITransmit hspi1 32 1 5nrHALOKnr", .pxCommandInterpreter = TERMINALHALSPITransmit, .cExpectedNumberOfParameters = 4} .cExpectedNumberOfParameters = 3}, { .pcCommand = "GetSPIHandles", .pcHelpString = "GetSPIHandlesnrReturn lists of the SPI handles.nr", .pxCommandInterpreter = TERMINALHALSPIGetSPIStrHandles, .cExpectedNumberOfParameters = 0} };

In terminal i input: -> GetSPIHandles [hspi1] // Ok -> HALSPITransmit hspi1 10 2 5 [hspi1] // Not Ok

To fix this bug I delete the "static" before "const CLIDefinitionListItemt *pxCommand = NULL" in function FreeRTOSCLIProcessCommand (FreeRTOSCLI.c). Of course line "if( pxCommand == NULL)" can be deleted.


FreeRTOS+CLI Erorr in FreeRTOS_CLIProcessCommand

Posted by rtel on August 17, 2017

I'm not following this and finding it hard to read the code you posted on my phone as it wraps and I can't match the brackets. Could you please write the code out longhand, with each struct member initialized individually, and each const struct separate, and use the code formatting markup so it doesn't wrap on my small screen. Thanks.

Also if you think there is a bug please say what it is and my the change fixes it. Then I can try and replicate it.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists