|
home | lewin's resume | contact lewin | larwe.com |
Nidificate - Embedded Archiver UtilityNidificate is the first product in a suite of embedded GUI tools I will be releasing over the next few months. Rather than duplicate any effort by re-describing exactly what Nidificate does, I will simply quote from the reference manual included in the distribution archive: When implementing embedded operating systems, particularly operating systems that include a graphical user interface, there is frequently a need to develop external media objects, such as bitmapped image data for icons and window controls, and then incorporate these objects into the final binary image. It is convenient to work with these objects on the development platform with readily-available tools using common file formats such as Windows BMP, and convert the final result to space-efficient/time-efficient formats as a penultimate, one-way step prior to generating an executable firmware image. In some embedded systems, it may also be useful to be able to switch out the entire set of resources in one step, or allow the user to change many resource selections simultaneously using a single menu selection. An obvious example application would be to allow the user to select a “skin” for the operating system, which would include typefaces, icons, and other appearance data. Another typical example would be to allow installation, by the end-user, of an international language pack to permit a device to display content in a foreign language. Using replaceable resources in this way also permits a product to be internationalized by a third party without the need to release proprietary sourcecode or involve the third party directly in the build process. It can also shorten the development cycle on some embedded systems, by enabling the developer to upload only the code component of the OS when resources have not been updated. Nidificate is a combination of a host-side archiver and format conversion tool (Nidify), and a library for the embedded system that allows your embedded OS to access resources inside a proprietary archive file (referred to as a “nest”). The host-side archiver was developed with Microsoft Visual C++ 6.0 for Win32, but it uses only standard file I/O calls and can easily be ported to any operating system. The device-side library is designed to work on any platform for which a properly functioning C compiler is available, though it is specifically intended for use with fairly “meaty” 16/32-bit platforms (I have used it on 68000, ARM, PA-RISC and Intel x86). The existence of a filesystem is not assumed; it is intended that the nest file be mapped directly into the processor’s address space, either by a (user-supplied) function that loads it into RAM from a storage device, or by including the nest file at a known address in flash or ROM; the nest file itself becomes a read-only memory-mapped filesystem of sorts. Issues such as endianness and integer size are handled implicitly by the file format (also, it is not necessary to enable structure packing/disable word boundary alignment in your compiler, since the nest file is accessed bytewise at all times). All sourcecode is supplied for the user’s convenience. As an additional feature, the archiver tool can easily be extended to convert input files from the format you find convenient on the host platform, to formats convenient for the target platform. The current version supports the following conversion methods: • 24-bit Windows BMP to a proprietary internal 5:6:5 or 8:8:8 RGB data format suitable for easy integration with simple GUIs. • A text resource list similar to a Windows stringtable or Macintosh STR# resource. The current version of this library only supports one text resource per nest file, with a maximum of 2^32 strings. String handling is especially optimized for speed on the embedded platform. • Raw binary (include with no conversion). The archiver works using a simple input scriptfile, and creates both the nest file and a C header file that defines resource IDs for the file(s) in the nest. You may generate the nest file as a binary image, or optionally also as a C header file for direct inclusion in your program.
|