06.08.2013 Views

JAVA-BASED REAL-TIME PROGRAMMING

JAVA-BASED REAL-TIME PROGRAMMING

JAVA-BASED REAL-TIME PROGRAMMING

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4. Exercises and Labs<br />

4.3 Lab 1 – Alarmclock<br />

In this lab you are going to implement your alarm clock system designed in<br />

the previous exercise. The target system is an AVR board equipped with LCD<br />

display and six buttons. You will develop the software in three steps:<br />

• Implementing the alarm clock in Java using semaphores, executing it on<br />

a Java emulator<br />

• Compile the Java code to C and execute on a PC simulator<br />

• Cross-compile to the AVR board and execute on the actual hardware<br />

Java is the choice language in the course, but really small embedded systems<br />

may not have the resources for executing Java directly. This is the case here.<br />

However, almost all small system are capable of executing C code, so therefore<br />

we translate the code to C through a tool and compile it, first towards PC<br />

and linux for testing, and then towards the real hardware.<br />

Note: in the 2012 edition of the course in Lund, the AVR board will not be<br />

available (the hardware is broken). Therefore only the two first items should<br />

be done.<br />

Note: in the Helsingborg RT course, only the first item should be done,<br />

since the Java2C-translator will not be available.<br />

Preparation<br />

It is generally a good idea to start programming before the lab occasion.<br />

The handout code is available on the course homepage as a zipped Eclipse<br />

workspace. Remember that the emulator should be run as an applet.<br />

108 2012-08-29 16:05

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!