cleanup
externalize nvic
use volatile_store and volatile_load when accessing hardware registers (works in -O2 now)