I was in a similar situation where I thought I was going to lose my teaching position. However, there was a procedure that had to be followed. First, there was an informal intervention. That had to followed up by a formal intervention six weeks later. Then, and only then, after the formal intervention had been in place several weeks, could I be terminated. I would think that if there was not some kind of show that your principal had previously warned you that this was a problem area that they would have no grounds to be able to just terminate employment. Just another thing you may want to check with your union--I went to mine and was told there was nothing they could do to me because they had not followed appropriate procedures. I got transferred to a new school this year and am having the best year of teaching I've ever had.
I wish you good luck--it's tough to do your job when nobody appreciates all you do.