emCompress-Embed is a compression system that is able to reduce the storage requirements of that a that must be embedded into an application. It can reduce the overall size of a firmware image to make it possible to fit into a otherwise too small internal flash of a microcontroller.
Compress data on the host in advance, decompress in the target on demand. A small, fast decompressor for the compressed data is included in the application to decompress the data on-the-fly, whenever it is needed.
The emCompress-Embed decompressor can decompress into RAM or send the output to an application defined function for immediate processing. It can be used with little RAM on the target side for decompression; the amount of RAM available to the decompressor is taken into account during compression and an appropriate compression algorithm is automatically selected.
With increasing complexity of today's embedded devices, customers expect firmware updates over the life of an embedded device. It's important to be able to replace both, firmware images and FPGA configuration bitstreams in the field. Typically, firmware upgrades and other static content are only growing in size over the lifetime of a device: features are added to the software and not taken away. Using quickly-written ad-hoc utilities to convert content directly to compilable code (possibly with some form of simple compression) is usual, but it's towards the end of a project when you realize that the static content just won't fit into your device with the baggage of new firmware features.
- Configuration bitstreams to program FPGA and CPLD embedded devices.
- Permanent files for the embedded web servers static content.
- Upgrading firmware, using a compressed image for an embedded target.
- Storing user interface messages for multiple languages.
In contrast to many compression utilities, emCompress does not seek to provide the ultimate in compression ratios and decompression speeds. Rather, emCompress focuses on the memory available to run decompression on the embedded target and choose the best compressor that will work to meet those constraints. It's easy to use, it's simple to integrate and as with many other SEGGER software products, SEGGER has the confidence to build it into our own hardware products which are in daily use by hundreds of thousands of satisfied users worldwide. Making it a professional and unique embedded compression tool for multiple use cases.
The smart embedded compression tool emCompress is able to significantly reduce the amount of storage required for data in embedded systems, by compressing it during compile time. This can save flash, cost, data transmission times, or even make it possible to fit the application into the available space on the embedded device.
This is where emCompress can help. emCompress will compress your data on a workstation so that it takes much less space on the target device. The decompressors are tiny in ROM, but the benefits of compression mean you reclaim more space in your device for the features you're trying to add. Because emCompress decompressors can be tailored for RAM use, you can decompress static content early in your application and not devote RAM to decompression buffers. For instance, configuring an FPGA is one of the first things that an application will do, decompressing a bitstream and sending it to the FPGA. In this case, a small decompression buffer can be held on the stack, even though the compressed bitstream is hundreds of kilobytes in size: the temporary buffer is a known size that is configured at compression time and therefore RAM is free to be reused the moment any decompression is completed. Of course, emCompress is not limited to these applications, it is very effective at reducing any type of stored content.
In group mode, the uncompressed source files are concatenated and compressed as a whole, increasing the opportunities for the compressor to find ways to compress the combined data. This proves especially effective when compressing small, static HTML files for embedded web servers. Decompression for group-mode compression is identical in operation to single-file compression, giving you the flexibility to choose how to compress and decompress your data.
The compression ratio and decompression speed of emCompress are dependent on various factors and may vary in each case.
The main speed factors are:
- The data to be compressed
- The data size and redundancy
- The compression codec
- The decompression workspace size
The amount of ROM that the embedded compression solution emCompress is using for decompression, varies with the codec selected. The table below measures the total ROM required for a single decoder, including all supporting functions and excluding integrity checks on the target device.
Some of the codecs share common code. Hence, if your compressed bitstreams only use DEFLATE, the amount of ROM required is easily read off from the table. If you are using more than one codec in your application, the amount of ROM is less than the sum of the used codecs.
Adding a table-driven CRC32 integrity check adds about 1.1 KB of code to the total emCompress ROM requirement. The following table lists the ROM requirements per codec.
The amount of RAM that emCompress uses is under complete control as it is specified at compression time. Typically, 2KB of temporary RAM for decompression already yield good compression ratios, but even without temporary RAM, good compression ratios can be achieved in many cases. No static RAM is required, stack usage is well below 512 bytes.
|Uncompressed Data (112 kByte ? 100%)|
|Data size||30.5 kByte|
|Decompression RAM||2 kB||48 kB|
|Decompression speed*||3 MByte/sec||2 MByte/sec|
* Running on Cortex-M4 @ 200 MHz