Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Scilab 2 C details
Login with GitLab

Scilab 2 C

Translate Scilab code into C code
(11620 downloads for this version - 36150 downloads for all versions)
Alberto MOREA
Maria Teresa CHIARADA
Owner Organization
Creation Date
August 2, 2012
Source created on
Scilab 5.4.x
Binaries available on
Scilab 5.4.x:
Windows 64-bit Windows 32-bit Linux 64-bit Linux 32-bit macOS
Install command
--> atomsInstall("scilab2c")
            Sci2C is a tool capable to translate Scilab code into C code.

It is a standalone toolbox of Scilab and it has been primarily developed to
become the interface between the Scilab scientific software package and the
hArtes design flow.

The output C code is in a plain style and does not include any part of the
Scilab interpreter thus making it small, efficient and easy to interface to the
hArtes tool chain.

In other words, the generated C code is standalone and minimal in the sense that
Scilab interpreter is no longer needed and only the minimal number of C files
which are necessary to execute the application are generated. It follows that
the generated code can be embedded in processors or used as entries for other

Sci2C is implemented in Scilab language, so it naturally becomes a Scilab
toolbox available in the Scilab installation program and consequently it can be
directly used in the Scilab Development Environment. 

The implementation of Sci2C is mainly based on the introduction of data and
function annotations into Scilab code which is seen as comment by the Scilab
interpreter, but that are used by Sci2C to translate the Scilab code into an
efficient and plain C code. Moreover the use of annotations allows the user to
specify not only the size of data but also their precision, in that way it is
possible to get a further optimization of the C code produced thanks to the
possibility to use ad-hoc precision for each data to be processed.

Two major limitations can be identified in Sci2C: the first limitation of the
tool is that the annotations must be manually added by the user, although it is
the only manual intervention required by the tool; the second limitation is that
the size of data is fixed and consequently no dynamic array extension is

Other minor limitations have been introduced in order to simplify the
development of the tool without impacting on the usefulness of it for embedded
Files (2)
[4.22 MB]
Source code archive

[6.02 MB]
OS-independent binary for Scilab 5.4.x
Binary version
Automatically generated by the ATOMS compilation chain

News (0)
Comments (5)     Leave a comment 
Comment from Baudry Olivier -- September 2, 2012, 01:02:36 AM    

Il semble que le binarie ne fonctionne pas sous mac OSX voila le résultat sous Mac OS X
Lion 10.7.4 avec Scilab 5.40 béta 1 

: /Downloads/scilab2c_2.3/configure ; exit;
checking whether ln -s works... yes
checking build system type... i386-apple-darwin11.4.0
checking host system type... i386-apple-darwin11.4.0
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p...
/Users/olivierbaudry/Downloads/scilab2c_2.3/config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/olivierbaudry':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

[Opération terminée]

Comment from Giovanni Licitra -- January 22, 2014, 10:14:21 AM    
hello everyone!!!

I am trying to install Scilab 2 C, but but when I install from ATOMS, appear simply a 
window with written "Installation failed!!!". moreover if I try to install with
atomsInstall('scilab2c'), I see:

atomsExtract: The extraction of the archive 
'C:\Users\glicitr\AppData\Roaming\Scilab\scilab-5.4.1\atoms\x64\scilab2c\scilab2c_2.3-' has failed.
 !--error 10000 

at line      51 of function atomsError called by :  
at line      82 of function atomsExtract called by :  
at line     318 of function atomsInstall called by :  

Someone could tell me why I have this problem? I have windows 7 enterprise 64bit

Thanks :-)
Comment from Siddhesh Wani -- October 7, 2016, 07:55:07 AM    
Dear All,

I have taken up this toolbox for further development. I am working on this for a long time

and after much work I was able to improve it a bit with supporting more scilab functions. I

have also added part so that code for Arduino, AVR microcontroller and Raspberry Pi can be

generated for accessing their hardware peripherals.
Latest version is available on Github ( I have also written

some docs available here (
describing how to 
use it.

I would welcome any suggestions and help in developing it further. I would like to make 
request to use this and give me feedback.  
Comment from Ankit Raj -- June 16, 2017, 11:06:25 AM    
I am having an issue with the scilab2c toolbox, I am trying to add the function '%k' in the

toolbox, but after I click the CONVERT button it gives me an error "An error occurred:
Comment from Loganathan muthuswamy -- July 24, 2021, 05:46:17 PM    
scilab2c make error
scilab2c_2.3$ make
Making all in src/fortran/blas
make[1]: Entering directory '/media/loga/Toshiba931/SCILAB1/scilab2c_2.3/src/fortran/blas'
/bin/bash ../../../libtool --tag=F77   --mode=compile    -c -o zrotg.lo zrotg.f
libtool: compile: unrecognized option `-c'
make[1]: *** [Makefile:391: zrotg.lo] Error 1
make[1]: Leaving directory '/media/loga/Toshiba931/SCILAB1/scilab2c_2.3/src/fortran/blas'
make: *** [Makefile:309: all-recursive] Error 1
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.