JTAG connection to StartKit

All technical discussions and projects around startKIT
mhelin
Active Member
Posts: 44
Joined: Fri Dec 24, 2010 10:54 am

Re: JTAG connection to StartKit

Postby mhelin » Mon Jan 06, 2014 12:44 pm

segher wrote:
mhelin wrote:Ok, so it boots from USB and we should be able to use the same dynamic loading working with startKIT as it does with XTAG2 if we want to use debugger tile for anything else than debugging, right?

#0 boots from OTP, and does who-knows-what. #1 boots
from SPI. #0 then does the load-from-USB thing. The
thing normally loaded to it (by xgdb) is an XTAG2-style
debugger. It drives all those 1-bit ports to its own JTAG
pins; this works just fine as the JTAG stuff doesn't interfere
with the CPU running (except one particular pin -- think
about it :-) )
But then can the software we load from USB to enable communications between the tiles (xCONNECT switch) again?

It already is connected! The analogue tile is connected to
#0 only. #1 can also reach it, so the link(s) between the
two digital tiles (and routing) must be set up already.
And even enable JTAG?

It's not disabled afaics.


Yes,
The command:

xburn --read --id 0 --target startkit

lists OTP contents, the last line is

SR : 0x00000020

So that means that only the "Secure Boot" bit 5 is set (sorry, got to be sure).
User avatar
fosfor
Member
Posts: 11
Joined: Wed Jul 04, 2012 5:08 pm
Contact:

Postby fosfor » Mon Jan 06, 2014 1:37 pm

mhelin wrote:SR : 0x00000020

So that means that only the "Secure Boot" bit 5 is set (sorry, got to be sure).

Confirming this, same SR in my kit and also my JTAG is (nearly with all features) working.
mhelin
Active Member
Posts: 44
Joined: Fri Dec 24, 2010 10:54 am

Postby mhelin » Mon Jan 06, 2014 11:05 pm

I haven't got the app_hid_mouse_demo running, I get every time the "USB Device Not Recognized" error. I'm running in Windows XP, are you all Linux users? Anyway, I use target u16_noadc in build configuration, and have tried almost all image_n*c0/_2.bin files (mostly the image_n0c0_2.bin as it has been known to work).

In Windows device manager I see that the VID and PID all all zeros, so probably the build configuration is still wrong. I use libusb-win32 drivers from sourceforge (same as startKIT on Windows though the version migh differ).

Could anyone attach a working image_*.bin file, or tell what is going wrong. Maybe it's Windows (no blue screens yet though)...
User avatar
fosfor
Member
Posts: 11
Joined: Wed Jul 04, 2012 5:08 pm
Contact:

Postby fosfor » Mon Jan 06, 2014 11:09 pm

Use u8_noadc binary - that's only on one tile (because through bootloader you can upload app only to one tile). BTW: I', working on Win7.
mhelin
Active Member
Posts: 44
Joined: Fri Dec 24, 2010 10:54 am

Postby mhelin » Tue Jan 07, 2014 10:26 am

fosfor wrote:Use u8_noadc binary - that's only on one tile (because through bootloader you can upload app only to one tile). BTW: I', working on Win7.


I'll try that. I'm wondering also what are the other images, like for u16_adc there are four of them, shouldn't the both image_n0c0.bin and image_n0c0_2.bin needed anyway for the tile[0]?

Did you btw. create the xCORE application (USB HID example) from xSOFTIP or did you use the github version? They are a little bit different. I guess that I just haven't been able to create proper image, got to try with XTAG2 also. I've been using od and gawk to create the header file like in the documentation (http://www.xmos.com/download/public/Dyn ... -XTAG2.pdf).
mhelin
Active Member
Posts: 44
Joined: Fri Dec 24, 2010 10:54 am

Postby mhelin » Tue Jan 07, 2014 10:30 am

The above linked document also has a chapter on modifying the USB L1 Audio example code for running in XTAG2. It tells that "for the USB Audio example you will also need the USB L1 Audio source code (as the port map needs modifying to run on an XTAG2). This must be requested via
your profile on xmos.com.". Isn't the source code available elsewhere these days, like on github?
User avatar
fosfor
Member
Posts: 11
Joined: Wed Jul 04, 2012 5:08 pm
Contact:

Postby fosfor » Tue Jan 07, 2014 11:26 am

I've used code from XMOS.com - xCORE-USB Device Library (sc_usb_device.zip). I have nearly no clue what are those binaries inside XE. There seem to be two of the for each tile. First one didn't work for me, so I used the second one;)

BTW: porting L1 USB Audio demo to startKIT will need some more work - L1 uses external USB controller, but startKIT chip has this controller onboard.
mhelin
Active Member
Posts: 44
Joined: Fri Dec 24, 2010 10:54 am

Postby mhelin » Tue Jan 07, 2014 4:04 pm

Maybe I should try the runDynamic with this libusb version instead:

https://github.com/mattfyles/xmos_libusb_binaries

Also it's maybe useful to clone the whole proj_xtag2 (https://github.com/xcore/proj_xtag2
) from github as well and use the directory structure in README:

Required Repositories

xcommon git@github.com:xcore/xcommon.git
sc_jtag git@github.com:xcore/sc_jtag.git
sc_usb git@github.com:xcore/sc_usb.git
xmos_libusb_binaries git://github.com/mattfyles/xmos_libusb_binaries.git

The directory structure should be:

...
proj_xtag2/
app_l1_jtag
app_l1_otp_programmer/
...
sc_jtag/
module_jtag_master/
module_xcore_debug/
...
sc_usb/
module_xud/
module_usb_shared/
...
xcommon/
...
xmos_libusb_binaries/
...

Guess no all of them are needed, actually the libusb is the only dependency for the run_dynamic_xe I think.
User avatar
fosfor
Member
Posts: 11
Joined: Wed Jul 04, 2012 5:08 pm
Contact:

Postby fosfor » Tue Jan 07, 2014 4:58 pm

mhelin wrote:Maybe I should try the runDynamic with this libusb version instead:

https://github.com/mattfyles/xmos_libusb_binaries

Ah, forget to mention - sorry:) This one is only needed tu build run_dynamic_xe. On the other hand it is not needed for building binary to be loaded into startKIT.
mhelin
Active Member
Posts: 44
Joined: Fri Dec 24, 2010 10:54 am

Postby mhelin » Tue Jan 07, 2014 7:23 pm

There are many steps actually required to get the runDynamic.exe built. For an example setting up the VC commandline tools:

"D:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86

Now when I build the xCORE application I get this error message for module_xud (imported from xsoftip):

xtimecomperror.PNG
xtimecomperror.PNG (9.02 KiB) Viewed 3566 times
xtimecomperror.PNG
xtimecomperror.PNG (9.02 KiB) Viewed 3566 times


It still makes the XE image though, so the error is propably caused by an attempt to build the module (not intended as the build tool is grayed out for this module) I guess.

Attached also the image bin converted to header file.
Attachments
test.h
(51.14 KiB) Downloaded 116 times
test.h
(51.14 KiB) Downloaded 116 times

Return to “startKIT”

Who is online

Users browsing this forum: No registered users and 8 guests