The semiconductor-metal transition in Tm-compounds