Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

hardware breakpoint Vs software breakpoint

Status
Not open for further replies.

sivamit

Full Member level 4
Joined
Dec 1, 2005
Messages
201
Helped
20
Reputation
40
Reaction score
14
Trophy points
1,298
Activity points
2,651
hardware breakpoint vs software breakpoint

Hi
Q1: what is the difference b/w these two??

I am using Trace32 debugger for our ARM applications...If I set a software breakpoint and when the program comes at the breakpoint, the taget running status is shown as "stopped"..

Q2:I have a basic question for you.. Before setting breakpoint I downloaded my .elf file.. So,How does my ARM processor come across this breakpoint???
Does my trace32 ICD download the code each and evrytime I press "Run" command???

Q3:Why software breakpoints can not be implemented in ROM??

Thanks,
Shiva
 

hardware breakpoint and software breakpoint

Hardware Break points are the address values that you program to debug Unit when the configured value is matched with PC
value or the address of the variable then it stops execution.
This has a limitation that we can have only few Break points (Depends on the number of registers available).

Software Breakpoints enables to place the Break point in the virtual memory locations also (if the code is not available in physical memory location)
Limitation here is :
Software break points can be placed over the instruction that are located in RW Memory.

*) Code execution is stopped, and the core functions are taken over by the debugger that uses the JTAG interface for communication.
*) Developer points to the instruction that should become breakpoint and instructs the debugger to convert it to the software breakpoint (e.g. pressing F11 while the desired instruction is being highlighted).
*)debugger replaces teh content of the highlighted program memory location with a special instruction that on attempt of execution causes the processor core to stop, This is detected by the debugger and signaled on the debugger window.

Hope I clear your doubt.

Added after 1 hours 27 minutes:

Q1: what is the difference b/w these two??

I am using Trace32 debugger for our ARM applications...If I set a software breakpoint and when the program comes at the breakpoint, the target running status is shown
as "stopped".

This is correct infact . You need to send command to run further. I think stop you meant here is not crash?

Q2: I have a basic question for you.. Before setting breakpoint I downloaded my .elf file.. So, How does my ARM processor come across this breakpoint???
After loading the elf/ Binary image to Processor there are 2 things happening:
a) If you set the breakpoint in the editor it takes that information and loads the address into the the Register and it loads the image into flash.
b) you can also set breakpoint while running (After loading).Now it loads the information to the debug Register.

Flashing happens first... Source code mapping will be in Sync with the code execution in Hardware. This protocol needs to taken care by Software like Keil.

Does my trace32 ICD download the code each and every time I press "Run" command???
No it will be loaded once before you start running.

Q3: Why software breakpoints can not be implemented in ROM??
Because the execution area content will not be having constant code always loke ROM. Software Breakpints are used most of
the times in this scenario where execution area content will get changed often based on demand or function Execution.
So it is RW area.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top