I add a FreeRtos moudel,but the s32ds can not build,the error information is the follow: What Can I do?
make -j4 all
Building file: ../SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.c
Building file: ../SDK/rtos/osif/osif_freertos.c
Executing target #26 ../SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.c
Executing target #28 ../SDK/rtos/osif/osif_freertos.c
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.args" -MMD -MP -MF"SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.d" -MT"SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.o" -o "SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.o" "../SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.c"
Invoking: Standard S32DS C Compiler
arm-none-eabi-gcc "@SDK/rtos/osif/osif_freertos.args" -MMD -MP -MF"SDK/rtos/osif/osif_freertos.d" -MT"SDK/rtos/osif/osif_freertos.o" -o "SDK/rtos/osif/osif_freertos.o" "../SDK/rtos/osif/osif_freertos.c"
../SDK/rtos/osif/osif_freertos.c:65:2: error: #error "Wrong OSIF selected. Please define symbol USING_OS_FREERTOS in project settings or change the OSIF variant"
#error "Wrong OSIF selected. Please define symbol USING_OS_FREERTOS in project settings or change the OSIF variant"
^
../SDK/rtos/osif/osif_freertos.c: In function 'OSIF_MutexLock':
../SDK/rtos/osif/osif_freertos.c:177:9: warning: implicit declaration of function 'xSemaphoreGetMutexHolder' [-Wimplicit-function-declaration]
mutex_holder_handle = xSemaphoreGetMutexHolder(*pMutex);
^
../SDK/rtos/osif/osif_freertos.c:177:29: warning: assignment makes pointer from integer without a cast
mutex_holder_handle = xSemaphoreGetMutexHolder(*pMutex);
^
../SDK/rtos/osif/osif_freertos.c:198:13: warning: implicit declaration of function 'xSemaphoreTake' [-Wimplicit-function-declaration]
operation_status = xSemaphoreTake(*pMutex, timeoutTicks);
^
../SDK/rtos/osif/osif_freertos.c: In function 'OSIF_MutexUnlock':
../SDK/rtos/osif/osif_freertos.c:230:29: warning: assignment makes pointer from integer without a cast
mutex_holder_handle = xSemaphoreGetMutexHolder(*pMutex);
^
../SDK/rtos/osif/osif_freertos.c:240:13: warning: implicit declaration of function 'xSemaphoreGive' [-Wimplicit-function-declaration]
operation_status = xSemaphoreGive(*pMutex);
^
../SDK/rtos/osif/osif_freertos.c: In function 'OSIF_MutexCreate':
../SDK/rtos/osif/osif_freertos.c:264:9: warning: implicit declaration of function 'xSemaphoreCreateMutex' [-Wimplicit-function-declaration]
*pMutex = xSemaphoreCreateMutex();
^
../SDK/rtos/osif/osif_freertos.c: In function 'OSIF_MutexDestroy':
../SDK/rtos/osif/osif_freertos.c:289:9: warning: implicit declaration of function 'vSemaphoreDelete' [-Wimplicit-function-declaration]
vSemaphoreDelete(*pMutex);
^
../SDK/rtos/osif/osif_freertos.c: In function 'OSIF_SemaPost':
../SDK/rtos/osif/osif_freertos.c:350:9: warning: implicit declaration of function 'xSemaphoreGiveFromISR' [-Wimplicit-function-declaration]
operation_status = xSemaphoreGiveFromISR(*pSem, &taskWoken);
^
../SDK/rtos/osif/osif_freertos.c: In function 'OSIF_SemaCreate':
../SDK/rtos/osif/osif_freertos.c:384:5: warning: implicit declaration of function 'xSemaphoreCreateCounting' [-Wimplicit-function-declaration]
*pSem = xSemaphoreCreateCounting(0xFFu, initValue);
^
C:\Users\ADMINI~1\AppData\Local\Temp\ccoWRDKC.s: Assembler messages:
C:\Users\ADMINI~1\AppData\Local\Temp\ccoWRDKC.s:708: Error: selected processor does not support Thumb mode `vstmdbeq r0!,{s16-s31}'
C:\Users\ADMINI~1\AppData\Local\Temp\ccoWRDKC.s:710: Error: instruction not allowed in IT block -- `stmdb r0!,{r4-r11,r14}'
C:\Users\ADMINI~1\AppData\Local\Temp\ccoWRDKC.s:731: Error: selected processor does not support Thumb mode `vldmiaeq r0!,{s16-s31}'
C:\Users\ADMINI~1\AppData\Local\Temp\ccoWRDKC.s:733: Error: instruction not allowed in IT block -- `msr psp,r0'
make: *** [SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/subdir.mk:35: SDK/rtos/FreeRTOS_S32K/Source/portable/GCC/ARM_CM4F/port.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [SDK/rtos/osif/subdir.mk:35: SDK/rtos/osif/osif_freertos.o] Error 1
Hi,
as you can see from the error message:
#error "Wrong OSIF selected. Please define symbol USING_OS_FREERTOS in project settings or change the OSIF variant"
just define USING_OS_FREERTOS in project setting:
Also don't forget generate processor expert code.
Hope it helps.
Jiri
Hello He Wei,
Have you checked the following documents? Perhaps they can help you to identify the issue.
Tutorial: FreeRTOS 10.0.1 with NXP S32 Design Studio 2018.R1
Using custom FreeRTOS with S32K SDK and OSIF for ARM | MCU on Eclipse
Hope it helps,
Mike