yukunduan wrote on Wednesday, July 11, 2018:
I’m using stm32f103c8t6 ,the editor is keil mdk.i must using c++11,so i change the misc controls to --cpp11 from c99 in keil . Then i add the freertos by STM32CubeMX, the freertos version is V9.0. F1 version is 1.6.0
when i complie it push error:
…/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c(235): error: #513: a value of type “void *” cannot be assigned to an entity of type “BlockLink_t *”
…/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c(317): error: #513: a value of type “void *” cannot be assigned to an entity of type “BlockLink_t *”
…/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c(392): error: #513: a value of type “void *” cannot be assigned to an entity of type “A_BLOCK_LINK *”
…/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c(400): error: #513: a value of type “void *” cannot be assigned to an entity of type “BlockLink_t *”
…/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c(406): error: #513: a value of type “void *” cannot be assigned to an entity of type “BlockLink_t *”
…/Middlewares/Third_Party/FreeRTOS/Source/tasks.c(2806): error: #513: a value of type “void *” cannot be assigned to an entity of type “TCB_t *”
…/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c(934): error: #513: a value of type “void *” cannot be assigned to an entity of type “osPoolId”
…/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c(943): error: #513: a value of type “void *” cannot be assigned to an entity of type “std::uint8_t *”
…/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c(1223): error: #513: a value of type “void *” cannot be assigned to an entity of type “os_mailQ_cb *”
The I force the type,until the editor can’t push the error messige like this:.
before :pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
change:pxNewBlockLink = ( void * ) ( ( ( BlockLinkt * ) pxBlock ) + xWantedSize );
But i find a prolem when mcu running .it stop in PendSv
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
it means the editor does not recognized the Macro definition in FreertosConfig.h.
#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
And the function define in port.c
__asm void vPortSVCHandler( void ).
But i fount something
1;it can run prvStartFirstTask
2.when i change the editor from cpp11 to c99, the system can run in normal
3.when i use STM32CUBEMX create the funtion of STM32F427,and change the project to cpp11 ,the complie go successful without an error.(F4 version is 1.18.0 )
i had compare the different about the FreeRtos between F4 and F1 , it just has a little different, also i have rechange the document,the F4 also complie well.
4.The config of F4 and F1 may just the FPU.
the next step i will using the transplant freertos from Official website download.