58 lines
2.0 KiB
Markdown
58 lines
2.0 KiB
Markdown
# Introduction
|
|
|
|
[TOC]
|
|
|
|
<!--:powertrain_build:-->
|
|
|
|
## General Information
|
|
|
|
[powertrain-build introduction](./powertrain_build.md) introduces installation and basic usage of powertrain-build.
|
|
|
|
## Code Base
|
|
|
|
The basic code introduction is placed in [General Code Introduction](./powertrain_build_architecture.md).
|
|
|
|
## Deployment
|
|
|
|
Information on how to deploy powertrain-build can be found [here](./powertrain_build_deployment.md).
|
|
|
|
## Code Generators
|
|
|
|
powertrain-build collects code generated from Simulink models in Matlab.
|
|
powertrain-build was originally designed to work with TargetLink but
|
|
with the correct setup it can also support Embedded Coder.
|
|
For instance, Embedded Coder needs to be configured to mimic the variable classes.
|
|
The part of powertrain-build's codebase that processes Simulink models is located in *powertrain_build/matlab_scripts* folder.
|
|
|
|
For more information about the TargetLink setup see [this page](target_link/target_link.md).
|
|
|
|
## Development
|
|
|
|
If you want to develop powertrain-build, you can run it directly from the Git repositories.
|
|
You probably need a separate virtual environment, as any installed release versions of powertrain-build would interfere:
|
|
|
|
```shell
|
|
python3 -m venv powertrain_build_venv
|
|
source ./powertrain_build_venv/bin/activate
|
|
```
|
|
|
|
Once activated, you can execute it:
|
|
|
|
```shell
|
|
PYTHONPATH=<path_to>//powertrain-build python -m powertrain_build.wrapper build-specific --project-config Projects/CSP/PvcDepDemo/ProjectCfg.json --core-dummy
|
|
```
|
|
|
|
### Local Testing
|
|
|
|
Other than the unit tests, there are two very small sample projects to build.
|
|
These projects can be found in the *test_data/test_repo/Projects* folder.
|
|
|
|
The project *ZC/ZCLA_LVCSC* generates a yaml file describing the interface,
|
|
as well as collecting/generating source code.
|
|
*CSP/CATC* only collects/generates source code.
|
|
|
|
To test run one of these projects, start a terminal in the *test_data/test_repo* folder and execute:
|
|
|
|
* `export PYTHONPATH=my/path/to/powertrain-build/`
|
|
* `python3 -m powertrain_build.wrapper --build CSP/CATC`
|