Andes Workshop
https://forum.andestech.com/

The difference between HW and SW breakpoint.
https://forum.andestech.com/viewtopic.php?f=6&t=961
Page 1 of 1

Author:  TangLei [ Thu Aug 18, 2016 12:40 pm ]
Post subject:  The difference between HW and SW breakpoint.

1. HW breakpoints could be used on both ROM and RAM. The number of HW breakpoints should be less than 4/8 which depends on the HW design.
2. SW breakpoints could only be used on RAM. The number of SW breakpoints depends on the size of RAM. While setting a SW breakpoint, GDB will write some instructions into the RAM. But the instructions of GDB are invisible to developer.
3. Please note that it is not supported for GDB to set a SW breakpoint on ROM. The reason below:
1). Flash will be erased and written very often because of the GDB flow.
The steps after hitting a breakpoint in GDB:
- disable all breakpoints / watchpoints (erase and update flash)
- hardware single step
- enable all breakpoints / watchpoints (erase and update flash)
- continue

2). Flash still keeps break instructions if GDB is not exited with the normal way. For example, set breakpoints in flash, free run, and directly close AndeSight without shutdown the debug session.

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/