FreeRTOS_Plus_TCP on SAM4E_EK

Hello

I’m trying to port the FreeRTOS + TCP v2.4.0 library to SAM4E-EK board in AtmelStudio, and I’m curious whether I need to cover the files under

…\FREERTOS_SAM_EXAMPLE1\src\ASF\sam\utils\cmsis\sam4e\include\component\gmac.h

and

…\FREERTOS_SAM_EXAMPLE1\src\ASF\sam\utils\cmsis\sam4e\include\instance\gmac.h

respectively for

…\FreeRTOS-Plus-TCP-2.4.0\portable\NetworkInterface\ATSAM4E\component\gmac.h

and

…\FreeRTOS-Plus-TCP-2.4.0\portable\NetworkInterface\ATSAM4E\instance\gmac.h

It seems that the definition of RwReg, RoReg and WoReg is missing from document component\gmac.h in FreeRTOS-Plus-TCP-2.4.0, but I can make up for it myself. After I modify the definition, the compiler will report a lot of errors like

expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

or

declaration for parameter 'sysclk_set_prescalers' but no such parameter

and other mistakes, as if trying to tell me that a ; or another symbol is missing in a file, or other mistakes. I can’t find out where the symbol is missing. So did anyone else have this problem?

Note that the newest driver is called DriverSAM. It works for both SAM4E and for SAME70.

This has always been very confusing:

include\component\gmac.h
include\instance\gmac.h

In the new driver, you will find \DriverSAM\gmac_SAM.h so there won’t be overlap with existing gmac.h files.

Note that there were 2 recent PR’s for DriverSAM: PR #568 and #567.
Both PR’s are merged already.

Please tell us how DriverSAM works for you.

Thanks.

I’m not sure which driver version I use, in fact I can’t find a file namedgmac_SAM.h and there is no such folder named DriverSAM in Solution Explorer.
My Ethernet driver comes from Atmel ASF (3.52.0) and is automatically imported into the project by the compiler. Only include\component\gmac.h and include\instance\gmac.h can be found in the project. By the way, these files exist in the solution

src\ASF\sam\drivers\gmac\gmac.h
src\ASF\sam\drivers\gmac\gmac_phy.c
src\ASF\thirdparty\lwip\lwip-port-1.4.1\sam\include\netif\sam4e_gmac.h
src\ASF\thirdparty\lwip\lwip-port-1.4.1\sam\netif\sam4e_gmac.c

So I think it should not be the latest version.

Thanks

Oh, I found out where my mistakes were. The problem was not as complicated as I thought. Now the TCP library in my project can run normally.

Glad that you figured it out. Would be great if you can share your solution too for everyone’s benefit. Thanks.