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] [May 2017 Threads]
Hello,
I want to recommend you fix the freertos source code about CLI
When I used the 'FreeRTOS Plus CLI' source code, 'UARTCommandConsole.c' to compile. After Linking and download to STM32 platfrom. A fatal error ocured.
When I reset the STM32, the welcome information was shown normally via the serial port. However, when I send something to the STM32 via 'XSHELL', the STM32 has not any response. Then I pause the debug, I found my program point is always jump to 'HardFault_Handler'. Many tries, I found that, at the first beginning, the program is run normally, and once sending something, it was halt!
Then I check the source code, I found that, at the function 'static void prvUARTCommandConsoleTask( void pvParameters )
', there is a call 'xSemaphoreTake( xTxMutex, cmdMAXMUTEX_WAIT )
', the error is there.
> Because the mutex semaphore 'xTxMutex
' is though defined, it was not created before taking and giving. So it's the fatal error to cause the OS halt. If you want to fix it, just add a line'xTxMutex = xSemaphoreCreateMutex();'
. And Don't forget change the definetion '#define configUSE_MUTEXES 1
' in 'FreeRTOS.h'
Best Regards,
2.May.2017
Edward
The mutex is created in vUARTCommandConsoleStart().
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.