I just received my buspirate, I now want to dump a flash (MX25L12845E). I tried the following command:

flashrom -V -p buspirate_spi:dev=/dev/tty.usbserial-AJ02XILF,spispeed=1M -r MX25L128.bin -c MX25L12835F/MX25L12845E/MX25L12865E

And get the following output:

flashrom v0.9.8-r1888 on Darwin 15.0.0 (x86_64)
flashrom is free software, get the source code at http://www.flashrom.org

flashrom was built with LLVM Clang 7.0.0 (clang-700.0.72), little endian
Command line (7 args): flashrom -V -p buspirate_spi:dev=/dev/tty.usbserial-AJ02XILF,spispeed=1M -r MX25L128.bin -c MX25L12835F/MX25L12845E/MX25L12865E
Calibrating delay loop... OS timer resolution is 1 usecs, 2849M loops per second, 10 myus = 10 us, 100 myus = 149 us, 1000 myus = 1019 us, 10000 myus = 9791 us, 4 myus = 14 us, OK.
Initializing buspirate_spi programmer
serialport_config: Some requested options did not stick.
Error: Programmer initialization failed.

I check the Internet but it look like nobody already had this problem.

I tried to look at the pinout once again, still nothing.

Then I change some connection to see if I can have a different error, but no.

Did someone already had this problem?

EDIT: This error message come from this part of code:

wanted.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
wanted.c_cflag |= (CS8 | CLOCAL | CREAD);
wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
wanted.c_iflag &= ~(IXON | IXOFF | IXANY | ICRNL | IGNCR | INLCR);
wanted.c_oflag &= ~OPOST;
if (tcsetattr(fd, TCSANOW, &wanted) != 0) {
    msg_perr_strerror("Could not change serial port configuration: ");
    return 1;
if (tcgetattr(fd, &observed) != 0) {
    msg_perr_strerror("Could not fetch new serial port configuration: ");
    return 1;
if (observed.c_cflag != wanted.c_cflag ||
    observed.c_lflag != wanted.c_lflag ||
    observed.c_iflag != wanted.c_iflag ||
    observed.c_oflag != wanted.c_oflag ||
    cfgetispeed(&observed) != cfgetispeed(&wanted)) {
    msg_perr("%s: Some requested options did not stick.\n", __func__);
    return 1;

The PARENB | CSTOPB | CSIZE | CRTSCTS and so on part look like it's a problem due to terminal.

BTW I use iTerm and Terminal and it's not working on both. But works on Linux with default terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.