Material 17 starting cos ii initialize hardware ucos

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: hardware & uC/OS-II Initialize hardware & uC/OS-II ARMTargetInit(), ,OSInit() ) ARMTargetInit() OSInit( Real-time OS Allocate resources Allocate resources OSMemCreate(), ,OSMboxCreate(), ,…etc OSMemCreate() OSMboxCreate() …etc Create at least one task Create at least one task OSTaskCreate() OSTaskCreate() Start Scheduler Start Scheduler OSStart() OSStart() SoC Design Laboratory SOC Consortium Course Material 18 Porting Application Necessary coding changes variables Real-time OS • use local variables for preemption • use semaphore to protect global variables (resources) data transfer • arguments => mailbox/queue memory allocation • SoC Design Laboratory malloc() => OSMemCreate() OSMemGet() SOC Consortium Course Material 19 Porting Application assign task priorities unique priority level in uC/OS-II Real-time OS • only 56 levels available • priority can be change dynamically call OSTimeDly() in infinite loop task • ensure lower priority task get a chance to run MUST: if lower priority task is pending data from higher priority task SoC Design Laboratory SOC Consortium Course Material 20 Lab 7:Real-time OS - 1 Goal – A guide to use RTOS and port programs to...
View Full Document

This note was uploaded on 08/23/2009 for the course IEE 5016 taught by Professor Tian-sheuanchang during the Spring '05 term at National Chiao Tung University.

Ask a homework question - tutors are online