Profiling Uncoated Embedded Systems (ARM)

I wonder how you profile software on bare metal systems (ARM Cortex a8)? I used to use a simulator with built-in test statistics, and now I want to compare the results with real equipment (running on BeagleBoard-Xm).

I understand that you can use gprof, but I kinda lost it, as it suggests that you should run Linux on the target system?

I create an executable using the Codesourcery arm-none-eabi cross-compiler, and FreeRTOS runs on the target system.

+6
source share
2 answers

Carefully evaluate what you mean by "profiling." You really work very close to bare metals, and you probably need to take on some of the work done by the gprof tool.

Do you want to call a function call? or ISR? How about switching the GPIO line when entering and exiting the code being checked. A data logger or oscilloscope can be configured to trigger these events. (In my experience, the data logger is more convenient since mine can be configured to capture the sequence of these events, which allows me to calculate the average timings.)

Do you want to count the number of executions? The Cortex A8 is equipped with many features (such as custom event counters) that may help: link . Your ARM chip may be equipped with other peripherals that may be used as well (depending on the vendor). Regardless, look at the link above - the new ARM has many interesting functions that I can not play with as much as I would like !; -)

+3
source

I managed to get profiling for ARM Cortex M. Since the GNU ARM Embedded tools (launch pad) do not come with profiling libraries enabled, I added the necessary glue and profiling features. Recommendations: See http://mcuoneclipse.com/2015/08/23/tutorial-using-gnu-profiling-gprof-with-arm-cortex-m/

Hope this helps.

+2
source

Source: https://habr.com/ru/post/904924/


All Articles