[scilab-Users] XCos Blocks
Clément DAVID
clement.david at scilab.org
Thu Apr 29 13:55:23 CEST 2010
Hello,
On Xcos, we lazy-load the scicos library on the simulation part. Thus
the `loadScicosLibs` macros doesn't load libsciscicos.so.
For your purpose simply load it with a raw scicos call. For example
use :
--> scicos_debug();
before linking your library.
For the record, I posted a bug
[http://bugzilla.scilab.org/show_bug.cgi?id=7005] for discussion about
loading this library on the `loadScicosLibs` macros.
Regards,
--
Clément DAVID
> Hello
>
> The Compilation of the C-Files is no problem,
>
> but if I want to load the generated lib, scilab cannot solve Xcos depended
> symbols like
> get_block_number
>
> The Headerfile scilab-5.2.2/include/scilab/scicos_block4.h defines this
> function.
>
> Error Message:
>
> Loading macros
> in /home/ab/etherlab-scicos/ethercos_io_scicoslab-clone/macros/utils/
> link(ethercos_io_runtime_path+'libethercos_io_runtime'+getdynlibext(),
> ['etl_scicos'],'c');
> !--error
> 236
> link: das gemeinsame Archiv wurde nicht
> geladen: /home/ab/etherlab-scicos/ethercos_io_scicoslab-clone/src/runtime/libethercos_io_runtime.so:
> undefined symbol: get_block_number
> at line 9 of exec file called by :
> exec('loader.sce');
> at line 25 of exec file called by :
> exec loader.sce
>
>
> I have tried to load the Xcos libs via
> loadScicosLibs
> before, with no success.
>
> ldd libethercos_io_runtime.so gives me following output
>
> ab at shuttle4:~/etherlab-scicos/ethercos_io_scicoslab-clone/src/runtime$ ldd
> libethercos_io_runtime.so
> linux-gate.so.1 => (0xb7f2b000)
> librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7ef2000)
> libethercat.so.1 => /opt/etherlab/lib/libethercat.so.1 (0xb7eeb000)
> libethercos_io.so.0 => /tmp/SD_17628_/.libs/libethercos_io.so.0 (0xb7ee9000)
> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7dfb000)
> libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7dd5000)
> libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7c7a000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7c6d000)
> libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7c53000)
> /lib/ld-linux.so.2 (0xb7f2c000)
>
>
> following Symbols are requested
>
> objdump -T libethercos_io_runtime.so
>
> libethercos_io_runtime.so: file format elf32-i386
>
> DYNAMIC SYMBOL TABLE:
> 00000000 D *UND* 00000000 get_block_number
> ........
>
>
>
> Greatings
>
> Andreas
>
>
> Am Tuesday 27 April 2010 11:32:22 schrieb Clément DAVID:
> > Hello,
> >
> > First the Xcos API has been described in the wiki :
> > [http://wiki.scilab.org/Xcos/PrivateAPI] and
> > [http://wiki.scilab.org/Xcos/PublicAPI].
> >
> > On the 5.2.x branch, you can reuse your current scicos implementation as
> > the core is the same. As in Scicoslab, you just need to load your block
> > interface function into the interpreter (myblock.c), provide macros
> > block descriptor (MYBLOCK_f.sci) and a reference instance in a palette
> > (MYPALETTE.cosf).
> >
> > Then just open your palette on xcos as a normal diagram or use
> > palettes/Open as palette button.
> >
> > For the 5.3.x branch (current master), we will probably provide an API
> > to add/remove/customize h5 blocks from Scilab. Thus user will be able to
> > implement Xcos palettes as Scilab toolboxes.
> >
> > Regards,
> >
> > Clément
> >
> > > Hello,
> > >
> > > Is there any documentation about XCos Block building and compiling?
> > > I have working blocks under Scilab 4.x and Scicoslab, but I do not know
> > > under Xcos:
> > > - how to compile and link the c-source against the xcos-libs?
> > > - how to build up the hdf5 files?
> > >
> > >
> > > Greatings
> > >
> > >
> > > Andreas
>
>
More information about the users
mailing list