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

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

Embed Size (px)

Citation preview

ASU Real-Time Operating System.

Supervised by:Dr. Mohammed Sobh

Agenda Overview Background Implementation Demo Conclusion Future Work

Overview

Operating System Based on FreeRTOS

Processing Communication

• C code.• Java code.

• Serial Communication.• USB Communication.

Background

Hardware

AT91SAM7S-EK evaluation board from Atmel

•AT91SAM7s256

J-Link debugger.

Software

FREERTOS.

• Support ARM7 architecture.

• Scheduling policies.

• Memory management.

• Technical support.

FREERTOS

• Definition

• Scheduling

• Intertask communication & resource sharing

• APIs

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).

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.

Smart Cards

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. 

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.

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.

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.

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

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.

Component Modelcomponent {u1 tagu2 sizeu1 info[]}

Design.applet .java

.class

.cap

.ijc

Design

20

Card applet loader

Execution engine

Cap file component

s

parser Virtual Machine

Native method

s support

Implementation

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.

Sending a Library

Multiple

function

Library

Sending a library from Computer to system serially

ASU_OS

File System

Allocation

o

OS

o

OS

Allocation

o

OS

Compaction

GUI (User Interface)

Connection

Control Running Tasks

JCVM Implementation

Parsing Loading API packages Installing Processing Native

Parsing Header_component

Directory_component{}

Applet_component{}

Import_component{}

Export_component{}

Descriptor_component{}

Class_component{}

Method_component{}

ConstantPool_componen

t{}

StaticField_component{}

ReferenceLocation_component{}

Loading API packages

Java.Lang

Java.framework

JNI

Installing

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

Create various objects Set some initializations

Register this instance

Processing

Call process() method to:

Process the functionality of the applet.

Native

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

Demo

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.

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.