summaryrefslogtreecommitdiff
path: root/2.3-1/macros/CCodeGeneration
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/macros/CCodeGeneration')
-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.binbin24368 -> 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
8 files changed, 24 insertions, 13 deletions
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 d5648f44..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 b998257a..1ef5a411 100644
--- a/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
+++ b/2.3-1/macros/CCodeGeneration/C_GenerateMakefile.sci
@@ -28,6 +28,8 @@ SCI2CNInArgCheck(argn(2),2,2);
// -----------------------
PrintStepInfo('Generating Builder '+FileInfo.MakefileFilename,...
FileInfo.GeneralReport,'both');
+
+target = SharedInfo.Target;
// ---------------------------
// --- End Initialization. ---
// ---------------------------
@@ -43,21 +45,30 @@ 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');
if getos() == 'Windows' then
// 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 = -L./ -lblasplus -llapack -lm',FileInfo.MakefileFilename,'file','y','y'); //Added -L./ and -lblasplus(previously it was -lblas)
-
+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
else
// Compiler definition
PrintStringInfo('CC = gcc',FileInfo.MakefileFilename,'file','y','y');
@@ -70,9 +81,9 @@ PrintStringInfo('EXEFILE = $(SCI2CDIR)/$(EXEFILENAME)', FileInfo.MakefileFilenam
// 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');