summaryrefslogtreecommitdiff
path: root/2.3-1/macros
diff options
context:
space:
mode:
authorsiddhu89902016-02-01 11:05:35 +0530
committersiddhu89902016-02-01 11:05:35 +0530
commit3425c4fedbdbc7e1a3440df7502d9af93f466b84 (patch)
tree55f138b2e4c2133b1d01ce4959996452213e2d18 /2.3-1/macros
parentef666a6b9ac74d5effe8b34179cc3ad0c247e7c3 (diff)
downloadScilab2C-3425c4fedbdbc7e1a3440df7502d9af93f466b84.tar.gz
Scilab2C-3425c4fedbdbc7e1a3440df7502d9af93f466b84.tar.bz2
Scilab2C-3425c4fedbdbc7e1a3440df7502d9af93f466b84.zip
Support for RPi gpios added
Diffstat (limited to '2.3-1/macros')
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleEndGenFun.binbin81440 -> 81440 bytes
-rw-r--r--2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci4
-rw-r--r--2.3-1/macros/CCodeGeneration/C_Funcall.binbin62220 -> 62220 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_Funcall.sci4
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateFunName.binbin6288 -> 6436 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci6
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateMakefile.binbin23080 -> 24940 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci23
-rw-r--r--2.3-1/macros/CCodeGeneration/C_InitHeader.binbin14064 -> 14064 bytes
-rw-r--r--2.3-1/macros/CCodeGeneration/C_InitHeader.sci4
-rw-r--r--2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.binbin0 -> 2812 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/libbin1964 -> 1988 bytes
-rw-r--r--2.3-1/macros/FunctionAnnotation/names1
-rw-r--r--2.3-1/macros/Hardware/AVR/AVRUARTSetup.binbin0 -> 3480 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/buildmacros.sce11
-rw-r--r--2.3-1/macros/Hardware/AVR/libbin932 -> 956 bytes
-rw-r--r--2.3-1/macros/Hardware/AVR/names1
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.binbin0 -> 1604 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci21
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.binbin0 -> 2704 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci22
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPIDelay.binbin0 -> 3528 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPIDelay.sci31
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.binbin0 -> 3280 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.sci30
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.binbin0 -> 3400 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci27
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.binbin0 -> 3480 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci27
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.binbin0 -> 3452 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci27
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/buildmacros.sce4
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/libbin0 -> 816 bytes
-rw-r--r--2.3-1/macros/Hardware/RasberryPi/names7
-rw-r--r--2.3-1/macros/Hardware/buildmacros.sce19
-rw-r--r--2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.binbin4288 -> 4296 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.binbin951340 -> 992640 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci105
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.binbin19080 -> 19080 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci6
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SCI2C.binbin24408 -> 24408 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/INIT_SCI2C.sci8
-rw-r--r--2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.binbin37748 -> 38684 bytes
-rw-r--r--2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci2
-rw-r--r--2.3-1/macros/buildmacros.sce1
-rw-r--r--2.3-1/macros/cb_sci2c_gui.binbin17820 -> 18548 bytes
-rw-r--r--2.3-1/macros/cb_sci2c_gui.sci14
-rw-r--r--2.3-1/macros/findDeps/getAllHeaders.binbin24908 -> 25820 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllHeaders.sci16
-rw-r--r--2.3-1/macros/findDeps/getAllInterfaces.binbin26044 -> 27108 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllInterfaces.sci16
-rw-r--r--2.3-1/macros/findDeps/getAllLibraries.binbin0 -> 1648 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllLibraries.sci17
-rw-r--r--2.3-1/macros/findDeps/getAllSources.binbin153272 -> 158532 bytes
-rw-r--r--2.3-1/macros/findDeps/getAllSources.sci18
-rw-r--r--2.3-1/macros/findDeps/libbin748 -> 772 bytes
-rw-r--r--2.3-1/macros/findDeps/names1
-rw-r--r--2.3-1/macros/runsci2c.binbin26392 -> 27996 bytes
-rw-r--r--2.3-1/macros/runsci2c.sci21
-rw-r--r--2.3-1/macros/sci2c_gui.binbin57340 -> 58664 bytes
-rw-r--r--2.3-1/macros/sci2c_gui.sci18
-rw-r--r--2.3-1/macros/scilab2c.binbin19368 -> 19488 bytes
-rw-r--r--2.3-1/macros/scilab2c.sci18
63 files changed, 442 insertions, 88 deletions
diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin
index d5d2e4ab..ce6f0d68 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin
+++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.bin
Binary files differ
diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
index f6ae58e7..57f5f930 100644
--- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
+++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci
@@ -46,9 +46,9 @@ ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName;
Pass1HeaderFileName = FileInfo.Funct(nxtscifunnumber).Pass1HeaderFileName;
FunInfoDatDir = FileInfo.FunctionList.FunInfoDatDir;
CGblDeclarFileName = FileInfo.Funct(nxtscifunnumber).CGblDeclarFileName;
-if(SharedInfo.OutFormat == 'AVR')
+if(SharedInfo.Target == 'AVR')
PeripheralInitListFile = FileInfo.PeripheralInitListFile;
-elseif (SharedInfo.OutFormat == 'Arduino')
+elseif (SharedInfo.Target == 'Arduino')
SetupListFile = FileInfo.SetupListFile;
end
diff --git a/2.3-1/macros/CCodeGeneration/C_Funcall.bin b/2.3-1/macros/CCodeGeneration/C_Funcall.bin
index fec47128..36823876 100644
--- a/2.3-1/macros/CCodeGeneration/C_Funcall.bin
+++ b/2.3-1/macros/CCodeGeneration/C_Funcall.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_Funcall.sci b/2.3-1/macros/CCodeGeneration/C_Funcall.sci
index 166799e6..3669e54d 100644
--- a/2.3-1/macros/CCodeGeneration/C_Funcall.sci
+++ b/2.3-1/macros/CCodeGeneration/C_Funcall.sci
@@ -35,7 +35,7 @@ CDeclarationFileName = FileInfo.Funct(nxtscifunnumber).CDeclarationFileName;
CInitVarsFileName = FileInfo.Funct(nxtscifunnumber).CInitVarsFileName;
IndentLevel = SharedInfo.NIndent;
CCall = '';
-OutFormat = SharedInfo.OutFormat;
+Target = SharedInfo.Target;
// --- Extract Function Info. ---
FunctionName = FunInfo.SCIFunctionName;
CFunName = FunInfo.CFunctionName;
@@ -371,7 +371,7 @@ else
if (FlagCall == 0)
// Add prototype to the header file
- C_InitHeader(CCall+';',HeaderFileName,SharedInfo.Sci2CLibMainHeaderFName,OutFormat);
+ C_InitHeader(CCall+';',HeaderFileName,SharedInfo.Sci2CLibMainHeaderFName,Target);
// Add { at the beginning of the function.
PrintStringInfo(' {',ReportFileName,'file','y');
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin
index 4f3c5917..9a4af082 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci
index 657258a9..54c641f2 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateFunName.sci
@@ -23,9 +23,9 @@ function CFunName = C_GenerateFunName(FunctionName,InArg,NInArg,OutArg,NOutArg)
// ------------------------------
SCI2CNInArgCheck(argn(2),5,5);
CFunName = '';
-if(IsAVRSupportFunction(FunctionName))
-//If current function is an AVR function, then function name can be just plain
-//function name without any input/output arguments types
+if((IsAVRSupportFunction(FunctionName)) | (IsRPISupportFunction(FunctionName)))
+//If current function is an AVR or RPi function, then function name can be just
+//plain function name without any input/output arguments types
CFunName = CFunName+FunctionName;
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin
index cf4ea0e4..feff05f8 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
index 320d8035..424c8216 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
@@ -26,6 +26,8 @@ SCI2CNInArgCheck(argn(2),2,2);
// -----------------------
PrintStepInfo('Generating Builder '+FileInfo.MakefileFilename,...
FileInfo.GeneralReport,'both');
+
+target = SharedInfo.Target;
// ---------------------------
// --- End Initialization. ---
// ---------------------------
@@ -41,28 +43,37 @@ PrintStringInfo('# --- DIRECTORIES AND FILES ---',FileInfo.MakefileFilename,'fil
makecsrcdir = pathconvert('src/c', %f, %f, 'u');
makehsrcdir = pathconvert('includes', %f, %f, 'u');
makeisrcdir = pathconvert('interfaces', %f, %f, 'u');
+makelibdir = pathconvert('libraries', %f, %f, 'u');
makesci2cdir = FileInfo.CStyleOutCCCodeDir;
PrintStringInfo('CSRCDIR = '+makecsrcdir,FileInfo.MakefileFilename,'file','y','y');
PrintStringInfo('HSRCDIR = '+makehsrcdir,FileInfo.MakefileFilename,'file','y','y');
PrintStringInfo('ISRCDIR = '+makeisrcdir,FileInfo.MakefileFilename,'file','y','y');
+PrintStringInfo('LIBDIR = '+makelibdir,FileInfo.MakefileFilename,'file','y','y');
PrintStringInfo('SCI2CDIR = .',FileInfo.MakefileFilename,'file','y','y');
// Compiler definition
-PrintStringInfo('CC = gcc',FileInfo.MakefileFilename,'file','y','y');
-PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR)',FileInfo.MakefileFilename,'file','y','y');
-PrintStringInfo('LDFLAGS = -lblas -llapack -lm',FileInfo.MakefileFilename,'file','y','y');
-
+if (target == 'RPi')
+ PrintStringInfo('CC = arm-linux-gnueabihf-gcc ',FileInfo.MakefileFilename,'file','y','y');
+else
+ PrintStringInfo('CC = gcc',FileInfo.MakefileFilename,'file','y','y');
+end
+PrintStringInfo('CFLAGS = -Wall -pedantic -g -I $(HSRCDIR) -I $(ISRCDIR) -L $(LIBDIR)',FileInfo.MakefileFilename,'file','y','y');
+if (target == 'RPi')
+ PrintStringInfo('LDFLAGS = -llapack -lrefblas -lgfortran -lm -lbcm2835',FileInfo.MakefileFilename,'file','y','y');
+else
+ PrintStringInfo('LDFLAGS = -lblas -llapack -lm ',FileInfo.MakefileFilename,'file','y','y');
+end
// Binary definition
PrintStringInfo('EXEFILENAME = mytest.exe',FileInfo.MakefileFilename,'file','y','y');
PrintStringInfo('EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)', FileInfo.MakefileFilename,'file','y','y');
// Sources
//Check the output format selected and insert files according to it
-outformat = SharedInfo.OutFormat;
+target = SharedInfo.Target;
PrintStringInfo('SRC = \\', FileInfo.MakefileFilename,'file','y','y');
-allSources = getAllSources(outformat);
+allSources = getAllSources(target);
nbSources = size(allSources);
for i = 1:(nbSources(1) - 1)
[tmppath,tmpfile,tmpext] = fileparts(allSources(i));
diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
index 642e75c3..957ea506 100644
--- a/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
+++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.bin
Binary files differ
diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
index dffb9726..bc6f2520 100644
--- a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
+++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
@@ -1,4 +1,4 @@
-function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,OutFormat)
+function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,Target)
// function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName)
// -----------------------------------------------------------------
// //NUT: add description here
@@ -38,7 +38,7 @@ PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
PrintStringInfo('** ----- Target ------ ',HeaderFileName,'file','y');
PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
PrintStringInfo('*/',HeaderFileName,'file','y');
-PrintStringInfo('# define ' + OutFormat + '1 1' ,HeaderFileName,'file','y');
+PrintStringInfo('# define ' + Target + '1 1' ,HeaderFileName,'file','y');
PrintStringInfo('/*',HeaderFileName,'file','y');
PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y');
PrintStringInfo('** --- SCI2C Includes. --- ',HeaderFileName,'file','y');
diff --git a/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin
new file mode 100644
index 00000000..2373b813
--- /dev/null
+++ b/2.3-1/macros/FunctionAnnotation/FA_SZ_ROW_COLUMN_CAT.bin
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/lib b/2.3-1/macros/FunctionAnnotation/lib
index c2025c87..6e93fb38 100644
--- a/2.3-1/macros/FunctionAnnotation/lib
+++ b/2.3-1/macros/FunctionAnnotation/lib
Binary files differ
diff --git a/2.3-1/macros/FunctionAnnotation/names b/2.3-1/macros/FunctionAnnotation/names
index d9300d20..a5f862b9 100644
--- a/2.3-1/macros/FunctionAnnotation/names
+++ b/2.3-1/macros/FunctionAnnotation/names
@@ -37,6 +37,7 @@ FA_SZ_OPPLUSA
FA_SZ_OPRC
FA_SZ_OPSLASH
FA_SZ_OPSTAR
+FA_SZ_ROW_COLUMN_CAT
FA_SZ_SEL1
FA_SZ_SEL2
FA_TP_C
diff --git a/2.3-1/macros/Hardware/AVR/AVRUARTSetup.bin b/2.3-1/macros/Hardware/AVR/AVRUARTSetup.bin
new file mode 100644
index 00000000..4a49b861
--- /dev/null
+++ b/2.3-1/macros/Hardware/AVR/AVRUARTSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/buildmacros.sce b/2.3-1/macros/Hardware/AVR/buildmacros.sce
index 60fd2843..2954a424 100644
--- a/2.3-1/macros/Hardware/AVR/buildmacros.sce
+++ b/2.3-1/macros/Hardware/AVR/buildmacros.sce
@@ -1,14 +1,3 @@
-//
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET
-//
-// This file must be used under the terms of the CeCILL.
-// This source file is licensed as described in the file COPYING, which
-// you should have received as part of this distribution. The terms
-// are also available at
-// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-//
-//
tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
diff --git a/2.3-1/macros/Hardware/AVR/lib b/2.3-1/macros/Hardware/AVR/lib
index b1986824..64d346af 100644
--- a/2.3-1/macros/Hardware/AVR/lib
+++ b/2.3-1/macros/Hardware/AVR/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/AVR/names b/2.3-1/macros/Hardware/AVR/names
index 126da77a..624fee8a 100644
--- a/2.3-1/macros/Hardware/AVR/names
+++ b/2.3-1/macros/Hardware/AVR/names
@@ -7,6 +7,7 @@ AVRPWMSetDuty
AVRPWMSetup
AVRReadADC
AVRTimerSetup
+AVRUARTSetup
GetAVRSupportFunctions
GetPeripheral
InsertPeripheralInList
diff --git a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
new file mode 100644
index 00000000..5bea6458
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
new file mode 100644
index 00000000..24c2f556
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci
@@ -0,0 +1,21 @@
+function AVRSupportFunctions = GetRPISupportFunctions()
+// -----------------------------------------------------------------
+// Get list of RPI peripherals supported
+//
+// Input data:
+// None
+//
+// Output data:
+// None
+//
+// Author: Siddhesh Wani
+// -----------------------------------------------------------------
+
+AVRSupportFunctions = [
+ "RPI_DigitalIn"
+ "RPI_DigitalOut"
+ "RPI_DigitalSetup"
+ "RPI_DelayMilli"
+ "RPI_DelayMicro"];
+
+endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.bin b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.bin
new file mode 100644
index 00000000..728e3d80
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci
new file mode 100644
index 00000000..647b0c85
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci
@@ -0,0 +1,22 @@
+function Output = IsRPISupportFunction(FunName)
+// -----------------------------------------------------------------
+// Check whether input function name is a RPi support function or not.
+//
+// Input data:
+// FunName: Name of the function to be checked
+//
+// Output data:
+// Output: True or False depending whether given function is a RPi
+// support functions or not
+//
+// Author: Siddhesh Wani
+// -----------------------------------------------------------------
+
+//Get list of supported functions for AVR
+RPISupportFunctions = GetRPISupportFunctions();
+
+//Check whether input function is present in above list or not
+FunNameInRPISupport = members(FunName,RPISupportFunctions);
+Output = bool2s(FunNameInRPISupport~=0);
+
+endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelay.bin b/2.3-1/macros/Hardware/RasberryPi/RPIDelay.bin
new file mode 100644
index 00000000..bb8279ec
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPIDelay.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelay.sci b/2.3-1/macros/Hardware/RasberryPi/RPIDelay.sci
new file mode 100644
index 00000000..c5080dd8
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPIDelay.sci
@@ -0,0 +1,31 @@
+function RPI_DelayMilli(time)
+// Function to insert some delay in code execution.
+//
+// Calling Sequence
+// RPI_DelayMilli(time)
+//
+// Parameters
+// time: time(milliseconds) for which execution is to be delayed
+//
+// Description
+// this function can be used for insertig execution delays. 'time' should be
+// specified in milliseconds. If more resolution is required, use 'RPI_DelayMicro'
+// for inserting delay in microseconds.
+// Note: Delay inserted by this function is not accurate, but depedent on
+// operating system, other running tasks etc.
+//
+// Examples
+// RPI_DelayMilli(100) //This will delay the execution of next code by 100 ms.
+//
+// See also
+// RPI_DelayMicro
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+
+endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.bin b/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.bin
new file mode 100644
index 00000000..a4d32cb6
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.sci b/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.sci
new file mode 100644
index 00000000..730755b7
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPIDelayMicro.sci
@@ -0,0 +1,30 @@
+function RPI_DelayMicro(time)
+// Function to insert some delay in code execution.
+//
+// Calling Sequence
+// RPI_DelayMicro(time)
+//
+// Parameters
+// time: time(microseconds) for which execution is to be delayed
+//
+// Description
+// this function can be used for insertig execution delays. 'time' should be
+// specified in microseconds.'time' should be between (1-65536).
+// Note: Delay inserted by this function is not accurate, but depedent on
+// operating system, other running tasks etc.
+//
+// Examples
+// RPI_DelayMilli(100) //This will delay the execution of next code by 100 ms.
+//
+// See also
+// RPI_DelayMicro
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+
+endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.bin
new file mode 100644
index 00000000..a3269a0a
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci
new file mode 100644
index 00000000..3ea3bf12
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci
@@ -0,0 +1,27 @@
+function state = RPI_DigitalIn(pin)
+// Function to read current state on digital pins.
+//
+// Calling Sequence
+// state = RPI_DigitalIn(pin)
+//
+// Parameters
+// pin : pin of RPi to be used
+// state : current state of the pin (0 -> LOW, 1 -> HIGH)
+//
+// Description
+// This fucntion is used for reading the current state on gpio pins of RPi. 'RPI_DigitalSetup' function must be called before this for setting up pin as input. 'pin' must be specified from list given. 'state' specifies the input state (0 -> Low, 1-> High)
+// Examples
+// RPI_DigitalIn(RPI_GPIO_P1_03) //Reads the state of pin 3 of header P1.
+//
+// See also
+// RPI_DigitalSetup RPI_DigitalOut
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+
+endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.bin
new file mode 100644
index 00000000..d6b6b7bf
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci
new file mode 100644
index 00000000..4836f54f
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci
@@ -0,0 +1,27 @@
+function RPI_DigitalOut(pin, state)
+// Function to output desired state on digital pins.
+//
+// Calling Sequence
+// RPI_DigitalOut(pin, state)
+//
+// Parameters
+// pin : pin of RPi to be used
+// state : desired state of the pin (0 -> LOW, 1 -> HIGH)
+//
+// Description
+// This fucntion is used for outputting the desired state on gpio pins of RPi. 'RPI_DigitalSetup' function must be called before this for setting up pin as output. 'pin' must be specified from list given. 'state' specifies the output state (0 -> Low, 1-> High)
+// Examples
+// RPI_DigitalOut(RPI_GPIO_P1_03,0) //Changes the state of pin 3 of header P1 as 'Low'.
+//
+// See also
+// RPI_DigitalSetup RPI_DigitalIn
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+
+endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
new file mode 100644
index 00000000..46836cd9
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
new file mode 100644
index 00000000..5ce48f0b
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci
@@ -0,0 +1,27 @@
+function RPI_DigitalSetup(pin, direction)
+// Function to setup digital pins.
+//
+// Calling Sequence
+// RPI_DigitalSetup(pin,direction)
+//
+// Parameters
+// pin : pin of RPi to be used
+// direction : direction to be set for pin (0 -> INPUT, 1 -> OUTPUT)
+//
+// Description
+// There are few pins available on RPi as Gpio or digital io. These pins can be used as digital output or input. Pin name must be provided from list provided. Please refer '' for complete list of pins. Direction can be 0 or 1 depending upon desired function (Input/output)
+// Examples
+// RPI_DigitalSetup(RPI_GPIO_P1_03,0) //Sets pin 3 of header P1 as input
+//
+// See also
+// RPI_DigitalIn RPI_DigitalOut
+//
+//
+// Authors
+// Siddhesh Wani
+//
+
+// This is curretly dummy function. It provides no functionality but is required
+// for providing support for generating C code for RPi.
+
+endfunction
diff --git a/2.3-1/macros/Hardware/RasberryPi/buildmacros.sce b/2.3-1/macros/Hardware/RasberryPi/buildmacros.sce
new file mode 100644
index 00000000..2954a424
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/buildmacros.sce
@@ -0,0 +1,4 @@
+
+tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
+
+clear tbx_build_macros;
diff --git a/2.3-1/macros/Hardware/RasberryPi/lib b/2.3-1/macros/Hardware/RasberryPi/lib
new file mode 100644
index 00000000..5884511a
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/lib
Binary files differ
diff --git a/2.3-1/macros/Hardware/RasberryPi/names b/2.3-1/macros/Hardware/RasberryPi/names
new file mode 100644
index 00000000..87fe2cd1
--- /dev/null
+++ b/2.3-1/macros/Hardware/RasberryPi/names
@@ -0,0 +1,7 @@
+GetRPISupportFunctions
+IsRPISupportFunction
+RPIDelay
+RPIDelayMicro
+RPI_DigitalIn
+RPI_DigitalOut
+RPI_DigitalSetup
diff --git a/2.3-1/macros/Hardware/buildmacros.sce b/2.3-1/macros/Hardware/buildmacros.sce
deleted file mode 100644
index 88f0fb2a..00000000
--- a/2.3-1/macros/Hardware/buildmacros.sce
+++ /dev/null
@@ -1,19 +0,0 @@
-// This file is released into the public domain
-
-Directories = [ "AVR" ];
-
-
-current_path_buildmacros = get_absolute_file_path("buildmacros.sce");
-
-for K=1:size(Directories,"*")
- myfile = current_path_buildmacros + filesep() + Directories(K) + filesep() + "buildmacros.sce";
- if isfile(myfile) then
- exec(myfile);
- end
-end
-
-clear current_path_buildmacros;
-
-tbx_build_macros(TOOLBOX_NAME, get_absolute_file_path('buildmacros.sce'));
-
-clear tbx_build_macros;
diff --git a/2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.bin b/2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.bin
index 7a5052dc..ee4b6f95 100644
--- a/2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.bin
+++ b/2.3-1/macros/Scilab-Arduino/GenerateSetupFunction.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
index 26530399..a4c9a3fb 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
index 629b3ee8..f4490101 100644
--- a/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci
@@ -4301,6 +4301,111 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file',
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+//------------------------------------
+//---- Class RPI_DigitalSetup --------
+//------------------------------------
+ClassName = 'RPI_DigitalSetup';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DigitalSetup';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_DigitalOut ----------
+//------------------------------------
+ClassName = 'RPI_DigitalOut';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 2',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DigitalOut';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_DigitalIn -----------
+//------------------------------------
+ClassName = 'RPI_DigitalIn';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DigitalIn';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+//------------------------------------
+//---- Class RPI_DelayMilli ----------
+//------------------------------------
+ClassName = 'RPI_DelayMilli';
+
+// --- Class Annotation. ---
+PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y');
+ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls);
+PrintStringInfo('NIN= 1',ClassFileName,'file','y');
+PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y');
+PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y');
+
+// --- Function List Class. ---
+ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls);
+//PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y');
+PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y');
+
+// --- Annotation Function And Function List Function. ---
+FunctionName = 'RPI_DelayMilli';
+PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y');
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun);
+INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun);
+
+FunctionName = 'RPI_DelayMicro';
+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/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin
index 4a82f12a..eed0cd8f 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci
index a61eb724..c213db9f 100644
--- a/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_GenSharedInfo.sci
@@ -1,4 +1,4 @@
-function SharedInfo = INIT_GenSharedInfo(RunMode,UserScilabMainFile,TotTempScalarVars,EnableTempVarsReuse,Sci2CLibMainHeaderFName,CopySciCodeIntoCCode,OutFormat)
+function SharedInfo = INIT_GenSharedInfo(RunMode,UserScilabMainFile,TotTempScalarVars,EnableTempVarsReuse,Sci2CLibMainHeaderFName,CopySciCodeIntoCCode,Target)
// function SharedInfo = INIT_GenSharedInfo(WorkingDir,OutCCCodeDir,UserSciFilesPaths,...
// RunMode,UserScilabMainFile,TotTempScalarVars,EnableTempVarsReuse,Sci2CLibMainHeaderFName)
// -----------------------------------------------------------------
@@ -47,7 +47,7 @@ SharedInfo.Sci2CLibMainHeaderFName = pathconvert(Sci2CLibMainHeaderFName, %f, %f
SharedInfo.NextSCIFileName = UserScilabMainFile;
[scipath,funname,sciext] = fileparts(UserScilabMainFile);
SharedInfo.SCIMainFunName = funname;
-if (OutFormat == 'Arduino')
+if (Target == 'Arduino')
SharedInfo.CMainFunName = 'loop_arduino';
else
SharedInfo.CMainFunName = 'main';
@@ -120,6 +120,6 @@ SharedInfo.Extension.FuncListClasses = '.lcls'; // Stands for list class
// ------------------------
SharedInfo.ResizeApproach = 'NO_RESIZE'; // 'NO_RESIZE', 'RESIZE_ALL', 'RESIZE_TEMP', 'RESIZE_LOCAL', 'RESIZE_GLOBAL', 'REALLOC_ALL_RESIZE_ALL'
-SharedInfo.OutFormat = OutFormat;
+SharedInfo.Target = Target;
endfunction
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin b/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin
index c6141d61..91a0d91c 100644
--- a/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin
+++ b/2.3-1/macros/ToolInitialization/INIT_SCI2C.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
index 6dde05de..e5ee9758 100644
--- a/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
+++ b/2.3-1/macros/ToolInitialization/INIT_SCI2C.sci
@@ -1,5 +1,5 @@
function [FileInfoDatFile,SharedInfoDatFile] = ...
- INIT_SCI2C(UserScilabMainFile, UserSciFilesPaths, SCI2COutputDir, RunMode,OutFormat)
+ INIT_SCI2C(UserScilabMainFile, UserSciFilesPaths, SCI2COutputDir, RunMode,Target)
// function [FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(SCI2CInputPrmFile)
// -----------------------------------------------------------------
// #RNU_RES_B
@@ -68,7 +68,7 @@ OutCCCodeDir = SCI2CResultDir;
//-- FIXME : MainLibHeader and Verbose mode are (?) configurable
SharedInfo = INIT_GenSharedInfo(RunMode,UserScilabMainFile, ...
- TotTempScalarVars,EnableTempVarsReuse,"sci2clib.h", %t,OutFormat);
+ TotTempScalarVars,EnableTempVarsReuse,"sci2clib.h", %t,Target);
// ----------------------------
// --- Initialize FileInfo. ---
@@ -147,10 +147,10 @@ anscounter = 0;
//--------------------------------------------
//---Hardware related initialisation----------
//--------------------------------------------
-if (OutFormat == 'AVR')
+if (Target == 'AVR')
PeripheralList = list();
save(FileInfo.PeripheralInitListFile, 'PeripheralList');
-elseif (OutFormat == 'Arduino')
+elseif (Target == 'Arduino')
SetupList = list();
save(FileInfo.SetupListFile, 'SetupList');
end
diff --git a/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.bin b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.bin
index 16e99c9a..c13904d2 100644
--- a/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.bin
+++ b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.bin
Binary files differ
diff --git a/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci
index 253299a3..ed07907f 100644
--- a/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci
+++ b/2.3-1/macros/ToolInitialization/UpdateSCI2CInfo.sci
@@ -61,7 +61,7 @@ FileInfo.Funct(funnumber).PfxP1WhileEpilFileName = fullfile(FileInfo.WorkingDir,
FileInfo.Funct(funnumber).CPass1FreeFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass1free.c');
FileInfo.Funct(funnumber).CPass2FileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'_pass2.c');
FileInfo.Funct(funnumber).Pass1HeaderFileName = fullfile(FileInfo.WorkingDir,funname,SharedInfo.NextCFunName+'.h');
-if (SharedInfo.OutFormat == 'Arduino')
+if (SharedInfo.Target == 'Arduino')
//In case of "Arduino" target, *.cpp files should be generated, not *.c files.
FileInfo.Funct(funnumber).FinalCFileName = fullfile(FileInfo.OutCCCodeDir,SharedInfo.NextCFunName+'.cpp');
else
diff --git a/2.3-1/macros/buildmacros.sce b/2.3-1/macros/buildmacros.sce
index dfeb4755..91f5a060 100644
--- a/2.3-1/macros/buildmacros.sce
+++ b/2.3-1/macros/buildmacros.sce
@@ -10,6 +10,7 @@ Directories = [ "ASTManagement", ...
"SymbolTable", ...
"ToolInitialization"...
"Hardware/AVR"...
+ "Hardware/RasberryPi"...
"Scilab-Arduino" ];
diff --git a/2.3-1/macros/cb_sci2c_gui.bin b/2.3-1/macros/cb_sci2c_gui.bin
index 3c70ac39..bc691e45 100644
--- a/2.3-1/macros/cb_sci2c_gui.bin
+++ b/2.3-1/macros/cb_sci2c_gui.bin
Binary files differ
diff --git a/2.3-1/macros/cb_sci2c_gui.sci b/2.3-1/macros/cb_sci2c_gui.sci
index b6fbd1ac..8f3f92ad 100644
--- a/2.3-1/macros/cb_sci2c_gui.sci
+++ b/2.3-1/macros/cb_sci2c_gui.sci
@@ -57,12 +57,12 @@ elseif or(get(gcbo, "tag")==["runradioall","runradiotranslate","runradiogenlib"]
// --- Output format option ---
-elseif or(get(gcbo, "tag")==["outformatradiostalone","outformatradioarduino","outformatradioavr"]) then
+elseif or(get(gcbo, "tag")==["outformatradiostalone","outformatradioarduino","outformatradioavr","outformatradiorpi"]) then
set(findobj("tag", "outformatradiostalone"), "value", 0);
set(findobj("tag", "outformatradioarduino"), "value", 0);
set(findobj("tag", "outformatradioavr"), "value", 0);
-
+ set(findobj("tag", "outformatradiorpi"), "value", 0);
set(gcbo, "value", 1);
@@ -113,11 +113,13 @@ elseif get(gcbo, "tag")=="convertbtn" then
end
if get(findobj("tag", "outformatradiostalone"), "value") == 1 then
- OutFormat = "StandAlone";
+ Target = "StandAlone";
elseif get(findobj("tag", "outformatradioarduino"), "value") == 1 then
- OutFormat = "Arduino";
+ Target = "Arduino";
elseif get(findobj("tag", "outformatradioavr"), "value") == 1 then
- OutFormat = "AVR";
+ Target = "AVR";
+ elseif get(findobj("tag", "outformatradiorpi"), "value") == 1 then
+ Target = "RPi";
end
CopySciCodeIntoCCode = get(findobj("tag", "sciintocradioyes"), "value") == 1;
@@ -138,7 +140,7 @@ elseif get(gcbo, "tag")=="convertbtn" then
// mprintf("RunMode = {%s}\n", RunMode);
// mprintf("CopySciCodeIntoCCode = {%d}\n", bool2s(CopySciCodeIntoCCode));
// mprintf("NativeBuild = {%s}\n", NativeBuild);
- scilab2c(UserScilabMainFile, UserSciCodeMainDir, UserSciFilesPaths, RunMode, NativeBuild,OutFormat);
+ scilab2c(UserScilabMainFile, UserSciCodeMainDir, UserSciFilesPaths, RunMode, NativeBuild,Target);
//
// --- sci2c help ---
//
diff --git a/2.3-1/macros/findDeps/getAllHeaders.bin b/2.3-1/macros/findDeps/getAllHeaders.bin
index 4ed973e7..0dbfba5e 100644
--- a/2.3-1/macros/findDeps/getAllHeaders.bin
+++ b/2.3-1/macros/findDeps/getAllHeaders.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllHeaders.sci b/2.3-1/macros/findDeps/getAllHeaders.sci
index 7cddce29..0f325bd7 100644
--- a/2.3-1/macros/findDeps/getAllHeaders.sci
+++ b/2.3-1/macros/findDeps/getAllHeaders.sci
@@ -10,7 +10,7 @@
//
//
-function allHeaders = getAllHeaders(OutFormat)
+function allHeaders = getAllHeaders(Target)
//Header files common to all types of output format.
Standalone_headers = [
@@ -145,12 +145,20 @@ function allHeaders = getAllHeaders(OutFormat)
"src/c/hardware/avr/includes/AVRUtil.h"
];
- if OutFormat == "StandAlone"
+ RPi_headers = [
+ "includes/bcm2835.h"
+ "src/c/hardware/rasberrypi/includes/RPIPeripheralDigital.h"
+ "src/c/hardware/rasberrypi/includes/RPIPeripheralUtil.h"
+ ];
+
+ if Target == "StandAlone"
allHeaders = Standalone_headers;
- elseif OutFormat == "Arduino"
+ elseif Target == "Arduino"
allHeaders = cat(1,Standalone_headers, Arduino_headers);
- elseif OutFormat == "AVR"
+ elseif Target == "AVR"
allHeaders = cat(1,Standalone_headers, AVR_headers);
+ elseif Target == "RPi"
+ allHeaders = cat(1,Standalone_headers, RPi_headers);
end
endfunction
diff --git a/2.3-1/macros/findDeps/getAllInterfaces.bin b/2.3-1/macros/findDeps/getAllInterfaces.bin
index 368b84ab..80868ed8 100644
--- a/2.3-1/macros/findDeps/getAllInterfaces.bin
+++ b/2.3-1/macros/findDeps/getAllInterfaces.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllInterfaces.sci b/2.3-1/macros/findDeps/getAllInterfaces.sci
index 65ee1745..e2333537 100644
--- a/2.3-1/macros/findDeps/getAllInterfaces.sci
+++ b/2.3-1/macros/findDeps/getAllInterfaces.sci
@@ -10,7 +10,7 @@
//
//
-function allInterfaces = getAllInterfaces(OutFormat)
+function allInterfaces = getAllInterfaces(Target)
//Interface files common to all types of output format
Standalone_interfaces = [
"src/c/auxiliaryFunctions/interfaces/int_rand.h"
@@ -139,12 +139,20 @@ function allInterfaces = getAllInterfaces(OutFormat)
"src/c/hardware/avr/interfaces/int_AVRUtil.h"
];
- if OutFormat == "StandAlone"
+ RPI_interfaces = [
+ "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralDigital.h"
+ "src/c/hardware/rasberrypi/interfaces/int_RPIPeripheralUtil.h"
+
+];
+
+ if Target == "StandAlone"
allInterfaces = Standalone_interfaces;
- elseif OutFormat == "Arduino"
+ elseif Target == "Arduino"
allInterfaces = cat(1,Standalone_interfaces, Arduino_interfaces);
- elseif OutFormat == "AVR"
+ elseif Target == "AVR"
allInterfaces = cat(1,Standalone_interfaces, AVR_interfaces);
+ elseif Target == "RPi"
+ allInterfaces = cat(1,Standalone_interfaces, RPI_interfaces);
end
endfunction
diff --git a/2.3-1/macros/findDeps/getAllLibraries.bin b/2.3-1/macros/findDeps/getAllLibraries.bin
new file mode 100644
index 00000000..e6ddf718
--- /dev/null
+++ b/2.3-1/macros/findDeps/getAllLibraries.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllLibraries.sci b/2.3-1/macros/findDeps/getAllLibraries.sci
new file mode 100644
index 00000000..1d633ea4
--- /dev/null
+++ b/2.3-1/macros/findDeps/getAllLibraries.sci
@@ -0,0 +1,17 @@
+
+function allLibraries = getAllLibraries(Target)
+
+ //Library files required for "RasberryPi" target
+ RPi_libs = [
+ "src/c/hardware/rasberrypi/libraries/libbcm2835.a"
+ "src/c/hardware/rasberrypi/libraries/libcblas.a"
+ "src/c/hardware/rasberrypi/libraries/librefblas.a"
+ "src/c/hardware/rasberrypi/libraries/liblapack.a"
+ "src/c/hardware/rasberrypi/libraries/libgfortran.a"
+ ];
+
+ if Target == "RPi"
+ allLibraries = RPi_libs;
+ end
+
+endfunction
diff --git a/2.3-1/macros/findDeps/getAllSources.bin b/2.3-1/macros/findDeps/getAllSources.bin
index a81e474e..82a109ac 100644
--- a/2.3-1/macros/findDeps/getAllSources.bin
+++ b/2.3-1/macros/findDeps/getAllSources.bin
Binary files differ
diff --git a/2.3-1/macros/findDeps/getAllSources.sci b/2.3-1/macros/findDeps/getAllSources.sci
index 56a8fea0..ca9ac8be 100644
--- a/2.3-1/macros/findDeps/getAllSources.sci
+++ b/2.3-1/macros/findDeps/getAllSources.sci
@@ -10,7 +10,7 @@
//
//
-function allSources = getAllSources(OutFormat)
+function allSources = getAllSources(Target)
//Files common to types of output format
Standalone_files = [ "src/c/auxiliaryFunctions/abs/sabsa.c"
"src/c/auxiliaryFunctions/abs/sabss.c"
@@ -858,13 +858,23 @@ function allSources = getAllSources(OutFormat)
"src/c/hardware/avr/util/u16AVRSleeps.c"
];
+ RPI_files = [
+ "src/c/hardware/rasberrypi/gpio/u8RPIDigitalSetups.c"
+ "src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c"
+ "src/c/hardware/rasberrypi/gpio/u8RPIDigitalIns.c"
+ "src/c/hardware/rasberrypi/util/u16RPIDelayMillis.c"
+ "src/c/hardware/rasberrypi/util/u16RPIDelayMicros.c"
- if OutFormat == "StandAlone"
+];
+
+ if Target == "StandAlone"
allSources = Standalone_files;
- elseif OutFormat == "Arduino"
+ elseif Target == "Arduino"
allSources = cat(1,Standalone_files, Arduino_files);
- elseif OutFormat == "AVR"
+ elseif Target == "AVR"
allSources = cat(1,Standalone_files, AVR_files);
+ elseif Target == "RPi"
+ allSources = cat(1,Standalone_files, RPI_files);
end
endfunction
diff --git a/2.3-1/macros/findDeps/lib b/2.3-1/macros/findDeps/lib
index 8d3728f0..c1deaa62 100644
--- a/2.3-1/macros/findDeps/lib
+++ b/2.3-1/macros/findDeps/lib
Binary files differ
diff --git a/2.3-1/macros/findDeps/names b/2.3-1/macros/findDeps/names
index dc32fef6..2b8c551b 100644
--- a/2.3-1/macros/findDeps/names
+++ b/2.3-1/macros/findDeps/names
@@ -2,5 +2,6 @@ Scilab2CDeps
findDeps
getAllHeaders
getAllInterfaces
+getAllLibraries
getAllSources
getArduinoFiles
diff --git a/2.3-1/macros/runsci2c.bin b/2.3-1/macros/runsci2c.bin
index 6c09823e..f6fd2393 100644
--- a/2.3-1/macros/runsci2c.bin
+++ b/2.3-1/macros/runsci2c.bin
Binary files differ
diff --git a/2.3-1/macros/runsci2c.sci b/2.3-1/macros/runsci2c.sci
index 4620705c..b55a7a1e 100644
--- a/2.3-1/macros/runsci2c.sci
+++ b/2.3-1/macros/runsci2c.sci
@@ -1,4 +1,4 @@
-function runsci2c(UserScilabMainFile, UserSciFilesPaths, SCI2COutputPath, Runmode, BuildTool,OutFormat)
+function runsci2c(UserScilabMainFile, UserSciFilesPaths, SCI2COutputPath, Runmode, BuildTool,Target)
// function runsci2c(SCI2CInputPrmFile)
// -----------------------------------------------------------------
// === hArtes/PoliBa/GAP SCI2C tool ===
@@ -51,7 +51,7 @@ disp(RunSci2CMainDir);
// --- Initialize the SCI2C tool directories and files. ---
[FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(UserScilabMainFile, ...
- UserSciFilesPaths, SCI2COutputPath, RunMode, OutFormat);
+ UserSciFilesPaths, SCI2COutputPath, RunMode, Target);
// -- Load FileInfo and SharedInfo
load(SharedInfoDatFile,'SharedInfo');
@@ -92,14 +92,16 @@ end
// ---------------------------
global SCI2CHOME
-allSources = SCI2CHOME + "/" + getAllSources(OutFormat);
-allHeaders = SCI2CHOME + "/" +getAllHeaders(OutFormat);
-allInterfaces = SCI2CHOME + "/" + getAllInterfaces(OutFormat);
+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');
@@ -125,6 +127,13 @@ for i = 1:size(allInterfaces, "*")
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
// --------------------------
// --- Generate Makefile. ---
@@ -132,7 +141,7 @@ end
//If output format is chosen as 'Arduino', then copy makefile for arduino from
//default folder, else generate makefile for standalone c code
-if (OutFormat == 'Arduino')
+if (Target == 'Arduino')
GenerateSetupFunction(FileInfo);
mkdir(SCI2COutputPath+"/arduino/");
diff --git a/2.3-1/macros/sci2c_gui.bin b/2.3-1/macros/sci2c_gui.bin
index 2e72ec49..57a2f696 100644
--- a/2.3-1/macros/sci2c_gui.bin
+++ b/2.3-1/macros/sci2c_gui.bin
Binary files differ
diff --git a/2.3-1/macros/sci2c_gui.sci b/2.3-1/macros/sci2c_gui.sci
index cb75b158..6dbd4628 100644
--- a/2.3-1/macros/sci2c_gui.sci
+++ b/2.3-1/macros/sci2c_gui.sci
@@ -203,7 +203,7 @@ outformatradiostalone = uicontrol("parent", sci2cfig,...
outformatradioarduino = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
"string", gettext("Arduino"),...
- "position",[2*margin+widgetLabelWidth+2*radiow outformaty radiow widgeth],...
+ "position",[margin+widgetLabelWidth+2*radiow outformaty radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -217,7 +217,7 @@ outformatradioarduino = uicontrol("parent", sci2cfig,...
outformatradioavr = uicontrol("parent", sci2cfig,...
"style", "radiobutton",...
"string", gettext("AVR"),...
- "position",[2*margin+widgetLabelWidth+3*radiow outformaty radiow widgeth],...
+ "position",[margin+widgetLabelWidth+3*radiow outformaty radiow widgeth],...
"horizontalalignment", "left",...
"fontname", defaultfont,...
"fontunits", "points",...
@@ -228,6 +228,20 @@ outformatradioavr = uicontrol("parent", sci2cfig,...
"callback", "cb_sci2c_gui",...
"tag", "outformatradioavr");
+outformatradiorpi = uicontrol("parent", sci2cfig,...
+ "style", "radiobutton",...
+ "string", gettext("Rpi"),...
+ "position",[margin+widgetLabelWidth+4*radiow outformaty radiow widgeth],...
+ "horizontalalignment", "left",...
+ "fontname", defaultfont,...
+ "fontunits", "points",...
+ "fontsize", 12,...
+ "min", 0, ...
+ "max", 1, ...
+ "value", 0,...
+ "callback", "cb_sci2c_gui",...
+ "tag", "outformatradiorpi");
+
// --- Run mode option ---
runy = outformaty + margin + widgeth;
runlabel = uicontrol("parent", sci2cfig,...
diff --git a/2.3-1/macros/scilab2c.bin b/2.3-1/macros/scilab2c.bin
index 6defd940..ff634b64 100644
--- a/2.3-1/macros/scilab2c.bin
+++ b/2.3-1/macros/scilab2c.bin
Binary files differ
diff --git a/2.3-1/macros/scilab2c.sci b/2.3-1/macros/scilab2c.sci
index 3eab16ee..118232ea 100644
--- a/2.3-1/macros/scilab2c.sci
+++ b/2.3-1/macros/scilab2c.sci
@@ -35,7 +35,7 @@ function scilab2c(varargin)
UserSciFilesPaths = [];
RunMode = 'All';
BuildTool = getNativeBuildTool();
- OutFormat = "StandAlone"
+ Target = "StandAlone"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths)
//
@@ -55,7 +55,7 @@ function scilab2c(varargin)
end
RunMode = "All";
BuildTool = getNativeBuildTool();
- OutFormat = "StandAlone"
+ Target = "StandAlone"
//
// scilab2c(UserScilabMainFile, CCodeOutputDir, UserSciFilesPaths, RunMode)
//
@@ -79,7 +79,7 @@ function scilab2c(varargin)
end
RunMode = varargin(4);
BuildTool = getNativeBuildTool();
- OutFormat = "StandAlone"
+ Target = "StandAlone"
case 5
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -104,7 +104,7 @@ function scilab2c(varargin)
end
RunMode = varargin(4);
BuildTool = varargin(5);
- OutFormat = "StandAlone"
+ Target = "StandAlone"
case 6
for i = 1:4
if typeof(varargin(i)) <> "string"
@@ -120,7 +120,7 @@ function scilab2c(varargin)
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"
+ 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"".\n"),"scilab2c",5));
return
end
@@ -133,7 +133,7 @@ function scilab2c(varargin)
end
RunMode = varargin(4);
BuildTool = varargin(5);
- OutFormat = varargin(6);
+ Target = varargin(6);
else
//
// Calling scilab2c with more than understood values
@@ -143,8 +143,8 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
// --- LAUNCH USER SCI CODE TO TEST IT BEFORE TRANSLATING IT!!! ---
-// If OutFormat choosen is 'Standalone' then only execute the code, otherwise directly start conversion.
- if OutFormat == "StandAlone"
+// If Target choosen is 'Standalone' then only execute the code, otherwise directly start conversion.
+ if Target == "StandAlone"
runscicode(UserScilabMainFile, UserSciFilesPaths);
// --- ASK USER FOR CONTINUATION. ---
@@ -160,7 +160,7 @@ error(msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"),
end
if (userchoice == 1)
// --- LAUNCH SCI2C ---
- runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,OutFormat);
+ runsci2c(UserScilabMainFile, UserSciFilesPaths, CCodeOutputDir, RunMode, BuildTool,Target);
end
endfunction