if (options.program is None) and (not options.source_dir): args_error(parser, "one of -p, -n, or --source is required") if options.source_dir and not options.build_dir: args_error( parser, "argument --build is required when argument --source is provided") 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 if not TOOLCHAIN_CLASSES[toolchain].check_executable(): search_path = TOOLCHAIN_PATHS[toolchain] or "No path set" args_error( parser, "Could not find executable for %s.\n" "Currently set search path: %s" % (toolchain, search_path)) # Test build_data_blob = {} if options.build_data else None for test_no in p: test = Test(test_no) if options.automated is not None: test.automated = options.automated if options.dependencies is not None:
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.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 = [] # Additional Libraries if options.rtos: libraries.extend(["rtx", "rtos"]) if options.rpc: libraries.extend(["rpc"]) if options.eth: libraries.append("eth") if options.usb: libraries.append("usb")