chrschmidt / spitool Goto Github PK
View Code? Open in Web Editor NEWA tool for accessing SPI EEPROMs through DangerousPrototypes.com Bus Pirates
License: GNU General Public License v2.0
A tool for accessing SPI EEPROMs through DangerousPrototypes.com Bus Pirates
License: GNU General Public License v2.0
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.