Implementation of Embedded OS Lab3 Porting μC/OS-II.

Slides:



Advertisements
Similar presentations
Computer System Laboratory
Advertisements

Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Embedded Systems Programming Introduction to cross development techniques.
Chapter 13 Embedded Systems
Author: Texas Instruments ®, Sitara™ ARM ® Processors Building Blocks for PRU Development Module 2 PRU Firmware Development This session covers how to.
Computer System Laboratory
Software Development and Software Loading in Embedded Systems.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Computer System Laboratory
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
1 THE ARCHITECTURE FOR THE DIGITAL WORLD TM THE ARCHITECTURE FOR THE DIGITAL WORLD Embedded Linux for ARM Architecture.
COMPUTER SYSTEM LABORATORY Lab8 - Debugging II. Lab 8 Experimental Goal Learn how to debug Linux in source-level by Domingo and diagnose target boards.
Shell and Flashing Images Commands and upgrades. RS-232 Driver chip – ST3232C Driver chip is ST3232C Provides electrical interface between UART port and.
COMPUTER SYSTEM LABORATORY Lab4 - Bootloader. Lab 4 Experimental Goal Learn how to build U-Boot bootloader for PXA /10/8/ 142.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
1 uClinux course. 2 Author: D L Johnson Overview u Day 1 +Survey of embedded operating systems - why uclinux? +The uclinux environment - the directory.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 - Cross Tools 2014/10/7/ 20 1.
Computer System Laboratory
COMPUTER SYSTEM LABORATORY Lab10 - Sensor II. Lab 10 Experimental Goal Learn how to write programs on the PTK development board (STM32F207). 2013/11/19/
Computer System Laboratory
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Sensor 2014/9/23/ 13 1.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
Lab 10 Department of Computer Science and Information Engineering National Taiwan University Lab10 – Debugging II 2014/12/2 1 /16.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
Implementation of Embedded OS Lab3 Linux Kernel Modules.
Lab 14 Department of Computer Science and Information Engineering National Taiwan University Lab14 – Camera 2014/12/30 1 /14.
Lab 13 Department of Computer Science and Information Engineering National Taiwan University Lab13 – Interrupt + Timer 2014/12/23 1 /16.
Linux Kernel Management. Module 9 – Kernel Administration ♦ Overview The innermost layer of Linux operating system is the kernel, which is a thin layer.
Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
Lab 12 Department of Computer Science and Information Engineering National Taiwan University Lab12 – Driver 2014/12/16 1 /21.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 – Bootloader + OS Kernel 2015/10/27/ 25 1.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 – μC/OS 2015/10/13/ 13 1.
Implementation of Embedded OS
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
SOC Consortium Course Material SoC Design Laboratory Lab 8 Real-time OS - 1 Speaker: Yung-Chih Chen Advisor: Prof. Chun-Yao Wang November 17, 2003 Department.
Embedded Real-Time Systems Introduction to embedded software development Lecturer Department University.
김민수 Cortex-M4 Processor - Getting Started with the GNU Compiler Collection(gcc)
Embedded Software Design Week II Linux Intro Linux Kernel.
Linux on ARM7TDMI or Nothing is as easy as it looks Helicon technologies Ltd. How to run uClinux on NXP LPC22xx.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux system development.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 – μC/OS 2016/5/31/ 13 1.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The U-boot bootloader Michael.
An Embedded Wireless Mini-Server with Database Support Presented by: Amit Kumar.
Software 12/1/2008.
Implementation of Embedded OS
Bare metal OS project CSSE 332 Operating Systems
Computer System Laboratory
Current Generation Hypervisor Type 1 Type 2.
Computer System Laboratory
Operating Systems •The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that.
Implementation of Embedded OS
Implementation of Embedded OS
Implementation of Embedded OS
Computer System Laboratory
Programming Languages
Computer System Laboratory
How & When The Kernel Runs
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Presentation transcript:

Implementation of Embedded OS Lab3 Porting μC/OS-II

Lab3 Goal  Learn how to port μ C/OS-II to the ARM platform. 2015/5/26 / 122 * source:

Lab3 Environment  Host System  Windows XP  Build System  VirtualBox + Ubuntu 8.04  Target System  Creator XScale PXA270  Software  The binary support package for PXA270.  The source codes of μ C/OS-II.  The application note (AN-1011) for porting μ C/OS-II.  You can download them from RSWiki IEOS Course SoftwareRSWiki IEOS Course Software 2015/5/26 / 123

Lab3 μC/OS-II 2015/5/26 / 124  μ C/OS-II is a real-time operating system with the following features.  Highly portable  ROMable  Very scalable  Preemptive real-time  Multitasking  …  The source codes can be downloaded from the official website freely.

Lab3 Porting Strategies (1/2) 2015/5/26 / 125  μ C/OS-II can be split into core and port.  To port μ C/OS-II to the ARM architecture, we need to implement the ARM port.  A generic ARM port is included in the source archive on our course website.  We only need to modify timer- related functions.  The difference between μ C/OS- II and μ C/OS-III can be found in the user manual of μ C/OS-III. Files that we should modify remaining unchanged

Lab3 Porting Strategies (2/2) 2015/5/26 / 126  There are four components should be considered first.  Memory  The very first step is to initialize the DRAM controller so that we can load executable images to the target board.  UART console  It is useful for debugging.  Interrupt  It enables us to handle asynchronous events from peripheral devices.  Timer  It will keep the scheduler running repeatedly.  The information about how to configure the components can be found in the datasheet of the microprocessor.

Lab3 Directories and Files of μC/OS-II Source Codes 2015/5/26 / 127  The source files are put in three different directories. ./PXA270 : port-specific  It contains files specific to the hardware platform.  OS_CPU.H : constants, macros, and types specific to the platform.  OS_CPU_C.C : C functions for scheduling and processor events.  OS_CPU_A.S : assembly codes for interrupt handling and context switching. ./SOURCES : core  It contains files implementing the core functionality of μ C/OS-II. ./TEST : application-specific  It contains files specific to the application, i.e., the entry functions of user-defined tasks.  The detail information can be found in the application note.

Lab3 Board Support Package (BSP) 2015/5/26 / 128  A board support package contains the minimal codes supporting a specific OS for the given target board.  It usually has the following components.  Low-level initialization functions  A bootloader  OS startup functions  Device drivers  In lab4, we will use U-Boot to load μ C/OS-II.  Hence, only the last two components are needed for porting μ C/OS-II.

Lab3 Lab Steps (1/3) 2015/5/26 / 129  Modify uCOS-II/TEST/Makefile.  The toolchain prefix should be changed.  μ C/OS-II should be compiled without using standard C library.  You can exclude the C library from linking with the gcc option “- nostdlib -lgcc”.  Modify source codes.  You might need to implement some C library functions, e.g., strncpy, strncmp, memcmp, etc.  Hints:  Please do not include any headers from Linux or the C library.  “NULL” is actually a macro expending to “((void*)0)”.

Lab3 Lab Steps (2/3) 2015/5/26 / 1210  Try compiling the source codes.  You will get TEST.bin if the compilation is done successfully.

Lab3 Lab Steps (3/3) 2015/5/26 / 1211  Add timer update function.  It should reprogram the timer to the next deadline when the timer interrupt occurs.  Hints:  when a timer interrupt occurs, the function “OSTimeTickHook” will be invoked.  The timer can be updated by invoking the function “Update_OSMR0” with an argument “p_irq_desc[IRQ_OST0].pVoid”.  Flash the kernel image.  The entry point of μ C/OS-II is at 0xa  The image should be loaded to that address before execution.  Please use the command mkimage to create uImage for μ C/OS-II.

Lab3 Lab Requirements 2015/5/26 / 1212  Let U-Boot load and boot μ C/OS-II automatically.  The timer should be set correctly in μ C/OS-II so that the tasks can run alternately.