Skip to main content
Topic: Cross Platform ROM Programmer GUI with the Bus Pirate (Read 17158 times) previous topic - next topic

Cross Platform ROM Programmer GUI with the Bus Pirate

After seeing James' Windows EEPROM programmer in C, I took it upon myself to write a GUI programmer (for fun). My Question for everyone is what would you all like to see as part of the GUI. So far I have the framework setup and started writing the SPI and I2C GUI parts, but I'd like to know what everyone else thinks?

It should work on Windows, Linux, and Mac.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #1
Sounds cool. I'd like to be able to read from, and dump to binary files in addition to ASCII hex. The ASCII hex is a really great idea because you can see the values and change them with a note pad, but I usually deal with raw binary files and edit them with HxD.

Maybe a 1-wire programmer? It seems to be a popular protocol.

A simple power button to enable the regulators would be great. I get requests for a power option in HiZ mode all the time - some times you just need a quick little power supply. I think this would make your ap an instant hit :)

Out of curiosity, what tool-chain do you use for that type of cross-platform development?

PS: I'll probably never add power to HiZ because HiZ is supposed to be a safe mode where you're sure the Bus Pirate won't fry anything.
Got a question? Please ask in the forum for the fastest answers.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #2
The Tool-chain I use is C++ Qt4.5. I'm kinda rusty so I'm having to retrain myself on how to use it. I have a few googlecode projects, but one of them uses it heavily to create a Valve Steam-like service/app.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #3
Today, I've ran into a wall. The Qt Library I'm using for the Serial Port is having problems connecting to the Bus Pirate on my Macbook. So far that's the only problem and I've haven't tested the app on Windows or Linux yet.

To test if my programming is correct, is to see if i can read the chip id off of my SPI Flash chip connected to the BP.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #4
Ok, I've fixed the QextSerialPort problem; found out how to get the latest source code.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #5
Screenshots of current progress, as follows:






Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #6
WoW, that looks really slick. What is the last screen for power? I don't understand the different settings.
Got a question? Please ask in the forum for the fastest answers.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #7
Never mind, I get it. It's the power + pin mode for programming, right?

Are you doing the I2C scan in software? I can help with sample code, or we could add a command for it.

Here's the code in the Bus Pirate, there's a few quirks to get it right:
http://code.google.com/p/the-bus-pirate ... /I2C.c#171

The important thing is read an extra byte and then NACK the read addresses (last bit 1) or the device won't let go of the I2C bus.
Got a question? Please ask in the forum for the fastest answers.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #8
I haven't started on the I2C code except for the GUI. I think scan should be done in software, since I can't think of a good way for you to easily implement it in firmware.

P.S. I've been reading the firmware code while writing all my software.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #9
I've done some updates to the Interface; some of the features are programmed and are usable, but I honestly feel this is the worst programming I've done. The only reason it might look good to everyone else is because I'm a huge Perfectionist. I've been running into many problems with it, and my SPI test code is only returning nonsense when It should be printing the chip id "0x61 0x42 0x00". The good news is the ASCII GUI Tab actually works except for printing to the log window.

Anyways, I felt it would be better to post a blog entry for the screen shots, instead of posting 5 new shots everytime I decide to drastically change the GUI.

http://seancrazy.net/blog/?p=3

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #10
looks pretty good.. if you want some base code for programming SPI based chips, there is a project called spipgm2 that is used to reprogram the bios chips on many motherboards.. it contains the parameters for a wide selection of chips.. Do a quick google search.. Its easy to find.. here is a link to the lates source that I know about

http://richard-burke.dyndns.org/wordpre ... 2/SPIPGM.C

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #11
[quote author="dvbguy"]
looks pretty good.. if you want some base code for programming SPI based chips, there is a project called spipgm2 that is used to reprogram the bios chips on many motherboards.. it contains the parameters for a wide selection of chips.. Do a quick google search.. Its easy to find.. here is a link to the lates source that I know about

http://richard-burke.dyndns.org/wordpre ... 2/SPIPGM.C
[/quote]

ht send to fast.. see his link also for info additional info.. it also mentions a common difficult chip to program..

http://richard-burke.dyndns.org/wordpress/tag/spipgm/

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #12
It's not the SPI programming thats hard, I've done plenty of hardware and software for SPI. It's getting C++ Qt and Serial Ports to play nice. My SPI Flash part is a Numonyx M45PE20 from a Nintendo DS Lite, which works with my python library and script.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #13
You seem to have a better grasp on all aspects of programming than I do, but I've had issues with buffer size (set it to 1 byte in and out) and unexpected system timeouts on serial port reads that are supposedly blocking calls.
Got a question? Please ask in the forum for the fastest answers.

Re: Cross Platform ROM Programmer GUI with the Bus Pirate

Reply #14
What's funny to me is I kinda hate programming. My true passion is hardware hacking. I've always wanted to build something like the Bus Pirate, but never found the time to actually design anything; or I was just Lazy.

I have a few ideas for GUIs for the Bus Pirate, but I know I tend to switch projects midway through and forget what I was working on. But I usually do continue to support/work on everyone of my projects. On the maybe do list is: Firmware updater GUI.

Firmware Updater GUI would only take a new GUI Tab and logic for programmer. I would probably remove the other tabs for a standalone release.

~Sean