PyCortexMDebug icon indicating copy to clipboard operation
PyCortexMDebug copied to clipboard

Allow running with just Python Standard Library

Open Flameeyes opened this issue 1 year ago • 4 comments

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.

Flameeyes avatar Jul 30 '23 12:07 Flameeyes

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.

bnahill avatar Aug 01 '23 03:08 bnahill

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.

Flameeyes avatar Aug 01 '23 09:08 Flameeyes

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.

Flameeyes avatar Aug 03 '23 18:08 Flameeyes

Perhaps this might be helpful, my setup: SAMC21, Zephyr RTOS, Atmel debugger.

https://forum.zubax.com/t/using-pycortexmdebug-with-zephyr-rtos/2174

maksimdrachov avatar Aug 07 '24 13:08 maksimdrachov