diff options
author | siddhu8990 | 2016-05-10 17:17:41 +0530 |
---|---|---|
committer | siddhu8990 | 2016-05-10 17:17:41 +0530 |
commit | a9d0c72c839428a17956fa0530977fc058d8a799 (patch) | |
tree | 90c89d1eeeb3130c35927bceefe4bbb7ba175300 /macros | |
parent | fe32d3a31c1f9d26cbefad9e2512a641ef323f0a (diff) | |
download | Scilab2C_fossee_old-a9d0c72c839428a17956fa0530977fc058d8a799.tar.gz Scilab2C_fossee_old-a9d0c72c839428a17956fa0530977fc058d8a799.tar.bz2 Scilab2C_fossee_old-a9d0c72c839428a17956fa0530977fc058d8a799.zip |
Added support for cumprod, cumsum, triu, tril functions
Diffstat (limited to 'macros')
-rw-r--r-- | macros/ASTManagement/AST_HandleEndGenFun.bin | bin | 84704 -> 87244 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST_HandleEndGenFun.sci | 32 | ||||
-rw-r--r-- | macros/ASTManagement/AST_HandleHeader.bin | bin | 40524 -> 40076 bytes | |||
-rw-r--r-- | macros/ASTManagement/AST_HandleHeader.sci | 2 | ||||
-rw-r--r-- | macros/FunctionAnnotation/FA_GetOutArgInfo.bin | bin | 16720 -> 16800 bytes | |||
-rw-r--r-- | macros/FunctionAnnotation/FA_GetOutArgInfo.sci | 2 | ||||
-rw-r--r-- | macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin | bin | 1074784 -> 1102440 bytes | |||
-rw-r--r-- | macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci | 134 | ||||
-rw-r--r-- | macros/findDeps/getAllHeaders.bin | bin | 28508 -> 29200 bytes | |||
-rw-r--r-- | macros/findDeps/getAllHeaders.sci | 10 | ||||
-rw-r--r-- | macros/findDeps/getAllInterfaces.bin | bin | 29568 -> 30388 bytes | |||
-rw-r--r-- | macros/findDeps/getAllInterfaces.sci | 6 | ||||
-rw-r--r-- | macros/findDeps/getAllSources.bin | bin | 171448 -> 181184 bytes | |||
-rw-r--r-- | macros/findDeps/getAllSources.sci | 59 | ||||
-rw-r--r-- | macros/runsci2c.bin | bin | 28916 -> 28820 bytes | |||
-rw-r--r-- | macros/runsci2c.sci | 161 |
16 files changed, 300 insertions, 106 deletions
diff --git a/macros/ASTManagement/AST_HandleEndGenFun.bin b/macros/ASTManagement/AST_HandleEndGenFun.bin Binary files differindex 5baa2e2..27c8880 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.bin +++ b/macros/ASTManagement/AST_HandleEndGenFun.bin diff --git a/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci index 3a6d225..b08ab39 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -196,14 +196,15 @@ global STACKDEDUG //If a function is passed as input argument, Change the scope of function name from variable to string, //as it is passed as string to C function. Also enter this function in conversion list also. if(ASTFunName == 'ode') - disp(NInArg) if NInArg == 4 InArg(4).Scope = 'String'; ODEFunName = InArg(4).Name; - disp(ODEFunName) end end [InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo); + if(ASTFunName == 'ode') + disp(InArg(4).Name); + end end // #RNU_RES_B @@ -356,6 +357,19 @@ global STACKDEDUG else ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,'all'); end + if ASTFunName == 'ode' then + ODE_InArg(1) = InArg(3) + ODE_InArg(2) = InArg(1) + ODE_OutArg(1) = OutArg(1) + ODE_CFunName = C_GenerateFunName(ODEFunName,ODE_InArg,2,ODE_OutArg,1); + + [FunFound, FunType, FunSize, FunValue, FunFindLike, FunDimension] = ... + ST_Get(InArg(4).Name,FileInfo.GlobalVarFileName); + disp(FunFound); + //ST_Del(InArg(4).Name,FileInfo.GlobalVarFileName); + //ST_Set(ODE_CFunName, FunType, FunSize, FunValue, FunFindLike, FunDimension); + end + //#RNUREM_ME NUT: per risparmiare tempo di esecuzione puoi mettere delle if sulle funzioni che devono //#RNUREM_ME NUT: essere skippate. @@ -425,6 +439,7 @@ global STACKDEDUG //NUT: il problema della d0d0OpEqual dovrebbe essere legato al fatto che cerco di fare la opequal legata alla ins... //NUT: devo evitare di scriveral dentro la lsista delle funzioni da tradurre. //#RNU_RES_E + SharedInfo = FL_UpdateToBeConv(ASTFunName,CFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,FileInfo,SharedInfo); //#RNU_RES_B @@ -473,12 +488,15 @@ global STACKDEDUG //NUT: e' piu' ordinato. //#RNU_RES_E - //If current function being converted is 'ode', call 'scilab2c' again to convert - //function containing differential equations. It is passed as one of the input - //arguements to 'ode'. + //If current function being converted is 'ode', insert function containing + //in list of functions to be converted if ASTFunName == 'ode' then - temp = ODEFunName + '.sci' - scilab2c( '/home/siddhesh/Documents/Scilab/ODE/ODE_test/try_ode.sci', FileInfo.OutCCCodeDir, FileInfo.UserSciFilesPaths,'FunCall','make','AVR') + //ODE_InArg(1) = InArg(3) + //ODE_InArg(2) = InArg(1) + //ODE_OutArg(1) = OutArg(1) + //ODE_CFunName = C_GenerateFunName(ODEFunName,ODE_InArg,2,ODE_OutArg,1); + GenCFunDatFiles(ODEFunName,%t,FunTypeAnnot,['IN(2).SZ(1)' 'IN(2).SZ(2)'],ODE_InArg,2,ODE_OutArg,1,ODE_CFunName,LibTypeInfo,FunInfoDatDir); + SharedInfo = FL_UpdateToBeConv(ODEFunName,ODE_CFunName,%t,FunTypeAnnot,FunSizeAnnot,ODE_InArg,2,ODE_OutArg,1,FileInfo,SharedInfo); end endfunction diff --git a/macros/ASTManagement/AST_HandleHeader.bin b/macros/ASTManagement/AST_HandleHeader.bin Binary files differindex b5e33b6..67e0296 100644 --- a/macros/ASTManagement/AST_HandleHeader.bin +++ b/macros/ASTManagement/AST_HandleHeader.bin diff --git a/macros/ASTManagement/AST_HandleHeader.sci b/macros/ASTManagement/AST_HandleHeader.sci index 7346f32..41dcd06 100644 --- a/macros/ASTManagement/AST_HandleHeader.sci +++ b/macros/ASTManagement/AST_HandleHeader.sci @@ -114,8 +114,6 @@ if(SharedInfo.RunMode == "FunCall") SharedInfo.CurrentFunInfo.FunTypeAnnot = FunTypeAnnot; SharedInfo.CurrentFunInfo.FunSizeAnnot = FunSizeAnnot; end - disp(SharedInfo.CurrentFunInfo.FunSizeAnnot) - disp(SharedInfo.CurrentFunInfo.FunTypeAnnot) end //#RNU_RES_B // ----------------------------------------------------------------------------- diff --git a/macros/FunctionAnnotation/FA_GetOutArgInfo.bin b/macros/FunctionAnnotation/FA_GetOutArgInfo.bin Binary files differindex 51ec64c..7102319 100644 --- a/macros/FunctionAnnotation/FA_GetOutArgInfo.bin +++ b/macros/FunctionAnnotation/FA_GetOutArgInfo.bin diff --git a/macros/FunctionAnnotation/FA_GetOutArgInfo.sci b/macros/FunctionAnnotation/FA_GetOutArgInfo.sci index 5db2623..314c0f2 100644 --- a/macros/FunctionAnnotation/FA_GetOutArgInfo.sci +++ b/macros/FunctionAnnotation/FA_GetOutArgInfo.sci @@ -101,7 +101,7 @@ for counterout = 1:NOutArg // This is a dynamic memory extension of a local variable and for the moment
// we issue an error according to SCI2C specifications
// #RNU_RES_E
-
+ //disp(FunSizeAnnot)
for iterOutputPosition=1:size(FunSizeAnnot, 'c')
tmpeval = eval(FunSizeAnnot(counterout, iterOutputPosition));
if (IsNanSize(tmpeval))
diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin Binary files differindex 1db8f2b..42ad0ab 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 07d1127..20db53f 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -4843,8 +4843,8 @@ ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 4',ClassFileName,'file','y');
PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
-PrintStringInfo('OUT(1).SZ(1)= IN(3).SZ(1)',ClassFileName,'file','y');
-PrintStringInfo('OUT(1).SZ(2)= IN(3).SZ(2)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= FA_MUL(IN(1).SZ(2),IN(3).SZ(2))',ClassFileName,'file','y');
//Arguements specified: initial value, start time, end time, ode function
PrintStringInfo('NIN= 4',ClassFileName,'file','y');
@@ -4855,10 +4855,10 @@ PrintStringInfo('OUT(1).SZ(2)= IN(3).SZ(2)',ClassFileName,'file','y'); // --- Function List Class. ---
ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
-PrintStringInfo('d0d0d2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d0d0d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
PrintStringInfo('d0d0d0g2'+ArgSeparator+'d0',ClassFileName,'file','y');
-PrintStringInfo('d2d0d2g2'+ArgSeparator+'d0',ClassFileName,'file','y');
-PrintStringInfo('d2d0d0g2'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('d2d0d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('d2d0d0g2'+ArgSeparator+'d2',ClassFileName,'file','y');
// --- Annotation Function And Function List Function. ---
FunctionName = 'ode';
@@ -4866,6 +4866,130 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file', INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//------------------------------------
+//---- Class CUMSUM ---------------------
+//------------------------------------
+ClassName = 'CUMSUM';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d2g2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2g2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82g2'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82g2'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162g2'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162g2'+ArgSeparator+'i162',ClassFileName,'file','y');
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'cumsum';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'cumprod';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class TRIU ---------------------
+//------------------------------------
+ClassName = 'TRIU';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+
+//Arguements specified: initial value, start time, time vector, ode function
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= IN(1).TP',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= IN(1).SZ(1)',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= IN(1).SZ(2)',ClassFileName,'file','y');
+
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d0d0'+ArgSeparator+'d0',ClassFileName,'file','y');
+PrintStringInfo('s0s0'+ArgSeparator+'s0',ClassFileName,'file','y');
+PrintStringInfo('u80u80'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80i80'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160u160'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160i160'+ArgSeparator+'i160',ClassFileName,'file','y');
+PrintStringInfo('u80d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo('i80d0'+ArgSeparator+'i80',ClassFileName,'file','y');
+PrintStringInfo('u160d0'+ArgSeparator+'u160',ClassFileName,'file','y');
+PrintStringInfo('i160d0'+ArgSeparator+'i160',ClassFileName,'file','y');
+
+PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+PrintStringInfo('d2d0'+ArgSeparator+'d2',ClassFileName,'file','y');
+PrintStringInfo('s2s0'+ArgSeparator+'s2',ClassFileName,'file','y');
+PrintStringInfo('u82u80'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82i80'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162u160'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162i160'+ArgSeparator+'i162',ClassFileName,'file','y');
+PrintStringInfo('u82d0'+ArgSeparator+'u82',ClassFileName,'file','y');
+PrintStringInfo('i82d0'+ArgSeparator+'i82',ClassFileName,'file','y');
+PrintStringInfo('u162d0'+ArgSeparator+'u162',ClassFileName,'file','y');
+PrintStringInfo('i162d0'+ArgSeparator+'i162',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'triu';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+FunctionName = 'tril';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
// ////////////////////////////////////////////
// /////PARTE INTRODOTTA DA ALBERTO MOREA
// /////////////////////////////////////////////
diff --git a/macros/findDeps/getAllHeaders.bin b/macros/findDeps/getAllHeaders.bin Binary files differindex 3f2bf2d..c130ae7 100644 --- a/macros/findDeps/getAllHeaders.bin +++ b/macros/findDeps/getAllHeaders.bin diff --git a/macros/findDeps/getAllHeaders.sci b/macros/findDeps/getAllHeaders.sci index 6338fe2..373549e 100644 --- a/macros/findDeps/getAllHeaders.sci +++ b/macros/findDeps/getAllHeaders.sci @@ -64,6 +64,10 @@ function allHeaders = getAllHeaders(Target) "src/c/matrixOperations/includes/determ.h" "src/c/matrixOperations/includes/matrixMultiplication.h" "src/c/matrixOperations/includes/diag.h" + "src/c/matrixOperations/includes/cumsum.h" + "src/c/matrixOperations/includes/cumprod.h" + "src/c/matrixOperations/includes/triu.h" + "src/c/matrixOperations/includes/tril.h" "src/c/elementaryFunctions/includes/cos.h" "src/c/elementaryFunctions/includes/fix.h" "src/c/elementaryFunctions/includes/exp.h" @@ -146,9 +150,9 @@ function allHeaders = getAllHeaders(Target) "src/c/scilab-arduino/includes/cmd_analog_in.h" "src/c/scilab-arduino/includes/cmd_dcmotor_setup.h" "src/c/scilab-arduino/includes/cmd_dcmotor_run.h" -// "src/c/scilab-arduino/includes/cmd_servo_attach.h" -// "src/c/scilab-arduino/includes/cmd_servo_detach.h" -// "src/c/scilab-arduino/includes/cmd_servo_move.h" + "src/c/scilab-arduino/includes/cmd_servo_attach.h" + "src/c/scilab-arduino/includes/cmd_servo_detach.h" + "src/c/scilab-arduino/includes/cmd_servo_move.h" "src/c/scilab-arduino/includes/sleep.h"]; AVR_headers = [ diff --git a/macros/findDeps/getAllInterfaces.bin b/macros/findDeps/getAllInterfaces.bin Binary files differindex 0121eb9..65bccb1 100644 --- a/macros/findDeps/getAllInterfaces.bin +++ b/macros/findDeps/getAllInterfaces.bin diff --git a/macros/findDeps/getAllInterfaces.sci b/macros/findDeps/getAllInterfaces.sci index 5bef0c6..436eb86 100644 --- a/macros/findDeps/getAllInterfaces.sci +++ b/macros/findDeps/getAllInterfaces.sci @@ -52,6 +52,10 @@ function allInterfaces = getAllInterfaces(Target) "src/c/matrixOperations/interfaces/int_fill.h" "src/c/matrixOperations/interfaces/int_expm.h" "src/c/matrixOperations/interfaces/int_diag.h" + "src/c/matrixOperations/interfaces/int_cumsum.h" + "src/c/matrixOperations/interfaces/int_cumprod.h" + "src/c/matrixOperations/interfaces/int_triu.h" + "src/c/matrixOperations/interfaces/int_tril.h" "src/c/elementaryFunctions/interfaces/int_asinh.h" "src/c/elementaryFunctions/interfaces/int_atanh.h" "src/c/elementaryFunctions/interfaces/int_sinh.h" @@ -139,7 +143,7 @@ function allInterfaces = getAllInterfaces(Target) "src/c/scilab-arduino/interfaces/int_cmd_analog_out.h" "src/c/scilab-arduino/interfaces/int_cmd_analog_in.h" "src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h" -// "src/c/scilab-arduino/interfaces/int_cmd_servo.h" + "src/c/scilab-arduino/interfaces/int_cmd_servo.h" "src/c/scilab-arduino/interfaces/int_sleep.h"]; //Interface files required for "AVR" output diff --git a/macros/findDeps/getAllSources.bin b/macros/findDeps/getAllSources.bin Binary files differindex 0796a3b..c014aaa 100644 --- a/macros/findDeps/getAllSources.bin +++ b/macros/findDeps/getAllSources.bin diff --git a/macros/findDeps/getAllSources.sci b/macros/findDeps/getAllSources.sci index 631edd2..5a88eb3 100644 --- a/macros/findDeps/getAllSources.sci +++ b/macros/findDeps/getAllSources.sci @@ -274,6 +274,54 @@ function allSources = getAllSources(Target) "src/c/matrixOperations/diag/i16diagins.c" "src/c/matrixOperations/diag/i16diagexa.c" "src/c/matrixOperations/diag/i16diagexs.c" + "src/c/matrixOperations/cumsum/dcumsuma.c" + "src/c/matrixOperations/cumsum/drowcumsuma.c" + "src/c/matrixOperations/cumsum/dcolumncumsuma.c" + "src/c/matrixOperations/cumsum/scumsuma.c" + "src/c/matrixOperations/cumsum/srowcumsuma.c" + "src/c/matrixOperations/cumsum/scolumncumsuma.c" + "src/c/matrixOperations/cumsum/u8cumsuma.c" + "src/c/matrixOperations/cumsum/u8rowcumsuma.c" + "src/c/matrixOperations/cumsum/u8columncumsuma.c" + "src/c/matrixOperations/cumsum/i8cumsuma.c" + "src/c/matrixOperations/cumsum/i8rowcumsuma.c" + "src/c/matrixOperations/cumsum/i8columncumsuma.c" + "src/c/matrixOperations/cumsum/u16cumsuma.c" + "src/c/matrixOperations/cumsum/u16rowcumsuma.c" + "src/c/matrixOperations/cumsum/u16columncumsuma.c" + "src/c/matrixOperations/cumsum/i16cumsuma.c" + "src/c/matrixOperations/cumsum/i16rowcumsuma.c" + "src/c/matrixOperations/cumsum/i16columncumsuma.c" + "src/c/matrixOperations/cumprod/dcumproda.c" + "src/c/matrixOperations/cumprod/drowcumproda.c" + "src/c/matrixOperations/cumprod/dcolumncumproda.c" + "src/c/matrixOperations/cumprod/scumproda.c" + "src/c/matrixOperations/cumprod/srowcumproda.c" + "src/c/matrixOperations/cumprod/scolumncumproda.c" + "src/c/matrixOperations/cumprod/u8cumproda.c" + "src/c/matrixOperations/cumprod/u8rowcumproda.c" + "src/c/matrixOperations/cumprod/u8columncumproda.c" + "src/c/matrixOperations/cumprod/i8cumproda.c" + "src/c/matrixOperations/cumprod/i8rowcumproda.c" + "src/c/matrixOperations/cumprod/i8columncumproda.c" + "src/c/matrixOperations/cumprod/u16cumproda.c" + "src/c/matrixOperations/cumprod/u16rowcumproda.c" + "src/c/matrixOperations/cumprod/u16columncumproda.c" + "src/c/matrixOperations/cumprod/i16cumproda.c" + "src/c/matrixOperations/cumprod/i16rowcumproda.c" + "src/c/matrixOperations/cumprod/i16columncumproda.c" + "src/c/matrixOperations/triu/dtriua.c" + "src/c/matrixOperations/triu/striua.c" + "src/c/matrixOperations/triu/u8triua.c" + "src/c/matrixOperations/triu/i8triua.c" + "src/c/matrixOperations/triu/u16triua.c" + "src/c/matrixOperations/triu/i16triua.c" + "src/c/matrixOperations/tril/dtrila.c" + "src/c/matrixOperations/tril/strila.c" + "src/c/matrixOperations/tril/u8trila.c" + "src/c/matrixOperations/tril/i8trila.c" + "src/c/matrixOperations/tril/u16trila.c" + "src/c/matrixOperations/tril/i16trila.c" "src/c/elementaryFunctions/cos/dcosa.c" "src/c/elementaryFunctions/cos/dcoss.c" "src/c/elementaryFunctions/cos/scosa.c" @@ -897,8 +945,9 @@ function allSources = getAllSources(Target) "src/c/implicitList/zimplicitLists.c" "src/c/implicitList/dimplicitLists.c" "src/c/implicitList/cimplicitLists.c" - "src/c/implicitList/simplicitLists.c"]; - //"src/c/differential_calculus/ode/ode.c"]; + "src/c/implicitList/simplicitLists.c"]; + //"src/c/differential_calculus/ode/dodes.c" + //"src/c/differential_calculus/ode/doded.c"]; //Files to be inserted only if output format selected is 'Arduino'. Arduino_files = ["src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c" @@ -907,9 +956,9 @@ function allSources = getAllSources(Target) "src/c/scilab-arduino/cmd_analog_in/u8cmd_analog_ins.c" "src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c" "src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c" -// "src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp" -// "src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp" -// "src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp" + "src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp" + "src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp" + "src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp" "src/c/scilab-arduino/sleep/u16sleeps.c"]; //Files to be inserted only if output format selected is 'AVR'. diff --git a/macros/runsci2c.bin b/macros/runsci2c.bin Binary files differindex b7eba52..f5b8087 100644 --- a/macros/runsci2c.bin +++ b/macros/runsci2c.bin diff --git a/macros/runsci2c.sci b/macros/runsci2c.sci index 83cf708..206a362 100644 --- a/macros/runsci2c.sci +++ b/macros/runsci2c.sci @@ -90,96 +90,93 @@ end // ---------------------------
// --- Copy library files. ---
// ---------------------------
-if(RunMode <> "FunCall")
-
- global SCI2CHOME
-
- allSources = SCI2CHOME + "/" + getAllSources(Target);
- allHeaders = SCI2CHOME + "/" +getAllHeaders(Target);
- allInterfaces = SCI2CHOME + "/" + getAllInterfaces(Target);
- allLibraries = SCI2CHOME + "/" + getAllLibraries(Target);
-
- mkdir(SCI2COutputPath+"/src/");
- mkdir(SCI2COutputPath+"/src/c/");
- mkdir(SCI2COutputPath+"/includes/");
- mkdir(SCI2COutputPath+"/interfaces/");
- mkdir(SCI2COutputPath+"/libraries/");
-
- // -- Sources
- PrintStepInfo('Copying sources', FileInfo.GeneralReport,'both');
- for i = 1:size(allSources, "*")
- // DEBUG only
- //disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
- copyfile(allSources(i), SCI2COutputPath+"/src/c/");
- end
+if (RunMode <> 'FunCall')
+global SCI2CHOME
+
+allSources = SCI2CHOME + "/" + getAllSources(Target);
+allHeaders = SCI2CHOME + "/" +getAllHeaders(Target);
+allInterfaces = SCI2CHOME + "/" + getAllInterfaces(Target);
+allLibraries = SCI2CHOME + "/" + getAllLibraries(Target);
+
+mkdir(SCI2COutputPath+"/src/");
+mkdir(SCI2COutputPath+"/src/c/");
+mkdir(SCI2COutputPath+"/includes/");
+mkdir(SCI2COutputPath+"/interfaces/");
+mkdir(SCI2COutputPath+"/libraries/");
+
+// -- Sources
+PrintStepInfo('Copying sources', FileInfo.GeneralReport,'both');
+for i = 1:size(allSources, "*")
+ // DEBUG only
+ //disp("Copying "+allSources(i)+" in "+SCI2COutputPath+"/src/c/");
+ copyfile(allSources(i), SCI2COutputPath+"/src/c/");
+end
- // -- Includes
- PrintStepInfo('Copying headers', FileInfo.GeneralReport,'both');
- for i = 1:size(allHeaders, "*")
- // DEBUG only
- //disp("Copying "+allHeaders(i)+" in "+SCI2COutputPath+"/includes/");
- copyfile(allHeaders(i), SCI2COutputPath+"/includes/");
- end
+// -- Includes
+PrintStepInfo('Copying headers', FileInfo.GeneralReport,'both');
+for i = 1:size(allHeaders, "*")
+ // DEBUG only
+ //disp("Copying "+allHeaders(i)+" in "+SCI2COutputPath+"/includes/");
+ copyfile(allHeaders(i), SCI2COutputPath+"/includes/");
+end
- // -- Interfaces
- PrintStepInfo('Copying interfaces', FileInfo.GeneralReport,'both');
- for i = 1:size(allInterfaces, "*")
- // DEBUG only
- //disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
- copyfile(allInterfaces(i), SCI2COutputPath+"/interfaces/");
- end
+// -- Interfaces
+PrintStepInfo('Copying interfaces', FileInfo.GeneralReport,'both');
+for i = 1:size(allInterfaces, "*")
+ // DEBUG only
+ //disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
+ copyfile(allInterfaces(i), SCI2COutputPath+"/interfaces/");
+end
- // -- Libraries
- PrintStepInfo('Copying libraries', FileInfo.GeneralReport,'both');
- for i = 1:size(allLibraries, "*")
- // DEBUG only
- //disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
- copyfile(allLibraries(i), SCI2COutputPath+"/libraries/");
- end
+// -- Libraries
+PrintStepInfo('Copying libraries', FileInfo.GeneralReport,'both');
+for i = 1:size(allLibraries, "*")
+ // DEBUG only
+ //disp("Copying "+allInterfaces(i)+" in "+SCI2COutputPath+"/interfaces/");
+ copyfile(allLibraries(i), SCI2COutputPath+"/libraries/");
+end
- // --------------------------
- // --- Generate Makefile. ---
- // --------------------------
- //If output format is chosen as 'Arduino', then copy makefile for arduino from
- //default folder, else generate makefile for standalone c code
-
- if (Target == 'Arduino')
-
- GenerateSetupFunction(FileInfo);
- mkdir(SCI2COutputPath+"/arduino/");
- mkdir(SCI2COutputPath+"/arduino/sci2c_arduino");
- //Copy arduino makefile
- arduinoFiles = SCI2CHOME + "/" + getArduinoFiles();
- PrintStepInfo('Copying arduino files', FileInfo.GeneralReport,'both');
- copyfile(arduinoFiles(1), SCI2COutputPath);
- for i = 2:size(arduinoFiles, "*")
- // DEBUG only
- //disp("Copying "+arduinoFiles(i)+" in "+SCI2COutputPath+"/arduino/sci2carduino");
- copyfile(arduinoFiles(i), SCI2COutputPath+"/arduino/sci2c_arduino/");
- end
-
- else
-
- if BuildTool == "make"
- C_GenerateMakefile(FileInfo,SharedInfo);
- copyBlasLapackLibs(FileInfo,SharedInfo); //Previously .dll files and blas,lapack library not creating for cygwin by additing this works fine
- end
- if BuildTool == "nmake"
- copyBlasLapackLibs(FileInfo,SharedInfo);
- C_GenerateMakefile_msvc(FileInfo,SharedInfo);
- end
- end
+// --------------------------
+// --- Generate Makefile. ---
+// --------------------------
+//If output format is chosen as 'Arduino', then copy makefile for arduino from
+//default folder, else generate makefile for standalone c code
+
+if (Target == 'Arduino')
+
+ GenerateSetupFunction(FileInfo);
+ mkdir(SCI2COutputPath+"/arduino/");
+ mkdir(SCI2COutputPath+"/arduino/sci2c_arduino");
+ //Copy arduino makefile
+ arduinoFiles = SCI2CHOME + "/" + getArduinoFiles();
+ PrintStepInfo('Copying arduino files', FileInfo.GeneralReport,'both');
+ copyfile(arduinoFiles(1), SCI2COutputPath);
+ for i = 2:size(arduinoFiles, "*")
+ // DEBUG only
+ //disp("Copying "+arduinoFiles(i)+" in "+SCI2COutputPath+"/arduino/sci2carduino");
+ copyfile(arduinoFiles(i), SCI2COutputPath+"/arduino/sci2c_arduino/");
+ end
+else
- // ------------------------------
- // --- Generate SCI2C Header. ---
- // ------------------------------
- // FIXME : Give the user the ability to set this prefix
- FunctionPrefix = "SCI2C";
- C_GenerateSCI2CHeader(SCI2COutputPath+"/includes/", FunctionPrefix);
+ if BuildTool == "make"
+ C_GenerateMakefile(FileInfo,SharedInfo);
+ copyBlasLapackLibs(FileInfo,SharedInfo); //Previously .dll files and blas,lapack library not creating for cygwin by additing this works fine
+ end
+ if BuildTool == "nmake"
+ copyBlasLapackLibs(FileInfo,SharedInfo);
+ C_GenerateMakefile_msvc(FileInfo,SharedInfo);
+ end
+end
-end // RunMode <> FunCall
+// ------------------------------
+// --- Generate SCI2C Header. ---
+// ------------------------------
+// FIXME : Give the user the ability to set this prefix
+FunctionPrefix = "SCI2C";
+C_GenerateSCI2CHeader(SCI2COutputPath+"/includes/", FunctionPrefix);
+end
// -----------------
// --- Epilogue. ---
// -----------------
|