cancel
Showing results for 
Search instead for 
Did you mean: 

Code analyzer for STM32

lowpowermcu
Associate II
Posted on October 03, 2011 at 16:50

Hi STM32 users,

I am writing an application for STM32 based on c code and I want to develop some unitary tests and do some code analyzis (optimization,....). Is there someone who did it? Is there free tools that can be used easily with STM32.

Thanks a lot in advance.

MCU Lüfter
2 REPLIES 2
rmteo
Associate II
Posted on October 03, 2011 at 17:11

I don't know about free but Atollic has products for professional embedded systems software development and testing. 

http://atollic.com/index.php/product-overview

0690X00000602fLQAQ.jpg

Danish1
Lead II
Posted on October 03, 2011 at 19:14

I sometimes do code-profiling by setting up a regular interrupt which peeks at the return address and then adds one to the appropriate ''bin'' (array). This way I can see where the processor spends most of its time and thereby tell which functions might benefit by hand-optimised assembly-language.

But there are often greater savings that can be made by doing the processing in a more-efficient mannar e.g. heapsort/quicksort rather than bubble-sort, use of fixed-point-word-length variables rather than float/double/long long for calculations.

And sometimes the right approach is to make your code ''feel'' more responsive by arranging it in threads of different priority.

Hope this helps,

Danish