[xsd-users] Running resultant CodeSynthesis XSD executable on
an embedded ARM-9 Linux 2.26.30 system?
Boris Kolpackov
boris at codesynthesis.com
Sat Jun 4 14:16:32 EDT 2011
Hi William,
William Duffy <wduffy at videologyinc.com> writes:
> We are considering using the CodeSynthesis XSD to generate code that
> will be compiled for and run on an embedded ARM-9 SOC with the Linux
> 2.26.30 OS.
While you can use XSD if your target has a fairly complete Linux setup,
XSD/e is normally better suited for mobile/embedded systems. In
particular, the C++/Hybrid mapping in XSD/e is similar to C++/Tree in
XSD:
http://www.codesynthesis.com/products/xsde/
> I typically use Visual Studio 2008 as the IDE to write the code (and
> test some features within the Windows environment), we then
> cross-compile the code on an Ubuntu Linux system with the ARM-9 as our
> target device. The executables (and libraries) are then built (or
> copied) into the embedded system's image and executed therein.
>
> To help us get started, what are the steps required to support the
> resulting code from CodeSynthesis XSD.
> I assume these steps are required:
> Cross-compile the xerces-c++ runtime libraries to execute on the
> ARM-9 target
Yes, you will need to build Xerces-C++ for this target. Xerces-C++ uses
the standard autotools-based build system and the configure command line
will look along these lines:
./configure --host=<host-triplet> CFLAGS=-O2 CXXFLAGS=-O2 \
CC=<c-cross-compiler> CXX=<cxx-cross-compiler>
Some people run into trouble with building/using Xerces-C++ on stripped-
down embedded Linux systems because some of the dependencies are not
available or are not fully functional. The common example is the iconv
library used for character conversion. But if you have a fairly complete
Linux setup on your target, then this should work without any problems.
> Cross-compile the CodeSynthesis XSD runtime libraries to execute on
> the ARM-9 target
The XSD runtime (libxsd) is a header-only library so this step is not
necessary.
> Build the project source code using the CodeSynthesis XSD running on
> Visual Studio
Yes, you will want to compile your schemas on your Windows box since that's
where you will be doing the development. Then you can copy the generated
code to the Ubuntu box for cross-compilation to the target. You could also
compile the schemas on the Ubuntu box.
> Cross-compile the resulting code for the ARM-9 target
> copy all libraries and project executable to the target system.
Yes, this will be the last step.
> If such is possible, is there a guide available for cross-compiling and
> installing the runtime libraries for both packages?
There is no dedicated guide but the above instructions should generally
be sufficient. If you decide to go with XSD/e, then the whole process
will be much simpler since there are no external dependencies in XSD/e
(e.g., to Xerces-C++). All you will need to do is build the XSD/e
runtime library (libxsde) which is quite easy to do for both VC++
and a cross-compilation target (see the INSTALL file inside the XSD/e
distribution for details).
> Are there install packages available for embedded ARM-9 systems?
We don't provide such packages but some distributions might. For example,
Debian has a Xerces-C++ package for their armel target.
Boris
More information about the xsd-users
mailing list