- SAME70 Xplained failed to build with ethernet networking
Re: SAME70 Xplained failed to build with ethernet networking
toggle quoted messageShow quoted text
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 rebase upstream/master
west build -b sam_e70b_xplained samples/net/telnet
Device driver -> Ethernet Driver -> Atmel SAM -> Number of active TX queues to 6 (max)
20 packages receive at same time
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.
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,
../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'
37 | BUILD_ASSERT(ARRAY_SIZE(GMAC->GMAC_TBQBAPQ) + 1 == GMAC_QUEUE_NUM,
[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 firstname.lastname@example.org to automatically receive all group messages.