Do you like my hacking? If so, please consider leaving something in the
Fediverse (Mastodon etc): @Sprite_tm@social. spritesmods.com
Not all projects I do have an immediately visible result. Some of them are all about building the right tools, so in the future, I can build awesome things more quickly. This is one of them.
If you've ever worked with FPGAs or larger non-x86 microprocessors, you probably know about JTAG. You can use it to debug software, or upload new bitstreams into an FPGA, reconfiguring the device to do new, more awesome things. You can also use it to upload a tiny bit of code into your bricked router that can then re-write the permanent storage so it works again. These examples usually are one-off tricks: you (hopefully) only need to debrick your router once, you only use JTAG to develop the code on your FPGA. After that, you burn it into a piece of flash memory that's on the board and you're done.
But what if burning your data to flash isn't that easy? You might think that's impossible: if you design a board, you surely will allow yourself to flash the onboard memory? Yep, if you design such a board yourself, you can do that. If you hack a device that's not actually meant to be used in the way you plan, you don't have that advantage. For example, you may have a board with a nice CPU in it that has an internal bootloader that validates the flash before executing it, but which will still accept commands over JTAG after starting. Another example: it's quite easy to obtain scrap PCBs with some quite good FPGAs on them. The FPGA itself is usually fairly easy to get working, with JTAG points indicated on the PCB and a pinout that's mostly retrievable by tracing PCB-traces. FPGAs, however, are SRAM-based and lose their configuration after bootup, and the way the PCB writes the configuration back can be obscure, proprietary and/or not easy to reverse engineer.
All these devices have one generic way to put data in, however: the JTAG port. So why not make a small device that plugs in there and uploads your design or code as soon as you power up your device?
1 Next »