Changes

CW308T-D2000

3,539 bytes added, 00:06, 6 February 2018
Programming
Info : JTAG tap: quark_d2000.lmt enabled
At this point it will hold, waiting for new commands. There is two ways to proceed: ==== Connecting with GDB ==== Connecting and programming with GDB may be preferred if you wish to also do any debug. It however is more limited in what commands you can run. If this does not work see the next section about using telnet commands. Open a second command prompt, and run:
C:\IntelSWTools\ISSM_2016.0.027\issm_env.bat
gdb
From within this GDB console, you You can then run the followingwithin a GDB console:
target remote :3333
monitor clk32M 500125
monitor load_image C:\\chipwhisperer\\hardware\\victims\\firmware\\intel_quark\\quark_d2000_rom.bin 0x0
monitor load_image C:\\chipwhisperer\\hardware\\victims\\firmware\\intel_quark\\simpleserial_example\\release\\quark_d2000\\x86\\bin\\simpleserial_aes.bin 0x00180000
The first load_image is used for the ROM image. This may should only be done once - do not reload every time, only reload the application. The boards as shipped come with a ROM image so you can skip that step if using the NewAE example code. Notes: # The <code>monitor clk32M 125</code> sets a 125 kHz JTAG clock frequency. This may be needed too slow, but is recommended especially when loading ROM due to potential for misprogramming on the target board due to the shunt resistor. Note it takes a long time (~60 seconds) to program the ROM code so don't abort it!# If the above fails, see the next note on recovering normal settings with the telnet interface.# You can short F13 (GPIO1 on the ChipWhisperer-Lite) to GND to force the JTAG pins on. It is suggested to do this via the ChipWhisperer-Lite software (setting it as has normally been done a GPIO output and then setting it low). This requires the 'ROM' code programmed in already. However # Do not reload the ROM code unless needed -- this is the boot code and if something gets corrupt it can brick the device. ==== Connecting with Telnet to Monitor ==== When running the <code>target remote :3333</code> or other commands above, you may encounter errors that seem fatal. Do not fret, you can likely recover everything using another mode. To do so: # Power cycle the target board, and re-run the openocd command previously specified (assuming you'll have encountered errors and the system is in an unknown state).# If this fails, set GPIO1 to reload LOW, and power cycle the application any time target. Try connecting again. Assuming the connect works, open a second command prompt and run  telnet localhost 4444 Note the port connected to is 4444 (not :3333) as before. This now enters the monitor directly, and you wish can try running the following commands:  reset halt set QUARK_D2000_OTPC_DATA_WRITE_ENABLED 1 mass_erase clk32M 100 load_image C:\\chipwhisperer\\hardware\\victims\\firmware\\intel_quark\\quark_d2000_rom.bin 0x0 load_image C:\\chipwhisperer\\hardware\\victims\\firmware\\intel_quark\\simpleserial_example\\release\\quark_d2000\\x86\\bin\\simpleserial_aes.bin 0x00180000 The following should be the example output of these commands:  > reset halt JTAG tap: quark_d2000.cltap tap/device found: 0x0e786013 (mfg: 0x009, part: 0xe786, ver: 0x0) Enabling lmt core tap JTAG tap: quark_d2000.lmt enabled target state: halted target halted due to reprogram itdebug-request at 0x0000ffff in real mode target state: halted target halted due to debug-request at 0x0000fff0 in real mode > set QUARK_D2000_OTPC_DATA_WRITE_ENABLED 1 1 > mass_erase Deleting OTPC, OTPD and FLASH regions 0xb0100014: 00000001 > clk32M 100 adapter speed: 3 kHz adapter speed: 100 kHz JTAG tap: quark_d2000.cltap tap/device found: 0x0e786013 (mfg: 0x009, part: 0xe786, ver: 0x0) Enabling lmt core tap JTAG tap: quark_d2000.lmt enabled target state: halted target halted due to debug-request at 0x0000fff0 in real mode > load_image C:\\chipwhisperer\\hardware\\victims\\firmware\\intel_quark\\quark_d2000_rom.bin 0x0 ....8192 bytes written at address 0x00000000 downloaded 8192 bytes in 66.997505s (0.119 KiB/s) > load_image C:\\chipwhisperer\\hardware\\victims\\firmware\\intel_quark\\simpleserial_example\\release\\quark_d2000\\x8 .2872 bytes written at address 0x00180000 downloaded 2872 bytes in 42.280869s (0.066 KiB/s) Note you can try the following if still having trouble: # Use a slower JTAG clock speed.# Short the SHUNTH/SHUNTL pins.
== Schematic ==
Approved_users, bureaucrat, administrator
1,956
edits