E4Coder Code Generator
The E4Coder Code Generator allows the translation of a ScicosLab and XCos diagram in a set of C Language functions, for embedding them inside the final application inside a microcontroller or a bigger hardware platform.
Figure: a ScicosLab diagram that can be used to simulate and generate code for a small microcontroller.
Please check the Documentation and Videos page
DC Motor Simulation and Code Generation
The main features of the E4Coder Code Generator are the following:
- A Customized Blockset for ScicosLab and XCos. The same diagram can be used both for Simulation and Code Generation.
- with support for mathematical functions, and signal generators, useful for implementing control algorithms.
- Generic I/O Peripheral Blocks, which can be used in simulation thanks to optional simulation inputs and outputs.
- Custom Blocks.
- Custom blocks can be defined, providing an implementation of the simulation behavior and of the code generation behavior.
- Native Embedded Target Board support.
- Target boards can be defined specifying which are the I/O Peripherals actually present on the target.
- I/O Peripheral Blocks can be then mapped to the actual peripherals which are present on the Target board.
- Native supports for multi-rate distributed designs.
- Each subsystem is generated to a separate function with a separate periodicity;
- Diagrams can specify more than one frequency;
- Data exchange between subsystems at different rates is modeled using Read/Write Blocks;
- The sematics of communication between different rates is customizable, resulting in the generation of memory buffers, protected memory buffers, or communication messages;
- Native support for microcontrollers without operating system.
- Each subsystem is generated as a separate C function (Runnable), easy to integrate in the main() loop;
- Peripheral blocks generate simple functions that can be easily implemented on microcontrollers as library code.
- Native support for multi-task RTOS environments.
- Periodic tasks are directly modeled in the system, with the purpose of directly generating the Task C functions.
- Susbystems are generated as Runnable functions which are mapped to tasks.
- Direct support for OSEK/VDX operating systems, as well as other operating systems. Direct integration with the ERIKA Enterprise RTOS for the generation of a complete application.
- Direct support for Linux PThread targets, including support for Comedi libraries.
- Direct support for Linux RTAI targets, including support for Comedi libraries.
- Direct support for Bare Metal targets, including the automatic code generation of main() loops.
- Direct support for Windows targets (soft real-time).
- Readable code.
- Every output port is implemented as a static global variable in the generated code.
- Variable names can be customized to enhance the readability of the generated code.
- Traceability: each line of code is tagged with comments to trace which block generated which line of code.
- Efficient code for microcontrollers.
- Customizable types for the data structures.
- Simple types used for scalars, directly initialized in the data definition.
- Mathematical blocks expanded inline.
- Custom blocks for higher algorithms efficiency.
- More than one configuration on the same design.
- All Code generation properties and mappings are stored inside a Property Block.
- More than one Property Block can be specified in the same diagram allowing the same diagram to work on more than one Target Board.