Commit 46062ce5 authored by 时海鑫's avatar 时海鑫

Merge branch 'dev' into 'master'

test

See merge request !14
parents 9d153fa2 3d357825
import datetime
import os
import subprocess
exe_url = "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.2\\common\\bin\\iarbuild.exe"
projectname = "\\G393\\G393_V0.02\\IARProject\G393.ewp"
def build(rootdir):
project = "{}\\{}".format(rootdir, projectname)
if not os.access(project, os.R_OK):
print("{} not exist".format(project))
return ""
result = subprocess.run(
[exe_url, project, "-build", "Debug"],
capture_output=True,
text=True
)
print(result.stdout, result.returncode)
if __name__ == '__main__':
outputname = build("C:\dev_space\compile_space")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment