FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2017 Threads]
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.
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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.