[xsde-users] Using XSD/e with NET+OS RTOS

Boris Kolpackov boris at codesynthesis.com
Wed Sep 7 09:32:08 EDT 2011


Hi,

I received the following question off-list (the author prefers to
remain anonymous):

> I'm trying to implement the XSD/e on a Digi ConnectMe 9210 device running
> their NET+OS v7.4 RTOS (POSIX, 32-bit, big-endian, C++/STL capable).  It
> uses a GNU toolchain in a managed make environment.  Unfortunately, I've
> spent the past two days failing to cross-compile the XSD/e runtime library
> for the NET+OS.  I believe I'm the problem because I'm not accustomed to
> using the make tools.  I've been able to compile/run your tools in Windows
> and verify their utility, but I can't seem to get my build environment
> configured to install Build 0.3.9 and the XSD/e runtime yet.  The makefiles
> keep failing for me.

I see you mentioned cross-compilation so I assume you are not trying
to develop on the RTOS target natively. In the cross-compilation
environment, the steps to setup XSD/e are as follows:

1. Download the XSD/e binary for your development platform (i.e.,
   the platform on which you are running the cross-compiler, such
   as Windows, Linux, etc). The binary will include the pre-built
   XSD/e compiler plus source code for the runtime (libxsde) and
   examples.

2. Unpack the binary and open config/config.make. Adjust it to
   match your RTOS target. At a minimum, you would want to change
   the CC, CXX, AR, and RANLIB variables to use your cross-toolchain.

3. Now go to libxsde and run GNU make (normally just 'make' or 'gmake')
   that came with your toolchain. This should build the XSD/e runtime.

4. To compile the schemas run the XSD/e compiler on the development
   platform and then add the generated files to your application. You
   will also need to link to libxsde.a that was built on step 3.

I also see you mentioned trying to install Build 0.3.9. This would
only be necessary if you were trying to build the XSD/e compiler 
itself. Unless you are using some exotic development platform (or
trying to build the XSD/e compiler to run on the target), this
should not be necessary. Instead, you should use the pre-built
binary, just as you did on Windows.

You also mentioned "managed make environment". Does this mean that
you have to use Makefiles (or Makefile templates) supplied by the
toolchain to compile your code? Some targets do this which makes
using the build environment that comes with XSD/e very difficult
(e.g., the actual compilers and their flags are "hidden" by such
Makefiles). In this case, a better approach could be to use the
XSD/e build environment to create the configuration and generate 
a list of C and C++ files that need to be compiled. Then, you can
use this list together with the target-supplied Makefiles to
build the XSD/e runtime. XSD/e supports a few targets, notably
Android and XCode-based iOS, using this method. For more information,
see the etc/android directory and etc/ios/config-xcode.make file.

Boris



More information about the xsde-users mailing list