Failure by a party to raise defenses or objections or to make requests which must be made prior to trial, at the time set by a court pursuant to § 23A-8-4, or prior to any extension thereof made by the court, shall constitute a waiver thereof, but the court for cause shown may grant relief from the waiver.
SDCL 23A-8-9