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.
sources::build_api Namespace Reference
Functions | |
def | prep_report |
def | prep_properties |
def | create_result |
def | add_result_to_report |
def | get_config |
def | is_official_target |
def | transform_release_toolchains |
def | get_mbed_official_release |
def | prepare_toolchain |
def | merge_region_list |
def | build_project |
def | build_library |
def | mbed2_obj_path |
Legacy methods ###. | |
def | build_lib |
def | build_mbed_libs |
def | get_unique_supported_toolchains |
def | mcu_toolchain_list |
def | mcu_target_list |
def | mcu_toolchain_matrix |
def | get_target_supported_toolchains |
def | print_build_results |
def | print_build_memory_usage |
def | write_build_report |
Detailed Description
mbed SDK Copyright (c) 2011-2016 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Function Documentation
def sources::build_api::add_result_to_report | ( | report, | |
result | |||
) |
Add a single result to a report dictionary Positional arguments: report - the report to append to result - the result to append
Definition at line 111 of file build_api.py.
def sources::build_api::build_lib | ( | lib_id, | |
target, | |||
toolchain_name, | |||
clean = False , |
|||
macros = None , |
|||
notify = None , |
|||
jobs = 1 , |
|||
report = None , |
|||
properties = None , |
|||
build_profile = None , |
|||
ignore = None |
|||
) |
Legacy method for building mbed libraries Positional arguments: lib_id - the library's unique identifier target - the MCU or board that the project will compile for toolchain_name - the name of the build tools Keyword arguments: clean - Rebuild everything if True macros - additional macros notify - Notify function for logs jobs - how many compilers we can run at once report - a dict where a result may be appended properties - UUUUHHHHH beats me build_profile - a dict of flags that will be passed to the compiler ignore - list of paths to add to mbedignore
Definition at line 799 of file build_api.py.
def sources::build_api::build_library | ( | src_paths, | |
build_path, | |||
target, | |||
toolchain_name, | |||
dependencies_paths = None , |
|||
name = None , |
|||
clean = False , |
|||
archive = True , |
|||
notify = None , |
|||
macros = None , |
|||
inc_dirs = None , |
|||
jobs = 1 , |
|||
report = None , |
|||
properties = None , |
|||
project_id = None , |
|||
remove_config_header_file = False , |
|||
app_config = None , |
|||
build_profile = None , |
|||
ignore = None |
|||
) |
Build a library Positional arguments: src_paths - a path or list of paths that contain all files needed to build the library build_path - the directory where all of the object files will be placed target - the MCU or board that the project will compile for toolchain_name - the name of the build tools Keyword arguments: dependencies_paths - The location of libraries to include when linking name - the name of the library clean - Rebuild everything if True archive - whether the library will create an archive file notify - Notify function for logs macros - additional macros inc_dirs - additional directories where include files may be found jobs - how many compilers we can run at once report - a dict where a result may be appended properties - UUUUHHHHH beats me project_id - the name that goes in the report remove_config_header_file - delete config header file when done building app_config - location of a chosen mbed_app.json file build_profile - a dict of flags that will be passed to the compiler ignore - list of paths to add to mbedignore
Definition at line 652 of file build_api.py.
def sources::build_api::build_mbed_libs | ( | target, | |
toolchain_name, | |||
clean = False , |
|||
macros = None , |
|||
notify = None , |
|||
jobs = 1 , |
|||
report = None , |
|||
properties = None , |
|||
build_profile = None , |
|||
ignore = None |
|||
) |
Build legacy libraries for a target and toolchain pair Positional arguments: target - the MCU or board that the project will compile for toolchain_name - the name of the build tools Keyword arguments: clean - Rebuild everything if True macros - additional macros notify - Notify function for logs jobs - how many compilers we can run at once report - a dict where a result may be appended properties - UUUUHHHHH beats me build_profile - a dict of flags that will be passed to the compiler ignore - list of paths to add to mbedignore Return - True if target + toolchain built correctly, False if not supported
Definition at line 948 of file build_api.py.
def sources::build_api::build_project | ( | src_paths, | |
build_path, | |||
target, | |||
toolchain_name, | |||
libraries_paths = None , |
|||
linker_script = None , |
|||
clean = False , |
|||
notify = None , |
|||
name = None , |
|||
macros = None , |
|||
inc_dirs = None , |
|||
jobs = 1 , |
|||
report = None , |
|||
properties = None , |
|||
project_id = None , |
|||
project_description = None , |
|||
config = None , |
|||
app_config = None , |
|||
build_profile = None , |
|||
stats_depth = None , |
|||
ignore = None |
|||
) |
Build a project. A project may be a test or a user program. Positional arguments: src_paths - a path or list of paths that contain all files needed to build the project build_path - the directory where all of the object files will be placed target - the MCU or board that the project will compile for toolchain_name - the name of the build tools Keyword arguments: libraries_paths - The location of libraries to include when linking linker_script - the file that drives the linker to do it's job clean - Rebuild everything if True notify - Notify function for logs name - the name of the project macros - additional macros inc_dirs - additional directories where include files may be found jobs - how many compilers we can run at once report - a dict where a result may be appended properties - UUUUHHHHH beats me project_id - the name put in the report project_description - the human-readable version of what this thing does config - a Config object to use instead of creating one app_config - location of a chosen mbed_app.json file build_profile - a dict of flags that will be passed to the compiler stats_depth - depth level for memap to display file/dirs ignore - list of paths to add to mbedignore
Definition at line 457 of file build_api.py.
def sources::build_api::create_result | ( | target_name, | |
toolchain_name, | |||
id_name, | |||
description | |||
) |
Create a result dictionary Positional arguments: target_name - the target being built for toolchain_name - the toolchain doing the building id_name - the name of the executable or library being built description - a human readable description of what's going on
Definition at line 92 of file build_api.py.
def sources::build_api::get_config | ( | src_paths, | |
target, | |||
toolchain_name = None , |
|||
app_config = None |
|||
) |
Get the configuration object for a target-toolchain combination Positional arguments: src_paths - paths to scan for the configuration files target - the device we are building for toolchain_name - the string that identifies the build tools
Definition at line 126 of file build_api.py.
def sources::build_api::get_mbed_official_release | ( | version ) |
Given a release version string, return a tuple that contains a target and the supported toolchains for that release. Ex. Given '2', return (('LPC1768', ('ARM', 'GCC_ARM')), ('K64F', ('ARM', 'GCC_ARM')), ...) Positional arguments: version - The version string. Should be a string contained within RELEASE_VERSIONS
Definition at line 246 of file build_api.py.
def sources::build_api::get_target_supported_toolchains | ( | target ) |
Returns target supported toolchains list Positional arguments: target - the target to get the supported toolchains of
Definition at line 1281 of file build_api.py.
def sources::build_api::get_unique_supported_toolchains | ( | release_targets = None ) |
Get list of all unique toolchains supported by targets Keyword arguments: release_targets - tuple structure returned from get_mbed_official_release(). If release_targets is not specified, then it queries all known targets
Definition at line 1108 of file build_api.py.
def sources::build_api::is_official_target | ( | target_name, | |
version | |||
) |
Returns True, None if a target is part of the official release for the given version. Return False, 'reason' if a target is not part of the official release for the given version. Positional arguments: target_name - Name if the target (ex. 'K64F') version - The release version string. Should be a string contained within RELEASE_VERSIONS
Definition at line 154 of file build_api.py.
def sources::build_api::mbed2_obj_path | ( | target_name, | |
toolchain_name | |||
) |
Legacy methods ###.
Definition at line 795 of file build_api.py.
def sources::build_api::mcu_target_list | ( | release_version = '5' ) |
Shows target list
Definition at line 1163 of file build_api.py.
def sources::build_api::mcu_toolchain_list | ( | release_version = '5' ) |
Shows list of toolchains
Definition at line 1138 of file build_api.py.
def sources::build_api::mcu_toolchain_matrix | ( | verbose_html = False , |
|
platform_filter = None , |
|||
release_version = '5' |
|||
) |
Shows target map using prettytable Keyword arguments: verbose_html - emit html instead of a simple table platform_filter - remove results that match the string release_version - get the matrix for this major version number
Definition at line 1192 of file build_api.py.
def sources::build_api::merge_region_list | ( | region_list, | |
destination, | |||
notify, | |||
padding = b'\xFF' |
|||
) |
Merge the region_list into a single image Positional Arguments: region_list - list of regions, which should contain filenames destination - file name to write all regions to padding - bytes to fill gapps with
Definition at line 405 of file build_api.py.
def sources::build_api::prep_properties | ( | properties, | |
target_name, | |||
toolchain_name, | |||
vendor_label | |||
) |
Setup test properties Positional arguments: properties - the dict to fill target_name - the target the test is targeting toolchain_name - the toolchain that will compile the test vendor_label - the vendor
Definition at line 73 of file build_api.py.
def sources::build_api::prep_report | ( | report, | |
target_name, | |||
toolchain_name, | |||
id_name | |||
) |
Setup report keys Positional arguments: report - the report to fill target_name - the target being used toolchain_name - the toolchain being used id_name - the name of the executable or library being built
Definition at line 55 of file build_api.py.
def sources::build_api::prepare_toolchain | ( | src_paths, | |
build_dir, | |||
target, | |||
toolchain_name, | |||
macros = None , |
|||
clean = False , |
|||
jobs = 1 , |
|||
notify = None , |
|||
config = None , |
|||
app_config = None , |
|||
build_profile = None , |
|||
ignore = None |
|||
) |
Prepares resource related objects - toolchain, target, config Positional arguments: src_paths - the paths to source directories target - ['LPC1768', 'LPC11U24', etc.] toolchain_name - ['ARM', 'uARM', 'GCC_ARM', 'GCC_CR'] Keyword arguments: macros - additional macros clean - Rebuild everything if True jobs - how many compilers we can run at once notify - Notify function for logs config - a Config object to use instead of creating one app_config - location of a chosen mbed_app.json file build_profile - a list of mergeable build profiles ignore - list of paths to add to mbedignore
Definition at line 287 of file build_api.py.
def sources::build_api::print_build_memory_usage | ( | report ) |
Generate result table with memory usage values for build results Aggregates (puts together) reports obtained from self.get_memory_summary() Positional arguments: report - Report generated during build procedure.
Definition at line 1305 of file build_api.py.
def sources::build_api::print_build_results | ( | result_list, | |
build_name | |||
) |
Generate result string for build results Positional arguments: result_list - the list of results to print build_name - the name of the build we are printing result for
Definition at line 1291 of file build_api.py.
def sources::build_api::transform_release_toolchains | ( | toolchains, | |
version | |||
) |
Given a list of toolchains and a release version, return a list of only the supported toolchains for that release Positional arguments: toolchains - The list of toolchains version - The release version string. Should be a string contained within RELEASE_VERSIONS
Definition at line 231 of file build_api.py.
def sources::build_api::write_build_report | ( | build_report, | |
template_filename, | |||
filename | |||
) |
Write a build report to disk using a template file Positional arguments: build_report - a report generated by the build system template_filename - a file that contains the template for the style of build report filename - the location on disk to write the file to
Definition at line 1350 of file build_api.py.
Generated on Tue Jul 12 2022 17:12:47 by
