I have write a basic network driver for FreeRTOS-PLUS TCP FreeRTOS-Plus tcp driver for TMS320F2838x (github.com). This driver uses the ethernet.h library from driverlib_cm from texas instrument. All your feedback and advice are greatly appreciated to improve this driver
Thank you for sharing this network interface.
Is it using zero-copy techniques?
When this statement is executed, are you sure that the sending is complete?
Why do you clear pxDescriptor->pucEthernetBuffer
before freeing the network buffer?
Does the EMAC have a buffer of outgoing packets?
Just get more information, can you attach your FreeRTOSIPConfig.h header please? Thanks.
Thanks @adrien for writting the driver.
Please create a PR in GitHub for the same for https://github.com/FreeRTOS/FreeRTOS-Plus-TCP repo. We will take it up from there and review the same.
No not at the moment this is the next step
no I need to add a test
good question, it’s actually not necessary
I do not think so
Hello Adrien,
This time I looked much more into detail, and added some comments:
tms320f2838x.v2.c (14.4 KB)
The comments start with // _HT_
Have you already seen this call-back from the TI library?
/** Free packet call back called after the completion of Tx and
when the buffer needs to handled back to application */
void (*pfcbFreePacket )( Ethernet_Handle handleApplication,
Ethernet_Pkt_Desc *pPacket);
It can be useful when you want to send multiple packets without waiting.
We normally use a counting semaphore, see for example here.
If you have a TX queue of 3 descriptors, your semaphore will have a max count of 3, and an initial value of 3 as well.
The function NetworkInterfaceOutput()
will decrease the semaphore, it will be increased after the callback.
This mechanism may help you in finding out why the ETHERNET_DESC_OWNER
bit wasn’t cleared, as you wrote.
Hello, Adrien,
First of all, thank you for sharing your work, I am working on ethernet-tcp with the f28388d card and I want to run my tcp application on freertos and I am very new to these things, so can you share this project on github if FreeRTOS-PLUS TCP is not private?
This source code may not make much sense for people like me who are new to this.
I wish you good work.
Hi @mkaya ,
Application interacts with FreeRTOS-plus-TCP stack using the socket APIs.
You can refer to the FreeRTOS-plus-TCP wiki page FreeRTOS Plus TCP - A free thread aware TCP/IP stack for FreeRTOS for the sicket API signatures.
Also we have some demos which you can refer to create the TCP application.