# Building

Last modified by Alexander Schulz-Rosengarten on 2025/01/30 12:05
Export
Office Formats
Export as PDF Export as ODT Export as RTF
Other Formats

Select the pages to export:

select all/ none

Legend:
  Created Page
  Modified Extension Page
  Clean Extension Page

Export as HTML

## Building / Make Script

The build process for the controller consists of two main tasks:

### Compilation from SCChart to C-Code

The SCCharts for the Controller are compiled by KIELER. This can either be done in the usual GUI Version or with the KIELER Command Line Compiler.

Before trying to run the code the compiler output should be checked. The compiler generates C-Code even if the Controller isn't fully schedulable, so be careful when trying new controllers.

The generated C-Files should be stored in the /code/ part of the local working copy but not commited to the repository.

### Compilation from C-Code to executable

To generate the final executable a python script is provided. This can be found at /code/make.py. The script takes care of including the required modules and adds the needed headers to the controller.

Calling the script with the first parameter rail and the path to the C-Code compiles the controller for the real railway installation.

python make.py rail railway/Tests/TestAll.c

With the parameter sim instead of rail the simulation is built.

python make.py sim railway/Tests/TestAll.c

The generated executables are located in the /code/build/ directory. These files should normally not be commited to the repository.

With the second parameter run the code is executed after finishing the compilation.

python make.py sim run railway/Tests/TestAll.c
Tags:
Created by nbw on 2014/06/22 18:48

- Comments (0)
- Attachments (0)
- History
- Information

# Quick Links

KIELER on GitHub
RTSYS Homepage

XWiki 14.4.7