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.
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
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
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
-- 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>
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 104, in _main
File "/home/sam/zephyr/zephyr/scripts/kconfig/guiconfig.py", line 238, in menuconfig
File "/usr/lib/python3.8/tkinter/__init__.py", line 1420, in mainloop
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
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.
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
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?
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’?
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?
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.