Closed EdXian closed 3 years ago
@EdXian Indeed, as you have seen, the current cmake is not building a final CMSIS-DSP library but only the intermediate libraries : one per sub folder.
The CMSIS-DSP library is a virtual library but in cmake can be used as a normal library and it will link the sub-libraries.
Of course, if the goal is to build a new CMSIS-DSP static library then you need to add another step as you have done.
What was the size of the officially released version ?
I am getting a similar size when building the library through cmake and linking all of the intermediate libraries (like libCMSISDSPBasicMath.a) into a final library.
In cmake you can also do:
add_library(arm_cortexM4lf_math STATIC)
target_link_libraries(arm_cortexM4lf_math PRIVATE CMSISDSP)
and remove the $
and it should work and link all the sub libraries into your final libarm_cortexM4lf_math.a
Hi @christophe0606 , The officially released version (v5.7.0) is downloaded from this page. The size of libarm_cortexM4lf_math.a is about 6MB.
@EdXian Have you tried fromelf or size commands to dump the sections ? It may give an idea of the origin of the difference. Perhaps debug symbols ?
Hi @christophe0606 , You are right! I trired to give the following command to build the static library.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g ")
Finally, I got a new static library which size is about 6 MB. BTW, I just tested some dsp function with these two libraries and both of them could compute the same result.
@EdXian Great you was able to solve your issue.
Hi all, For some reason, I have to integrate all DSP library into a static library something like libarm_cortexM4lf_math.a . The following snippets shows how I build the library:
CMake commands:
After building the library, I found the code size of the static library is 1.8MB which is much smaller than the official-released version. Any Idea?