I had compiled my code in Hardware Mode and tested it many times. It was working fine, but then the same code failed at the call to sgx_create_enclave() after I started my machine again. Now, the code works for in simulation mode but fails to create enclave in HW mode. I don't know how to rectify this.
I'm having the exact same problem. It was working, and then we restarted the machine (model is Intel(R) Xeon(R) CPU E3-1280 v5 @ 3.70GHz).
I am trying to make the sgxsdk RemoteAttestation example with some small changes with SGX_PRERELEASE=1 SGX_DEBUG=0. It makes OK but then I get the following error when I run it:
Error, call sgx_create_enclave fail [timing_test].
Error code: 0x0001