Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1,157 Views

Can Segger J-link Debugger be used to debug/flash D2000 boards?

Dear all,

I have a Segger J-link which can be used well with C8051F and ARM Cortex devices. Is it possible to use it to debug/flash D2000 controller? Any idea/experience?

0 Kudos
8 Replies
Highlighted
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

I have not used the Segger J-Link debugger with the D2000 board but I can confirm the JTAG pin-out you suggested is correct and as OpenOCD supports it I think it should work ok.

When connecting OpenOCD you just need to specify the 'quark_d2000.cfg' file (rather than the quark_d2000_onboard.cfg)

e.g. bin\openocd.exe -f {path to J-Link config file} -f scripts\board\quark_d2000.cfg

This is the connection I have used with an Olimex Debugger . Pin 1 Connected to 3.3V on the Board and Pin 4 to Ground.

Note : Remove all sleeves from Jumpers J9, J10, J11, J15, J17

Pin 1 – (3.3V)

 

 

Pin 3 – TRST

 

 

Pin 4 – GND

 

 

Pin 5 – TDI

 

 

Pin 7 – TMS

 

 

Pint 9 – TCK

 

 

Pin 13 – TDO
Highlighted
Beginner
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

Dear Michelle,

Thanks for the reply!

I couldn't find where 'quark_d2000.cfg' should be written Also, Olimex debugger has been listed, but Segger J-link.

0 Kudos
Highlighted
Beginner
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

This one?

0 Kudos
Highlighted
New Contributor II
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

Check this: https://wiki.segger.com/Intel_Quark_processors Intel Quark processors - SEGGER - Support Wiki

Highlighted
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

Have a look at the Wiki Link above -- the zip file includes the jlink.cfg. You should be able to use this with ISSM also.

Just drop it into - C:\IntelSWTools\ISSM_2016.2.094\tools\debugger\openocd\scripts\interface\ftdi

Then when Flashing the ROM choose 'Custom Configuration' and update the OpenOCD line to below ...

Similarly in the Application Debug Options set the configuration to below ..

Let me know if this works for you

0 Kudos
Highlighted
Beginner
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

Dear Michelle,

You are fantastic! I have just managed to establish a communication between the MCU and System Studio. Now, I can downloadthe examples. I tried blinky, just working fine. Thank you very much!

However, there is one problem. I cannot upload firmware to the module. It fails during verification and returning the following message;

-----------------------------------------------------------------------------------------------------------------------------------------

Open On-Chip Debugger 0.8.0-dev-g377d3f24-dirty (2017-04-11-19:24)

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 : J-Link initialization started / target CPU reset initiated

Info : J-Link V9 compiled Jun 9 2017 17:27:29

Info : J-Link caps 0xb9ff7bbf

Info : J-Link hw version 92000

Info : J-Link hw type J-Link

Info : J-Link max mem block 69816

Info : J-Link configuration

Info : USB-Address: 0x0

Info : Kickstart power on JTAG-pin 19: 0xffffffff

Info : Vref = 3.356 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 0 TRST = 0

Info : J-Link JTAG Interface ready

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

adapter speed: 3 kHz

redirect to PM, tapstatus=0x08302c14

unknown break reason at 0x00180145

target state: halted

target halted due to undefined at 0x00180145 in protected mode

adapter 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

target state: halted

target halted due to debug-request at 0x0000fff0 in real mode

0xb0100014: 00000001

Setup clock

adapter speed: 3 kHz

adapter 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

target state: halted

target halted due to debug-request at 0x0000fff0 in real mode

Start flash

The requested flash write overlaps the OTP DATA protected region 0x00000000 - 0x0000014f, skipping that part

The following command will allow it:

set QUARK_D2000_OTPC_DATA_WRITE_ENABLED 1

...

7999 bytes written at address 0x00000000

downloaded 7999 bytes in 117.621109s (0.066 KiB/s)

Start verify

------------------------------------------------------------------------------------------------------------------------------------------------------------------

It looks like I have to add command "set QUARK_D2000_OTPC_DATA_WRITE_ENABLED 1" somewhere, but, I don't know where it should be

0 Kudos
Highlighted
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

It looks like the ROM was successfully flashed and there was a timeout on the Verify. It looks like it is taking a long time to flash.

You can ignore the "set QUARK_D2000_OTPC_DATA_WRITE_ENABLED 1" message - the ROM flashing process does this automatically.

One thing you can do is try increasing the adapter speed in the C:\IntelSWTools\ISSM_2016.2.094\tools\debugger\openocd\scripts\target\quark_d2000.cfgn which should speed up the flashing.

In the clk32M function try increasing the speed from 1000khz to 4000khz for example.

# utility function to set SoC clock to 32MHz Si

proc clk32M { {jtag_khz 4000} } {

# slow speed to make sure we can write mem

adapter_khz 3

# LMT halt

irscan quark_d2000.cltap 0x70 ; drscan quark_d2000.cltap 8 0x1

# set the SoC clock to the 32 MHz Silicon one

mww 0xB0800008 0x2

mww 0xB0800038 0x7

mww 0xB0800038 0x87

# set the JTAG clock to the desired one

adapter_khz $jtag_khz

# clear halt flag and reset the SoC

irscan quark_d2000.cltap 0x70 ; drscan quark_d2000.cltap 8 0x0

reset halt

}

-Michelle.

0 Kudos
Highlighted
Beginner
7 Views

Re: Can Segger J-link Debugger be used to debug/flash D2000 boards?

I tried, but, same. It fails during verification.

0 Kudos