GoodFET42 in Linux
Hardware info on main page.
History
2018-07-19: e1 - using the GoodFET42
[tingo@kg-elitebook ~]$ env GOODFET=/dev/ttyUSB0 goodfet.monitor info GoodFET with f26f MCU Clocked at 0x8f9e
ok
2018-07-19: e1 - list apps
[tingo@kg-elitebook goodfet]$ goodfet.monitor listapps GoodFET with f26f MCU Clocked at 0x8f9e Build Date: 2014-07-05 13:24 Firmware apps: Monitor SPI MAXUSB JTAG JTAG430 JTAG430 JTAG430X2 I2C JTAGARM7 OpenOCD CHIPCON AVR CCSPI CC2500 NRF
ok
2018-07-19: e1 - info
[tingo@kg-elitebook goodfet]$ goodfet.monitor info GoodFET with f26f MCU Clocked at 0x8f9e
ok
2018-07-19: e1 - test LEDs
[tingo@kg-elitebook goodfet]$ goodfet.monitor testleds See the GoodFET FAQ about missing info flash. Flashing LEDs Flashed 1 LED.
ok
2018-07-19: e1 - dumpinfo
[tingo@kg-elitebook goodfet]$ env board=goodfet42 goodfet.bsl -P firmware/prebuilt/goodfet42.hex --dumpinfo Use -h for help Use --fromweb to upgrade a GoodFET. MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Invoking BSL... Transmit password ... Current bootstrap loader version: 2.13 (Device ID: f26f) @1000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff q
that worked. But info shouldn't be "blank".
2018-07-19: e1 - upgrade my GoodFET42:
[tingo@kg-elitebook goodfet]$ env board=goodfet42 goodfet.bsl --fromweb Use -h for help Use --fromweb to upgrade a GoodFET. MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Invoking BSL... Transmit default password ... Current bootstrap loader version: 2.13 (Device ID: f26f) Checking for info flash... None. Look at contrib/infos/README.txt for better performance. Grabbing goodfet42 firmware from http://goodfet.sourceforge.net/dist/goodfet42.hex Mass Erase... Transmit default password ... Invoking BSL... Transmit default password ... Current bootstrap loader version: 2.13 (Device ID: f26f) Program ... 25842 bytes programmed.
ok.
2014-05-04: try to dump the info:
tingo@kg-u35jc:~/doc/GoodFET/GoodFET42$ export board=goodfet42 tingo@kg-u35jc:~/doc/GoodFET/GoodFET42$ goodfet.bsl --dumpinfo >info.txtUse -h for help Use --fromweb to upgrade a GoodFET. MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Invoking BSL... Transmit default password ... Use -h for help Use --fromweb to upgrade a GoodFET. MSP430 Bootstrap Loader Version: 1.39-goodfet-8 Invoking BSL... Transmit default password ... Traceback (most recent call last): File "/usr/local/bin/goodfet.bsl", line 1985, in <module> main(0); File "/usr/local/bin/goodfet.bsl", line 1940, in main bsl.actionStartBSL(bslreset=reset) File "/usr/local/bin/goodfet.bsl", line 1162, in actionStartBSL self.txPasswd(self.passwd) #transmit password File "/usr/local/bin/goodfet.bsl", line 1132, in txPasswd wait=wait) #if wait is 1, try to sync forever File "/usr/local/bin/goodfet.bsl", line 798, in bslTxRx rxFrame = self.comTxRx(cmd, dataOut, len(dataOut)) #Send frame File "/usr/local/bin/goodfet.bsl", line 477, in comTxRx rxHeader, rxNum = self.comRxHeader() #receive header File "/usr/local/bin/goodfet.bsl", line 383, in comRxHeader if not hdr: raise BSLException("Timeout") __main__.BSLException: Timeout
Why does it not work?
2014-05-04: let's see what my adapter have for software: short list
tingo@kg-u35jc:~/work/goodfet/trunk/client$ goodfet.monitor listapps GoodFET with f26f MCU Clocked at 0x8fb1 Build Date: 2013-02-16 12:05 Firmware apps: Monitor SPI MAXUSB JTAG JTAG430 JTAG430 JTAG430X2 JTAGARM7 OpenOCD CHIPCON AVR NRF
full list
tingo@kg-u35jc:~/work/goodfet/trunk/client$ goodfet.monitor listapps full GoodFET with f26f MCU Clocked at 0x8fb1 Build Date: 2013-02-16 12:05 Firmware apps: Monitor The monitor app handles basic operations on the MSP430 such as peeking and poking memory, calling functions and managing the baud rate. SPI The SPI app handles the SPI bus protocol, turning your GoodFET into a USB-to-SPI adapter. MAXUSB This allows you to write USB Host or USB Device drivers for the MAX3421 and MAX3420 chips. JTAG The JTAG app handles basic JTAG operations such as resetting the TAP, resetting the target, detecting the instruction register width, shifting bits into both the instruction and data registers. JTAG430 The JTAG430 app adds to the basic JTAG app support for JTAG'ing MSP430 devices. JTAG430 The JTAG430 app adds to the basic JTAG app support for JTAG'ing MSP430 devices. JTAG430X2 The JTAG430X2 app extends the basic JTAG app with support for 20-bit MSP430X2 devices, such as the MSP430F5xx Family. JTAGARM7 The JTAGARM7 app extends the basic JTAG app with support for JTAG'ing ARM7TDMI based devices. OpenOCD The OpenOCD app handles the OpenOCD bitbang protocol. CHIPCON The CHIPCON app adds support for debugging the chipcon 8051 processor. AVR The AVR app adds support for debugging AVR based devices. NRF The NRF app adds support for the NordicRF register interface.
quite a lot.
2014-05-04: configuring the software:
tingo@kg-u35jc:~/work$ cd goodfet/trunk/client
test it first:
tingo@kg-u35jc:~/work/goodfet/trunk/client$ ./goodfet.monitor testleds Flashing LEDs Flashed 1 LED.
ok - LEDs blinked. Link scripts:
tingo@kg-u35jc:~/work/goodfet/trunk/client$ sudo make link rm -f /usr/local/bin/goodfet.* /usr/local/bin/goodfet /usr/local/bin/facedancer* rm -rf *~ mkdir -p /usr/local/bin ln -s `pwd`/goodfet `pwd`/goodfet.* `pwd`/facedancer* /usr/local/bin/
verify:
tingo@kg-u35jc:~/work/goodfet/trunk/client$ which goodfet /usr/local/bin/goodfet tingo@kg-u35jc:~/work/goodfet/trunk/client$ which goodfet.monitor /usr/local/bin/goodfet.monitor
looks good.
2014-05-04: getting the software:
tingo@kg-u35jc:~/work$ svn co https://svn.code.sf.net/p/goodfet/code goodfet [...snipped...] A goodfet/reports/avr/glitch/graphs.gnuplot A goodfet/reports/avr/glitch/Makefile Checked out revision 1675.
ok
2014-05-04: I connected the GoodFET42 to my Linux laptop, detected in /var/log/messages:
May 4 14:17:02 kg-u35jc kernel: [498031.727497] usb 2-1.2: new full-speed USB device number 9 using ehci_hcd May 4 14:17:02 kg-u35jc kernel: [498031.828767] ftdi_sio 2-1.2:1.0: FTDI USB Serial Device converter detected May 4 14:17:02 kg-u35jc kernel: [498031.828830] usb 2-1.2: Detected FT232RL May 4 14:17:02 kg-u35jc kernel: [498031.828835] usb 2-1.2: Number of endpoints 2 May 4 14:17:02 kg-u35jc kernel: [498031.828839] usb 2-1.2: Endpoint 1 MaxPacketSize 64 May 4 14:17:02 kg-u35jc kernel: [498031.828843] usb 2-1.2: Endpoint 2 MaxPacketSize 64 May 4 14:17:02 kg-u35jc kernel: [498031.828847] usb 2-1.2: Setting MaxPacketSize 64 May 4 14:17:02 kg-u35jc kernel: [498031.829355] usb 2-1.2: FTDI USB Serial Device converter now attached to ttyUSB1 May 4 14:17:02 kg-u35jc mtp-probe: checking bus 2, device 9: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2" May 4 14:17:02 kg-u35jc mtp-probe: bus: 2, device: 9 was not an MTP device
I already have a usb-to-serial adapter connected as ttyUSB0, which is why the GoodFET shows up at ttyUSB1. My Linux laptop details:
tingo@kg-u35jc:~$ uname -a Linux kg-u35jc 3.2.0-61-generic #92-Ubuntu SMP Mon Mar 31 23:47:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux tingo@kg-u35jc:~$ lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:desktop-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-3.2-amd64:printing-3.2-noarch:printing-4.0-amd64:printing-4.0-noarch:qt4-3.1-amd64:qt4-3.1-noarch Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise
that's it.