![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Responsible for creating and executing the necessary CMake command to compile code that is generated by the CGenerator. More...
Public Member Functions | |
| LFCommand | buildCmakeCommand () |
| Return a command to build the specified C file using CMake. | |
| LFCommand | buildWestFlashCommand (PlatformOptions options) |
| Return a flash/emulate command using west. | |
| CCompiler (TargetConfig targetConfig, FileConfig fileConfig, MessageReporter messageReporter, boolean cppMode) | |
| Create an instance of CCompiler. | |
| LFCommand | compileCmakeCommand () |
| Return a command to compile the specified C file using CMake. | |
| boolean | runCCompiler (GeneratorBase generator, LFGeneratorContext context) throws IOException |
| Run the C compiler by invoking cmake and make. | |
Static Package Functions | |
| static String | getFileExtension (boolean cppMode, TargetConfig targetConfig) |
| Return the file extension of the output source files. | |
| static String | getTargetFileName (String fileName, boolean cppMode, TargetConfig targetConfig) |
| Produces the filename including the target-specific extension. | |
Package Attributes | |
| GeneratorCommandFactory | commandFactory |
| A factory for compiler commands. | |
| FileConfig | fileConfig |
| MessageReporter | messageReporter |
| TargetConfig | targetConfig |
Responsible for creating and executing the necessary CMake command to compile code that is generated by the CGenerator.
This class uses CMake to compile.
| org.lflang.generator.c.CCompiler.CCompiler | ( | TargetConfig | targetConfig, |
| FileConfig | fileConfig, | ||
| MessageReporter | messageReporter, | ||
| boolean | cppMode ) |
Create an instance of CCompiler.
| targetConfig | The current target configuration. |
| fileConfig | The current file configuration. |
| messageReporter | Used to report errors. |
| cppMode | Whether the generated code should be compiled as if it were C++. |
| LFCommand org.lflang.generator.c.CCompiler.buildCmakeCommand | ( | ) |
Return a command to build the specified C file using CMake.
This produces a C-specific build command.
Note: It appears that configuration and build cannot happen in one command. Therefore, this is separated into a compile command and a build command.
| LFCommand org.lflang.generator.c.CCompiler.buildWestFlashCommand | ( | PlatformOptions | options | ) |
Return a flash/emulate command using west.
If board is null (defaults to qemu_cortex_m3) or qemu_* Return a flash command which runs the target as an emulation If ordinary target, return west flash
| LFCommand org.lflang.generator.c.CCompiler.compileCmakeCommand | ( | ) |
Return a command to compile the specified C file using CMake.
This produces a C-specific compile command.
|
staticpackage |
Return the file extension of the output source files.
| cppMode | Whether we are building C code using a C++ compiler. |
| targetConfig | The target configuration that parameterizes the build process. |
|
staticpackage |
Produces the filename including the target-specific extension.
| fileName | The base name of the file without any extensions |
| cppMode | Indicate whether the compiler is in C++ mode In C++ mode, the compiler produces .cpp files instead of .c files and uses a C++ compiler to compiler the code. |
| targetConfig | The target configuration. |
| boolean org.lflang.generator.c.CCompiler.runCCompiler | ( | GeneratorBase | generator, |
| LFGeneratorContext | context ) throws IOException |
Run the C compiler by invoking cmake and make.
| generator | An instance of GeneratorBase, only used to report error line numbers in the Eclipse IDE. |
| context | The generator context. |
|
package |
A factory for compiler commands.
|
package |
|
package |
|
package |