People try with mocks and stubs, but hardware in the loop is the only way you can know your firmware works as expected on device.