CMSIS-DAP
Dependencies: mbed mbed API helper
make.py
00001 """ 00002 00003 Build programs in this project 00004 00005 """ 00006 import os, errno 00007 00008 00009 def build_program(args): 00010 path = os.getcwd() 00011 parent_path = os.sep.join(path.split(os.sep)[:-1]) 00012 odir = " --destdir " + parent_path + "\\output\\" 00013 00014 mbeduser = " --user sam_grove" 00015 preprocessor = " --extra_symbols" + " THREE" 00016 00017 string = "python ./mbed-API-helper/mbedapi.py --repo http://mbed.org/teams/HDK-Development/code/CMSIS-DAP/ --api http://mbed.org --platform FRDM-KL05Z" 00018 string += odir 00019 string += mbeduser 00020 string += preprocessor 00021 00022 try: 00023 os.makedirs(parent_path) 00024 except OSError, e: 00025 if e.errno != errno.EEXIST: 00026 raise 00027 00028 #print string 00029 os.system(string) 00030 00031 00032 if __name__ == "__main__": 00033 import argparse 00034 parser = argparse.ArgumentParser(description='configure a mbed repository build.') 00035 parser.add_argument('--username', type=str, help='What is your mbed username', required=False) 00036 parser.add_argument('--odir', type=str, help='Where does the output go', required=False) 00037 00038 args = parser.parse_args() 00039 build_program(args) 00040 00041
Generated on Wed Jul 20 2022 20:50:28 by 1.7.2