Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AURIX™ Forum Discussions

MaxVer
Level 1
5 sign-ins First reply posted First like given
Level 1

Hello all,

In section 1.3.2,   "Eight hardware breakpoints for TriCore, based on instruction or data address; Unlimited number of software breakpoints (DEBUG instruction)".

So what's the difference between hardware breakpoints and software breakpoints ? Thank you very much.

0 Likes
1 Solution
FD_aurix
Level 5
100 replies posted 5 solutions authored 10 likes given
Level 5

HW breakpoints are handled by the core without any change in code. SW breakpoints instrument the code- > each time you modify your code and each time you change it a new SW is downloaded -> flash cycle increase and life decrease

View solution in original post

3 Replies
FD_aurix
Level 5
100 replies posted 5 solutions authored 10 likes given
Level 5

HW breakpoints are handled by the core without any change in code. SW breakpoints instrument the code- > each time you modify your code and each time you change it a new SW is downloaded -> flash cycle increase and life decrease

dw
Moderator
Moderator 750 replies posted 10 likes given 500 replies posted
Moderator
A software breakpoint is typically an instruction that temporarily replaces an instruction in RAM that is either an illegal instruction and causes a fault or is designed to cause the application to break. A perfect example is the BKPT instruction in the ARM instruction set. When the CPU reaches this instruction, it halts execution.

The first breakpoint type that is used and generally preferred is a hardware breakpoint. Every microcontroller has comparators which are part of the debugging module. For example, the ARM Cortex-M microcontrollers can have 2 – 4 comparators in their debugging module. The comparator is set with a program counter value and when a match occurs, a debug event is raised and the program halts. Hardware breakpoints are the fastest and the most used breakpoint.

Hardware breakpoints have a problem. A microcontroller will typically only have 2 – 4 comparators which means once they are used up, no more breakpoints can be added!

https://www.beningo.com/embedded-basics-hard-and-soft-breakpoints/#:~:text=A%20software%20breakpoint....