freertos移植到IARforstm32中,port.c文件出现大量错误
__asm void vPortSVCHandler( void ){
PRESERVE8
ldr r3, =pxCurrentTCB /* Restore the context. */
ldr r1, /* Use pxCurrentTCBConst to get the pxCurrentTCB address. */
ldr r0, /* The first item in pxCurrentTCB is the task top of stack. */
ldmia r0!, {r4-r11}/* Pop the registers that are not automatically saved on exception entry and the critical nesting count. */
msr psp, r0 /* Restore the task stack pointer. */
isb
mov r0, #0
msr basepri, r0
orr r14, #0xd
bx r14
}
这是我将freertos移植到stm32上,开发平台是IAR,在port.c中出现大量的错误,上面标红的地方,还有很多函数,这是为什么?
不懂这个。
我是用cubemx生成的ac6下的freertos工程,据说是删减版的。
我找到了对应的函数,供参考:
void vPortSVCHandler( void )
{
__asm volatile (
" ldr r3, pxCurrentTCBConst2 \n" /* Restore the context. */
" ldr r1, \n" /* Use pxCurrentTCBConst to get the pxCurrentTCB address. */
" ldr r0, \n" /* The first item in pxCurrentTCB is the task top of stack. */
" ldmia r0!, {r4-r11} \n" /* Pop the registers that are not automatically saved on exception entry and the critical nesting count. */
" msr psp, r0 \n" /* Restore the task stack pointer. */
" isb \n"
" mov r0, #0 \n"
" msr basepri, r0 \n"
" orr r14, #0xd \n"
" bx r14 \n"
" \n"
" .align 2 \n"
"pxCurrentTCBConst2: .word pxCurrentTCB \n"
);
}
我这个已经在kell平台上移植成功了,然后我想转到IAR中,然后就不好使了,我想知道是不是在IAR中还需要配置一些东西呢?:dizzy: 月霜寒 发表于 2017-4-6 17:16
我这个已经在kell平台上移植成功了,然后我想转到IAR中,然后就不好使了,我想知道是不是在IAR中还需要配置 ...
port应该需要对应的平台的文件,可以下载FreeRTOS的源码替换成IAR平台下的port文件试试 我试试 可以参考这篇文章 http://blog.csdn.net/lzs940320/article/details/105838131 keil、iar和gcc各自的汇编格式不一致,不能共用
页:
[1]