From boris at codesynthesis.com Wed Sep 7 09:32:08 2011 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Sep 7 09:34:38 2011 Subject: [xsde-users] Using XSD/e with NET+OS RTOS Message-ID: 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 From gleonid at yahoo.com Tue Sep 13 17:14:37 2011 From: gleonid at yahoo.com (Leonid Gershanovich) Date: Wed Sep 14 07:32:03 2011 Subject: [xsde-users] --generate-aggregate fails with lists Message-ID: <1315948477.80919.YahooMailNeo@web112415.mail.gq1.yahoo.com> Hi Boris, I am trying to use xsd/e with --generate-aggregate option for cxx-hybrid mode. Please find attached very simple schema that I am using. It essentially has a string list with restriction. I am running on RHEL5 and using "CodeSynthesis XSD/e XML Schema to C++ compiler for embedded systems 3.2.0". When I invoke xsde compiler with following arguments: > xsde cxx-hybrid --generate-parser --generate-aggregate temp.xsd I am getting generated source code with following line in temp-pimpl.cxx : this->list_p_.parsers (this->); which naturally fails to compile. Have you come across such issue? Is there a workaround? Thanks in advance. ? Leonid Gershanovich -------------- next part -------------- A non-text attachment was scrubbed... Name: temp.xsd Type: application/octet-stream Size: 635 bytes Desc: not available Url : http://codesynthesis.com/pipermail/xsde-users/attachments/20110913/a941e0f4/temp.obj From boris at codesynthesis.com Wed Sep 14 08:38:57 2011 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Sep 14 08:41:26 2011 Subject: [xsde-users] --generate-aggregate fails with lists In-Reply-To: <1315948477.80919.YahooMailNeo@web112415.mail.gq1.yahoo.com> References: <1315948477.80919.YahooMailNeo@web112415.mail.gq1.yahoo.com> Message-ID: Hi Leonid, Leonid Gershanovich writes: > I am getting generated source code with following line in temp-pimpl.cxx : > > this->list_p_.parsers (this->); Fixed: http://scm.codesynthesis.com/?p=xsde/xsde.git;a=commit;h=a32d89c25b80f443d93a050a979e465f4d1dc39e Thanks for reporting this and for providing the test case. If you would like, I can build you a pre-release binary with the fix. Just let me know which platform you are using. Boris From gleonid at yahoo.com Wed Sep 14 10:41:20 2011 From: gleonid at yahoo.com (Leonid Gershanovich) Date: Thu Sep 15 10:02:01 2011 Subject: [xsde-users] --generate-aggregate fails with lists In-Reply-To: References: <1315948477.80919.YahooMailNeo@web112415.mail.gq1.yahoo.com> Message-ID: <1316011280.46292.YahooMailNeo@web112407.mail.gq1.yahoo.com> ?Thanks, Boris. I'd appreciate if you can build binary for me. I am running on RHEL5 64 bit. [gleonid@host.domain.com ~]$ cat /etc/redhat-release; uname -a Red Hat Enterprise Linux Server release 5.5 (Tikanga) Linux host.domain.com 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux Leonid Gershanovich ________________________________ From: Boris Kolpackov To: Leonid Gershanovich Cc: "xsde-users@codesynthesis.com" Sent: Wednesday, September 14, 2011 8:38 AM Subject: Re: [xsde-users] --generate-aggregate fails with lists Hi Leonid, Leonid Gershanovich writes: > I am getting generated source code with following line in temp-pimpl.cxx : > > this->list_p_.parsers (this->); Fixed: http://scm.codesynthesis.com/?p=xsde/xsde.git;a=commit;h=a32d89c25b80f443d93a050a979e465f4d1dc39e Thanks for reporting this and for providing the test case. If you would like, I can build you a pre-release binary with the fix. Just let me know which platform you are using. Boris From boris at codesynthesis.com Thu Sep 15 10:38:11 2011 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Sep 15 10:40:42 2011 Subject: [xsde-users] --generate-aggregate fails with lists In-Reply-To: <1316011280.46292.YahooMailNeo@web112407.mail.gq1.yahoo.com> References: <1315948477.80919.YahooMailNeo@web112415.mail.gq1.yahoo.com> <1316011280.46292.YahooMailNeo@web112407.mail.gq1.yahoo.com> Message-ID: Hi Leonid, Leonid Gershanovich writes: > I'd appreciate if you can build binary for me. Here you go: http://www.codesynthesis.com/~boris/tmp/xsde/xsde-3.3.0.a1-x86_64-linux-gnu.tar.bz2 Boris