We have an Application Note for Ultrasonic Distance Measurement for Park Assist Systems. You can refer to this Application Note as a starting point, since it does not use the same ultrasonic transducer.
A short answer is that we do not have an example for the HC-SR04. But the above mentioned AN works directly on the transducer, generating the ultrasonic signal from PSoC1.
After going through this AN, do let us know your questions.
Thanks and regards,