This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi, I must say I am overwhelmed with the response I got from this request!! Thanks to everyone who responded. I have not included names in the descriptions unless that person included code not generally available or had used a solution on a project. As Robert Brown guessed, this will be for an RTEMS application. It is intended as the mechanism for maintenance personally to update the software in the field. So schemes appropriate for development environments are not ideal here, although this scheme would be an improvment over downloading Srecords. :) My first cut at a design is something like this and I expect someone on this list has done something very similar in the past: + A download task running the serial protocol receives the executable image. As it receives data, it passes that compressed data via a message queue to a decompression task. + The decompression task decompresses the image into RAM. + Once download and decompressed is complete, the Flash image will be updated. We have PLENTY of RAM so having an a download program and the application in RAM at the same time is no problem. I think the scheme above allows for different protocols and decompression algorithms to be incorporated pretty easily. Plus it allows decompression and download to occur in parallel. Based upon everyone's input, I think the best solution is a combination of zmodem and zlib. One thing left to decide is the format of the executable to be downloaded. For simplicity, I am leaning toward simple binary produced by GNU objcopy with a starting address and length prepended to the image. This appears to compress quite nicely (3:1 for my test case). I will try to summarize what everyone pointed me to and add a few comments of my own. Obviously, unless otherwise specified the opinions are my own. This might be a good start for a section of a FAQ somewhere. Acknowledgements: David W. Glessner <dglessne@glenqcy.glenayre.com> Robert J. Brown <rj@eli.elilabs.com> Ralph Muha <ralph_muha@ycrdi.com> Igor Zafievsky <gosha@rosinter.ru> Stu Bershtein <sbershte@videonics.com> Chris Johns <cjohns@plessey.com.au> Alex Lemaresquier <alex@brainstorm.fr> Stephen Williams <steve@icarus.icarus.com> --joel Compression Libraries ===================== There were a number of options mentioned but zlib is my first choice. The license does not impose any burdens on a system using this library. zlo appears to be a good technical option but is GPL'ed. Package: zlib Location: http://www.cdrom.com/pub/infozip/zlib License: "BSD style", no liability, acknowledge authors Comments: This is my first choice and provided 3;1 compression on the executable I am downloading. The license is very nice for use in embedded systems. Package: lzop Location: http://www.infosys.tuwien.ac.at/Staff/lux/marco/lzo.html License: GPL Comments: Technically this looks very nice. It was designed for real-time compression and decompression. But the license is the "plain GPL" which presents problems for inclusion in an embedded application. If the license were less encumbered, then I would be hard pressed to choose between zlib and lzop. Package: lzss.c Location: ? License: "Use, distribute, and modify this program freely." This program is very small and can decode programs compressed by Microsoft compress.exe. If compatibility with Microsoft compress.exe was a factor, this looks like a great choice. The main file is only 318 lines and in a quick perusal, I do not see any particularly large stack or data requirements. This was sent to me by Stu Bershtein <sbershte@videonics.com> but it is probably on the Net somewhere. Communications Protocols ======================== Multiple people mentioned zmodem. I found multiple zmodem implementations in http://www.cdrom.com/pub/unix-c/comm/. Package: zm Location: http://www.cdrom.com/pub/unix-c/comm/ License: none apparent, but copyrighted so not public domain This is a very simple and compact implementation of zmodem. I have not tested it yet but it looks like a good candidate for an embedded system if it works with the zmodem in standard communications packages. I have emailed the author to see if there is a new version. Package: kermit Location: ? License: ? I dismissed kermit because I remembered that it could not be included in Linux distributions because of the licensing. That leads me to believe that its license is too restrictive for my purposes. --joel Joel Sherrill Director of Research & Development joel@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (205) 722-9985