您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 其它行业文档 > 7基于群星Cortex-M3的μCOS-II移植模板的使用
Tel(020)3873097638730977Fax38730925(020)3873097638730977Fax38730925(020)3873097638730977Fax38730925µCOS-II1.1.111.1C/OS-IIC/OS-II1.1Tel(020)3873097638730977Fax38730925(1)UserMain.CMain.HOS_Cfg.HC/OS-IIC/OS-II2.52OS_Cfg_V252.HOS_Cfg.HIncludes.HC/OS-II.CIncludes.H(2)MiddlewareUart0.CUart0.H(3)µC/OS-IIC/OS-II\SourceC/OS-II2.52uCOS_II.C.C.HC/OS-II2.52(4)µC/OS-IIC/OS-II\PortsC/OS-IILM3SOS_CPU_C.COS_CPU_A.ASMOS_CPU.HTargetStartupKeilStartup.SIARStartup.CCTarget.CTarget.HtargetInit()APILED0C/OS-IITarget.CtargetInit()1.1PLL_ENTarget.H1.11PLLEXT_CLKCCLK_DIVTarget.H1.12PLL200MHzCCLK_DIVTarget.H1.13C/OS-II1.14LED1.1targetInitvoidtargetInit(void){……#ifPLL_EN==0/*PLL*/1SysCtlClockSet(CCLK_DIV|SYSCTL_USE_OSC|SYSCTL_OSC_MAIN|EXT_CLK);#else/*PLL*/2SysCtlClockSet(CCLK_DIV|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|EXT_CLK);#endiftickInit();/**/3/**4*/ledInit();buzInit();}Tel(020)3873097638730977Fax38730925(5)C/OS-IIKeilIARLuminaryKeilDirverLib.lib.H…\Keil\ARM\RV31\LIB\Luminary…\Keil\ARM\INC\LuminaryIARDriverlib.r79.H.XCLPDL-LM3S-1928…\IARSystems\......\arm\libLuminary…\PDL-LM3S-1928\DriverLib\src\ewarm\ExeDriverlib.r79IARSystems\...\arm\lib\Luminary…\IARSystems\......\arm\incLuminary…\PDL-LM3S-1928\DriverLib.hLuminary…\PDL-LM3S-1928\DriverLib\src.h.cLuminary…\PDL-LM3S-1928\DriverLib\inc.hLuminary…\PDL-LM3S-1928\DriverLib\ewarmstandalone.xcl\IARSystems\...\arm\configlnk_LM3.xcl2Keil1.21.1CommentErrata.txtLM3S_uCOS2.map1.2KeilC/OS-IITel(020)3873097638730977Fax38730925(020)3873097638730977Fax38730925(1)4OS_ENTER_CRITICAL()OS_EXIT_CRITICAL()4C/OS-IIOsEnterSumOS_ENTER_CRITICAL()OsEnterSumOS_EXIT_CRITICAL()OsEnterSumOS_ENTER_CRITICAL()OS_EXIT_CRITICAL()OS_ENTER_CRITICAL()OS_EXIT_CRITICAL()1.21.24……/*OsEnterSum=0*/OS_ENTER_CRITICAL()/*OsEnterSum=1*/……OS_ENTER_CRITICAL()/*OsEnterSum=2*/......OS_ENTER_CRITICAL()/*OsEnterSum=3*/……/**/……OS_EXIT_CRITICAL()/*OsEnterSum=2*/……OS_EXIT_CRITICAL()/*OsEnterSum=1*/……OS_EXIT_CRITICAL()/*OsEnterSum=0*/(2)1.3LED1LED11.312Tel(020)3873097638730977Fax38730925(void*p_arg){……OS_ENTER_CRITICAL();/**/1ledOn(1);/*1LED1*/2OS_EXIT_CRITICAL();/**/3/**/OSTimeDly(OS_TICKS_PER_SEC);/*1*/4OS_ENTER_CRITICAL();/**/5ledOff(1);/*2LED1*/6OS_EXIT_CRITICAL();/**/7……}1.4LED11.4121.43LED11.4451.4voidledTask(void*p_arg){……OS_ENTER_CRITICAL();/**/1ledOn(1);/*1LED1*/2/**/OSTimeDly(OS_TICKS_PER_SEC);/*1*/3ledOff(1);/*2LED1*/4OS_EXIT_CRITICAL();/**/5……}Tel(020)3873097638730977Fax38730925()OSPendSV1.621.63OSPendSV1.64ledTask()1.65ledTask()LED1LED11OSTimeDly()OSTimeDly()ledTask()1.66LEDLED1voidledTask(){OS_ENTER_CRITICAL();ledOn(1);/**/OSTimeDly(OS_TICKS_PER_SEC);ledOff(1);OS_EXIT_CRITICAL();}voidOSTimeDly(){OS_Sched();}OSPendSV;BXLR;;VoidotherTask(){......}OSPendSV;BXLR;;Led_Task1234561.6C/OS-IIOSTimeDly()OSSemPend()OSFlagPend()OSMboxPend()C/OS-II(3)Cortex-M3OS_CPU_A.Asm1.5OS_CRITICAL_INT_PRIO25OS_ENTER_CRITICAL()220125Luminary83OS_CRITICAL_INT_PRIO0OS_ENTER_CRITICAL()OS_ENTER_CRITICAL()PWM0OS_CRITICAL_INT_PRIO15PWMC/OS-II1.5……OS_CRITICAL_INT_PRIOEQU(25)……Tel(020)3873097638730977Fax38730925…OutputCreateHEXFile1.7Object.Hex1.7KEIL.HEXIARProjectOptions1.8CategoryLinkerOutputOtherOutputmsd-i…\Object\debug\Exe.Hex1.8IAR.HEXHexCrossStudioH-JTAGHexCrossStudioViewTargetsTargetsTel(020)3873097638730977Fax38730925(20pin)JTAG1.91.9CrossStudioJTAGMacraigorWiggler(20pin)DownloadFile-DownloadIntelHexFile1.10Hex1.10CrossStudio.HEX1.2C/OS-IIEasyARM8962C/OS-II1.2.1LED1(1)KeilIARLM3SC/OS-II(2)C/OS-II(3)LEDAPI2PC1EasyARM89621ULink2LM-Link1Tel(020)3873097638730977Fax38730925
本文标题:7基于群星Cortex-M3的μCOS-II移植模板的使用
链接地址:https://www.777doc.com/doc-5371991 .html