(Intel Quark) D2000
連接OpenOCD + GDB
連接USB
連接JTAG
$ cd $ wget https://github.com/steward-fu/d2000/releases/download/v1.0/issm-toolchain-linux-2017-02-07.tar.gz $ tar xvf issm-toolchain-linux-2017-02-07.tar.gz $ sudo mv issm-toolchain-linux-2017-02-07 /opt/d2000 $ cd /opt/d2000/tools/debugger/openocd $ ./bin/openocd -f scripts/board/quark_d2000_onboard.cfg Open On-Chip Debugger 0.8.0-dev-gcc0497a (2016-05-03-17:33) Licensed under GNU GPL v2 For bug reports, read http://openocd.sourceforge.net/doc/doxygen/bugs.html Info : only one transport option; autoselect 'jtag' adapter speed: 1000 kHz trst_only separate trst_push_pull adapter speed: 1000 kHz trst_only separate trst_push_pull Info : clock speed 1000 kHz Info : JTAG tap: quark_d2000.cltap tap/device found: 0x0e786013 (mfg: 0x009, part: 0xe786, ver: 0x0) Enabling lmt core tap Info : JTAG tap: quark_d2000.lmt enabled
接著把編譯好的quark_d2000_rom_fm_hmac.bin、hello_world.bin複製到/tmp目錄,接著開啟另一個Terminal並且執行如下命令:
$ ls /tmp hello_world.bin quark_d2000_rom_fm_hmac.bin $ gdb (gdb) target remote :3333 (gdb) monitor clk32M 5000 (gdb) monitor load_image /tmp/quark_d2000_rom_fm_hmac.bin 0x0 (gdb) monitor load_image /tmp/hello_world.bin 0x00180000