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'
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.
Sam
|
|
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
change 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.
Gerson
toggle quoted messageShow quoted text
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'
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.
Sam
|
|
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?
Thanks.
Sam
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.
toggle quoted messageShow quoted text
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'
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.
Sam
|
|
Have you tried ‘west update’?
Stephanos
toggle quoted messageShow quoted text
From: users@... <users@...>
On Behalf Of Sam Wong via lists.zephyrproject.org
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|
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?
Thanks.
Sam
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’?
Stephanos
toggle quoted messageShow quoted text
From: users@... <users@...>
On Behalf Of Sam Wong via lists.zephyrproject.org
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|
Hi Sam Wong,
We define two SoC versions at boards/sam_e70_xplained, same for sam_v71_xult: Version SoC rev A:
sam_e70_xplained
Version SoC rev B:
sam_e70b_xplained
> 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? The range [1,3] is for SoC rev A.
Make sure you always use version B since your SoC is the last version and you will see range [1,6].
BR, Gerson Em qua., 8 de jul. de 2020 às 23:11, Sam Wong < sam@...> escreveu:
toggle quoted messageShow quoted text
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?
Thanks.
Sam
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’?
Stephanos
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|
It was my misunderstanding. I thought each board need to have its own folder in boards/arm. I didn’t see a directory boards/arm/sam_e70b_xplained and so never tried to build with sam_e70b_xplained as shown in your first reply.
Instead, I made a sam_e70b_xplained directory out of the files from sam_e70_xplained and got it working. Just now I pulled my folder away and was able to build sam_e70b_xplained just fine
😊.
The remaining mystery is that the range is now stuck in [1,0] for both revisions. As I said, I deleted the zephyr folder and did west init and west update. The range was already [1,0] immediately after west update.
I got round that by putting the correct configs in sam_e70b_defconfig so that I don’t need to run menuconfig.
Anyway, I got the board working.
Thanks again.
Sam.
From: "users@..." <users@...> on behalf of "nandojve@..." <nandojve@...>
Date: Friday, July 10, 2020 at 7:06 AM
To: "users@..." <users@...>
Subject: Re: [Zephyr-users] SAME70 Xplained failed to build with ethernet networking
We define two SoC versions at boards/sam_e70_xplained, same for sam_v71_xult:
Version SoC rev A: sam_e70_xplained
Version SoC rev B: sam_e70b_xplained
> 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?
The range [1,3] is for SoC rev A.
Make sure you always use version B since your SoC is the last version and you will see range [1,6].
Em qua., 8 de jul. de 2020 às 23:11, Sam Wong <sam@...> escreveu:
toggle quoted messageShow quoted text
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?
Thanks.
Sam
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’?
Stephanos
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|
Ok, now we can build let's explore configs.
When you add options -p(restine) auto west will decide about prestine configs and that may be the case of [1,0] config.
So it may doesn't apply the default board configuration.
In general, I always use this command, without -p make build -b sam_e70b_xplained <sample>
It will create a build dir with default configuration and after that you should have [1,1]. Then you can increase that parameter to enable priority queues. We don't enable all because uses a lot of buffers and most applications don't need that feature, it saves RAM.
BR, Gerson Em sex., 10 de jul. de 2020 às 11:55, Sam Wong < sam@...> escreveu:
toggle quoted messageShow quoted text
It was my misunderstanding. I thought each board need to have its own folder in boards/arm. I didn’t see a directory boards/arm/sam_e70b_xplained and so never tried to build with sam_e70b_xplained as shown in your first reply.
Instead, I made a sam_e70b_xplained directory out of the files from sam_e70_xplained and got it working. Just now I pulled my folder away and was able to build sam_e70b_xplained just fine
😊.
The remaining mystery is that the range is now stuck in [1,0] for both revisions. As I said, I deleted the zephyr folder and did west init and west update. The range was already [1,0] immediately after west update.
I got round that by putting the correct configs in sam_e70b_defconfig so that I don’t need to run menuconfig.
Anyway, I got the board working.
Thanks again.
Sam.
We define two SoC versions at boards/sam_e70_xplained, same for sam_v71_xult:
Version SoC rev A: sam_e70_xplained
Version SoC rev B: sam_e70b_xplained
> 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?
The range [1,3] is for SoC rev A.
Make sure you always use version B since your SoC is the last version and you will see range [1,6].
Em qua., 8 de jul. de 2020 às 23:11, Sam Wong <sam@...> escreveu:
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?
Thanks.
Sam
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’?
Stephanos
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|
I deleted build and ran “west build -b sam_e70b_xplained samples/net/telnet”.
I then ran guiconfig and the active range is still stuck at [1,0] and won’t allow me to select anything and always reverts back to 0.
Here is the output when I ran guiconfig. Warnings at the last two lines.
Thanks.
Sam
sam@ubuntu:~/zephyr/zephyr$ west build -t guiconfig
-- west build: running target guiconfig
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)): /home/sam/zephyr/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/sam/zephyr/zephyr/samples/net/telnet
-- Zephyr version: 2.3.99 (/home/sam/zephyr/zephyr)
-- Board: sam_e70b_xplained
-- Found toolchain: zephyr (/opt/zephyr-sdk-0.11.4)
-- Found west: /home/sam/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: /opt/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/sam/zephyr/zephyr/boards/arm/sam_e70_xplained/sam_e70b_xplained.dts
-- Generated zephyr.dts: /home/sam/zephyr/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/sam/zephyr/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/sam/zephyr/zephyr/Kconfig
Loaded configuration '/home/sam/zephyr/zephyr/boards/arm/sam_e70_xplained/sam_e70b_xplained_defconfig'
Merged configuration '/home/sam/zephyr/zephyr/samples/net/telnet/prj.conf'
Configuration saved to '/home/sam/zephyr/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/sam/zephyr/zephyr/build/zephyr/include/generated/autoconf.h'
warning: TEST_RANDOM_GENERATOR (defined at boards/shields/esp_8266/boards/sam4e_xpro.defconfig:17,
subsys/random/Kconfig:8) was assigned the value 'y' but got the value 'n'. Check these unsatisfied
dependencies: ((BOARD_SAM4E_XPRO && NETWORKING && SHIELD_ESP_8266) || !ENTROPY_HAS_DRIVER) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_TEST_RANDOM_GENERATOR.html and/or look
up TEST_RANDOM_GENERATOR in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.
-- Cache files will be written to: /home/sam/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sam/zephyr/zephyr/build
[0/1] cd /home/sam/zephyr/zephyr/build...fig.py /home/sam/zephyr/zephyr/Kconfig
Traceback (most recent call last):
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 2330, in <module>
_main()
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 104, in _main
menuconfig(standard_kconfig(__doc__))
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 238, in menuconfig
_root.mainloop()
File "/usr/lib/python3.8/tkinter/__init__.py", line 1420, in mainloop
self.tk.mainloop(n)
KeyboardInterrupt
Loaded configuration '/home/sam/zephyr/zephyr/build/zephyr/.config'
warning: user value 1 on the int symbol ETH_SAM_GMAC_QUEUES (defined at drivers/ethernet/Kconfig.sam_gmac:21) ignored due to being outside the active range ([1, 0]) -- falling back on defaults
warning: default value 1 on ETH_SAM_GMAC_QUEUES (defined at drivers/ethernet/Kconfig.sam_gmac:21) clamped to 0 due to being outside the active range ([1, 0])
From: "users@..." <users@...> on behalf of "nandojve@..." <nandojve@...>
Date: Friday, July 10, 2020 at 8:15 AM
To: "users@..." <users@...>
Subject: Re: [Zephyr-users] SAME70 Xplained failed to build with ethernet networking
Ok, now we can build let's explore configs.
When you add options -p(restine) auto west will decide about prestine configs and that may be the case of [1,0] config.
So it may doesn't apply the default board configuration.
In general, I always use this command, without -p
make build -b sam_e70b_xplained <sample>
It will create a build dir with default configuration and after that you should have [1,1].
Then you can increase that parameter to enable priority queues. We don't enable all because uses a lot of buffers
and most applications don't need that feature, it saves RAM.
Em sex., 10 de jul. de 2020 às 11:55, Sam Wong <sam@...> escreveu:
toggle quoted messageShow quoted text
It was my misunderstanding. I thought each board need to have its own folder in boards/arm. I didn’t see a directory boards/arm/sam_e70b_xplained and so never tried to build with
sam_e70b_xplained as shown in your first reply.
Instead, I made a sam_e70b_xplained directory out of the files from sam_e70_xplained and got it working. Just now I pulled my folder away and was able to build sam_e70b_xplained
just fine 😊.
The remaining mystery is that the range is now stuck in [1,0] for both revisions. As I said, I deleted the zephyr folder and did west init and west update. The range was already
[1,0] immediately after west update.
I got round that by putting the correct configs in sam_e70b_defconfig so that I don’t need to run menuconfig.
Anyway, I got the board working.
Thanks again.
Sam.
We define two SoC versions at boards/sam_e70_xplained, same for sam_v71_xult:
Version SoC rev A: sam_e70_xplained
Version SoC rev B: sam_e70b_xplained
> 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?
The range [1,3] is for SoC rev A.
Make sure you always use version B since your SoC is the last version and you will see range [1,6].
Em qua., 8 de jul. de 2020 às 23:11, Sam Wong <sam@...> escreveu:
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?
Thanks.
Sam
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’?
Stephanos
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|
Hi @sam, I update my machine with the current main zephyr repo and west update. Unfortunately I can't see the problem.
Environment (please complete the following information): - OS: Linux (Debian Buster)
- Toolchain Zephyr SDK 0.11.3
- Zephyr f014ba1ff
- hal_atmel 1fe96f0a
Could you check the environment and confirm you are at the same hashes? Em sex., 10 de jul. de 2020 às 13:17, Sam Wong < sam@...> escreveu:
toggle quoted messageShow quoted text
I deleted build and ran “west build -b sam_e70b_xplained samples/net/telnet”.
I then ran guiconfig and the active range is still stuck at [1,0] and won’t allow me to select anything and always reverts back to 0.
Here is the output when I ran guiconfig. Warnings at the last two lines.
Thanks.
Sam
sam@ubuntu:~/zephyr/zephyr$ west build -t guiconfig
-- west build: running target guiconfig
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)): /home/sam/zephyr/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/sam/zephyr/zephyr/samples/net/telnet
-- Zephyr version: 2.3.99 (/home/sam/zephyr/zephyr)
-- Board: sam_e70b_xplained
-- Found toolchain: zephyr (/opt/zephyr-sdk-0.11.4)
-- Found west: /home/sam/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: /opt/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/sam/zephyr/zephyr/boards/arm/sam_e70_xplained/sam_e70b_xplained.dts
-- Generated zephyr.dts: /home/sam/zephyr/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/sam/zephyr/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/sam/zephyr/zephyr/Kconfig
Loaded configuration '/home/sam/zephyr/zephyr/boards/arm/sam_e70_xplained/sam_e70b_xplained_defconfig'
Merged configuration '/home/sam/zephyr/zephyr/samples/net/telnet/prj.conf'
Configuration saved to '/home/sam/zephyr/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/sam/zephyr/zephyr/build/zephyr/include/generated/autoconf.h'
warning: TEST_RANDOM_GENERATOR (defined at boards/shields/esp_8266/boards/sam4e_xpro.defconfig:17,
subsys/random/Kconfig:8) was assigned the value 'y' but got the value 'n'. Check these unsatisfied
dependencies: ((BOARD_SAM4E_XPRO && NETWORKING && SHIELD_ESP_8266) || !ENTROPY_HAS_DRIVER) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_TEST_RANDOM_GENERATOR.html and/or look
up TEST_RANDOM_GENERATOR in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.
-- Cache files will be written to: /home/sam/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sam/zephyr/zephyr/build
[0/1] cd /home/sam/zephyr/zephyr/build...fig.py /home/sam/zephyr/zephyr/Kconfig
Traceback (most recent call last):
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 2330, in <module>
_main()
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 104, in _main
menuconfig(standard_kconfig(__doc__))
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 238, in menuconfig
_root.mainloop()
File "/usr/lib/python3.8/tkinter/__init__.py", line 1420, in mainloop
self.tk.mainloop(n)
KeyboardInterrupt
Loaded configuration '/home/sam/zephyr/zephyr/build/zephyr/.config'
warning: user value 1 on the int symbol ETH_SAM_GMAC_QUEUES (defined at drivers/ethernet/Kconfig.sam_gmac:21) ignored due to being outside the active range ([1, 0]) -- falling back on defaults
warning: default value 1 on ETH_SAM_GMAC_QUEUES (defined at drivers/ethernet/Kconfig.sam_gmac:21) clamped to 0 due to being outside the active range ([1, 0])
Ok, now we can build let's explore configs.
When you add options -p(restine) auto west will decide about prestine configs and that may be the case of [1,0] config.
So it may doesn't apply the default board configuration.
In general, I always use this command, without -p
make build -b sam_e70b_xplained <sample>
It will create a build dir with default configuration and after that you should have [1,1].
Then you can increase that parameter to enable priority queues. We don't enable all because uses a lot of buffers
and most applications don't need that feature, it saves RAM.
Em sex., 10 de jul. de 2020 às 11:55, Sam Wong <sam@...> escreveu:
It was my misunderstanding. I thought each board need to have its own folder in boards/arm. I didn’t see a directory boards/arm/sam_e70b_xplained and so never tried to build with
sam_e70b_xplained as shown in your first reply.
Instead, I made a sam_e70b_xplained directory out of the files from sam_e70_xplained and got it working. Just now I pulled my folder away and was able to build sam_e70b_xplained
just fine 😊.
The remaining mystery is that the range is now stuck in [1,0] for both revisions. As I said, I deleted the zephyr folder and did west init and west update. The range was already
[1,0] immediately after west update.
I got round that by putting the correct configs in sam_e70b_defconfig so that I don’t need to run menuconfig.
Anyway, I got the board working.
Thanks again.
Sam.
We define two SoC versions at boards/sam_e70_xplained, same for sam_v71_xult:
Version SoC rev A: sam_e70_xplained
Version SoC rev B: sam_e70b_xplained
> 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?
The range [1,3] is for SoC rev A.
Make sure you always use version B since your SoC is the last version and you will see range [1,6].
Em qua., 8 de jul. de 2020 às 23:11, Sam Wong <sam@...> escreveu:
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?
Thanks.
Sam
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’?
Stephanos
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|
I reinstalled zephyr with “west init” and “west update” on July 19th and I just checked. Menuconfig shows the proper range 1-6 for number of RX/TX queues now.
Sorry, no idea why it is correct now. I did reinstalled zephyr at least twice with the same steps couple of weeks ago and getting the same 1-0 range problem.
I’m running
Ubuntu 20.04 LTS
SDK 0.11.4.
Thanks for checking.
Sam
From: "users@..." <users@...> on behalf of "nandojve@..." <nandojve@...>
Date: Saturday, July 25, 2020 at 10:24 AM
To: "users@..." <users@...>
Subject: Re: [Zephyr-users] SAME70 Xplained failed to build with ethernet networking
Hi @sam,
I update my machine with the current main zephyr repo and west update.
Unfortunately I can't see the problem.
Environment (please complete the following information):
-
OS: Linux (Debian Buster)
-
Toolchain Zephyr SDK 0.11.3
-
Zephyr f014ba1ff
-
hal_atmel 1fe96f0a
Could you check the environment and confirm you are at the same hashes?
Em sex., 10 de jul. de 2020 às 13:17, Sam Wong <sam@...> escreveu:
toggle quoted messageShow quoted text
I deleted build and ran “west build -b sam_e70b_xplained samples/net/telnet”.
I then ran guiconfig and the active range is still stuck at [1,0] and won’t allow me to select anything and always reverts back to 0.
Here is the output when I ran guiconfig. Warnings at the last two lines.
Thanks.
Sam
sam@ubuntu:~/zephyr/zephyr$ west build -t guiconfig
-- west build: running target guiconfig
[0/1] Re-running CMake...
Including boilerplate (Zephyr base (cached)): /home/sam/zephyr/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/sam/zephyr/zephyr/samples/net/telnet
-- Zephyr version: 2.3.99 (/home/sam/zephyr/zephyr)
-- Board: sam_e70b_xplained
-- Found toolchain: zephyr (/opt/zephyr-sdk-0.11.4)
-- Found west: /home/sam/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: /opt/zephyr-sdk-0.11.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/sam/zephyr/zephyr/boards/arm/sam_e70_xplained/sam_e70b_xplained.dts
-- Generated zephyr.dts: /home/sam/zephyr/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/sam/zephyr/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/sam/zephyr/zephyr/Kconfig
Loaded configuration '/home/sam/zephyr/zephyr/boards/arm/sam_e70_xplained/sam_e70b_xplained_defconfig'
Merged configuration '/home/sam/zephyr/zephyr/samples/net/telnet/prj.conf'
Configuration saved to '/home/sam/zephyr/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/sam/zephyr/zephyr/build/zephyr/include/generated/autoconf.h'
warning: TEST_RANDOM_GENERATOR (defined at boards/shields/esp_8266/boards/sam4e_xpro.defconfig:17,
subsys/random/Kconfig:8) was assigned the value 'y' but got the value 'n'. Check these unsatisfied
dependencies: ((BOARD_SAM4E_XPRO && NETWORKING && SHIELD_ESP_8266) || !ENTROPY_HAS_DRIVER) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_TEST_RANDOM_GENERATOR.html
and/or look
up TEST_RANDOM_GENERATOR in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.
-- Cache files will be written to: /home/sam/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sam/zephyr/zephyr/build
[0/1] cd /home/sam/zephyr/zephyr/build...fig.py /home/sam/zephyr/zephyr/Kconfig
Traceback (most recent call last):
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 2330, in <module>
_main()
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 104, in _main
menuconfig(standard_kconfig(__doc__))
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 238, in menuconfig
_root.mainloop()
File "/usr/lib/python3.8/tkinter/__init__.py", line 1420, in mainloop
self.tk.mainloop(n)
KeyboardInterrupt
Loaded configuration '/home/sam/zephyr/zephyr/build/zephyr/.config'
warning: user value 1 on the int symbol ETH_SAM_GMAC_QUEUES (defined at drivers/ethernet/Kconfig.sam_gmac:21) ignored due to being outside the active range ([1, 0]) -- falling back
on defaults
warning: default value 1 on ETH_SAM_GMAC_QUEUES (defined at drivers/ethernet/Kconfig.sam_gmac:21) clamped to 0 due to being outside the active range ([1, 0])
Ok, now we can build let's explore configs.
When you add options
-p(restine) auto west will decide about prestine configs and that may be the case of [1,0] config.
So it may doesn't apply the default board configuration.
In general, I always use this command, without -p
make build -b sam_e70b_xplained <sample>
It will create a build dir with default configuration and after that you should have [1,1].
Then you can increase that parameter to enable priority queues. We don't enable all because uses a lot of buffers
and most applications don't need that feature, it saves RAM.
Em sex., 10 de jul. de 2020 às 11:55, Sam Wong <sam@...> escreveu:
It was my misunderstanding. I thought each board need to have its own folder in boards/arm. I didn’t see a directory boards/arm/sam_e70b_xplained and so never tried to build with
sam_e70b_xplained as shown in your first reply.
Instead, I made a sam_e70b_xplained directory out of the files from sam_e70_xplained and got it working. Just now I pulled my folder away and was able to build sam_e70b_xplained
just fine 😊.
The remaining mystery is that the range is now stuck in [1,0] for both revisions. As I said, I deleted the zephyr folder and did west init and west update. The range was already
[1,0] immediately after west update.
I got round that by putting the correct configs in sam_e70b_defconfig so that I don’t need to run menuconfig.
Anyway, I got the board working.
Thanks again.
Sam.
We define two SoC versions at boards/sam_e70_xplained, same for sam_v71_xult:
Version SoC rev A: sam_e70_xplained
Version SoC rev B: sam_e70b_xplained
> 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?
The range [1,3] is for SoC rev A.
Make sure you always use version B since your SoC is the last version and you will see range [1,6].
Em qua., 8 de jul. de 2020 às 23:11, Sam Wong <sam@...> escreveu:
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?
Thanks.
Sam
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’?
Stephanos
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?
Thanks.
Sam
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,
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'
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.
Sam
|
|