With a support entitlement you can also get direct access to our team of highly-qualified Arm experts 24-hours a day
Open a support case
I am using the Cycle-accurate ARMv6-M simulator provided here: https://github.com/impedimentToProgress/thumbulator to run benchmark programs provided on the following link: https://github.com/impedimentToProgress/MiBench2
I want to verify the output of the benchmark programs after running them on the simulator. I am not being able to do so as the simulator only outputs the clock ticks, no. of instruction and some memory access log. I am not sure how to verify the output of the benchmark in this scenario. I have tried to map the memory access log with the corresponding assembly listing of the benchmark program but I could not get the complete picture through that. I am a newbie in this area so apologies if the question sounds trivial.
It sounds like you are looking for some output from the printf() statements and not seeing any.
I took at a look at the MiBench2 code. I could compile it using gcc and I added -g to the Makefile for the qsort program (as a simple place to start). The main.elf was generated. I used the Arm Fast Models https://developer.arm.com/products/system-design/fast-models to create a simple Cortex-M0+ system with CPU and memory. I didn't look into any details of the thumbulator.
I can load the .elf file into the Fast Model simulation and from the README file I learned there is a function which handles the low-level I/O.
[putget.s](putget.s) contains low level functions written in assembly. Edit the `putchar` function in this file to change the behavior of all C-level printing operations.
The main() function immediately does a printf() and I can put a breakpoint on putchar and see it gets hit 1507 instructions in the simulation.
I believe the functionality is up to you to change the putchar to do something meaningful to output to the screen or a file. With no changes you are not going to see anything. The code appears to be setup for the Arm ITM (instrumentation trace macrocell) because it writes the character to address 0xe0000000 which is the ITM address.
If you use a core with ITM support, such as the Cortex-M4, and enable the ITM plugin for Arm Fast Models and follow this article you can get the printf() output. https://community.arm.com/tools/b/blog/posts/trace-cortex-m-software-with-the-instruction-trace-macrocell-itm
Other options would be to add a UART model to the hardware system and write characters to the UART or to use Semihosting, which can be done by changing the gcc options to generate semihosted printf() calls.
If you are interested to use Arm Fast Models or Arm Cycle Models let me know and I can help get the benchmarks running on either (or both) model types.