Presentation is loading. Please wait.

Presentation is loading. Please wait.

T.B. Skaali, Department of Physics, University of Oslo) FYS 4220 / 9220 – 2012 / # Real Time and Embedded Data Systems and Computing Linux for Embedded.

Similar presentations


Presentation on theme: "T.B. Skaali, Department of Physics, University of Oslo) FYS 4220 / 9220 – 2012 / # Real Time and Embedded Data Systems and Computing Linux for Embedded."— Presentation transcript:

1 T.B. Skaali, Department of Physics, University of Oslo) FYS 4220 / 9220 – 2012 / # Real Time and Embedded Data Systems and Computing Linux for Embedded / Real-time systems

2 T.B. Skaali, Department of Physics, University of Oslo What is Linux ? 2 FYS 4220 / Lecture #11 Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance. It has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy- on-write executables, proper memory management, and multistack networking including IPv4 and IPv6. Although originally developed first for 32-bit x86-based PCs (386 or higher), today Linux also runs on (at least) the Alpha AXP, Sun SPARC, Motorola 68000, PowerPC, ARM, Hitachi SuperH, IBM S/390, MIPS, HP PA-RISC, Intel IA-64, AMD x86-64, AXIS CRIS, Renesas M32R, Atmel AVR32, Renesas H8/300, NEC V850, Tensilica Xtensa, and Analog Devices Blackfin architectures; for many of these architectures in both 32- and 64-bit variants. Linux is easily portable to most general-purpose 32- or 64-bit architectures as long as they have a paged memory management unit (PMMU) and a port of the GNU C compiler (gcc) (part of GNU Compiler Collection, GCC). Linux has also been ported to a number of architectures without a PMMU, although functionality is then obviously somewhat limited.

3 T.B. Skaali, Department of Physics, University of Oslo 3 FYS 4220 / Lecture #11

4 T.B. Skaali, Department of Physics, University of Oslo Why linux for Embedded / Real-time? To start with, it is generally agreed that linux is not an OS for hard Real-time. However, most embedded /Real-time applications are soft: from mobile phones to web servers; Has a large and very active user community; Cheap, if you build the system yourself; –However, if you want to avoid this hassle there are ready cooked implementations, for instance from Wind River ( that are probably not cheap! ); POSIX API; Probably fewer Single Board target architectures supported by linux than by VxWorks; Not the same repetoire of RT systems calls as VxWorks Advantages and Disadvantages –The advantages of embedded Linux over proprietary embedded operating systems include multiple suppliers for software, development and support; no royalties or licensing fees; a stable kernel; and the ability to read, modify and redistribute the source code. The disadvantages include a comparatively large memory footprint (kernel and root file system); complexities of user mode and kernel mode memory access; and a complex device drivers framework. (Wikipedia) 4 FYS 4220 / Lecture #11

5 T.B. Skaali, Department of Physics, University of Oslo 5 FYS 4220 / Lecture #11 Take a walk: File: _Linux_is_not_an_RTOS-Chris_Simmonds

6 T.B. Skaali, Department of Physics, University of Oslo 6 FYS 4220 / Lecture #11 https://rt.wiki.kernel.org/index.php/Main_PageClick on: … and have a walk-through

7 T.B. Skaali, Department of Physics, University of Oslo LINUX Wind River 7 FYS 4220 / Lecture #11

8 T.B. Skaali, Department of Physics, University of Oslo 8 FYS 4220 / Lecture #11 «RTLinux» From RTLinux is a hard realtime RTOS microkernel that runs the entire Linux operating system as a fully preemptive process. It is the hard realtime variant of Linux that makes it possible to control robots, data acquisition systems, manufacturing plants, and other time-sensitive instruments and machines. It was developed by Victor Yodaiken, Michael Barabanov, Cort Dougan and others at the New Mexico Institute of Mining and Technology and then as a commercial product at FSMLabs. Wind River Systems acquired FSMLabs embedded technology in February 2007 and made a version available as Wind River Real- Time Core for Wind River Linux. As of August 2011, Wind River has discontinued the Wind River Real-Time Core product line, effectively ending commercial support for RTLinux.

9 T.B. Skaali, Department of Physics, University of Oslo 9 FYS 4220 / Lecture #11 Take a quick look at «New Product Overview»

10 T.B. Skaali, Department of Physics, University of Oslo 10 FYS 4220 / Lecture #11 GETTING STARTED: Workbench Also: have a look at the White Paper «The Real Costs of Roll-Your-Own Linux»

11 T.B. Skaali, Department of Physics, University of Oslo Linux and POSIX POSIX API : a key asset for embedded / Real-time software design. –Note, a web search will display some areas of incompatibility between linux and POSIX. However, what was true yesterday is not necessarily true today, as Linux continues to develop; –Another answer to the question «What is Linux missing to reach POSIX compatibilty?» is USD! This is probably the fee for a certification process. 11 FYS 4220 / Lecture #11

12 T.B. Skaali, Department of Physics, University of Oslo 12 FYS 4220 / Lecture #11

13 T.B. Skaali, Department of Physics, University of Oslo 13 FYS 4220 / Lecture #11 linux real-time library - POSIX message queue API

14 T.B. Skaali, Department of Physics, University of Oslo Test case: porting robot.c from VxWorks to Linux Step 1: Get an Integrated Development System (IDE) Step 2: Replace or emulate VxWorks specific system calls Step 3: Modify VxWorks POSIX stuff if incompatibility with Linux 14 FYS 4220 / Lecture #11

15 T.B. Skaali, Department of Physics, University of Oslo 15 FYS 4220 / Lecture #11 eclipse under linux on bus.uio.no

16 T.B. Skaali, Department of Physics, University of Oslo 16 FYS 4220 / Lecture #11 Setting up a new C project

17 T.B. Skaali, Department of Physics, University of Oslo 17 FYS 4220 / Lecture #11 Setting up a new C project

18 T.B. Skaali, Department of Physics, University of Oslo 18 FYS 4220 / Lecture #11 Porting the cutting edge «robot» program to linux

19 T.B. Skaali, Department of Physics, University of Oslo Linux message queues - mounting 19 FYS 4220 / Lecture #11

20 T.B. Skaali, Department of Physics, University of Oslo Linux message queues - naming 20 FYS 4220 / Lecture #11

21 T.B. Skaali, Department of Physics, University of Oslo A section of the ported code 21 FYS 4220 / Lecture #11

22 T.B. Skaali, Department of Physics, University of Oslo Setup 22 FYS 4220 / Lecture #11

23 T.B. Skaali, Department of Physics, University of Oslo 23 FYS 4220 / Lecture #11

24 T.B. Skaali, Department of Physics, University of Oslo 24 FYS 4220 / Lecture #11

25 T.B. Skaali, Department of Physics, University of Oslo 25 FYS 4220 / Lecture #11 Linux Documentation ProjectLinux Documentation Projectmirrors.kernel.org/LDP/ The canonical set of Linux online and printed documentation. Linux OnlineLinux Onlinewww.linux.org Linux information. linux.org.uklinux.org.ukwww.linux.org.uk Linux information from Great Britain (very good!) Linux InternationalLinux Internationalwww.li.org An organization for promoting the use of Linux. The linux-kernel mailing list FAQThe linux-kernel mailing list FAQhttp://www.tux.org/lkml/ Answers to frequently-asked questions about the Linux kernel (including how to submit patches) "A small trail through the Linux kernel“ "A small trail through the Linux kernel“ A walk-through of what the kernel does when it runs a small demonstration program. Linux kernel source finder A list of where to get architecture-specific kernel sources and patches. Cool Linux sites Maintained by people with lots of free time


Download ppt "T.B. Skaali, Department of Physics, University of Oslo) FYS 4220 / 9220 – 2012 / # Real Time and Embedded Data Systems and Computing Linux for Embedded."

Similar presentations


Ads by Google