Re: SAME70 Xplained failed to build with ethernet networking

Sam Wong

Tried many times. No change, still don’t have sam_e70b_xplained.

I even tried from scratch, ran


                West init ~/zephyr

                Cd ~/zephyr

                West update

                Cd zephyr

                West build -p auto -b sam_e70_xplained samples/net/telnet


Don’t know what’s change between now and last week. When I ran menuconfig after building telnet,

“Device driver -> Ethernet Driver -> Atmel SAM -> Number of active TX queues” showed a valid range of [1,0].

Before I re-cloned zephyr, that range used to be [1,3]. How do you fix that?








From: Stephanos Ioannidis <root@...>
Date: Wednesday, July 8, 2020 at 5:15 PM
To: Sam Wong <sam@...>, Gerson Fernando Budke <nandojve@...>
Cc: "users@..." <users@...>
Subject: RE: [Zephyr-users] SAME70 Xplained failed to build with ethernet networking


Have you tried ‘west update’?




From: users@... <users@...> On Behalf Of Sam Wong via
Sent: Thursday, July 9, 2020 7:47 AM
To: Gerson Fernando Budke <nandojve@...>
Cc: users@...
Subject: Re: [Zephyr-users] SAME70 Xplained failed to build with ethernet networking


Hi Gerson,


My apology, I’m new to these.


I deleted the zephyr folder, re-clone from the master. Went to zephyr, type git fetch upstream and got



fatal: 'upstream' does not appear to be a git repository

fatal: Could not read from remote repository.


Please make sure you have the correct access rights

and the repository exists.



sam_e70b_xplained does not exist in the boards/arm folder. Is it part of the upstream repository?





From: Gerson Fernando Budke <nandojve@...>
Date: Wednesday, July 8, 2020 at 2:23 PM
To: Sam Wong <sam@...>
Cc: "users@..." <users@...>
Subject: Re: [Zephyr-users] SAME70 Xplained failed to build with ethernet networking


Hi @ Sam Wong,


I made a build test and it is working for me.


git checkout master

git fetch upstream

git rebase upstream/master

west update


west build -b sam_e70b_xplained samples/net/telnet

west build -t menuconfig



Device driver -> Ethernet Driver -> Atmel SAM -> Number of active TX queues to 6 (max)


Add more buffers:

Network -> Ip Stack ->

20 packages receive at same time

20 packages send

80 network buffer to receive

80 network buffer to send


You can ignore the 2 warnings.

Please, let me know if it works for you.




Em qua., 8 de jul. de 2020 às 14:54, Sam Wong via <> escreveu:

I bought a new SAME70 Xplained board last week and pulled down the latest from Master. 
Sample projects work as long as networking is not involved. Network projects compiled and run but debugging showed that packet reception is fine but nothing got transmitted. 
Did some digging and saw some patches added for Rev.B chip that fixed the problem. I ran config to specify Rev.B chip. However, network projects now failed to build. 


In file included from ../include/toolchain.h:39,

                 from ../include/sys/atomic.h:13,

                 from ../include/logging/log_msg.h:9,

                 from ../include/logging/log_core.h:9,

                 from ../include/logging/log.h:11,

                 from /home/sam/zephyr/zephyr/drivers/ethernet/eth_sam_gmac.c:26:

../include/toolchain/gcc.h:62:36: error: static assertion failed: "GMAC_QUEUE_NUM doesn\'t match soc header"

   62 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)

      |                                    ^~~~~~~~~~~~~~

/home/sam/zephyr/zephyr/drivers/ethernet/eth_sam_gmac_priv.h:37:1: note: in expansion of macro 'BUILD_ASSERT'


      | ^~~~~~~~~~~~

[58/162] Building C object zephyr/arch...rm__core__aarch32.dir/irq_manage.c.obj

ninja: build stopped: subcommand failed.

FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/sam/zeph

Further digging showed that GMAC_QUEUE_NUM is set to 3 but GMAC->GMAC_TBQBAPQ is 5 for Rev.B chip according to the declaration in the SDK. GMAC->GMAC_TBQBAPQ is 2 for Rev.A chip and so it won't trigger the BUILD_ASSERT. 

num_queue is in auto-generated devicetree_unfixed.h in the build directory. I don't know enough to figure out where to look for the origin of num_queue.
Any help would be appreciated.


Join to automatically receive all group messages.