Top Banner
ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh
40

ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Dec 15, 2015

Download

Documents

Abraham Bowcutt
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

ASU Real-Time Operating System.

Supervised by:Dr. Mohammed Sobh

Page 2: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Agenda Overview Background Implementation Demo Conclusion Future Work

Page 3: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Overview

Page 4: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Operating System Based on FreeRTOS

Processing Communication

• C code.• Java code.

• Serial Communication.• USB Communication.

Page 5: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Background

Page 6: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Hardware

AT91SAM7S-EK evaluation board from Atmel

•AT91SAM7s256

J-Link debugger.

Page 7: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Software

FREERTOS.

• Support ARM7 architecture.

• Scheduling policies.

• Memory management.

• Technical support.

Page 8: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

FREERTOS

• Definition

• Scheduling

• Intertask communication & resource sharing

• APIs

Page 9: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Coding phase requirements

Complete understanding of :

• ARM architecture.

• using J-Link debugger.

• Keil IDE.

• IAP (in application programming).

• FREERTOS as operating system.

• Using peripherals (like Timers ,UART , USB).

Page 10: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Coding phase

• Debug test Projects on the kit(like flashing leds).

• Porting FREERTOS to the AT91SAM7S-EK.

• Receive data from PC to the board Ram, through UART.

• Move data from RAM to ROM using IAP.

• Send libraries and function and execute them.

Page 11: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Smart Cards

Page 12: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

A virtual MachineA virtual machine (VM) is a software implemented abstraction of the underlying hardware, which is presented to the application layer of the system. Byte code file:

it is the file generated after compiling a .java file and the name byte code is given may be because of the structure of the instruction set of Java program. 

Page 13: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Java Virtual Machine

JVM gives Java the flexibility of platform independence.

Java byte code is an input to Java Virtual Machine.

JVM reads this code and interprets it and executes the program.

Page 14: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Why Don’t we use JVM? Because there are resource-constrained

device ;for our kit (1.2K of RAM, 16K of nonvolatile memory (EEPROM or flash) and 32K of ROM). The only workable option is to

implement Java Card technology as a subset of the Java platform.

Page 15: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Java Card Virtual Machine A Java Card is a

smart card that is capable of running Java programs, and complies with the Java Card standard specifications issued by Oracle.

Page 16: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Java Card Features Platform independence. it promises the ease of programming in

Java to the world of smart cards. portability and security.

Data encapsulation Applet Firewall split virtual machine

o Off-card o On-card

Page 17: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Java Card VM Subset‘cap (converted applet) file’ Each CAP file contains all of the classes

and interfaces defined in one Java package.

A CAP file consists of a stream of 8-bit bytes.

A Java Card CAP file consists of a set of components. Each component describes a set of elements

in the Java package defined, or an aspect of the CAP file.

Page 18: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Component Modelcomponent {u1 tagu2 sizeu1 info[]}

Page 19: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Design.applet .java

.class

.cap

.ijc

Page 20: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Design

20

Card applet loader

Execution engine

Cap file component

s

parser Virtual Machine

Native method

s support

Page 21: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Implementation

Page 22: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Porting

RTOS

EFC

USART

File System

IAP Update

ASU_OS

1- Writing in ROM by EFC.

2- Communication Protocol uses

physical medium (Serial

Communication) by USART.

3- Mapping flash memory by the

File System.

4- IAP updated for sending

libraries and Control Tasks.

Page 23: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Sending a Library

Multiple

function

Library

Sending a library from Computer to system serially

ASU_OS

Page 24: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

File System

Page 25: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Allocation

o

OS

Page 26: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

o

OS

Allocation

Page 27: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

o

OS

Compaction

Page 28: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

GUI (User Interface)

Page 29: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Connection

Page 30: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Control Running Tasks

Page 31: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

JCVM Implementation

Parsing Loading API packages Installing Processing Native

Page 32: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Parsing Header_component

Directory_component{}

Applet_component{}

Import_component{}

Export_component{}

Descriptor_component{}

Class_component{}

Method_component{}

ConstantPool_componen

t{}

StaticField_component{}

ReferenceLocation_component{}

Page 33: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Loading API packages

Java.Lang

Java.framework

JNI

Page 34: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Installing

Call install() method to: Create an instance of the applet

Create various objects Set some initializations

Register this instance

Page 35: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Processing

Call process() method to:

Process the functionality of the applet.

Page 36: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Native

Java Card technology doesn’t support JNI CAP file format API

Page 37: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Demo

Page 38: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Conclusion User can send a Library to the system

and add more functions and updates. Java Run Time environment is ready to

receive java code to be executed. Sending files could be through USB or

Serial Communication.

Page 39: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.

Future Work Supporting more communication protocols :ex: CAN, Ethernet Implementing Driver libraries for common

devices : Motors Implementing the HAL for different

microcontrollers Extensive Debugging of the current system. Support all byte Codes. Memory & Speed Optimization.

Page 40: ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.