(program = None)
| 803 | EndBuilding(target, program) |
| 804 | |
| 805 | def GenTargetProject(program = None): |
| 806 | |
| 807 | if GetOption('target') in ['mdk', 'mdk4', 'mdk5']: |
| 808 | from targets.keil import MDK2Project, MDK4Project, MDK5Project, ARMCC_Version |
| 809 | |
| 810 | if os.path.isfile('template.uvprojx') and GetOption('target') not in ['mdk4']: # Keil5 |
| 811 | MDK5Project(Env, GetOption('project-name') + '.uvprojx', Projects) |
| 812 | print("Keil5 project is generating...") |
| 813 | elif os.path.isfile('template.uvproj') and GetOption('target') not in ['mdk5']: # Keil4 |
| 814 | MDK4Project(Env, GetOption('project-name') + '.uvproj', Projects) |
| 815 | print("Keil4 project is generating...") |
| 816 | elif os.path.isfile('template.Uv2') and GetOption('target') not in ['mdk4', 'mdk5']: # Keil2 |
| 817 | MDK2Project(Env, GetOption('project-name') + '.Uv2', Projects) |
| 818 | print("Keil2 project is generating...") |
| 819 | else: |
| 820 | print ('No template project file found.') |
| 821 | exit(1) |
| 822 | print("Keil Version: " + ARMCC_Version()) |
| 823 | print("Keil-MDK project has generated successfully!") |
| 824 | |
| 825 | if GetOption('target') == 'iar': |
| 826 | from targets.iar import IARProject, IARVersion |
| 827 | print("IAR Version: " + IARVersion()) |
| 828 | IARProject(Env, GetOption('project-name') + '.ewp', Projects) |
| 829 | print("IAR project has generated successfully!") |
| 830 | |
| 831 | if GetOption('target') == 'vs': |
| 832 | from targets.vs import VSProject |
| 833 | VSProject(GetOption('project-name') + '.vcproj', Projects, program) |
| 834 | |
| 835 | if GetOption('target') == 'vs2012': |
| 836 | from targets.vs2012 import VS2012Project |
| 837 | VS2012Project(GetOption('project-name') + '.vcxproj', Projects, program) |
| 838 | |
| 839 | if GetOption('target') == 'cb': |
| 840 | from targets.codeblocks import CBProject |
| 841 | CBProject(GetOption('project-name') + '.cbp', Projects, program) |
| 842 | |
| 843 | if GetOption('target') == 'ua': |
| 844 | from targets.ua import PrepareUA |
| 845 | PrepareUA(Projects, Rtt_Root, str(Dir('#'))) |
| 846 | |
| 847 | if GetOption('target') == 'vsc': |
| 848 | from targets.vsc import GenerateVSCode |
| 849 | GenerateVSCode(Env) |
| 850 | if GetOption('cmsispack'): |
| 851 | from vscpyocd import GenerateVSCodePyocdConfig |
| 852 | GenerateVSCodePyocdConfig(GetOption('cmsispack')) |
| 853 | |
| 854 | if GetOption('target') == 'vsc_workspace': |
| 855 | from targets.vsc import GenerateVSCodeWorkspace |
| 856 | GenerateVSCodeWorkspace(Env) |
| 857 | |
| 858 | if GetOption('target') == 'cdk': |
| 859 | from targets.cdk import CDKProject |
| 860 | CDKProject(GetOption('project-name') + '.cdkproj', Projects) |
| 861 | |
| 862 | if GetOption('target') == 'ses': |
no test coverage detected