Home Help Center

Ice on an embedded platform (status report)

rbxrbx Member
Hi there! We have been working on porting Ice to an embedded platform based on a Motorla Embedded PowerPC processor (MPC823) with 50 MHz, 8 MB Flash-ROM, 16 MB SDRAM, and some I/O like serial, USB, PS/2 and CAN. The OS is DENX Embedded Linux (based on Yellow Dog Linux). DENX also provides the ELDK (Embedded Linux Development Kit) that is used to cross-compile software, and in our case, Ice.
After modifying the Makefiles and Make.rules, most of Ice was successfully compiled. Some libraries had to be cross-compiled too (bzip2, expat, Berkeley DB). Kerberos would have taken some more time, so Ice compilation was stopped at that point (so the Ice libs now lack Glacier, IcePatch and Transform).
The embedded systems currently boot by mounting their root file system over NFS. This gives us more resources to work with, but is not entirely what one would call 'embedded'.
The first test succeeded just now: It is the simple printer example from the Ice documentation, with direct binding. We have one development board running the server process, and another one running the client. The server says "Hello world".
The next test was about connecting a 'big' client to a server that is running on an embedded system. The client runs on a standard SuSE Linux 8.2 (AMD Athlon system). This failed with the following message (client side):

Connection.cpp:166: Ice::IllegalMessageSizeException:
protocol error: illegal message size

To put it in a nutshell, it is essentially possible to cross-compile and run Ice on a platform with very limited resources. The next steps will include trying to run such a target system without the networked 'back-end' file system (getting to run a really minimal Ice or even link the applications statically if that is possible).
We would appreciate any suggestions, comments and questions.



  • rbxrbx Member
    update: running Ice on an embedded system

    Okay, it is done. The Ice communication works between two embedded systems as described above, running stand-alone! A few additional libraries had to be installed so that now there are only 380 kB left from the 4 MB free Flash ROM.
    Unfortunately, the communication between a 'normal' x86 box and an MPC system still does not work, no matter which one takes the role of the server or client. It is most likely a flaw introduced by the cross-compilation process, or, more precisely, by the changes made to the Makefiles and source code.

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Thanks for the progress report! It's good to know that Ice apparently supports embedded environments without too much trouble.

    Regarding the communication problem, is it possible that the cross-compilation process has gotten the Ice libraries confused about the endianness of the host? The IceUtil/Config.h header file defines ICE_LITTLE_ENDIAN or ICE_BIG_ENDIAN as appropriate for the platform, and these macros govern the marshaling behavior. It's quite possible that an improper configuration could cause the exception you listed in your first post.

    In any event, please keep us updated on this project.

    Take care,
    - Mark
  • rbxrbx Member
    Hi again,

    that's right, the only point where the source code needed to be changed was the detection of the endianness, because the cross-compiler defines none of the symbols that are used there. So the lines in question were commented out:

    //#if defined(__i386) || defined(_M_IX86) || defined (__x86_64)
    # define ICE_LITTLE_ENDIAN
    //elif defined(__sparc) || defined(__sparc__)
    //# define ICE_BIG_ENDIAN
    //# error "Unknown architecture"

    ... but maybe it was simply the wrong one because we're talking about a Motorola processor here? :mad:

    ...ours later, still working while writing this...

    Okay, I just recompiled Ice with big endian, and what can I say: it works. YES!
    Phew, now I wish you all a very nice weekend. I'm sure I'll enjoy mine.

    Ingmar (condition: happy)
Sign In or Register to comment.