在线时间447 小时
UID3267972
ST金币1822
蝴蝶豆17
注册时间2016-5-3
该用户从未签到
论坛元老
- 最后登录
- 2022-5-20
|
发表于 2017-4-6 17:12:19
|
显示全部楼层
不懂这个。
我是用cubemx生成的ac6下的freertos工程,据说是删减版的。
我找到了对应的函数,供参考:
- void vPortSVCHandler( void )
- {
- __asm volatile (
- " ldr r3, pxCurrentTCBConst2 \n" /* Restore the context. */
- " ldr r1, [r3] \n" /* Use pxCurrentTCBConst to get the pxCurrentTCB address. */
- " ldr r0, [r1] \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"
- );
- }
复制代码
|
|