. a defendant may appeal only: (A) those matters that were raised by written motion filed and ruled on before trial, or (B) after getting the trial court's permission to appeal." Id. 00.0(a)(0). The clerk's record, which contains a written plea bargain, establishes the punishment assessed by the court does not exceed the punishment recommended by the prosecutor and agreed to by the defendant. See id. The clerk's record does not include a written motion filed and ruled upon before trial; nor does it indicate that the trial court gave its permission to appeal. See id. The trial court's certification, therefore, appears to accurately reflect that this is a plea-bargain case and that 