1.16.1 Debugging Bootloader Code
The developer can debug the bootloader code just as they would for any normal project if they do not attempt to debug any of the application code. The reason for this is that there is no information about the application in the bootloader project and nothing in the elf file. The debugger that runs on the PC has no knowledge of the application and assumes that all the flash is blank except for what is in the debugger project. Therefore, while debugging the bootloader, if the user attempts to branch to the application code, the code in memory will most likely be blank causing a system reset.
If the user is interested in debugging the bootloader along with the application go to Debugging Application Code and Debugging the Combined Bootloader and Application Code