Has anyone transfered files to the xcore over web before?

Technical questions regarding the XTC tools and programming with XMOS.
DemoniacMilk
XCore Addict
Posts: 191
Joined: Tue Jul 05, 2016 2:19 pm

Has anyone transfered files to the xcore over web before?

Post by DemoniacMilk »

Hello lovely people,
once again I got a bit of a problem and would appreciate your input.

I have a system with multiple programmable devices. The xCore is the systems big boss with exclusive access to flash memory. It fetches configuration data/programs from flash and forwards them to the other devices, making sure they all boot correctly and in the right order.

The user shall be able to configure the system through a browser. Browser based configuration is implemented, but I would like to add another functionality: Updating the programs/configurations stored in flash via web, preferably by doing a file upload.

For this I see two possibilities:
  1. HTTP file transfer
  2. (T)FTP file transfer
With the following advantages/disadvantages:
  1. HTTP
    • Advantages
      • Easy integration into the existing website using an HTML input of type="file"
      • User may access configuration and upload thorugh a browser
    • Disadvantages
      • Need to manually add parsing of MIME Protocol
      • Data will be transmited as fast as possible -> flash wont be able to keep up (cant cache the files either, as they might be several Mbit in size) and I dont see How I may
  2. FTP
    • Advantages
      • TFTP available as part of XTCP
      • Should not have problems with flash write speed
    • Disadvantages
      • Not accessible using a standard web surface --> no integration in existing configuration
So, in short: TFTP is more comfortable for development, HTTP is more handy for the end user.

Do you guys see any way of removing the disadvantages of one of the implementations? I would really like to provide a browser based update and would not mind adding the MIME parsing, but I do not know how to handle the flashs low write speed in comparison to ethernet throughput, as I'd need to delay the packet transmission but do not want to alter the uIP/xtcp stacks too much (especially as i need those for the webserver as well).
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

I have seen TFTP used for firmware upgrade in various embedded systems, Linux or other OS