Adding TCP/IP to AVB

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
User avatar
isaacdavis
New User
Posts: 2
Joined: Tue Jul 14, 2015 4:57 pm

Adding TCP/IP to AVB

Post by isaacdavis »

Hello,

I am developing on the xCORE 200 Multichannel Audio Platform. I am currently running the example program "Gigabit Ethernet AVB endpoint example using TDM master," documented here:

https://www.xmos.com/download/private/A ... rc1%29.pdf

and am trying to add TCP/IP functionality to the program using this documentation:

https://www.xmos.com/download/private/A ... rc3%29.pdf

as a guide. However, the above TCP/IP example is written using version 3.2.1 of the xtcp library, and I am trying to use version 4.0.1, as I am using the current versions of all other libraries and want to avoid having to include old versions of other libraries as dependencies.

There seem to be some differences between the old and new xtcp libraries. These differences are preventing the example code from working for me. In particular, the function to set up a uip server,

Code: Select all

void xtcp_server_uip(chanend mac_rx,
                chanend mac_tx,
                chanend xtcp[],
                int num_xtcp_clients,
                xtcp_ipconfig_t &?ipconfig);
which is in the file lib_xtcp/xtcp_uip/uip_server.h, has no accompanying .c file with the actual function implementation. There is an alternative implementation in lib_xtcp/xtcp_uip6/uip_server.h and lib_xtcp/xtcp_uip6/uip_server.c, but I have found that this is the exact same implementation as in the older xtcp library, and these files require an older ethernet library, where I am using the newest lib_ethernet library.

Does anyone have suggestions of what implementation of the uip server I should use and where to find it? Do I need to make other changes to the old tcp example code? Is there anything else I'm doing wrong?

Alternatively, I have tried using the lib_webserver library instead. However, if I try to include the webserver.h header file in my program, I get countless type errors in the standard library file <flash.h>:

Code: Select all

In file included from /home/isaac/yourheaven/yh-xcore-dqe/lib_webserver/api/web_server.h:10:
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:35:3: error: conflicting types for 'PROT_TYPE_NONE'
  PROT_TYPE_NONE=0, /**< No protection. */
  ^~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:36:3: error: conflicting types for 'PROT_TYPE_SR'
  PROT_TYPE_SR=1,   /**< Device can be protected by writing the status register. */
  ^~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:37:3: error: conflicting types for 'PROT_TYPE_SECS'
  PROT_TYPE_SECS=2,  /**< Device has commands for protecting individual sectors. */
  ^~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:38:3: error: conflicting types for 'PROT_TYPE_SR_2X'
  PROT_TYPE_SR_2X=3,   /**< Device can be protected by writing the status register (need double write). */
  ^~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:39:3: error: redefinition of typedef 'fl_ProtectionType'
} fl_ProtectionType;
  ^~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:43:3: error: conflicting types for 'SECTOR_LAYOUT_REGULAR'
  SECTOR_LAYOUT_REGULAR=0, /**< All sectors the same size. */
  ^~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:44:3: error: conflicting types for 'SECTOR_LAYOUT_IRREGULAR'
  SECTOR_LAYOUT_IRREGULAR  /**< Sectors have different sizes. */
  ^~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:45:3: error: redefinition of typedef 'fl_SectorLayout'
} fl_SectorLayout;
  ^~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:152:1: error: conflicting types for 'fl_connect'
int fl_connect(fl_SPIPorts& SPI);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:169:1: error: conflicting types for 'fl_connectToDevice'
int fl_connectToDevice(fl_SPIPorts &SPI, const fl_DeviceSpec spec[], unsigned n);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:205:1: error: conflicting types for 'fl_getSpiId'
unsigned fl_getSpiId(fl_SPIPorts & SPI, unsigned id_command);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:240:3: error: redefinition of typedef 'fl_BootImageInfo'
} fl_BootImageInfo;
  ^~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:250:1: error: conflicting types for 'fl_getFactoryImage'
int fl_getFactoryImage(fl_BootImageInfo& bootImageInfo);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:264:1: error: conflicting types for 'fl_getNextBootImage'
int fl_getNextBootImage(fl_BootImageInfo& bootImageInfo);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:275:1: error: conflicting types for 'fl_getImageVersion'
unsigned fl_getImageVersion(fl_BootImageInfo& bootImageInfo);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:295:1: error: conflicting types for 'fl_startImageAdd'
int fl_startImageAdd(fl_BootImageInfo &bootImageInfo, unsigned maxsize,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:332:1: error: conflicting types for 'fl_startImageReplace'
int fl_startImageReplace(fl_BootImageInfo &bootImageInfo, unsigned maxsize);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:358:1: error: conflicting types for 'fl_deleteImage'
int fl_deleteImage(fl_BootImageInfo &bootImageInfo);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:370:1: error: conflicting types for 'fl_startDeleteImage'
int fl_startDeleteImage(fl_BootImageInfo &bootImageInfo);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:380:1: error: conflicting types for 'fl_startImageRead'
int fl_startImageRead(fl_BootImageInfo &bootImageInfo);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/main.xc:22:
In file included from /home/isaac/yourheaven/yh-xcore-dqe/lib_webserver/api/web_server.h:10:
In file included from /opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/flash.h:506:
/opt/XMOS/xTIMEcomposer/Community_14.0.4/target/include/SpecEnum.h:6:3: error: conflicting types for 'UNKNOWN'
  UNKNOWN = 0,
Does anyone know what's going on in this case?

Thank you!


Post Reply