|
From: Andreas F. <and...@gm...> - 2017-09-25 08:52:29
|
On Fri, Sep 22, 2017 at 12:16 PM, Bohdan Tymkiv <boh...@gm...> wrote: > > This device requires special acquisition procedure prior to any Flash > operation. Acquisition procedure involves setting breakpoint at arbitrary > Flash address. Breakpoint can be cleared after acquisition procedure has > been completed. > > What do you mean by "acquisition procedure"? What's so special about this chip that makes it unable to write flash without explicit breakpoint setting? The problem I am facing is that breakpoints-related API provided by OpenOCD > is not easily accessible from within Flash driver code. > I have to do ugly things like: > #include "../../target/breakpoints.h" > > #include <target/breakpoints.h> should work. I would like to ask if it is acceptable to set breakpoints from Flash > driver code? > If not, what is the correct way/location to implement this "acquisition" > code? > > If the hardware design requires any special procedures, then it should be OK. The flash drivers have full access to all target capabilities, i.e. can call any function target_*(), nothing special in that even though no current flash driver set breakpoints explicitly. Procedures like requiring special JTAG scans etc in order to write flash, or requiring other calls outside the target layer, well, then it starts to get ugly. But if its really needed then there's not much to do if you want to support the chip. /Andreas |