Fall 2013 Instructor: Vlad Wojcik TA Support: Manas Ghosh
Assignments: Warm-Up Project
LEGO MINDSTORMS SPECS
- 32-bit ARM7 microcontroller
- 256 kbytes flash,
64 kbytes RAM
- 8-bit AVR microcontroller
- 4 kbytes flash, 512 bytes RAM
- README for MINDSTORMS
- GNAT Reference Manual
- GNAT GPL User Guide
- GNAT for Cross-Platforms
- GNAT for High Integrity Platforms
- GNATcheck Coding Standard Verifier Reference Manual
- GNU Profiler Reference Manual
- GNU Linker Reference Manual
- Using the GNU Compiler Collection
- GNU Binary Utilities
- GNU Assembler
ADA DRIVERS FOR LEGO
To familiarize students with requirements posed by embedded software and issues arising from embedded software application development. Practical skills in handling real-time execution, concurrency, network and device control will be acquired by working on a project within teams of three students. The goal of the project is to develop a robotic application in Ada 2005 running on bare LEGO MINDSTORMS hardware (no operating system of any kind).
You surely have noticed that over the years the sizes of popular operating systems have grown by leaps and bounds. Windows (courtesy of Microsoft) and Mac OS X (of Apple) come immediately to mind. Consequently, their hardware footprints have grown too, while their reliability has suffered. Their sizes now make them unsuitable to use with robots, PDAs, etc.
Robotic and PDA manufacturers have responded by coming up with nimbler, smaller OS'es: iOS, Android, etc. However: The most intelligent systems we have seen so far are animals (i.e. "Darwin's robots"). They do not appear to run any operating system, but merely one software application (which may be multi-tasked or threaded), seemingly perfectly shrunk-wrapped around their hardware. If one of its less essential tasks / threads dies for whatever reason, then the animal becomes disabled; when a more important task/thread crashes (again for whatever reason, perhaps hardware failure), then the animal dies.
In this offering of COSC 3P95: Embedded Software we will mimic this "unintelligent design" strategy by programming our robots (LEGO MINDSTORMS) using Ravenscar profile, being a subset of Ada 2005, with the intent of running cross-compiled Ada programs on bare robot hardware (i.e. without any OS).
The instructor understands that this approach might induce severe concerns (panic perhaps, or even riots?) among COSC students who may be faithful to Java or other derivatives of C. The instructor would like to point out that with tiny computing resources available on the MINDSTORMS target platform (see table beside) it seems an impractical overkill to install Java Virtual Machine on a MINDSTORMS robot, so that JVM shrink-wraps robot's hardware, while the robotic application is written to shrink-wrap robot's JVM.
To placate these worries it may be useful to point out that a bridge between the Ada and Java words exists, allowing to mix these languages freely by calling Ada from Java or vice-versa.
PROGRAMMING ENVIRONMENT / TOOLS:
Ada 2005 (GNAT GPS), courtesy of AdaCore, Inc., hosted on Windows 7 machines.
- J.W.McCormick, F. Singhoff, J. Hugues: Building Parallel, Embedded, and Real-Time Applications with Ada, Cambridge Univ. Press, May 2011, ISBN 9780521197168.
- V. Braitenberg: Vehicles: Experiments in Synthetic Psychology, MIT Press.
REFERENCES AND RECOMMENDED READING:
- Introduction to Ada (PowerPoint presentation, courtesy of Robert Dewar, co-founder, President and CEO of AdaCore)
- J.Barnes, Programming in Ada 2005, Addison-Wesley, 1st ed., ISBN 9780321340788.
- Ada Programming (an extensive tutorial at Wikibooks).
- Ada for C++ or Java experts.
- Sensors: Physical Coupling + Interfaces
- Attributes in Ada
- Fundamental concepts: Time, Space and Embodiment
- Tasking in Ada
- Using Shared Objects
- Allocation od Scarce Resources
- Ada 2005 Reference Manual (PDF, 791 pages: Think green, then print, if you still must).
- Ravenscar Profile: The Rationale
- Ravenscar profile definition.
- Programming guidelines for Ada Ravenscar Profile.
- Ravenscar Ada for LEGO MINDSTORMS installation notes (courtesy of Mr. David Bockus)
- Programming example: MINDSTORMS motor test in Ravenscar Ada (ZIP archive, courtesy of Mr. David Bockus)
- Individual Assignment 0 @ 0% (Obligatory warm-up to Ada 2005);
- Two Team Assignments @ 10% each;
- Two Individual Midterm Tests @ 15% each;
- One Team Project @ 50%.
CAUTION: The Department reserves the right to scan submissions using electronic means, in order to ensure the originality of students' work. Teamwork: Attempt of a student to ride on the coattails of his/her teammates may result in mutual peer evaluation.
In case a given mark is perceived unjust or unclear by a student, s/he is encouraged to see the instructor to discuss the issue. Depending on the case s/he is able to make, a mark can be modified. The deadline to contact the instructor on these matters is one week after the mark has been issued. Marks not disputed within this period will be considered final.
Possible lateness in assignment submission is counted in days, each period of a day ending at 4 PM. The penalty for late submission of assignments is 25% up to three days (or a part of a day). After that period the penalty is 100%.
While honest cooperation between students is considered appropriate, the Department considers plagiarism a serious offense. For clarification on these issues you are directed to the statement of Departmental Policies and Procedures.
Instructor: Vlad Wojcik
Revised: Monday, 11 November, 2013 0:10 AM
Copyright © 2013 Vlad Wojcik