Skip to content

Commit e7a2791

Browse files
committed
Wed Nov 9 17:57:54 UTC 2016 Chad Elliott <[email protected]>
1 parent b518f6a commit e7a2791

File tree

6 files changed

+683
-2
lines changed

6 files changed

+683
-2
lines changed

ChangeLog

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Wed Nov 9 17:57:54 UTC 2016 Chad Elliott <[email protected]>
2+
3+
* docs/USAGE:
4+
* modules/UVISProjectCreator.pm:
5+
* modules/UVISWorkspaceCreator.pm:
6+
* templates/uvis.mpd:
7+
* templates/uvis.mpt:
8+
9+
Added support for the Keil uVision 5 IDE.
10+
111
Mon Oct 31 16:16:07 UTC 2016 Chad Elliott <[email protected]>
212

313
* templates/makedll.mpt:

docs/USAGE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Usage: mwc.pl [-global <file>] [-include <directory>] [-recurse]
2525
[-language <cplusplus | csharp | java | vb>]
2626
[-type <automake | bcb2007 | bcb2009 | bds4 | bmake | cc | cdt6 |
2727
cdt7 | em3 | ghs | html | make | nmake | rpmspec | sle |
28-
vc6 | vc7 | vc8 | vc9 | vc10 | vc11 | vc12 | vc14 |
29-
vc71 | wb26 | wb30 | wix>]
28+
uvis | vc6 | vc7 | vc8 | vc9 | vc10 | vc11 | vc12 |
29+
vc14 | vc15 | vc71 | wb26 | wb30 | wix>]
3030
[files]
3131

3232
-base Add <project> as a base project to each generated

modules/UVISProjectCreator.pm

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
package UVISProjectCreator;
2+
3+
# ************************************************************
4+
# Description : The Keil uVision Project Creator
5+
# Author : Chad Elliott
6+
# Create Date : 11/1/2016
7+
# ************************************************************
8+
9+
# ************************************************************
10+
# Pragmas
11+
# ************************************************************
12+
13+
use strict;
14+
15+
use ProjectCreator;
16+
use XMLProjectBase;
17+
use WinProjectBase;
18+
19+
use vars qw(@ISA);
20+
@ISA = qw(XMLProjectBase WinProjectBase ProjectCreator);
21+
22+
# ************************************************************
23+
# Data Section
24+
# ************************************************************
25+
26+
my $tmpl = 'uvis';
27+
28+
# ************************************************************
29+
# Subroutine Section
30+
# ************************************************************
31+
32+
sub compare_output {
33+
#my $self = shift;
34+
return 1;
35+
}
36+
37+
sub dependency_is_filename {
38+
#my $self = shift;
39+
return 0;
40+
}
41+
42+
sub project_file_extension {
43+
return '.uvprojx';
44+
}
45+
46+
47+
sub get_lib_exe_template_input_file {
48+
return $tmpl;
49+
}
50+
51+
52+
sub get_lib_template_input_file {
53+
return $tmpl;
54+
}
55+
56+
57+
sub get_dll_exe_template_input_file {
58+
return $tmpl;
59+
}
60+
61+
62+
sub get_dll_template_input_file {
63+
return $tmpl;
64+
}
65+
66+
67+
sub get_template {
68+
return 'uvis.mpd';
69+
}
70+
71+
72+
sub get_cmdsep_symbol {
73+
#my $self = shift;
74+
return '&amp;';
75+
}
76+
77+
78+
1;

modules/UVISWorkspaceCreator.pm

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package UVISWorkspaceCreator;
2+
3+
# ************************************************************
4+
# Description : The Keil uVision Workspace Creator
5+
# Author : Chad Elliott
6+
# Create Date : 11/1/2016
7+
# ************************************************************
8+
9+
# ************************************************************
10+
# Pragmas
11+
# ************************************************************
12+
13+
use strict;
14+
15+
use UVISProjectCreator;
16+
use WinWorkspaceBase;
17+
use WorkspaceCreator;
18+
19+
use vars qw(@ISA);
20+
@ISA = qw(WinWorkspaceBase WorkspaceCreator);
21+
22+
# ************************************************************
23+
# Subroutine Section
24+
# ************************************************************
25+
26+
27+
sub compare_output {
28+
#my $self = shift;
29+
return 1;
30+
}
31+
32+
33+
sub workspace_file_extension {
34+
#my $self = shift;
35+
return '.uvmpw';
36+
}
37+
38+
39+
sub pre_workspace {
40+
my($self, $fh) = @_;
41+
my $crlf = $self->crlf();
42+
43+
print $fh "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>$crlf",
44+
"<ProjectWorkspace xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"project_mpw.xsd\">$crlf$crlf",
45+
" <SchemaVersion>1.0</SchemaVersion>$crlf$crlf",
46+
" <Header>### uVision Project, (C) Keil Software</Header>$crlf$crlf";
47+
}
48+
49+
50+
sub write_comps {
51+
my($self, $fh) = @_;
52+
my $crlf = $self->crlf();
53+
54+
print $fh ' <WorkspaceName>', $self->get_workspace_name(), ' - ',
55+
$self->create_command_line_string($0, @ARGV),
56+
'</WorkspaceName>', $crlf;
57+
foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
58+
print $fh " <project>$crlf",
59+
" <PathAndName>$project</PathAndName>$crlf",
60+
" </project>$crlf$crlf";
61+
}
62+
}
63+
64+
65+
sub post_workspace {
66+
my($self, $fh) = @_;
67+
print $fh '</ProjectWorkspace>' . $self->crlf();
68+
}
69+
70+
71+
1;

0 commit comments

Comments
 (0)