mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Removed projectfiles directory. debug-info default option
							parent
							
								
									a6be472111
								
							
						
					
					
						commit
						7ee621320a
					
				| 
						 | 
					@ -39,7 +39,7 @@ def setup_project(ide, target, program=None, source_dir=None, build=None):
 | 
				
			||||||
    if source_dir:
 | 
					    if source_dir:
 | 
				
			||||||
        # --source is used to generate IDE files to toolchain directly
 | 
					        # --source is used to generate IDE files to toolchain directly
 | 
				
			||||||
        # in the source tree and doesn't generate zip file
 | 
					        # in the source tree and doesn't generate zip file
 | 
				
			||||||
        project_dir = join(source_dir[0],'projectfiles',ide+"_"+target)
 | 
					        project_dir = source_dir[0]
 | 
				
			||||||
        if program:
 | 
					        if program:
 | 
				
			||||||
            project_name = TESTS[program]
 | 
					            project_name = TESTS[program]
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
| 
						 | 
					@ -63,7 +63,7 @@ def setup_project(ide, target, program=None, source_dir=None, build=None):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def export(target, ide, build=None, src=None, macros=None, project_id=None,
 | 
					def export(target, ide, build=None, src=None, macros=None, project_id=None,
 | 
				
			||||||
           clean=False, zip_proj=False):
 | 
					           clean=False, zip_proj=False, options=None):
 | 
				
			||||||
    """Do an export of a project.
 | 
					    """Do an export of a project.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Positional arguments:
 | 
					    Positional arguments:
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ def export(target, ide, build=None, src=None, macros=None, project_id=None,
 | 
				
			||||||
    zip_name = name+".zip" if zip_proj else None
 | 
					    zip_name = name+".zip" if zip_proj else None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    export_project(src, project_dir, target, ide, clean=clean, name=name,
 | 
					    export_project(src, project_dir, target, ide, clean=clean, name=name,
 | 
				
			||||||
                   macros=macros, libraries_paths=lib, zip_proj=zip_name)
 | 
					                   macros=macros, libraries_paths=lib, zip_proj=zip_name, options=options)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
| 
						 | 
					@ -100,8 +100,7 @@ def main():
 | 
				
			||||||
    parser.add_argument("-m", "--mcu",
 | 
					    parser.add_argument("-m", "--mcu",
 | 
				
			||||||
                        metavar="MCU",
 | 
					                        metavar="MCU",
 | 
				
			||||||
                        default='LPC1768',
 | 
					                        default='LPC1768',
 | 
				
			||||||
                        type=argparse_many(
 | 
					                        type=argparse_force_uppercase_type(targetnames, "MCU"),
 | 
				
			||||||
                            argparse_force_uppercase_type(targetnames, "MCU")),
 | 
					 | 
				
			||||||
                        help="generate project for the given MCU ({})".format(
 | 
					                        help="generate project for the given MCU ({})".format(
 | 
				
			||||||
                            ', '.join(targetnames)))
 | 
					                            ', '.join(targetnames)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -165,6 +164,12 @@ def main():
 | 
				
			||||||
                        dest="macros",
 | 
					                        dest="macros",
 | 
				
			||||||
                        help="Add a macro definition")
 | 
					                        help="Add a macro definition")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    parser.add_argument("-o",
 | 
				
			||||||
 | 
					                        type=argparse_many(str),
 | 
				
			||||||
 | 
					                        dest="opts",
 | 
				
			||||||
 | 
					                        default=["debug-info"],
 | 
				
			||||||
 | 
					                        help="Toolchain options")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    options = parser.parse_args()
 | 
					    options = parser.parse_args()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Print available tests in order and exit
 | 
					    # Print available tests in order and exit
 | 
				
			||||||
| 
						 | 
					@ -212,10 +217,10 @@ def main():
 | 
				
			||||||
    if (options.program is None) and (not options.source_dir):
 | 
					    if (options.program is None) and (not options.source_dir):
 | 
				
			||||||
        args_error(parser, "one of -p, -n, or --source is required")
 | 
					        args_error(parser, "one of -p, -n, or --source is required")
 | 
				
			||||||
        # Export to selected toolchain
 | 
					        # Export to selected toolchain
 | 
				
			||||||
    for mcu in options.mcu:
 | 
					    export(options.mcu, options.ide, build=options.build,
 | 
				
			||||||
        export(mcu, options.ide, build=options.build, src=options.source_dir,
 | 
					           src=options.source_dir, macros=options.macros,
 | 
				
			||||||
               macros=options.macros, project_id=options.program,
 | 
					           project_id=options.program, clean=options.clean,
 | 
				
			||||||
               clean=options.clean, zip_proj=zip_proj)
 | 
					           zip_proj=zip_proj, options=options.opts)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue