summaryrefslogtreecommitdiff
path: root/2.3-1/macros/scilab2c.sci
diff options
context:
space:
mode:
authorJorawar Singh2017-06-30 11:54:22 +0530
committerJorawar Singh2017-06-30 11:54:22 +0530
commit4c6f1a8cced5610ab5075ea61c507c1dbc25f520 (patch)
tree798ae26a88891509424f8ade489b87cbf2af2093 /2.3-1/macros/scilab2c.sci
parent815306982a4ea8eaaa2106fadcd1472aa2a9dcd5 (diff)
parentf805bc9553b3d88d7c9e7dbf59486c5da490231e (diff)
downloadScilab2C-4c6f1a8cced5610ab5075ea61c507c1dbc25f520.tar.gz
Scilab2C-4c6f1a8cced5610ab5075ea61c507c1dbc25f520.tar.bz2
Scilab2C-4c6f1a8cced5610ab5075ea61c507c1dbc25f520.zip
merged main repo with local
Diffstat (limited to '2.3-1/macros/scilab2c.sci')
-rw-r--r--2.3-1/macros/scilab2c.sci42
1 files changed, 41 insertions, 1 deletions
diff --git a/2.3-1/macros/scilab2c.sci b/2.3-1/macros/scilab2c.sci
index 89dcd730..197c88b0 100644
--- a/2.3-1/macros/scilab2c.sci
+++ b/2.3-1/macros/scilab2c.sci
@@ -12,6 +12,7 @@
function scilab2c(varargin)
[lhs, rhs] = argn();
+
select rhs
//
// scilab2c()
@@ -35,6 +36,7 @@ function scilab2c(varargin)
RunMode = 'All';
BuildTool = getNativeBuildTool();
Target = "StandAlone"
+ //Board_name = "uno"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths)
//
@@ -55,6 +57,7 @@ function scilab2c(varargin)
RunMode = "All";
BuildTool = getNativeBuildTool();
Target = "StandAlone"
+ //Board_name = "uno"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths, RunMode)
//
@@ -79,6 +82,7 @@ function scilab2c(varargin)
RunMode = varargin(4);
BuildTool = getNativeBuildTool();
Target = "StandAlone"
+ //Board_name = "uno"
case 5
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -104,6 +108,7 @@ function scilab2c(varargin)
RunMode = varargin(4);
BuildTool = varargin(5);
Target = "StandAlone"
+ //Board_name = "uno"
case 6
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -133,6 +138,41 @@ function scilab2c(varargin)
RunMode = varargin(4);
BuildTool = varargin(5);
Target = varargin(6);
+ //Board_name = "uno";
+ case 7
+ for i = 1:4
+ if typeof(varargin(i)) <> "string"
+ error(msprintf(gettext("%s: Wrong type for input argument #%d: String expected.\n"),"scilab2c",i));
+ return
+ end
+ end
+ if varargin(4) <> "All" & varargin(4) <> "Translate" & varargin(4) <> "GenLibraryStructure" & varargin(4) <> "FunCall"
+ error(msprintf(gettext("%s: argument #%d must be: ""All"", ""Translate"" ,""GenLibraryStructure"" or ""FunCall"".\n"),"scilab2c",4));
+ return
+ end
+ if varargin(5) <> "make" & varargin(5) <> "nmake"
+ error(msprintf(gettext("%s: argument #%d must be: ""make"" or ""nmake"".\n"),"scilab2c",5));
+ return
+ end
+ if varargin(6) <> "StandAlone" & varargin(6) <> "Arduino" & varargin(6) <> "AVR" & varargin(6) <> "RPi"
+ error(msprintf(gettext("%s: argument #%d must be: ""StandAlone"" or ""Arduino"" or ""AVR"" or ""RPi"".\n"),"scilab2c",5));
+ return
+ end
+ //if varargin(7) <> "uno" & varargin(7) <> "mega" & varargin(7) <> "mega2560" & varargin(7) <> "micro" & varargin(7) <> "nano" & varargin(7) <> "mini"
+ // error(msprintf(gettext("%s: argument #%d must be: ""uno"" or ""mega"" or ""micro"" or ""nano"" or ""mini"".\n"),"scilab2c",7));
+ //return
+ //end
+ UserScilabMainFile = varargin(1);
+ CCodeOutputDir = varargin(2);
+ if varargin(3) == ""
+ UserSciFilesPaths = [];
+ else
+ UserSciFilesPaths = varargin(3);
+ end
+ RunMode = varargin(4);
+ BuildTool = varargin(5);
+ Target = varargin(6);
+ Board_name = varargin(7);
else
//
// Calling scilab2c with more than understood values
@@ -160,7 +200,7 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
if (userchoice == 1)
// --- LAUNCH SCI2C ---
- runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,Target);
+ runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,Target,Board_name);
end
endfunction