-
Notifications
You must be signed in to change notification settings - Fork 56
BootStrapLoader
Schuyler St. Leger edited this page Oct 6, 2019
·
4 revisions
The CC430F6137 contains a serial bootloader, documented in SLAU319. Our BSL client is a Python script which drives the bootloader through an FTDI chip or other low-voltage serial port.
Wire the following pins to an FTDI chip, or one of the clones that have fewer errata than the real FTDI chips.
RTS goes to the TEST Pin
DTR goes to the !RST Pin
Device RX (Host TX) is the Mode (P1.5) button
Device TX (Host RX) is the Program (P1.6) button
To flash a watch, you need to first create a config.h
with your
callsign, then flash a codeplug and the firmware.
x270% echo '#define CALLSIGN "KK4VCZ"' >config.h
x270% make flashcp
../bin/goodwatch-txt2cp.py -i codeplug.txt -o codeplug.hex
../bin/cc430-bsl.py -r 38400 -Ef codeplug.hex
Setting baud rate to 38400
Mass erasing, plus Info.
Writing codeplug.hex as Intel hex.
100% |##########################################################|
x270% make clean flash
rm -rf *~ */*~ *.hex *.elf *.o */*.o goodwatch gittag.h html latex
msp430-gcc -mmcu=cc430f6137 -Wall -I. -Os -c -o rtcasm.o rtcasm.S
echo "#define GITTAG" 0x`git describe --always` >gittag.h
msp430-gcc -mmcu=cc430f6137 -Wall -I. -Os -c -o main.o main.c
msp430-gcc -mmcu=cc430f6137 -Wall -I. -Os -c -o lcd.o lcd.c
msp430-gcc -mmcu=cc430f6137 -Wall -I. -Os -c -o lcdtext.o lcdtext.c
...
../bin/printsizes.py goodwatch
19098 bytes of .text (58 %)
28 bytes of .data, 486 bytes of .bss, 20 bytes of .noinit (13 %)
msp430-objcopy -O ihex goodwatch goodwatch.hex
../bin/cc430-bsl.py -r 38400 -etf goodwatch.hex
Setting baud rate to 38400
Mass erasing.
Writing goodwatch.hex as Intel hex.
100% |##########################################################|
x270%
Finally, view the dmesg log to verify that the radio correctly boots. It will also helpfully tell you whether or not your radio is properly oscillating.
x270% make dmesg
../bin/cc430-bsl.py -r 38400 -P goodwatch.hex -uD
Setting baud rate to 38400
Zeroed buffer for bad magic.
----
Initializing LCD rtc key but osc Initializing UART cp rad Power 0->0.
This watch has a radio.
Power 0->0.
Beginning POST.
Booted.
----
Initializing LCD rtc key but osc
x270%