Using oAW and Topcased editors for small embedded devices
Itemis takes part in a research project dealing with MDA/MDD for embedded systems. In the course of this project a simple example toolchain to demonstrate the ability of free, eclipse based tools for generating code for small devices emerged:
The target platform is an AVR Butterfly, which is a cheap demo device from Atmel. It demonstrates the abilities of the ATMega 169 8-bit-microcontroller. The chip has the following features:
- 16kb program space (flash ROM)
- 1 kb internal RAM
- 512 bytes EEPROM
- LCD controller
- several digital and analog ports
- several timers/counters and on-chip peripherals
- ...
The source code for the pre-installed application for demonstrating several features is also available. Because the menu structure is implemented as a state machine, we decided to model it with a UML2 statemachine and generate in a next step the corresponding C-structures and constants. Using a graphical editor is far more concise than editing the code directly.
We use the Topcased UML2 statemachine editor (Version 1.0.0 M3) and oAW 4.1.1. The generated source is copied to the WinAVR/AVR-Studio IDE, which is also able to simulate AVR microcontrollers. After a successful compilation, the new firmware with the generated menu structure is transferred to the AVR Butterfly via serial port.
Conclusion: Using the windows Compiler/IDE is the most convenient way, but it is also possible to choose a full integrated open source variant for Linux platforms. In doing so, the developer is free to implement feedback from the simulator to the UML2 model. We will face this issue in one of our next, more elaborate examples. Further, this tool chain shows a very cheap but powerful embedded systems development environment with MDSD-features, which fits also perfectly for educational purposes.
External resources:
| AVR main page | http://www.atmel.com/products/avr/ |
| ATMega169 data sheet | http://www.atmel.com/[...]/doc2514.pdf |
| AVR Butterfly description (book sample) | http://www.smileymicros.com/QuickStartGuide.pdf |
| The Topcased main project site | http://www.topcased.org/ |
| gcc for AVR controllers | http://www.avrfreaks.net/AVRGCC/ |
| Martin Thomas' AVR project page with gcc port of the firmware | http://www.siwawi.arubi.uni-kl.de/avr_projects/#bf_app |
| Open Source IDE with avr-gcc-integration for AVR controllers (Linux, KDE) | http://sourceforge.net/projects/kontrollerlab/ |





