Seems like it could go in flash_map? Its also been requested to also have a function that detects if an area should be erased, based on it having any non 0xff bytes within.
Should that go there as well. Whats a good method to loop through all bytes of a flash area? On Tue, May 16, 2017 at 11:01 AM, Christopher Collins <[email protected]> wrote: > On Tue, May 16, 2017 at 09:31:11AM -0700, marko kiiskila wrote: > > Maybe we could add hw/hal/src/hal_flash.c:hal_flash_erase_if_needed()? > > Which would erase slots which have any non-0xff bytes, and then use it > from > > image erase. > > Good idea. It might be best if that function were added to a package > other than the HAL, though, since it can be implemented using existing > HAL functions. > > Chris >
