Integrate TCP protocol into SAM

Hello,

I am working in my final degree project, which consists of implementing a DSP module into SAM to process audio signals just like professional audio mixers do. Up to now, I have my equalizer and dynamic sections ready to roll, and now I am working on the development of a GUI that allows me to modify the different parameters via WiFi and see the level and the magnitude frequency response of the audio signal. I chose TCP protocol for that work, but I am a newbie in programming embedded systems and also in TCP sockets. So I tried to find on SAM Wiki page any example or tutorial that could help me, but I didn't succeed.

From what I've been able to find out, the first step is to enable the EMAC peripheral through the Pin Multiplexing tab of the system.svc file located in my core0's folder. First, I tried to enable the EMAC0 peripheral, but CCES indicated me that PTPAUXIN0 and PTPCLKIN0 “(mux: 0) had a mux group conflict with UART1 [UART]-RX (mux: 1)”. So, I enabled the EMAC1 peripheral since the CCES didn't show me any hardware's conflict. Did I do the right thing? Can I work with the EMAC1 peripheral instead of the EMAC0?

The second step should be programming TCP sockets. As far as I know, the related code should be implemented in my core0's src folder, but I'm not sure if I should create its respective 'c' and 'h' files in the drivers folder, since I wasn't able to find any file that managed the EMAC ports.

Could someone provide me a basic guideline about how to integrate TCP protocol into SAM platform?

Thanks.