intro-sunspot.pdf
TRANSCRIPT
Sistemas Embebidos 2013/14
Intro to SunSPOTs 1
Introduction to
SunSPOTsSistemas Embebidos 2013/14
Pedro Brandão
d cc][
References
Based on slides from Luís Lopes and Pedro Lopes
Nik Shaylor, Douglas N. Simon William R. Bus, “A
Java Virtual Machine Architecture for Very Small
Devices”, Language, Compiler, and Tool Support
for Embedded Systems: Proceedings of LCTES ’03,
number 38(7), 2003
See also SunSPOT’s programmers’ Guide
SE 2013/14 - Intro SunSPOTs - pbrandao
2
Sistemas Embebidos 2013/14
Intro to SunSPOTs 2
d cc][
This is a SunSPOT
SE 2013/14 - Intro SunSPOTs - pbrandao
3
(OK 2 SunSPOTs )
d cc][
Board
SE 2013/14 - Intro SunSPOTs - pbrandao
4
Antenna
Processor
ARM920T
180MHz 32 bits
Switch
Radio 802.15.4
IEEE 2.4 GHz
512 KB RAM
4 MB Flash
USB Interface
Sistemas Embebidos 2013/14
Intro to SunSPOTs 3
d cc][
Sensor Board
SE 2013/14 - Intro SunSPOTs - pbrandao
5
8 LEDs
3 colours
Light sensor
digital and
analogue pins
Switchs
3 axis
accelerometer
Temperature
sensor
d cc][
Energy source
Lithium batteries, 3.7V/750 mAh, rechargeable
Deep sleep mode of 30 µA
What components are running affects deep sleep possibilities
Automatic power management by software
See the programmer’s guide on “Powering a
Spot” and “Conserving power”
SE 2013/14 - Intro SunSPOTs - pbrandao
6
Sistemas Embebidos 2013/14
Intro to SunSPOTs 4
d cc][
Squawk Virtual Machine
Architecture split-vm
Implemented in Java
No Operating system
Compacter Byte-
code
Simpler Garbage
collection
SE 2013/14 - Intro SunSPOTs - pbrandao
7
d cc][
Split-VM architecture
Classes loaded at host
Format (.suite)
compacter than .classor .jar
.suite files have no
compression
SE 2013/14 - Intro SunSPOTs - pbrandao
8
Sistemas Embebidos 2013/14
Intro to SunSPOTs 5
d cc][
Simplified Bytecode
Compacter (35% - 45% of equivalent J2ME code)
No dynamic loading
Immutable
Simplified memory management
SE 2013/14 - Intro SunSPOTs - pbrandao
9
d cc][
.suite files
A .suite file is a collection of classes
Each class in a .suite file only refers to classes within the file or in the father .suite.
SE 2013/14 - Intro SunSPOTs - pbrandao
10
Sistemas Embebidos 2013/14
Intro to SunSPOTs 6
d cc][
.suite files (cont)
When a .suite is closed no more classes can be
added
It becomes immutable
It can be kept in a single file and loaded from it.
A static and efficient process
Each SPOT can have several .suite in execution,
distributed in independent address spaces,
named isolates
SE 2013/14 - Intro SunSPOTs - pbrandao
11
d cc][
SunSPOT SDK
SunSPOTs applications are MIDLETs
They extend the javax.microedition.midlet.MIDlet class
Applications implement:
startApp, pauseApp e destroyApp
See the /Demos/CodeSamples/SunSpotApplicationTemplate
Communications use wireless channel with:
radiogram and radiostream
SE 2013/14 - Intro SunSPOTs - pbrandao
12