This is an old problem
first
what has changed in nrfjprog
# Flash the program
flash: $(OUTPUT_DIRECTORY)/nrf51422_xxac.hex
@echo Flashing: $<
nrfjprog --program $< -f nrf51 --sectorerase
nrfjprog --reset -f nrf51
erase:
nrfjprog --eraseall -f nrf52
and second
ERROR: JLinkARM.dll could not be located after the installation info in the registry or in the current folder.