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




respectively for




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


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:


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.


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


So I think it should not be the latest version.


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.