For my current project i have to investigate the runtime behavior (used cycles) of different algorithms on a Cortex-M4. The algorithms are pure computation in C, no IO and interrupts. Any hints and ideas how to do it?
My current idea is to create a minimal application and use renode (https://renode.io/) for cycle counting:
- Create a file test.c with one function with fixed signature that runs my algorithm
- Compile and link it to perform a minimal application
- Load the application and the needed input data into renode
- Run the application
- Extract the output data from renode
- Use the profiling data from renode to rate the algorithms
And now the questions:
- Has anyone used renode or QEMU for similar purposes?
- How to create a true minimal application? (crt0,ld flags)
- Any other ideas for my problem?
- How to configure a minimal system in renode? Which components are a minimal subset to successful run a C program?
Regards Jan