Rtos API example
Exporter Class Reference
Inherited by AtmelStudio, CMSIS, CoIDE, DS5_5, EmBitz, GNUARMEclipse, IAR, KDS, LPCXpresso, Makefile, SimplicityV3, Uvision, and ZIP.
Public Member Functions | |
| def | __init__ |
| def | get_toolchain |
| def | add_config |
| def | flags |
| def | get_source_paths |
| def | gen_file |
| def | make_key |
| def | group_project_files |
| def | build |
| def | generate |
| def | is_target_supported |
Detailed Description
Exporter base class This class is meant to be extended by individual exporters, and provides a few helper methods for implementing an exporter with either jinja2 or progen.
Definition at line 40 of file exporters.py.
Constructor & Destructor Documentation
| def __init__ | ( | self, | |
| target, | |||
| export_dir, | |||
| project_name, | |||
| toolchain, | |||
extra_symbols = None, |
|||
resources = None |
|||
| ) |
Initialize an instance of class exporter Positional arguments: target - the target mcu/board for this project export_dir - the directory of the exported project files project_name - the name of the project toolchain - an instance of class toolchain Keyword arguments: extra_symbols - a list of extra macros for the toolchain resources - an instance of class Resources
Definition at line 55 of file exporters.py.
Member Function Documentation
| def add_config | ( | self ) |
Add the containgin directory of mbed_config.h to include dirs
Definition at line 87 of file exporters.py.
| def build | ( | project_name, | |
log_name = 'build_log.txt', |
|||
cleanup = True |
|||
| ) |
Invoke exporters build command within a subprocess. This method is assumed to be executed at the same level as exporter project files and project source code. See uvision/__init__.py, iar/__init__.py, and makefile/__init__.py for example implemenation. Positional Arguments: project_name - the name of the project to build; often required by exporter's build command. Keyword Args: log_name - name of the build log to create. Written and printed out, deleted if cleanup = True cleanup - a boolean dictating whether exported project files and build log are removed after build Returns -1 on failure and 0 on success
Reimplemented in Makefile, and Uvision.
Definition at line 173 of file exporters.py.
| def flags | ( | self ) |
Returns a dictionary of toolchain flags. Keys of the dictionary are: cxx_flags - c++ flags c_flags - c flags ld_flags - linker flags asm_flags - assembler flags common_flags - common options
Definition at line 96 of file exporters.py.
| def gen_file | ( | self, | |
| template_file, | |||
| data, | |||
| target_file, | |||
| kwargs | |||
| ) |
Generates a project file from a template using jinja
Definition at line 133 of file exporters.py.
| def generate | ( | self ) |
| def get_source_paths | ( | self ) |
Returns a list of the directories where source files are contained
Definition at line 124 of file exporters.py.
| def get_toolchain | ( | self ) |
A helper getter function that we should probably eliminate
Definition at line 83 of file exporters.py.
| def group_project_files | ( | self, | |
| sources | |||
| ) |
Group the source files by their encompassing directory
Positional Arguments:
sources - array of source locations
Returns a dictionary of {group name: list of source locations}
Definition at line 162 of file exporters.py.
| def is_target_supported | ( | cls, | |
| target_name | |||
| ) |
Query support for a particular target NOTE: override this method if your exporter does not provide a static list of targets Positional Arguments: target_name - the name of the target.
Reimplemented in Makefile, and Uvision.
Definition at line 200 of file exporters.py.
| def make_key | ( | self, | |
| src | |||
| ) |
From a source file, extract group name Positional Arguments: src - the src's location
Definition at line 148 of file exporters.py.
Generated on Sun Jul 17 2022 08:25:44 by
1.7.2