Trouble with L297 pins
The 297 draws typically 50mA (could be as much as 80mA) from the supply. If you're using a 5V supply it will get warm. It could get pretty hot with a 10V (the maximum) supply, and will probably be fried if you connect it to a much higher voltage supply.

If it's getting hot quickly with a 5V supply, it's probably wired wrong. 

Please read the fine datasheet (RTFD) and learn what the outputs are used for.