Best way to transfer a project from an Arduino to a microcontroller

This may help:

I had an Atmega328 on a perfboard with minimal components.