cryptovillage / badge2015

Hardware, firmware, and documentation for the 2015 Crypto and Privacy Village Badge
Other
6 stars 1 forks source link

re-programming #1

Open gigawatts opened 4 years ago

gigawatts commented 4 years ago

I was looking to explore re-purposing / programming this badge, and I am looking for a pin-out for the programming header on the badge, along with some tips on a procedure.

Is it using this pinout? https://www.olimex.com/Products/MSP430/_resources/msp430-jtag.gif

I saw the "CONN_01x14 / P1" connector in the schematic PDF, but it only labels 4 pins. Are the rest not connected to the MSP430?

Do you have some notes on a process to re-flash this? My only other MSP experience is on a Stellaris LaunchPad (with Energia), but that was easily re-programmed with just USB. I have a few other programmers available, including a buspirate and Black Magic Probe clone. Can my LaunchPad be easily used as a programmer?

Any hints would be appreciated!

supersat commented 4 years ago

You are correct that only 4 pins on the programming header are connected to the MSP430. We debugged and programmed them using TI's Spy-Bi-Wire protocol instead of JTAG, which only requires those four pins.

The firmware was originally developed with a MSP-EXP430G2 LaunchPad, although the production badges have a larger microcontroller (MSP430G2955 vs MSP430G2744) that is not supported by it. Apparently newer LaunchPads might support it?

gigawatts commented 4 years ago

Giving it a shot with my Stellaris LM4F120 (removing the jumper that powers the onboard micro).

Next issue, I downloaded the support pack you linked to, and based on its name, downloaded the old Energia 0101E0013 version, selected the "Spirilis' G2955 LaunchPad" board option, but every upload attempt just errors with "No unused FET found." What version of Energia did you use with that support pack?

I'm pretty sure I have all the right drivers installed, as I can upload sketches to the onboard lm4f120 micro just fine from Energia (selecting the lm4f120 board, of course).

gigawatts commented 4 years ago

I gave up on the Stellaris, pretty sure it does not support SBW. I picked up a cheap LaunchPad MSP-EXP430G2. I was able to program it's onboard G2553 with Energia v13 without any issues. I removed the jumpers, then connected GND, VCC, RST, and TEST over to the badge. The badge successfully powers up, running its stock DC23 program.

Attempting to upload (after picking Board "Spirilis' G2955 LaunchPad"), I just get this error now:

tilib: MSP430_OpenDevice: Could not find device (or device not supported) (error = 4)
tilib: device initialization failed

Any ideas?

supersat commented 4 years ago

The MSP-EXP430G2 explicitly does not support the G2955 (see my comment above). However, if you were to remove the G2955 and replace it with a G2744, it would be pin-compatible and work just fine.

That being said, it's probably easier to find a compatible programmer.

gigawatts commented 4 years ago

Doh, then I misunderstood your previous statement about chip support. Which LaunchPad or programmer will work, without spending too much?