To stop you, he needs probable cause to believe that a crime has been committed. If he really has been watching you, then he'd need to have set out all the reasons he thinks you were making meth into an affidavit and asked a judge to issue an arrest warrant. Buying one box of cold medicine, in and of itself, is not a crime. You have a right to ask the district attorney for copies of all of the evidence against you, which would include any warrant affidavits.
And it sounds like you may also have a basis for filing a Motion to Suppress evidence based on the officer's act in stopping you without probable cause. If the evidence found on you is suppressed, then the charge will have to be dropped unless they have other evidence (which, again, you have a right to see).
It may help to have a local attorney file the motion for you. If you cannot afford a lawyer, the judge will appoint one for you at no charge unless the district attorney waived all possibility of imprisonment at your appearance.
If you have any questions or concerns about my response, please reply WITHOUT RATING. It's important that you are 100% satisfied with my courtesy and professionalism. Otherwise, please rate my service positively so I am paid for the time I spend answering questions. If you are on a mobile device, you may need to scroll to the right. There is no charge for follow-up questions. Thank you.