Skip to content

Latest commit

 

History

History

codegen

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

codegen/

Stub for code generation. The actual workflow lives in ../docs/codegen.md; this folder is where generated sources and toolbox-specific configurations are kept.

Layout

codegen/
├── matlab/
│   ├── codercfg.m.example    # example MATLAB Coder configuration
│   ├── codercfg.m            # (you create this from the example)
│   ├── entries.txt           # list of entry points for build_codegen.m
│   └── src/                  # generated .cpp/.hpp
└── simulink/
    ├── entries.txt           # list of models for build_codegen.m
    └── <model>/              # generated .cpp/.hpp per model

Driver

scripts/build_codegen.m reads the two entries.txt manifests and runs MATLAB Coder / slbuild for each entry. It exits non-zero on any failure so it can be wired into CI later without code changes.

# Linux / macOS / WSL / Git Bash
./scripts/build_codegen.sh

# Native Windows PowerShell
.\scripts\build_codegen.ps1

# Interactive MATLAB
>> setup
>> build_codegen

What to commit

  • *.cpp, *.hpp, *.h generated by MATLAB/Simulink Coder.
  • codercfg.m configurations (renamed from .example once adopted).
  • entries.txt once it lists real entry points.
  • Hand-written CMakeLists.txt / Makefiles under codegen/<tool>/.

What NOT to commit (already in root .gitignore)

  • Object files, shared/static libraries, executables.
  • slprj/, slexec/, slbuild/, build/, cmake-build-*/.
  • *.slxc, *.slx.r20*.