Date   

LWM2M client to nrf582540-DK #nrf52840 #networking

Nikos Karamolegkos
 

Hi all,

I have two nrf582540-dk modules and I would like to run the lwm2m client example of the link using the leshan server. How could I implement this using real device? How my 802.15.4 device will communicate with the server running on my PC? Is there any border router? 

I really need this. Can someone point me in the right direction?

Thank you,
Nikos


RFC: removing eeprom_slave as driver in Zephyr

Peter A. Bigot
 

The eeprom_slave driver accessed under CONFIG_I2C_EEPROM_SLAVE implements the I2C follower (slave) driver API. This device isn't an actual hardware driver: it's a virtual EEPROM that stores data in an instance-specific RAM buffer, with the data exposed on an I2C bus as a I2C follower device that can be controlled by another device acting as a leader (master) on that same bus.

As such it's a reasonable example of how to write an I2C follower driver, but it's not clear that it has a real use in applications: the sole in-tree reference is in the i2c_slave_api test.

Unless this driver has real-world applications I intend to move this from the drivers directory into the source directory for the test that uses it.  Consequently CONFIG_I2C_EEPROM_SLAVE and the device it provided will no longer be supported.

If you have a use for this driver or other concerns about this please comment at: https://github.com/zephyrproject-rtos/zephyr/issues/27303

Peter


API meeting: agenda

Carles Cufi
 


Re: [solved] Re: SMP Server Sample: Fails to upload over BLE

Lawrence King
 

Hi George:

 

I had no end of trouble with the built-in bluetooth adapter on my laptop. It was an Intel adapter and would only work if I moved the target Zephyr box about 15ft away from the laptop.

 

I changed over to using another nrf52840 board with the hci_usb sample loaded, connected to the laptop via USB. With this setup mcumgr targeted at hci1 instead of hci0 works great.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of George Ruinelli
Sent: Tuesday, August 4, 2020 3:09 AM
To: users@...
Subject: [Zephyr-users] [solved] Re: SMP Server Sample: Fails to upload over BLE

 

Thanks to the support of Nick, I was able to trace it down to an issue in the MCUmgr on the PC side.

There is now an open bug report for this: https://github.com/apache/mynewt-mcumgr-cli/issues/15


[solved] Re: SMP Server Sample: Fails to upload over BLE

George Ruinelli
 

Thanks to the support of Nick, I was able to trace it down to an issue in the MCUmgr on the PC side.

There is now an open bug report for this: https://github.com/apache/mynewt-mcumgr-cli/issues/15


Network forum agenda

Jukka Rissanen
 

Hi all,

There is a network forum meeting today 4 Aug at 8AM PDT / 17.00 CET.

Agenda:

- Making the new TCP stack the default. See
https://github.com/zephyrproject-rtos/zephyr/pull/27208 for details.

- Network stack testing. Maxwell Pro license just expired, any
volunteers to start using it. Discussion how to do network testing in
the future.

If you have anything else you want to discuss, please let me know.

Link to the Teams meeting:

https://teams.microsoft.com/l/meetup-join/19%3ameeting_NDU5ODRkNzktZDBmNC00MDg5LWI2OWEtNzM0MGZjMDU0Yjgw%40thread.v2/0?context=%7b%22Tid%22%3a%22af0096d9-700c-411a-b795-b3dd7122bad2%22%2c%22Oid%22%3a%22841a7c92-7816-4faf-9887-5e334e88f6d8%22%7d


Cheers,
Jukka


SMP Server Sample: Fails to upload over BLE

George Ruinelli
 

Hi all

