Hi im new to embedded system, I am using IAR compiler to work with ST MCUS(stm32f103c8t6) And I want to use CMSIS DSP library which is a large library. and I just have a mcu with 20KB RAM & 64KB FLASH. The problem I faced is that when I use functions related to Fourier calculation, it gives an out-of-memory error while I used a small length for Fourier, but the compiler added the whole library to my project, There are notes that IAR stated that modules and variables that are not needed are not used. (but it doesn't work for me ) And after a lot of searching and asking,https://github.com/ARM-software/CMSIS-DSP/issues/91 found out that it is possible to define a series of rules to use only the necessary parts that must be defined before the DSP library is compiled. (Definitions for different modes are already included in the library).
In the IAR, CMSIS libraries are added with just one tick. Now my question is, is it possible to add settings for this library? And if possible, to which part should these commands be added, because iar has several options
project -->option-->compiler-->preprocess
project -->option-->compiler-->extra option -->command line
project -->option-->assembler-->preprocess
project -->option-->assembler-->extra option -->command line
project -->option-->linker-->define....
project -->option-->linker-->extra option -->command line
I defined a series of definitions at the top of the program, but it didn't work. Here are the defines:
Now I understand that the selection and use of modules are done by the linker, so I think if preprocessing is needed, it must be defined in the linker. But despite the test, I did not get an answer and defined the desired definitions in different sections of the linker header. This is what comes to my mind now
1- From the beginning, I should add the cmsis-dsp library to the project and not use the default IAR compiler library. a little tricky
2- If you have experience in this field to be able to set the default library, I would appreciate your guidance