From: Magnus L. <lu...@ml...> - 2008-07-31 21:27:15
|
Hello list Øyvind Harboe wrote: > On Thu, Jul 31, 2008 at 11:13 AM, Dario Vecchio <dar...@ti...> wrote: > >> Hi all, >> >> I found that after manually setting hardware breakpoints 'flash write_image' >> and 'verify_image' commands fail if there are no more hardware breakpoints >> available. >> >> I think they should be removed before command execution and then restored. >> > > I guess the problem is that that would be another code path to test... The > code is working as intended otherwise. > After taking a quick look, I wold say that the code where things happen, armv4_5_run_algorithm is not safe and does not perform as intended. It only works most of the time. If there is an existing hw breakpoint in the memory block where the algoritm code is loaded to, then bad things will happen. So even without the problem of not having enough breakpoints, when running algorithms on the target we probably should disable all application breakpoints, and then restore them when resuming the application. > This would have to be done *everywhere* in the code and at that point I'd > rather place this responsibility with the debugger, which can enable/disable > breakpoints before/after stepping/running. > > This should probably be done in the "target->run_algoritm" functions, yes several places :), and not by gdb or tcl scripting since this problem will apply every time an algoritm is run on the target and it should be fixed in the core C code. Regards Magnus |