I am trying to get the "SMP Server Sample" (https://docs.zephyrproject.org/latest/samples/subsys/mgmt/mcumgr/smp_svr/README.html) working.


I have a nrf52840dongle_nrf52840 and successfully installed MCUboot (option #2) and the "SMP Server Sample" on it.
I also have a laptop with a built-in BLE radio.
I successfully can test the connection and even list the image:
> mcumgr --conntype ble --connstring ctlr_name= peer_name='Zephyr' echo hello
hello
sudo mcumgr --conntype ble --connstring ctlr_name=peer_name='Zephyr' image list
Images:
image=0 slot=0
version: 0.0.0
bootable: true
flags: active confirmed
hash: 37a4a9403fbd0a0336152646947ccce5faf6674e3a29b4220eb2b97a2f613b9d
Split status: N/A (0)

How ever when I try to upload a new image, I run into n error:
sudo mcumgr --conntype ble --connstring peer_name='Zephyr' image upload smp_svr.signed.bin -t 100
0 B / 182.61 KiB [--------------------------------------------------------------------------------------------------] 0.00%
panic: send on closed channel
goroutine 493 [running]:
mynewt.apache.org/newtmgr/nmxact/nmp.(*Listener).AfterTimeout.func1()
/home/ubuntu/go/src/mynewt.apache.org/newtmgr/nmxact/nmp/dispatch.go:50 +0x64
created by time.goFunc
/usr/lib/go-1.13/src/time/sleep.go:168 +0x44


Any Idea how this can get fixed?

Sincerely
George

Confidentiality Notice: This e-mail is privileged and confidential and for the use of the addressee only. Should you have received this e-mail in error please notify us by replying directly to the sender or by sending a message to info@kistler.com. Unauthorised dissemination, disclosure or copying of the contents of this e-mail, or any similar action, is prohibited.


Re: Getting to blinky with an ESP32 board

Michael Rosen
 

Did you complete “Step 3: Set up the Tools” on the esp-idf getting started page? If so, you should have run the install script and installed the ESP tools on your system. Depending on where you installed them, there should be a directory at either $HOME/.espressif (or %USERPROFILE%\.espressif on windows) or somewhere else if you installed them elsewhere. Once you find them, you need to set that environment variables for using that espressif toolchain:

 

export ZEPHYR_TOOLCHAIN_VARIANT="espressif"

export ESPRESSIF_TOOLCHAIN_PATH=<<DIRECTORY YOU FOUND EARLIER>>/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/

 

For flashing, you’ll also need a version of esptool.py which you can get from cloning the ESP IDF then setting the path to it for Zephyr to find:

 

export ESP_IDF_PATH=<<PATH TO WHEREEVER YOU DOWNLOADED THE IDF TO>>

 

From: users@... <users@...> On Behalf Of don.haig@...
Sent: Wednesday, July 29, 2020 3:22 PM
To: users@...
Subject: [Zephyr-users] Getting to blinky with an ESP32 board

 

I am trying out Zephyr following the "Getting Started" guide: https://docs.zephyrproject.org/latest/getting_started/index.html#build-the-blinky-sample

I've installed the toolchain and I am trying to get the blinky example running on an ESP32 board. I've installed the latest stable ESP toolchain according to the instructions here:  https://docs.espressif.com/projects/esp-idf/en/stable/get-started/

To set up the build environment, I apparently need to set the following environment variable:

export ESPRESSIF_TOOLCHAIN_PATH="/path/to/xtensa-esp32-elf/"

Unfortunately, there is no "xtensa-esp32-elf/" directory that I can find.

When I try to build the example, I get the following error:
zephyr-sdk-0.11.3/xtensa/esp32/xtensa-zephyr-elf/bin/xtensa-zephyr-elf-gcc
  not found - Please check your toolchain installation

It is probably something simple, but I'm stumped. Can someone point me in the right direction?


Getting to blinky with an ESP32 board

don.haig@...
 

I am trying out Zephyr following the "Getting Started" guide: https://docs.zephyrproject.org/latest/getting_started/index.html#build-the-blinky-sample

I've installed the toolchain and I am trying to get the blinky example running on an ESP32 board. I've installed the latest stable ESP toolchain according to the instructions here:  https://docs.espressif.com/projects/esp-idf/en/stable/get-started/

To set up the build environment, I apparently need to set the following environment variable:
export ESPRESSIF_TOOLCHAIN_PATH="/path/to/xtensa-esp32-elf/"
Unfortunately, there is no "xtensa-esp32-elf/" directory that I can find.

When I try to build the example, I get the following error:
zephyr-sdk-0.11.3/xtensa/esp32/xtensa-zephyr-elf/bin/xtensa-zephyr-elf-gcc
  not found - Please check your toolchain installation

It is probably something simple, but I'm stumped. Can someone point me in the right direction?



sending data to SD card - CS control inhibited (no GPIO device)

Edyta Bosacka <edyta.bosacka@...>
 

I want to write some data in .csv file on SD card. Some of data are written , but then I get error :
 "CS control inhibited (no GPIO device)"

I added this in config file:





I havent got any idea what could cause this problem 🙁


API meeting: agenda

Carles Cufi
 

Hi all,

Today's topics:

- Device: Normalize DMA, IPM and UART callbacks signatures including the caller's device pointer (should be quick, PRs are already approved and email sent to the mailing lists)
- Issue: https://github.com/zephyrproject-rtos/zephyr/issues/26923
- PR: https://github.com/zephyrproject-rtos/zephyr/pull/26426
- PR: https://github.com/zephyrproject-rtos/zephyr/pull/26780
- PR: https://github.com/zephyrproject-rtos/zephyr/pull/26781

- Device: Const-ify device driver instances
- PR: https://github.com/zephyrproject-rtos/zephyr/pull/24873

- Go through the current set of issues in the project and clean up/organize them

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

Teams link: https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWU2MjZlYWEtZDcwMi00MWQzLTgwMjEtNDdkYjQwMjBjMmFj%40thread.v2/0?context=%7b%22Tid%22%3a%22af0096d9-700c-411a-b795-b3dd7122bad2%22%2c%22Oid%22%3a%22841a7c92-7816-4faf-9887-5e334e88f6d8%22%7d

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


ODP: Reading data from LSM6DS33 , I2C

Edyta Bosacka <edyta.bosacka@...>
 

Thank you 🙂 Thanks to your advice I opened this file but I still get error while writing to this file 🙁Do you have any idea why?  I will be very grateful for any help😊

Od: Lawrence King <lawrence.king@...>
Wysłane: piątek, 24 lipca 2020 15:41
Do: Edyta Bosacka <edyta.bosacka@...>; users@... <users@...>
Temat: RE: Reading data from LSM6DS33 , I2C
 

Did you power up the Accelerometer? You should read the full datasheet, here is what is says about power:

 

Operating modes

The LSM6DS33 has three operating modes available:

only accelerometer active and gyroscope in power-down

only gyroscope active and accelerometer in power-down

both accelerometer and gyroscope sensors active with independent ODR

The accelerometer is activated from power down by writing ODR_XL[3:0] in CTRL1_XL

(10h) while the gyroscope is activated from power-down by writing ODR_G[3:0] in

CTRL2_G (11h). For combo mode the ODRs are totally independent.

 

There are a lot of registers (about 60) in this chip, you need to setup the chip before you can use it. Did you set the output data rates? The Fifo? The filters?

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Edyta Bosacka
Sent: Friday, July 24, 2020 5:27 AM
To: users@...
Subject: [Zephyr-users] Reading data from LSM6DS33 , I2C

 

Hi 🙂

I want to read some data (axis_X) from accelerometer but I constantly get "0" answer. 

 


I think my code is fine, but I dont know what could be a reason of my problem
🙁

 


Re: Sending data to .csv file

Lawrence King
 

You didn’t check the return code from fs_open(). I am pretty sure the open failed, I think the correct file path is “/SD:/plink.csv”.

 

You then tried to write to a file with an invalid handle which caused the instruction access violation.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Edyta Bosacka
Sent: Monday, July 27, 2020 10:13 AM
To: users@...
Subject: [Zephyr-users] Sending data to .csv file

 

Hi 🙂 I want to write some data to .csv file.

 

 

I took an example : \zephyrproject\zephyr\samples\subsys\fs\fat_fs and I added these to my code:

 

 

 

In main:

 

Os_x, os_y, os_z - these are variables I wanna have in one row in .csv file.

 

The code compiles, but in terminal I get:

 


What can be the reason of this problem?

 I also tried fs_opendir (&zfp, "C:/Users/user/Desktop/file.csv") but it also doesnt work 🙁 

 


Sending data to .csv file

Edyta Bosacka <edyta.bosacka@...>
 

Hi 🙂 I want to write some data to .csv file.


I took an example : \zephyrproject\zephyr\samples\subsys\fs\fat_fs and I added these to my code:




In main:


Os_x, os_y, os_z - these are variables I wanna have in one row in .csv file.


The code compiles, but in terminal I get:


What can be the reason of this problem?
 I also tried fs_opendir (&zfp, "C:/Users/user/Desktop/file.csv") but it also doesnt work 🙁 


Re: embed data files

artur.lipowski@...
 

Hi,

I usually use srec_cat utility for that purpose.
You can see quite good description here: http://www.keil.com/support/docs/2218.htm

Sometimes also classic xxd tool can be handy: https://linux.die.net/man/1/xxd

Regards,
Artur


Re: embed data files

Jukka Rissanen
 

Hi,

there are multiple networking samples that do this. Search generate_inc_file_for_target() to see some examples.

Cheers,
Jukka


On Thu, 2020-07-23 at 01:17 -0700, adpauly@... wrote:
Dear Experts,

I am new to zephyr and working with nRF9160dk related development.

For testing some functionalities, I thought to include some 'raw resource binary data file' in the code as in the linux's "/etc/<some_config_file>". I am using segger studio. Is it possible to embed some data files in the code and to build an application ? I did a search in the samples, but did not find anything similar. 

Thanks,


Re: SAME70 Xplained failed to build with ethernet networking

Sam Wong
 

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:

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.

 

BR,

Gerson

 

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.

 

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

 

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:

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

 

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 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

 

Em qua., 8 de jul. de 2020 às 14:54, Sam Wong via lists.zephyrproject.org <sam=bbinet.com@...> 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'

   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


Re: SAME70 Xplained failed to build with ethernet networking

nandojve@...
 

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:

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.

 

BR,

Gerson

 

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.

 

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

 

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:

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

 

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 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

 

Em qua., 8 de jul. de 2020 às 14:54, Sam Wong via lists.zephyrproject.org <sam=bbinet.com@...> 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'

   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


Re: Reading data from LSM6DS33 , I2C

Lawrence King
 

Did you power up the Accelerometer? You should read the full datasheet, here is what is says about power:

 

Operating modes

The LSM6DS33 has three operating modes available:

only accelerometer active and gyroscope in power-down

only gyroscope active and accelerometer in power-down

both accelerometer and gyroscope sensors active with independent ODR

The accelerometer is activated from power down by writing ODR_XL[3:0] in CTRL1_XL

(10h) while the gyroscope is activated from power-down by writing ODR_G[3:0] in

CTRL2_G (11h). For combo mode the ODRs are totally independent.

 

There are a lot of registers (about 60) in this chip, you need to setup the chip before you can use it. Did you set the output data rates? The Fifo? The filters?

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Edyta Bosacka
Sent: Friday, July 24, 2020 5:27 AM
To: users@...
Subject: [Zephyr-users] Reading data from LSM6DS33 , I2C

 

Hi 🙂

I want to read some data (axis_X) from accelerometer but I constantly get "0" answer. 

 


I think my code is fine, but I dont know what could be a reason of my problem
🙁

 


Reading data from LSM6DS33 , I2C

Edyta Bosacka <edyta.bosacka@...>
 

Hi 🙂
I want to read some data (axis_X) from accelerometer but I constantly get "0" answer. 



I think my code is fine, but I dont know what could be a reason of my problem 🙁



461 - 480 of 2604