Finished up writing function for SPI flash (not tested). Changed SPI flash init function to use starting address rather than compile-time chip assignment.