get_footer can’t find any variables set in functions.php

This is a variable scope problem.

Your variable in functions.php is not in scope where you are trying to use it in your footer.

To make this work declare the variable global in functions.php

global $tst;
$tst="d00d";

And then pull it in with the global keyword when you need to use it.

global $tst;
echo $tst;

Or, even better, rethink things so that you don’t need the global at all— maybe build a class or a function with a static variable.