Write into a Flash


I want to know if it is possible to write into flash one page of a time for an entire file. I mean, I want to make a loop where at the first time you erase the block, write 8 bytes and then read the 8 bytes from flash and so on until the whole file is written into the flash.

From following code, I am able to write/read the whole file into flash, but instead of take the whole file, I want to write/read into flash every 8 bytes. 

Erase_flash(WR_Block_ID, sizeof(Write_BUFF));
Write_flash(WR_Block_ID, Write_BUFF, sizeof(Write_BUFF));
Read_flash (RD_Block_ID, Read_BUFF, sizeof(Read_BUFF));

Using BF706