Add initial implementation of SPI flash programming. Still needs to be tested and actually used in the main code.