diff options
author | Chad Elliott <elliottc@objectcomputing.com> | 2019-04-18 17:21:25 -0500 |
---|---|---|
committer | Chad Elliott <elliottc@objectcomputing.com> | 2019-04-18 17:21:25 -0500 |
commit | 599f423d5e764338f89ef7c49f6a4363d0b2e700 (patch) | |
tree | 3b97ec5fa9cdd1b649105c96a63c8368c4af3cb1 /modules | |
parent | 68055d4af49d965c3f16aad9283048e9ac76386a (diff) | |
download | MPC-599f423d5e764338f89ef7c49f6a4363d0b2e700.tar.gz |
Thu Apr 18 22:18:20 UTC 2019 Chad Elliott <elliott_c@ociweb.com>
* docs/README:
* docs/USAGE:
* docs/templates/iar.txt:
* modules/IARProjectCreator.pm:
* modules/IARWorkspaceCreator.pm:
* templates/iar.mpd:
* templates/iar.mpt:
Added an initial, simplistic IAR workspace/project generator.
There will be more changes to fully suport this IDE.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/IARProjectCreator.pm | 78 | ||||
-rw-r--r-- | modules/IARWorkspaceCreator.pm | 70 |
2 files changed, 148 insertions, 0 deletions
diff --git a/modules/IARProjectCreator.pm b/modules/IARProjectCreator.pm new file mode 100644 index 00000000..aa16ee8f --- /dev/null +++ b/modules/IARProjectCreator.pm @@ -0,0 +1,78 @@ +package IARProjectCreator; + +# ************************************************************ +# Description : The IAR Embedded Workbench IDE Project Creator +# Author : Chad Elliott +# Create Date : 4/8/2019 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use ProjectCreator; +use XMLProjectBase; +use WinProjectBase; + +use vars qw(@ISA); +@ISA = qw(XMLProjectBase WinProjectBase ProjectCreator); + +# ************************************************************ +# Data Section +# ************************************************************ + +my $tmpl = 'iar'; + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub compare_output { + #my $self = shift; + return 1; +} + +sub dependency_is_filename { + #my $self = shift; + return 0; +} + +sub project_file_extension { + return '.ewp'; +} + + +sub get_lib_exe_template_input_file { + return $tmpl; +} + + +sub get_lib_template_input_file { + return $tmpl; +} + + +sub get_dll_exe_template_input_file { + return $tmpl; +} + + +sub get_dll_template_input_file { + return $tmpl; +} + + +sub get_template { + return $tmpl . '.mpd'; +} + + +sub get_cmdsep_symbol { + #my $self = shift; + return '&'; +} + + +1; diff --git a/modules/IARWorkspaceCreator.pm b/modules/IARWorkspaceCreator.pm new file mode 100644 index 00000000..5f339c6b --- /dev/null +++ b/modules/IARWorkspaceCreator.pm @@ -0,0 +1,70 @@ +package IARWorkspaceCreator; + +# ************************************************************ +# Description : The IAR Embedded Workbench IDE Workspace Creator +# Author : Chad Elliott +# Create Date : 4/18/2019 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use IARProjectCreator; +use WinWorkspaceBase; +use WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(WinWorkspaceBase WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + + +sub compare_output { + #my $self = shift; + return 1; +} + + +sub workspace_file_extension { + #my $self = shift; + return '.eww'; +} + + +sub pre_workspace { + my($self, $fh) = @_; + my $crlf = $self->crlf(); + + print $fh "<?xml version=\"1.0\" encoding=\"UTF-8\"?>$crlf", + "<workspace>$crlf"; +} + + +sub write_comps { + my($self, $fh) = @_; + my $crlf = $self->crlf(); + + print $fh ' <!-- ', $self->get_workspace_name(), ' - ', + $self->create_command_line_string($0, @ARGV), + ' -->', $crlf; + foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) { + print $fh " <project>$crlf", + " <path>\$WS_DIR\$\\", $self->slash_to_backslash($project), + "</path>$crlf", + " </project>$crlf"; + } +} + + +sub post_workspace { + my($self, $fh) = @_; + print $fh '</workspace>' . $self->crlf(); +} + + +1; |