Arduino zero spi serial in c

Take a look at the online help of the Atmel Software Framework.
BTW, could you tell us more about your project? It's sound interesting! I've also tried to do such a bootloader once.