Hi I am using cortex mps2 demo that can be executed on QEMU. I want to know is there any way to I set or measure the frequency of execution?
Would you please elaborate what you mean by “frequency of execution”?
I have seen in the freertosconfig.h file the are two fields configCPU_clock_hz but when using qemu for execution of the os by changing this the frequency dose not change I mean the speed of task execution.
I mean is there any way to set or change this frequency when using qemu too?
This is the CPU clock frequency which, depending on the port, FreeRTOS uses for programming the timer interrupt. Changing this macro does not change the CPU clock frequency. If you are asking how to change CPU clock frequency while using Qemu, that is a question for Qemu.
Thanks for your answer l. Do you know any way to I measure the number of executed instructions in a task?
Qemu does have a feature for instruction counting called TCG. You can learn more here.
Another option would be compile your code and use objdump and count the code under the function label. Something approximately like objdump -d yourfile.o | grep -A 100 "<your-function>:" | grep -v "<" | wc -l