The flash.h header does not require the target.h header file, but its implementation source files do. Move it to flash/nor/imp.h.