move global_counter logic from boards/ to cores/ethpipe