Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Sw4STM32 Class Reference
Inherits tools::export::gnuarmeclipse::GNUARMEclipse.
Public Member Functions | |
def | is_target_supported |
def | get_fpu_hardware |
def | process_sw_options |
def | generate |
def | clean |
def | flags |
def | toolchain_flags |
def | build |
def | compute_exclusions |
def | process_options |
def | get_toolchain |
def | add_config |
def | get_source_paths |
def | gen_file_dest |
def | gen_file |
def | gen_file_nonoverwrite |
def | make_key |
def | group_project_files |
def | filter_dot |
Detailed Description
Sw4STM32 class
Definition at line 33 of file export/sw4stm32/__init__.py.
Member Function Documentation
def add_config | ( | self ) | [inherited] |
Add the containgin directory of mbed_config.h to include dirs
Definition at line 88 of file exporters.py.
def build | ( | project_name, | |
log_name = "build_log.txt" , |
|||
cleanup = True |
|||
) | [inherited] |
Headless build an Eclipse project. The following steps are performed: - a temporary workspace is created, - the project is imported, - a clean build of all configurations is performed and - the temporary workspace is removed. The build results are in the Debug & Release folders. All executables (eclipse & toolchain) must be in the PATH. The general method to start a headless Eclipse build is: $ eclipse \ --launcher.suppressErrors \ -nosplash \ -application org.eclipse.cdt.managedbuilder.core.headlessbuild \ -data /path/to/workspace \ -import /path/to/project \ -cleanBuild "project[/configuration] | all"
Definition at line 295 of file export/gnuarmeclipse/__init__.py.
def clean | ( | project_name ) |
Clean a previously exported project 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. Returns nothing. May raise exceptions
Reimplemented from Exporter.
Definition at line 559 of file export/sw4stm32/__init__.py.
def compute_exclusions | ( | self ) | [inherited] |
With the project root as the only source folder known to CDT, based on the list of source files, compute the folders to not be included in the build. The steps are: - get the list of source folders, as dirname(source_file) - compute the top folders (subfolders of the project folder) - iterate all subfolders and add them to a tree, with all nodes markes as 'not used' - iterate the source folders and mark them as 'used' in the tree, including all intermediate nodes - recurse the tree and collect all unused folders; descend the hierarchy only for used nodes
Definition at line 396 of file export/gnuarmeclipse/__init__.py.
def filter_dot | ( | str ) | [inherited] |
Remove the './' or '.\\' prefix, if present.
Definition at line 263 of file exporters.py.
def flags | ( | self ) | [inherited] |
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 The difference from the parent function is that it does not add macro definitions, since they are passed separately.
Definition at line 82 of file export/gnuarmeclipse/__init__.py.
def gen_file | ( | self, | |
template_file, | |||
data, | |||
target_file, | |||
kwargs | |||
) | [inherited] |
Generates a project file from a template using jinja
Definition at line 138 of file exporters.py.
def gen_file_dest | ( | self, | |
target_file | |||
) | [inherited] |
Generate the project file location in an exported project
Definition at line 134 of file exporters.py.
def gen_file_nonoverwrite | ( | self, | |
template_file, | |||
data, | |||
target_file, | |||
kwargs | |||
) | [inherited] |
Generates a project file from a template using jinja
Definition at line 146 of file exporters.py.
def generate | ( | self ) |
Generate the .project and .cproject files.
Reimplemented from Exporter.
Definition at line 421 of file export/sw4stm32/__init__.py.
def get_fpu_hardware | ( | self, | |
fpu_unit | |||
) |
Convert fpu unit name into hardware name.
Definition at line 309 of file export/sw4stm32/__init__.py.
def get_source_paths | ( | self ) | [inherited] |
Returns a list of the directories where source files are contained
Definition at line 125 of file exporters.py.
def get_toolchain | ( | self ) | [inherited] |
A helper getter function that we should probably eliminate
Definition at line 84 of file exporters.py.
def group_project_files | ( | self, | |
sources | |||
) | [inherited] |
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 191 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 from Exporter.
Definition at line 295 of file export/sw4stm32/__init__.py.
def make_key | ( | self, | |
src | |||
) | [inherited] |
From a source file, extract group name Positional Arguments: src - the src's location
Definition at line 177 of file exporters.py.
def process_options | ( | self, | |
opts, | |||
flags_in | |||
) | [inherited] |
CDT managed projects store lots of build options in separate variables, with separate IDs in the .cproject file. When the CDT build is started, all these options are brought together to compose the compiler and linker command lines. Here the process is reversed, from the compiler and linker command lines, the options are identified and various flags are set to control the template generation process. Once identified, the options are removed from the command lines. The options that were not identified are options that do not have CDT equivalents and will be passed in the 'Other options' categories. Although this process does not have a very complicated logic, given the large number of explicit configuration options used by the GNU ARM Eclipse managed build plug-in, it is tedious...
Definition at line 442 of file export/gnuarmeclipse/__init__.py.
def process_sw_options | ( | self, | |
opts, | |||
flags_in | |||
) |
Process System Workbench specific options. System Workbench for STM32 has some compile options, which are not recognized by the GNUARMEclipse exporter. Those are handled in this method.
Definition at line 323 of file export/sw4stm32/__init__.py.
def toolchain_flags | ( | self, | |
toolchain | |||
) | [inherited] |
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 The difference from the above is that it takes a parameter.
Definition at line 106 of file export/gnuarmeclipse/__init__.py.
Generated on Tue Jul 12 2022 12:22:57 by
