Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8374

General • Re: Tcl on Pico?

$
0
0
Hippy, how did you get this lovely output?
It's my home-grown 'mptool' utility which allows detailed examination of UF2 and other Pico files.

Unfortunately, even Zipped, it's too large to post to the forum and I have no other means of distributing it.

The best option is for it to be able to extract from itself what would be individual tools, for example 'uf2-list' for the above.
I was motivated to figure out how to do that properly and it appears to have been a success so far though there's still more work to do.

Because I'm such a kind-hearted soul; here's my 'cheaper than even a Black Friday offering' release of the first two utilities made standalone. First is 'uf2-list.py' which lists what's in a '.uf2' as shown earlier, and secondly 'uf2-dump.py' which creates a detailed human readable description of every block in a '.uf2' file, and more besides.


To avoid having to use 'python /path/uf2-list.py firmware.uf2' all the time, you can run 'python uf2-list.py --install' which creates a '/usr/local/bin/uf2-list' link which allows a much easier and simpler 'uf2-list firmware.uf2' wherever you are. Simply use 'uf2-list --uninstall' to remove the link. Using '--help' will do the usual thing.

These are beta versions as I haven't exhaustively tested them and there may have been some issues withe automated refactoring but do work as far as I have tested them. The biggest risk is the generator hasn't included a function the utility needs. But they should hopefully still be usable and useful. These only support '.uf2' files at present as I appear to have forgotten to apply RP235X fix-ups to my own code for '.bin', '.hex' and '.elf' files.

The codebase itself may not be that usable as is because most of it was thrown together under "need to have it now" and limited time pressure, then subsequently hacked to fix bugs and handle new things along the way - like the RP235X introducing multiple Family ID in a single '.uf2', the RISC-V variant, errata blocks, meta blocks, and extension flags.

My only criteria has been 'does it work well enough for me' but most code has improved beyond bare bones and cryptic output.

The utility generator has also thrown functions all over the place but it's better than the mess my monolithic utility is which is what had kept me from pulling out specific functionality to be standalone apps.

I have a whole load of functionality in my monolithic utility which I want to make standalone, from '.uf2' file utilities, Pico connection utilities, Pico project management and build configuration stuff, to Pi and Pico house-keeping utilities, web servers and even 'apt package' creation tools. I have long wanted to release all that because I'm sure they will be as much time-savers for others as they have been for me.

At least I now have a way of doing that. It's currently a steady grind of working through them one by one. I'll release a full set of non-beta stuff when I have them done.

So many thanks for nudging me in the right direction, even if you didn't intend to.

If anyone does try these and encounters any bugs let me know, and if struggling to figure something out, or have a question, please do ask.

Statistics: Posted by hippy — Fri Nov 29, 2024 9:53 am



Viewing all articles
Browse latest Browse all 8374

Trending Articles