Is X2C freeware?
How can I get access to the advanced features?
Do I need Matlab® to run X2C?
No. The free version of X2C runs with Scilab. If you want to use X2C with Matlab®, you need to get a X2C Professional license.
Where do I get Scilab / Xcos?
You can download Scilab here.
Does X2C work with Linux?
Yes, since nightly build v639, X2C code generation works under Linux. However, some things have to be considered:
- Prior to executing X2C setup, the environment variable has to be set manually.
This can be done by adding the line
- Pre-compiled libraries for simulation in Xcos are not available.
- Some USB-to-serial converters are not recognized automatically by X2C Communicator. To work properly, the name has to be either /dev/ttySx or /dev/ttyUSBx.
The following example shows how to get the Microstick Plus demo board recognized:
ls -l /dev/ttyACM0
gives the ouput
crw-rw---- 1 root dialout 166, 0 Feb 11 08:56 /dev/ttyACM0
With this information, a new device can be created:
sudo mknod /dev/ttyUSB0 c 166 0 sudo chown root:dialout /dev/ttyUSB0 sudo chmod 660 /dev/ttyUSB0
This device will be recognized by the Communicator.
- The Communicator can only be started within Scilab/Xcos. Starting Communicator.jar as standalone application will not work.
So where do I set up my control scheme?
The control scheme is set up in Scilab’s Xcos by dragging the control blocks into the current diagram.
How do I get the code from my control scheme?
You can create the compilation ready C-code representing your control scheme by clicking the create code button in the Communicator GUI.
Does X2C work with Scilab 6.x?
No, not yet. We are working on the support of the latestet Scilab version 6.0.2. In the meantime please use Scilab 5.5.2.
How can I connect to my target?
The easiest and fastest way is to use the Communicator GUI. It provides a convenient way to set the communication parameters and connect to the target.
I can't connect to the target with the X2C Communicator, what's the problem?
To get a connection with the Communicator, an X2C application has to be running on the target. So the target has to be programmed prior to any connection attempts. Also interface and port in the “Setup”-tab have to be selected according to the setup of the target.
How can I download the compiled code to my target?
The new application has to be downloaded using the built-in programming feature of the target’s IDE. With X2C Professional and its bootloader support, a new application can be downloaded via the Communicator GUI.
Does X2C support the target XYZ?
Please check the list of supported targets. If your device is not among the listed targets but is a member of either the C28xx, ARMv6, ARMv7, dsPIC, or PIC32 series, you can use a generic processor type.
How can I simulate my model in Linux?
Unfortunately, simulation out of the box does not work in Linux yet. However, simulation is possible, if these steps are followed:
- Install gcc
- Download and install the latest X2C nightly build
- Re-create the libraries in Scilab:
- Compile the libraries in Scilab:
- Execute loadLibs() after every start of Scilab or execute initProject.sce prior opening an X2C Xcos model
Is a Java Runtime Environment (JRE) required to run X2C?
A JRE only is required if X2C is intended to be used in Standalone mode, e.g. using the Communicator outside Scilab or Matlab or using the Block Generator.
Above use case requires a JRE installation and – dependend of the underlying operating system and used JRE type – additional steps during the JRE setup.
If X2C is used in Scilab or Matlab environment only, no dedicated JRE is required.
X2C has been tested to work with
- Oracle Java SE 1.8
- ojdkbuild 13
The latter uses OpenJDK sources and is free for use.
If ojdkbuild is to be used on a Microsoft Windows platform, additional steps may be necessary during installation. For more information please have a look at the X2C documentation.