Re: 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.