Step 1. You have to tell him not to text you. The police won't step in if you haven't said the words to the actual person. It's not anything, but him being a caring person, until he keeps doing it after you tell him not to.
Step 2. Block him via cell company.
Step 3. Restraining order.
Unless he's actually gonna be like celery and stalk you, he'll take the hint, after step 1.
In any personal problem, step 1. should be "talk to that person first". Not your friends, not the police (unless you are in danger).