-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
The following list are generic instructions, regardless of your choice of bootstrap programmer. See below for instructions specific to the different bootstrapping methods.
- Assemble board
- Install toolchain software
- Flash USB bootloader using external programmer
- Flash application code using bootloader via USB
- Download SAT (summon-arm-toolchain) from https://s3.amazonaws.com/mchck/sat-62efaf8-32bit.tar.bz2
- Extract SAT in your
~
(will create~/sat
) - Clone git repo from
git://github.com/corecode/mchck.git
- Install dependencies for the toolchain:
- ruby 1.9
If your MC HCK already has a bootloader pre-programmed, you can skip this section.
First follow the Per-programmer instructions below.
- Connect programmer to MC HCK (see Per-programmer instructions)
- Run
make
inbootloader/usb-dfu
to build the DFU bootloader - Flash the bootloader with
ruby ../../programmer/flash.rb $BACKEND dfu.bin 0
- Plug the MC HCK into USB (pad with folded paper to get solid contact)
- Press the program button - the MC HCK will attach as DFU device to
USB:
Bus 001 Device 125: ID 2323:0001
- Run
make
inexamples/blink
to build the blink demo - Flash the blink demo with
dfu-util -D blink.bin
Run ruby programmer/gdbserver.rb $BACKEND
to start a gdbserver stub.
In another terminal, use ~/sat/bin/arm-none-eabi-gdb myexec.elf
to
start gdb. Attach to the gdbserver stub with target remote :1234
.
Reset or other exceptions will break into gdb as SIGSEGV
, even tho
the exception might not have been a segment violation.
You can use breakpoints and hardware watchpoints. If you use a write
watchpoint (default when using watch
), it will not work well for
registers that do not change content after a write – gdb will
automatically filter such accesses. Use awatch
instead.
-
serialport
gem:gem install serialport
-
3V3
toDBG1
(topmost, just below upper row) -
GND
toDBG2
-
MOSI
toDBG3
-
CLK
toDBG4
The Bus Pirate attaches as USB serial device. Find its device node in
/dev/serial/by-id/
; let’s call that $DEV
. Use
name=buspirate:dev=$DEV
as $BACKEND
.
The Bus Blaster’s CPLD must be flashed with a KT-Link buffer. I don’t quite remember how I did it, so please contribute information when you figure it out.
- libftdi-ruby gem:
gem install libftdi-ruby
-
VTG
toDBG1
(topmost, just below upper row) -
GND
toDBG2
-
TMS
toDBG3
-
TCK
toDBG4
images/mchck-r4-busblaster.jpg
The Bus Blaster is used directly via libusb/libftdi. You will have
to specify the USB VID and PID in the backend config. Let’s hope you
don’t have more than one Bus Blaster attached, or it probably won’t
work. Set $BACKEND
to name=ftdi:vid=0x0403:pid=0x6010
.