OVP Forums - A community of assistance, help, questions, and answers.
  FAQFAQ    SearchSearch      RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in
ARM Cortex-A9 Stop Simulation on specific instruction

 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question
View previous topic :: View next topic  
Author Message
AlKappa



Joined: 05 May 2017
Posts: 16

PostPosted: Tue Dec 04, 2018 1:47 pm    Post subject: ARM Cortex-A9 Stop Simulation on specific instruction Reply with quote

Hello,

i am using the ARM Cortex-A9 with bare-metal programs and i want to stop the simulation at a specific instruction. Is it possible and where should i start?

regards.
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Wed Dec 05, 2018 12:06 am    Post subject: Reply with quote

You can use all the normal debug commands with an attached GDB debugger. Start the simulation and add the argument -gdbconsole (command line) or -gdbegui (GUI).

When in the debug environment you can add a breakpoint on the address of the instruction or a defined symbol.

Hope this helps. If you have am more specific question please provide the details or what you want to do and what virtual platform and processor you are suing.
Back to top
View user's profile Send private message Visit poster's website
AlKappa



Joined: 05 May 2017
Posts: 16

PostPosted: Wed Dec 05, 2018 2:05 am    Post subject: Reply with quote

i want to automate the tracefile creation with a simpleCpuMemoryUart setup.
The setup includes the ARM Cortex-A9 and an altered PL011 Uart.

My aim is to automatically run harnesses with different programs and --trace as fast as possible. There is a huge overhead when writing traces, that i want to keep minimal.

The bare-metal programs' traces are important only up to a certain instruction and i don't want to run the rest of the program, as it can take a long time.

Is there any possibility to stop the simulation when it encounters a specific instruction?

gdb means interaction and also extra runtime, both of which i cannot spare.
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Wed Dec 05, 2018 2:43 am    Post subject: Reply with quote

What you are wanting is provided by the Imperas professional tools. The simulator contained provides support for the full APIs (OVP simulator provides a subset for modeling and virtual platform simulation)

As a university the tools can be obtained as part of the Imperas University Program, contact me at univ@imperas.com. On checking the tools are already available in the Dept of Computer Science at FAU
Back to top
View user's profile Send private message Visit poster's website
AlKappa



Joined: 05 May 2017
Posts: 16

PostPosted: Fri Dec 07, 2018 4:25 am    Post subject: Reply with quote

Thanks for the help so far.

Now i am trying to get /home/po75biqu/Imperas.20170511/Examples/BinaryInterception/Basic/7.tracing running. But i have problems getting the whole icm setup running with my igen/op module. Also there is no binary interception example with op API in version 20170511.

Running my module with imperas.exe instead of iss.exe was no problem, so my first step was copying my module into the 7.tracing example and changing the Makefile.

In the Makefile, instead of using:

Code:
run2:  all
       $(SIMULATOR) \
      --icmobject platform/model.$(IMPERAS_SHRSUF) \
      --extlib platform/CPU1=model.$(IMPERAS_SHRSUF) \
      --callcommand 'platform/CPU1/_intercept_0/trc -on -verbose' \
      -o simulator2.log \
      --excludem CM_FA --icmargv --program application/application.OR1K.elf
       @ mv CPU1.itrc run2.CPU1.itrc
       @ echo "Examine run2.CPU1.itrc to see trace output"


i changed it to:

Code:
run2:  all
       $(SIMULATOR) \
       --opobject module/model.$IMPERAS_SHRSUF \
       --extlib module/model.$IMPERAS_SHRSUF \
       --callcommand 'module/aarch32/_intercept_0/trc -on -verbose' \
       -o simulator2.log \
       --excludem CM_FA --argv --program application/myprogram.elf
       @ mv CPU1.itrc run2.CPU1.itrc
       @ echo "Examine run2.CPU1.itrc to see trace output"


and i get the errors:

Code:
Error (LDM_ISYM) Failed to find stubs object 'vmiStubs' in file /home/myhome/BinaryInterception/7.tracing/module/model.so
Error (LDM_ISYM) Failed to find stubs object 'vmiStubs' in file /home/myhome/BinaryInterception/7.tracing/module/model.so
Error (LDM_ISYM) Failed to find stubs object 'vmiStubs' in file /home/myhome/BinaryInterception/7.tracing/module/model.so
Error (OP_FIP) Failed to build platform 'top'


My question is: what do i have to change in order to get the binary interception example running with my igen created op API model?

and the following question will be: where do I implement stopping the simulation when encountering one specific instruction?

regards.[/i]
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Fri Dec 07, 2018 4:54 am    Post subject: Reply with quote

These examples should be updated to use harness.exe to load a module.

This would replace the first two lines with:

Code:
harness.exe \
       --modulefile module/model.$IMPERAS_SHRSUF \
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Information regarding OVP © 2008-2022 Imperas Software