游客:
注册
|
登录
|
会员
|
统计
|
帮助
我要委托设计网论坛
»
????????
» uC/OS-II???±??×÷???????????????¨??????????????°?·?·¨??????
‹‹ 上一主题
|
下一主题 ››
投票
交易
悬赏
活动
打印
|
推荐
|
订阅
|
收藏
标题: uC/OS-II???±??×÷???????????????¨??????????????°?·?·¨??????
本主题由 admin 于 2006-5-5 23:49 移动
zing
论坛支持团队
UID 79
精华 0
积分 710
帖子 701
阅读权限 10
注册 2004-8-30
状态 离线
#1
使用道具
发表于 2005-9-16 16:26
资料
个人空间
短消息
加为好友
uC/OS-II???±??×÷???????????????¨??????????????°?·?·¨??????
×÷?????????ó?§?? ????????????????×?
????
---???±??×÷?????????????????ò????????????????????·??????§???·±????¨????????????±??????¤????????·???
??C/OS-II???????ù?????????????±?à???????????????????????????????????¨????????????????????????C/OS-II?????÷??????????????????±????????????¤??
????C/OS-II??·????÷?????????é????????±?????????????·?????±í??????????????????·??????????????????????????ù?????????ò??·??¤????????°?±???????????·?×????ù???è????????????
±????ò????TMS320C6711 DSP??????????????????·???????C/OS-II??????????·????¨??????????????°?·?·¨??????????C/OS-II???????ù±????è
?????¨?????????¨????·??¤?????ó????????C/OS-II???????¤×÷????°??è??×????????????????è??
?? ?????????ù??????????????
?? ·????ù??????C??????·??¤????????
?? ±à???????ú??
?? ??????????????
?? ????????????·????¨??·?×°·???????
?¨?à??80x86°?±???PC.C??PC.H??
????????
?????????ù????????????????MCU??DSP??MPU????????C/OS-II???????±???ù?è????×????????????à?ü????
?×???????????????????í?ú????????????????±?????????·?±????°????????×???????????????????·????í?????ò??????????????????????·?????
?????????è??×??????????????÷???????ú?????????????????·???????????????¤·??ò???????ú????????????????
??±???????????????TMS320C6711 DSP??????TI????6000?????????????????????????????±??????·???????????????????????×??¨VLIW???á?????àRISC?????????à???÷???????????ù???????????à?±???ó?????¨???è±??????????í?????????÷??·???????×???·?????????
??C6711??????????3???à??????????????????±??????¨NMI????????±??????¨INT4-INT15????????±???????CSR?????÷????????????????????????IER?????÷·?±???????????????C6711?????????í?????ú?????ù????C/OS-II???????????è??±à??????ר??????????????
??????C6711??????ר????????·??????????ú?????????????ù???à?????????????ú???ù?è±à???ê???????????????àRISC??????C6711???????á??????????A0-A15??B0-B15????×é32bit???¨???????÷??
C??????·??¤??
?????ù??????????????????????C??????·??¤????????C/OS-II??±???????????
×??ò????????????????·??¤???????á???é????±?????C?????÷???????à??·?±?±à?????à??×???????·??§??????????±à?????????ó???ù????·??§???°interrupt?±·?±ê×????ü×??ù?÷??????????????·??§????±à?ú????±í(list)????????????
?????????ù???????????á????????????·????????à±?????TI??C??????·??¤??CCS for C6000??°ü?????????ù????????
???????ù????????????????????????·??¤????????????????????±????????ó???????????¤×÷??
?×????????C±à???÷???°??±à?ú????±í(list)?±?????????ù±à???÷???á??????C???????????ú????????????±à?ú????????
??CCS??·??·??????·?·¨???????????°/Project/Build options?±???°Feedback?±?????????°Interlisting??Opt/C and ASM(-s)?±???ò???????????±????CCS??C±à???ü???????????°-s?±??????
???ó·?±?±à???????ò????????????±à????±???C???ú????±à???ú??????±à?ú??????????
void FUNC_TEMP (void)
{
Func_tmp2(); //?÷????????????
}
??CCS??±à???ó?ú????ASM?ú??????
.asg B15, SP // ?ê?¨??
_FUNC_TEMP:
STW B3,*SP--(8) // ????
NOP 2
CALL _ Func_tmp2 //-----------
MVKL BACK, B3 // ?????÷??
MVKH BACK, B3 //-----------
NOP 3
BACK: LDW *++SP(8),B3 // ????
NOP 4
RET B3 // ????·???
NOP 5
????????????CCS±à???÷?????ò????B15?????÷±???×÷???????????????¨??????????????????×÷??????????????±?????8×???????????±???
??????B3?????÷±?????±????????÷???±??·??????·???????????????°?è??????±??¤???±??????·????°????????
?±????CCS??C±à???÷?????????¨???????÷???????¨????????????????C/OS-II??????????????????????????×???????
×??ó????±à?????????°interrupt?±???ü×??ù?÷????????
interrupt void ISR_TEMP (void)
{
int a;
a=0;
}
?ú????ASM?ú??????
_ISR_TEMP:
STW B4,*SP--(8) // ????
NOP 2
ZERO B4 //---------
STW B4,*+SP(4) // a=0
NOP 2 //----------
B IRP // ????·???
LDW *++SP(8),B4 // ????
NOP 4
???°?????ú???à±?????????????????±à????????????????
?? ??????·??????·????????B3?????÷???à?????????è??B3???????¨IRP?????÷??×???±???????·??ú?±?????ò???·??
?? ±à???÷?á×????????????????ù???????????÷????????????????????????????????±??¤???????????????ò??????????????B4?????÷??
±à???????ú??
????????????????????????·??¤?????ù??????????±à???????ú?????¤×÷???à??±????ò??????
??C/OS-II×??í???ú?????ó??·???????ANSI C±à???????????ú?????????á????·????????????¨?à?????????ú????????????OS_CPU_A.ASM??OS_CPU_C.C???°OS_CPU.H???????????±????
?????????±?ò???á???°?????????è???????????????????ù±???°??????????????±??×÷??????C/OS-II?·???é???à??????????????×???????????
??????????????????????·??¤?????§???ò±???????????????????°????á?????????í·?·¨???????????è????±?×???????C6711????????????
?? ??????????????±????????ê?¨??????
#define OS_ENTER_CRITICAL() Disable_int()
#define OS_EXIT_CRITICAL() Enable_int()
Disable_int??Enable_int??????±à????±à??????????????????????????????×????????÷(CSR)??????????????CSR????????????????????GIE????????????????PGIE??????????±??????°??GIE×?????
?ò????Disable_int??????GIE????????PGIE?????ó????GIE??0????±???????????Enable_int???ò??PGIE????????????GIE???????????????°???????è????
???ù????????±??????????????ê????????±?????????????×????????????????????????????ò????±?????±???×÷????????·?·¨??????
?? ????????????
?°????????C6711???????í?????ú?????ù?????????????è??????±à????×???±à??????????_OSCtxSw????????????
#define OS_TASK_SW() OSCtxSw()
??C6711???è??????±??¤???????÷°ü?¨A0-A15??B0-B15??CSR??IER??IRP??AMR?????????????±?°?????ò???·?????????????????è??????±?????
_OSCtxSw?????????è????·??ú?????????????ù???????????????????????ó????±??¤????????TCB?????????????????????????????????ê????????????
?è????±?×???????????????OS_TASK_SW??×÷???????÷???????ù?????°???ù?????÷???±???±?°???ò???·??±?????B3?????÷???????????????????????¤???±??·??????·??
?? ??????±à????
???°???ù???????????°interrupt?±???ü×??ù?÷??????CCS??±à???±???á×??????????????????????????÷??????????±??¤??
?????????á?????÷??????·??ú?±???????????????÷???à????????????C/OS-II???á?????????í?ó?????ò????C/OS-II???ó????·??ú?±????????×÷??????·??ú?????????±?ê?????ù?????????á????
?ò???????????±???ù????C/OS-II??????·??±?????????±?????°interrupt?±???ü×??????????????á??±à????????????
void OSTickISR (void)
{
DSP_C6x_Save(); // ·?????????????
OSIntEnter();
if (OSIntNesting == 1) // v2.51°?±???????
{
OSTCBCur->OSTCBStkPtr
=(OS_STK*) DSP_C6x_GetCurrentSP(); // ·???????
} // ?????±?°SP????
// ???í???????× ?ò????????????
OSTimeTick();
OSIntExit();
DSP_C6x_Resume(); // ·?????????????
}
DSP_C6x_Save??DSP_C6x_Resume??????·?????????·?±??ê??????????????????×÷???ü????OS_TASK_SW????????±???????????·??ú?±???±?°???ò???·??×???±?????IRP?????÷??????????×÷??????·??????·??????????B3????????DSP_C6x_Resume?????????????á·????????????????ù???????????ó???ü???±????×?????????·??ú?°?????ò???·??????????????
??????????????
??±à???ê???ù?????????ú?????ó????????±à???????ò???????????ò?????????????ó????????·????????è?????????à??×???±????ê?????????????à×÷×???????
·?×°·???????
×??ó???????è???ù?ù?????×±???????????????±????????ú?????ò?à???×???¤????????????????
??C/OS-II????×÷???????¨?é?????ú??·??·????????????????±?????×??????ù?????ú??????°??????·???á????????
uCOS-II
???¤SOURCE // ???¨?????ú??
?? OS_CORE.C
?? ......
???¤TI_C6711 // ????????
???¤CCS // ??·??¤??
?? OS_CPU.H
?? OS_CPU_A.ASM
?? OS_CPU_C.C
??
???¤ DSP_C6x_Service // ·???????
?? DSP_C6x_ Service.H
?? DSP_C6x_ Service.ASM
??
???¤ TEST // ????????·??????ú??
OS_CFG.H
INCLUDES.H
TEST.C ......
??????DSP_C6x_Service????·??????????à??????×÷???á????80x86°?±?????PC.C??PC.H????????±???????×?????·????????ò°ü?¨???????á?°???????à???????????°??????????????DSP_C6x_SystemInit()???±????????????DSP_C6x_TimerInit()????
??????????·??????ú?????ò????·?±????°/TI_C6711?±?·???????¨×????????????????????????????°TEST?±???????????è????×???C/OS-II?????ú????·?????????
????????????±?????±?????±à???í?ó????±?????·??????????¤??
·?????????
投票
交易
悬赏
活动
我要委托设计网论坛
商务区
> 售前服务区
> 项目发布区
电子技术 专区
> 硬件电路专区
> 嵌入系统
> PDA DIY
PCB/EDA专区
> EDA交流
> PCB技术
工程技术专区
> EMI/EMC电磁兼容
> 生产测试技术
休闲娱乐
> 键述我心
> 精彩贴图
> 家居生活
> 超级灌水
其他
> 其他技术区
> 回收站
日常事务
> 论坛事务
> 意见和建议
> 斑竹会议室
当前时区 GMT+8, 现在时间是 2024-11-24 03:17
Powered by
Discuz!
5.5.0
© 2001-2007
Comsenz Inc.
Processed in 0.012683 second(s), 8 queries
TOP
清除 Cookies
-
联系我们
-
我要委托设计网
-
Archiver