David Barahona Pereira
New Member
Hello.
I have the task of evaluate functions of C implemented libraries that will run on embedded systems. Those libraries are implemented in .h files and then included in implementations.
I was given a FFT library implemented in C that was meant to run on Arduino. In the readme file of the library there are two charts measuring execution time, RAM and FLASH usage of each of the functions that compose the library. I need to find a way to make those measurements and see if they match with what is given in that file.
I managed to evaluate execution time using Arduino and running micros() before and after the function and then measuring the time difference and I got good results. But I still haven't found a way of measuring memory usage. I need to find a way of measuring FLASH (memory that takes the code itself) for each function and SRAM (global and local variables) also for each function. I need to find a compiler that provides a memory map, or a code to make the measurement or something similar. I know that measuring dynamic data can be tricky so by far I have just tried to use the MemoryFree library for Arduino and the information that the compiler provides but got no useful results since I need it for every function and not for the hole code and also because the mentioned library gave no useful results. I have also googled a lot but found nothing.
I really appreciate if someone know how to do that or know where can I find useful information about it.
Thanks in advance.
PS: Attached you can find the FFT library (including the readme file with the charts).
I have the task of evaluate functions of C implemented libraries that will run on embedded systems. Those libraries are implemented in .h files and then included in implementations.
I was given a FFT library implemented in C that was meant to run on Arduino. In the readme file of the library there are two charts measuring execution time, RAM and FLASH usage of each of the functions that compose the library. I need to find a way to make those measurements and see if they match with what is given in that file.
I managed to evaluate execution time using Arduino and running micros() before and after the function and then measuring the time difference and I got good results. But I still haven't found a way of measuring memory usage. I need to find a way of measuring FLASH (memory that takes the code itself) for each function and SRAM (global and local variables) also for each function. I need to find a compiler that provides a memory map, or a code to make the measurement or something similar. I know that measuring dynamic data can be tricky so by far I have just tried to use the MemoryFree library for Arduino and the information that the compiler provides but got no useful results since I need it for every function and not for the hole code and also because the mentioned library gave no useful results. I have also googled a lot but found nothing.
I really appreciate if someone know how to do that or know where can I find useful information about it.
Thanks in advance.
PS: Attached you can find the FFT library (including the readme file with the charts).