Skip to content

Add a switch to fpp-to-cpp for checking that all framework constants are defined #905

@bocchino

Description

@bocchino

The FPP code generation depends a lot of symbolic constants, e.g., FwIndexType. If one of these constants is not defined, the generated C++ may not compile.

Before these constants were defined in C++. Now they're defined in FPP, but there's no check to make sure that they're all defined before generating code. Thus a case could arise where a user omits a constant (e.g., by deleting it from a config file by mistake) and the resulting code goes through code generation to fail in compilation. It would be better to have a switch enforcing that all these constants are defined before generating code. Running with the switch off would allow quick generation of code for inspection and testing but not compilation, without requiring all the constant definitions. In the F Prime build system, the switch could be turned on, so the FPP tools would report a clear error if a needed constant is missing.

Thanks to @Kronos3 for suggesting this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code generationIssues related to code generationsemanticsIssues related to semantics

    Projects

    Status

    CCB

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions