app_factory_image_programmer questions

Technical questions regarding the XTC tools and programming with XMOS.
babazaroni
Experienced Member
Posts: 94
Joined: Sun Feb 10, 2013 4:47 am

app_factory_image_programmer questions

Post by babazaroni »

While scanning the flash examples on github, I came across the app_factory_image_programmer. It appears to be composed of two parts, a c file (programmer.c) and an xc file (flash_connect.xc).

Programmer.c appears to run on the pc (it uses functions to read a file), yet it calls a function in the xc file(fl_connect) which must run on the device.

So how can a pc host program call an xc function?

Or does the programmer.c run on the device and can make system calls thru the debug adapter?

Here's the link to the repo: https://github.com/xcore/sw_flashlib_examples


colin
Experienced Member
Posts: 74
Joined: Mon Dec 16, 2013 12:14 pm

Post by colin »

The source filesprogrammer.c and flash_connect.xc are compiled into an xe file that runs on the xCORE device. System calls are then made thru the debug adapter to read the firmware file.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

I found Xmos system call interface which maybe useful, there are also some application notes that can be found using google eg AN10123

regards
Al
babazaroni
Experienced Member
Posts: 94
Joined: Sun Feb 10, 2013 4:47 am

Post by babazaroni »

Very interesting.

What has to be running on the pc side for this to work?

xgdb? xflash? xrun?
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

I guess xrun as this handles things like io buffering/xscope etc.. however it also tends to call on xgdb underneath for debugging purposes.
babazaroni
Experienced Member
Posts: 94
Joined: Sun Feb 10, 2013 4:47 am

Post by babazaroni »

I was able to get this working, but reading the firmware file from the host is very slow.

It seems about 20 times slower then DFU update via usb.

So unless it can be sped up, it's impractical as a factory programmer.