aren't we missing constraints on t? because t1,...,tm=0 minimizes the function for whatever m?
Otherwise, when there are diagonal matrices, you can look at the Hadamard product that gives you a relationship between m and diag(m).
As for the linear constraints on m, which we can write Sm=T, we can re-write m=m0 + P \* z, where Sm0=T and P projects to the nullspace of S. You can just minimize over z without constraints.