In a previous blog entry our C-Code generator based on our Model2UML-library was presented.
We have now used the C-Code generator to generate executable code for a Fujitsu MB90F352 16-Bit microcontroller. The code is generated form a state machine, modeled in Sparx Systems Enterprise Architect. As application a traffic light hardware was used, consisting of LEDs for car and pedestrian traffic lights in two directions. Two buttons connected via the external interrups are also available as input sources on the traffic light board. The interrupts are mapped to UML-Signals (S1 and S2) for use as transition trigger for the state machine.
The used microcontroller system has 4kByte RAM and does not support dynamic memory mapping, so the application example is also a demonstration of C-Code generation for small systems without Memory Management Units from UML-models. No high-weight framework or operating system is required.
Below you can see the state machnine and the related class element for the example.
We will present tis lttle demo ond other C-Code generation features and examples at the Embedded Software Engineering (ESE) Kongress 2012 in Sindelfingen (Germany) this week. Visit us at the Sparx Systems stand on the congress exhibition. If you are not able to visit the ESE-Kongress, but interested in C-Code generation from Enetrprise Architect models, you can contact firstname.lastname@example.org for more information.