Coder Social home page Coder Social logo

spitool's Introduction

The spitool has been born from my growing annoyance when trying to fiddle
with an SPI EEPROM on my bus pirate. Apparently there are no working tools
out there to write an EEPROM, reading only worked after patching a perl
script, verifying/status word access was not there either, etc. As a con-
sequence, this tool is tailored to my needs, and might or might not fit
yours.

Feature overview:

This spitool can
- dump EEPROMs, as hex dump to the display or to a file
- verify (compare) an EEPROM
- write an EEPROM from file (either overwriting fully, or only updating 
  changes)
- wipe an EEPROM (initialize with a constant value)
- read and write the status word
- can run the serial port at extended speeds of 230400, 460800, 1M and 2M baud
- log SPI traffic

Due to some bugfixes the "spifix" branch of firmware 6.2 is recommended, see
http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=4340#p42691
This will be needed to drive SPI at clock rates > 2MHz, and for working 
sniffing.

spitool requires popt as only external dependency.

spitool's People

Contributors

chrschmidt avatar entropyqueen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ruslan66

spitool's Issues

Project does not compile with -Werror

When trying to compile, just after cloning, I get these errors.

$> make
cc -Wall -Werror -pipe -Dlinux -D_GNU_SOURCE   -c -o spitool_cmdline.o spitool_cmdline.c
spitool_cmdline.c: In function ‘parse_commandline’:
spitool_cmdline.c:240:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
     if (commandlist);
     ^~
spitool_cmdline.c:241:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         poptSetOtherOptionHelp (optcon, commandlist);
         ^~~~~~~~~~~~~~~~~~~~~~
spitool_cmdline.c:304:43: error: comparison of constant ‘65537’ with boolean expression is always true [-Werror=bool-compare]
         else if (!action->device.capacity < 65537) action->device.addresslength = 2;
                                           ^
spitool_cmdline.c:304:43: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
spitool_cmdline.c:305:43: error: comparison of constant ‘16777216’ with boolean expression is always true [-Werror=bool-compare]
         else if (!action->device.capacity < 16777216) action->device.addresslength = 3;
                                           ^
spitool_cmdline.c:305:43: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
cc1: all warnings being treated as errors
make: *** [Makefile:17: spitool_cmdline.o] Error 1

Just for information's sake, I'm using gcc in version gcc (GCC) 6.1.1 20160707

I'll release a patch in a few minutes to fix those issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.