I wants to add a zlib library for compression and decompression a stream of data.I was cross compiled the zlib and generate the libz.so and libz.a file.
I wants to add a zlib library for compression and decompression a stream of data.I was cross compiled the zlib and generate the libz.so and libz.a file.
Hi,
Zephyr does not support dynamically linked (shared) libraries, so the fact that your build output contains ../externlib/lib/libz.so
means that something is wrong. You should not include .so
files in your project, as those are dynamically linked libraries. Rather you should use .a
files, which are statically linked.
Please note that any existing library may need modification in order to work with Zephyr. If you take, for instance, a library made for an operating system such as GNU/Linux or Windows, it may use features and system calls that are simply not available in Zephyr. For instance you may need changes for working with heap memory. For finding resources and getting help with porting libraries to Zephyr I recommend having a look at the official Zephyr resources.
Please also note that there are several things to consider when choosing a compression library, including size of the library itself, compression and decompression speed, compression rate, and possibility to configure the library according to your needs. Specifically the ported LZ4 library used in Zephyr is suited for microcontrollers, is fast, and can do dictionary compression (for better compression performance.) See the LZ4 fork for Zephyr at https://github.com/zephyrproject-rtos/lz4 for more details.
Regards,
Terje
Hi,
Zephyr does not support dynamically linked (shared) libraries, so the fact that your build output contains ../externlib/lib/libz.so
means that something is wrong. You should not include .so
files in your project, as those are dynamically linked libraries. Rather you should use .a
files, which are statically linked.
Please note that any existing library may need modification in order to work with Zephyr. If you take, for instance, a library made for an operating system such as GNU/Linux or Windows, it may use features and system calls that are simply not available in Zephyr. For instance you may need changes for working with heap memory. For finding resources and getting help with porting libraries to Zephyr I recommend having a look at the official Zephyr resources.
Please also note that there are several things to consider when choosing a compression library, including size of the library itself, compression and decompression speed, compression rate, and possibility to configure the library according to your needs. Specifically the ported LZ4 library used in Zephyr is suited for microcontrollers, is fast, and can do dictionary compression (for better compression performance.) See the LZ4 fork for Zephyr at https://github.com/zephyrproject-rtos/lz4 for more details.
Regards,
Terje