-
Notifications
You must be signed in to change notification settings - Fork 5
GettingStarted
Howdy!
In this page, we'll cover how to use the GoodTag platform. You probably won't need all of these notes, just enough to get firmware compiled and flashed to your board.
--Travis
Complete hardware construction details are available on the page for each model, such as the GoodTag11. For minimal functionality, only U1 and C2 need to be populated. Use solder paste and hot air so that the ground pad can be soldered, which will provide mechanical stability.
If you ask Travis Goodspeed politely by email or a Twitter DM, he'll probably send you one or two.
You'll need an msp430-elf-gcc
toolchain based on GCC 8. The GCC 4
toolchain that ships with Debian/unstable will not work, but TI offers
a chain that they call GCC for
MSP430.
Downloading it requires an annoying registration and ITAR declaration, but so it goes.
From that page, you need both the compiler
(msp430-gcc-full-linux-x64-installer-8.3.0.0.run
) and the support
files (msp430-gcc-support-files-1.208.zip
), which contain headers
for the RF430 chip.
I install the compiler to /opt/msp430-gcc
and unzip the support
files to place them at /opt/msp430-gcc-support-files
. Add
/opt/msp430-gcc/bin
to your $PATH
.
You will also need to install the srecord
package, which provides
the srec_cat
command that is used to convert firmware from ELF to
the TI-TXT format used by our tools.
Once these tools are installed, you can type make all
in the
firmware/
and shellcode/
directories to build the examples from
.c
to .txt
files.
dell% cd goodtag/firmware
dell% export PATH=/opt/msp430-gcc/bin:$PATH
dell% make clean all
rm -f *.elf *.hex *.txt
msp430-elf-gcc -mmcu=rf430frl152h -Wall -Wno-unused-but-set-variable -I. -I/opt/msp430-gcc-support-files/include -Os -Wl,--no-gc-sections -nostartfiles hello.c -o hello.elf
msp430-elf-objcopy hello.elf -O ihex hello.hex
srec_cat hello.hex -Intel -Output hello.txt -Texas_Instruments_TeXT
msp430-elf-gcc -mmcu=rf430frl152h -Wall -Wno-unused-but-set-variable -I. -I/opt/msp430-gcc-support-files/include -Os -Wl,--no-gc-sections -nostartfiles ndef.c -o ndef.elf
msp430-elf-objcopy ndef.elf -O ihex ndef.hex
srec_cat ndef.hex -Intel -Output ndef.txt -Texas_Instruments_TeXT
msp430-elf-gcc -mmcu=rf430frl152h -Wall -Wno-unused-but-set-variable -I. -I/opt/msp430-gcc-support-files/include -Os -Wl,--no-gc-sections -nostartfiles gcmemu.c -o gcmemu.elf
msp430-elf-objcopy gcmemu.elf -O ihex gcmemu.hex
srec_cat gcmemu.hex -Intel -Output gcmemu.txt -Texas_Instruments_TeXT
msp430-elf-gcc -mmcu=rf430frl152h -Wall -Wno-unused-but-set-variable -I. -I/opt/msp430-gcc-support-files/include -Os -Wl,--no-gc-sections -nostartfiles gcmpatch.c -o gcmpatch.elf
msp430-elf-objcopy gcmpatch.elf -O ihex gcmpatch.hex
srec_cat gcmpatch.hex -Intel -Output gcmpatch.txt -Texas_Instruments_TeXT
rm ndef.hex hello.hex gcmpatch.hex ndef.elf hello.elf gcmpatch.elf gcmemu.hex gcmemu.elf
dell% cat hello.txt
@F867
7F
@FA00
1D 42 06 08 5C 42 06 08 7E 40 0F 00 4E 9C 0E 28
C2 43 08 08 0C 93 02 20 4C 43 30 41 A2 4D 08 08
2D 53 7C 53 3C F0 FF 00 30 40 14 FA 92 43 06 08
30 40 18 FA
@FFAC
CE CE CE CE CE CE CE CE CE CE CE CE CE CE CE CE
CE CE CE CE CE CE CE CE CE CE CE CE CE CE 00 FA
A3 00 CE CE
q
dell%
The RF430 has no Flash memory, but instead uses a technology called FRAM to provide non-volatile memory for code that can be written while the tag is harvesting power over NFC.
Sadly, support for NFC Type V in desktop operating systems seems
pretty scarce, so for the moment we are flashing cards with the
GoodV app for Android.
Simply select the Program tab, then paste the .txt
file of your code
into the text box and tap your card to the phone.
It's also handy for development to have JTAG debugging. The RF430
chip requires 4-wire JTAG at 1.5V, and instructions for patching
mspdebug
to be compatible are tracked in its Github page as Issue
86. For hardware, you
probably want an RF430FRL152HEVM evaluation kit and a black MSP-FET
Flash Emulation Tool.
In the future, code support can be written for the HydraNFC shield on the HydraBus, or the upcoming Hydrangea neighbor of the GreatFET. The Proxmark3 could also be patched to write these cards.
You probably want to build your own thing with the tag, so the right
hand side is a 0.1" prototyping area and the Kicad schematics and
layout are available in hardware/
for you to fork as you like.
On the software end, NFC Type V is available in most but not all Android phones with NFC, and in all NFC iPhones running iOS 13 or higher. See the GoodV source code as an example.