The GusmanB logic analyzer is pretty easy to port (or was when I ported to BP5). There are the basic steps:
- (Optional) We have buffers, set to input by default, so nothing really needs to happen here. For good measure, make the buffer direction control pins (GPIO0-GPIO7) outputs and to ground during initialization. This will ensure the buffers are firmly held as input to the RP2350.
- Our first IO pin is GPIO8, I believe GusmanB uses GPIO0 as the first pin. We have 8 pins and GusmanB has a bunch more. The PIO program needs to be modified to use 8 as the starting IO, with 8 pins total. I forget exactly how to do this, but part is literally changing pin 0 to pin 8 when loading the PIO program.I believe there is already an option in the source for 8 channels only.
- Disable any indicator LEDs. They might trigger hardware connected to the Bus Pirate, depending on the pin used.
- (Optional) Enable a power supply. The buffers need to be powered. This can be done with an external supply on the VOUT pin (easy), or using the on board power supply (harder). There is a library called pirate-lib that drops into a project and gives basic control of the Bus Pirate hardware, from here you can enable the PSU.
Here are two examples of pirate-lib:
Here is an older walk through of pirate-lib that is a bit dated.
Basically you copy the pirate-lib folder into the source, then create a pirate_config.h to contain any initialization code. This example loads the display and enables the PSU if the button is pressed.
#elif ( BOARD_TYPE == BOARD_BUSPIRATE )
#include "pirate/pirate.h"
#include "pirate/pullup.h"
#include "pirate/bio.h"
#include "pirate/shift.h"
pirate_init();
Finally, include pirate.h and any additional features somewhere early in the initialization function and call pirate_init();.
Here’s one tricky part - pirate-lib only supports RP2040 based Bus Pirates at the moment. The hardware defines are here in pirate.h, they need to be replaced with the contents of the BP6 platform file. Ideally it should be merged so both RP2350 and RP2040 chips are supported, but that is excess work
I created a fork of the GusmanB logic analyzer for a Bus Pirate port. I am unable to take on this project at the moment, but I will make time to support/contribute to port if you (or anyone) helps it along. Of course I am here to help with any roadblocks as well.