9
The HVM embedded Java VM For very tiny devices

The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

Embed Size (px)

Citation preview

Page 1: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

The HVM embedded Java VM

For very tiny devices

Page 2: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

Overview

• Hardware near programming: a case example

• Hardware near programming: a case example in Java

• Contributions of the HVM• Using Java to improve SW

development processes for embedded devices

Page 3: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

A case example

• Target: CR16C– 16 bit platform from National – 8 Kb RAM + 768 Kb flash (ROM)– GCC available

• Example– Blink LED slowly and comforting, WHILE–Write simple text to UART interface

(serial)

Page 4: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

A case example

• Blinking LEDs,– Port 2, Pin 1 soldered to LED– From CR16c specification:

Page 5: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

A case example

• Writing to UART,– Put byte in transmit register– Enable UART transmit– Clear TX interrupt–Wait for next TX interrupt– From CR16c specification:

Page 6: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

A case example in Java

• Let’s look at the code………………..• Compiling for the CR16c• Compiling for other platforms (ATmega2560)

Page 7: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

Contributions of the HVM

• Hardware objects (Martin Schoeberl)• 1st level interrupt handling (Stephan

Korsholm et. al.)• Intelligent class linking (as proguard

treeshaker)• SDK independence• ROM/RAM aware• Extremely portable (gcc –nostdlib *.c)

Page 8: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

Improving embedded SW

The wedge is made up of proper tools for ensuring software quality:

• Test driven development, unit testing, regression testing• Code review, proper design, static analysis, modeling• Scrum, communication & team spirit

• Intelligence & technical skills are the force pushing the boulder up

• Destructive forces are changes……– ..in environment– ..in tools– ..in the physical world– ..in HW– ..in SW

Page 9: The HVM embedded Java VM For very tiny devices. Overview Hardware near programming: a case example Hardware near programming: a case example in Java Contributions

The birds eye view

• We are in it for the money!– Increasing SW quality– Increasing speed of development– Increasing agility– Increasing predictability of project

progress