options = parser.parse_args() # Only prints matrix of supported toolchains if options.supported_toolchains: print mcu_toolchain_matrix(platform_filter=options.general_filter_regex) exit(0) # Get target list targets = extract_mcus(parser, options) if options.mcu else TARGET_NAMES # Get toolchains list toolchains = options.tool if options.tool else TOOLCHAINS if options.source_dir and not options.build_dir: args_error(parser, "argument --build is required by argument --source") if options.color: # This import happens late to prevent initializing colorization when we don't need it import colorize if options.verbose: notify = mbedToolchain.print_notify_verbose else: notify = mbedToolchain.print_notify notify = colorize.print_in_color_notifier(CLI_COLOR_MAP, notify) else: notify = None # Get libraries list libraries = []
options = parser.parse_args() # Only prints matrix of supported toolchains if options.supported_toolchains: print mcu_toolchain_matrix( platform_filter=options.general_filter_regex) exit(0) # Get target list targets = options.mcu if options.mcu else TARGET_NAMES # Get toolchains list toolchains = options.tool if options.tool else TOOLCHAINS if options.source_dir and not options.build_dir: args_error(parser, "argument --build is required by argument --source") if options.color: # This import happens late to prevent initializing colorization when we don't need it import colorize if options.verbose: notify = mbedToolchain.print_notify_verbose else: notify = mbedToolchain.print_notify notify = colorize.print_in_color_notifier(CLI_COLOR_MAP, notify) else: notify = None # Get libraries list libraries = []
exit(0) # Clean Export Directory if options.clean: if exists(EXPORT_DIR): rmtree(EXPORT_DIR) # Export results successes = [] failures = [] # source_dir = use relative paths, otherwise sources are copied sources_relative = True if options.source_dir else False # Target if not options.mcu: args_error(parser, "argument -m/--mcu is required") # Toolchain if not options.ide: args_error(parser, "argument -i is required") if (options.program is None) and (not options.source_dir): args_error(parser, "one of -p, -n, or --source is required") for mcu in options.mcu: # Program Number or name p, src, ide = options.program, options.source_dir, options.ide try: project_dir, project_name, project_temp = setup_project( mcu, ide, p, src, options.build) zip = not bool(src) # create zip when no src_dir provided