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 • C code. • Java code. Communication • 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 Machine A 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 o Off-card 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 Model component { u1 tag u2 size u1 info[] } Design .appl et .java .class .ca p .ij c Design Card applet loader Cap file componen ts Execution engine parser Native method s support Virtual Machine 20 Implementation Porting ASU_OS RTOS EFC USART File System IAP Update 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 ASU_OS Sending a library from Computer to system serially File System Allocation OS o Allocation OS o Compaction OS o GUI (User Interface) Connection Control Running Tasks JCVM Implementation Parsing Loading API packages Installing Processing Native Parsing Header_co mponent Directory_co mponent{} ReferenceLo cation_com ponent{} Applet_com ponent{} StaticField_c omponent{} ConstantPo ol_compone nt{} Method_co mponent{} Import_com ponent{} Class_comp onent{} Descriptor_c omponent{} Export_com ponent{} Loading API packages Java.Lang Java.framework JNI Installing Call Create an instance of the applet install() method to: Create various objects Set some initializations Register this instance Processing Call process() method to: Process the functionality of the applet. Native Java JNI Card technology doesn’t support 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.