Development mbed library for MAX32630FTHR
Dependents: blinky_max32630fthr
examples_lib Namespace Reference
Functions | |
def | print_list |
def | print_summary |
def | target_cross_toolchain |
def | target_cross_ide |
def | get_repo_list |
def | source_repos |
def | clone_repos |
def | deploy_repos |
def | get_num_failures |
def | export_repos |
def | compile_repos |
def | update_mbedos_version |
Detailed Description
Import and bulid a bunch of example programs This library includes functions that are shared between the examples.py and the update.py modules.
Function Documentation
def examples_lib::clone_repos | ( | config, | |
examples | |||
) |
Clones each of the repos associated with the specific examples name from the json config file. Note if there is already a clone of the repo then it will first be removed to ensure a clean, up to date cloning. Args: config - the json object imported from the file.
Definition at line 171 of file examples_lib.py.
def examples_lib::compile_repos | ( | config, | |
toolchains, | |||
targets, | |||
examples | |||
) |
Compiles combinations of example programs, targets and compile chains. The results are returned in a [key: value] dictionary format: Where key = The example name from the json config file value = a list containing: pass_status, successes, and failures where pass_status = The overall pass status for the compilation of the full set of example programs comprising the example suite. True if all examples pass, false otherwise successes = list of passing examples. failures = list of failing examples. Both successes and failures contain the example name, target and compile chain Args: config - the json object imported from the file. toolchains - List of toolchains to compile for. results - results of the compilation stage.
Definition at line 311 of file examples_lib.py.
def examples_lib::deploy_repos | ( | config, | |
examples | |||
) |
If the example directory exists as provided by the json config file, pull in the examples dependencies by using `mbed-cli deploy`. Args: config - the json object imported from the file.
Definition at line 190 of file examples_lib.py.
def examples_lib::export_repos | ( | config, | |
ides, | |||
targets, | |||
examples | |||
) |
Exports and builds combinations of example programs, targets and IDEs. The results are returned in a [key: value] dictionary format: Where key = The example name from the json config file value = a list containing: pass_status, successes, export failures, build_failures, and build_skips where pass_status = The overall pass status for the export of the full set of example programs comprising the example suite. IE they must build and export) True if all examples pass, false otherwise successes = list of examples that exported and built (if possible) If the exporter has no build functionality, then it is a pass if exported export_failures = list of examples that failed to export. build_failures = list of examples that failed to build build_skips = list of examples that cannot build Both successes and failures contain the example name, target and IDE Args: config - the json object imported from the file. ides - List of IDES to export to
Definition at line 227 of file examples_lib.py.
def examples_lib::get_num_failures | ( | results, | |
export = False |
|||
) |
Returns the number of failed compilations from the results summary Args: results - results summary of the compilation stage. See compile_repos() for details of the format. num_failures
Definition at line 210 of file examples_lib.py.
def examples_lib::get_repo_list | ( | example ) |
Returns a list of all the repos associated with the specific example in the json config file. If there are repos listed under the mbed section then these will be returned as a list. If not then the github single repo with be returned. NOTE: This does not currently deal with multiple examples underneath a github sourced exampe repo. Args: example - Example for which the repo list is requested repos - The list of repos and types contained within that example in the json file
Definition at line 123 of file examples_lib.py.
def examples_lib::print_list | ( | lst ) |
Prints to screen the contents of a list Args: lst - a list of any type, to be displayed
Definition at line 25 of file examples_lib.py.
def examples_lib::print_summary | ( | results, | |
export = False |
|||
) |
Prints to screen the results of compiling/exporting combinations of example programs, targets and compile toolchains/IDEs. Args: results - results of the compilation stage. See compile_repos() and export_repos() for details of the format.
Definition at line 51 of file examples_lib.py.
def examples_lib::source_repos | ( | config, | |
examples | |||
) |
Imports each of the repos and its dependencies (.lib files) associated with the specific examples name from the json config file. Note if there is already a clone of the repo then it will first be removed to ensure a clean, up to date cloning. Args: config - the json object imported from the file.
Definition at line 151 of file examples_lib.py.
def examples_lib::target_cross_ide | ( | allowed_targets, | |
allowed_ides, | |||
features = [] |
|||
) |
Generate pairs of target and ides Args: allowed_targets - a list of all possible targets allowed_ides - a list of all possible IDEs Kwargs: features - the features that must be in the features array of a target
Definition at line 104 of file examples_lib.py.
def examples_lib::target_cross_toolchain | ( | allowed_targets, | |
allowed_toolchains, | |||
features = [] |
|||
) |
Generate pairs of target and toolchains Args: allowed_targets - a list of all possible targets allowed_toolchains - a list of all possible toolchains Kwargs: features - the features that must be in the features array of a target
Definition at line 86 of file examples_lib.py.
def examples_lib::update_mbedos_version | ( | config, | |
tag, | |||
examples | |||
) |
For each example repo identified in the config json object, update the version of mbed-os to that specified by the supplied GitHub tag. This function assumes that each example repo has already been cloned. Args: config - the json object imported from the file. tag - GitHub tag corresponding to a version of mbed-os to upgrade to.
Definition at line 372 of file examples_lib.py.
Generated on Tue Jul 12 2022 14:21:38 by 1.7.2