EcoCoder-One click Automatic Code Generation


EcoCoder is an auto-code generation tool. It adds a set of library blocks and S-Function sets to the generic Matlab/Simulink. It enhances the Simulink embedded coder /eCoder. It links the Simulink directly to the controller hardware, generates the codes compatible to the microprocessor, integrates the codes with the encapsulated hardware driver software, compiles the combined codes into executable codes, and flashes into the controller. All can be done by a single button push in the Simulink environments. It enables the controls engineers to design and develop their algorithms and simulations all in Matlab/Simulink software environment, and never need to worry about the hardware and software integration. It is an open platform that can be adapted to any customer controllers.
Basic EcoCoder library and S-Function:

ecocoder

Procedures to use EcoCoder:

EcoCoder-pic2

  • Run the EcoCoder installation, which automatically adds all EcoCoder’s library blocks and S-functions to Simulink;
  • Encapsulate all the hardware diver software with EcoCoder’s S-functions, including ADC drivers, CAN drivers, digital IO drivers, PWM drivers, etc; also encapsulate the real-time operating systems with EcoCoder’s Task Scheduler S-functions.
  • In Simulink environment, link your application software, aka, Simulink blocks, to the hardware driver software via EcoCoder’s library blocks and S-functions;
  • Run simulations in Simulink, verify models, and software integrity.
  • Define the signal properties and parameter properties in Simulink, which will be output to the generated A2L file.
ecocoder3
  • Click “code generation” button, EcoCoder will generate the microprocessor compatible codes;
  • Click “compile” button, will invoke the compiling and linking process, running at the background, which will run the compiler, like CodeWarrior, to compile the application code and hardware driver code together and generates the executable codes.
3 files will be generated by EcoCoder compiling process:
  • Machine executable file, for example MOT file for Freescale MPC56xx, 57xx series microprocessors;
  • A2l file, which a descriptive file contain all necessary info for the calibration tool to interpret the Controller protocols;
  • CAL file, containing only calibration data, not the code
A2L file generation
Simulink generic A2L file does not contain all needed info for the controller and calibration protocols. EcoCoder includes an “A2L update tool” , which is a basically a series of scripts that make the generic A2L file complete, by extracting the necessary info from the compiling products. The result of A2L update tool is a complete A2L file that is compatible to many calibration tools.

EcoCoder-pic4
Automatic code generation process
EcoCoder-pic5
EcoCoder has various library blocks and S-Function modules: System initialization setting module (HCU_Settings), ADC analog signal processing module (ADC), CAN bus data processing module (CAN),Task scheduling module (Task_Schedeuler), IO driver module (Digital Port IN / OUT).

    • System_Settings

System settings include CAN initialization, task scheduling initialization and EMIOS_PWM_Conf initialization. When starting a new project, first you need to configure the initialization modules, for example, determining CAN bus baud rates etc., timers for task scheduling modules.
EcoCoder-pic6

    • ADC

ADC modules need to be configured for channels, and linked to the specific signals to the application software.
EcoCoder-pic7

    • Digital IN/OUT

Digital IO modules contain four functions: PWM output, PWM input, digital signal output, and digital signal input.
EcoCoder-pic8

    • CAN

CAN modules have: CAN_RxData (CAN data receiving), CAN_TxData (CAN data transmitting), CAN_RxDataFilter (CAN ID filter), CAN_UnpackData (CAN bus data parsing), CAN_PackData (CAN bus data packing).
EcoCoder-pic9

    • Task Scheduler

Task scheduling module provides two types of task scheduling, high-priority tasks and low priority task. High priority tasks have short task execution intervals, but the task itself must be as small as possible, to save the run time, such PIT_10ms. Low priority tasks can have longer execution time, such task_100ms.
EcoCoder-pic10
In addition, task scheduling modules also provide the additional functions: monitoring each task’s execution time, and report task time overflow. If the task execution time is too long, the user needs to adjust the control software and redistribute the heavy computation blocks to lower priority tasks.
EcoCoder-pic11


Software and Documentation
Download documentation and software from here...

Our products are one month returnable, one year warranty!
Click here for Terms and Conditions...

We accept Paypal payment, and credit card payment!
Credit cards:
How to pay with your credit card without a Paypal account?