This is something that needs to be added to firmware not host.
emf needs also special speeds to work correctly and needs to be adjusted to motor, ... For TMC2130 a user has solved this for repetier-firmware and this driver, see recent thread in firmware section.