PyCortexMDebug
PyCortexMDebug copied to clipboard
Allow running with just Python Standard Library
I've struggled getting these utilities to work with the Zephyr SDK due to the Python version.
So here's a pull request that removes the lxml dependency in favour of Python Standard Library's ElementTree instead.
Outstanding upgrade! Can you perhaps test out another option? There's a branch incorporating cmsis-svd (which also uses elementtree) as a parser replacement here. It's worked fine in my testing but it's been a while. I'm not entirely sure which way to go forward from here, but would like to avoid having two functionally similar codebases.
I'll give it a try, but I'm afraid it might have the same problem as the lxml dependency at least in the specific case I'm looking at: it requires a pip dependency (six
), and at least on OpenSUSE there's no Python 3.8 pip
🫤
I originally considered splitting the parsing and loading, so that you can use your "usual" host Python to translate from SVD to a significantly simplified format that gdb can load, but then realized just hanging lxml→elementtree fixed it — but I totally see the point of not maintaining an equivalent parser.
After I prepared this, openSUSE pulled one more package for Python 3.8 so I hit a different failure today 😅
I've added one more commit for it, and another commit for a small snag I hit while debugging the devkit I have at hand.
Perhaps this might be helpful, my setup: SAMC21, Zephyr RTOS, Atmel debugger.
https://forum.zubax.com/t/using-pycortexmdebug-with-zephyr-rtos/2174