Date   

I2C: Bitbang driver and clock stretching

Turbo J
 

Hi,

while playing with an BQ27421YZFR battery gauge, I noticed that the I²C
bitbang driver does not support clock stretching.

Easy enough to fix: https://github.com/zephyrproject-rtos/zephyr/pull/16849

The code in i2c_gpio_set_scl() just waits until SCL actually reads back
as high.

There is currently no timeout - misbehaving slave would cause a deadlock.

I also noticed that reading a bit from the SDA line was done a bit too
early - it is supposed to be done when SCL is high.
Slaves w/o clock stretching would not have noticed this bug, as these
would set up SDA line early enough.

Yours sincerely,

Jörg Fischer


Re: ninja guiconfig fail #gettingstartedguide

hotkernel@...
 

Hi,
I get it, thanks for your patience explain.


Re: ninja guiconfig fail #gettingstartedguide

Bolivar, Marti
 

Hi,

"hotkernel via Lists.Zephyrproject.Org"
<hotkernel=163.com@lists.zephyrproject.org> writes:

Hi Carles,
Thank you for reminding me that the guiconfig was introduced after the release of Zephyr 1.14 at master.
So if use the git clone to get the source code not by the west tool (git clone https://github.com/zephyrproject-rtos/zephyr.git source2)
then I can launch "ninia guiconfig" under the build directory.
It doesn't matter how you get the source code; west will work too.
The important thing is that you need something more recent than LTS for
this new feature.

If you run plain "west init" it will pull the latest zephyr master --
you would actually have to specify additional arguments not to get the
latest, as in "west init --mr v1.14.0".

If you previously cloned zephyr v1.14 and want to update to a later
version, you can use "git pull". Just make sure to run "west update"
after each git pull to update your modules. As has been discussed on
other threads in this list, new modules are being added often right now
as zephyr/ext is cleared out, and your build will break if you don't
keep the up to date.

Thanks,
Marti




Re: ninja guiconfig fail #gettingstartedguide

hotkernel@...
 

Hi Carles,
Thank you for reminding me that the guiconfig was introduced after the release of Zephyr 1.14 at master.
So if use the git clone to get the source code not by the west tool (git clone https://github.com/zephyrproject-rtos/zephyr.git source2)
then I can launch "ninia guiconfig" under the build directory.


Zephyr SDK 0.10.1 available

Kumar Gala
 

Hi,

Latest version of the SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.10.1

Please download and try things out and report any issues.

Changes since the last release:

• --enable-initfini-array to gcc configure
• Fix bossa (revert back to 1.9.1)
• Enable multilibs on RISC-V
• Fix inclusion of MIPS toolchain
• Add x86_64 toolchain
• Fix assembler issue for Cortex M-23
• Fixes for openocd on ARC
• Updated TI CC32xx openocd scripts

Thanks to all that contributed fixes and enhancements to this version of the SDK.

- k


Re: is it possible to implement concurrent link with mutiple roles on nrf52832 with zephyr os ? #nrf52832 #ble

hotkernel@...
 


Re: ninja guiconfig fail #gettingstartedguide

Carles Cufi
 

Hi there,

 

I can’t explain it unless you are not on the current master. guiconfig was introduced after the release of Zephyr 1.14, so if you are on 1.14 you won’t be able to use it.

 

Carles

 

From: devel@... <devel@...> On Behalf Of hotkernel via Lists.Zephyrproject.Org
Sent: 13 June 2019 16:39
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] ninja guiconfig fail #gettingstartedguide

 

Hi Carles,
Here is my detail steps to reproduce this fail:
OS version: Ubuntu 18.04.2 LTS 64 bits
 
install zephyr development environment:
    1. sudo apt-get update
    2. sudo apt-get upgrade
    3. 
        sudo apt-get install --no-install-recommends git cmake ninja-build gperf \
        ccache dfu-util device-tree-compiler wget \
        python3-pip python3-setuptools python3-wheel xz-utils file make gcc \
        gcc-multilib 
    4. pip3 install --user cmake

zephyr sdk:
    1. version:  zephyr-sdk-0.10.0-setup.run
    2. install path: ~/zephyr/sdk
 
get zephyr source code:
    cd ~/zephyr
    pip3 install --user west
    west --version
    west init source
    cd source
    west update
 
    the version was 1.14.99, source path: ~/zephyr/source
 
install python packages:
    cd ~/zephyr/source
    pip3 install --user -r zephyr/scripts/requirements.txt     
    sudo apt-get install python3-tk
 
export variant:
    cd ~/zephyr/source/zephyr
    export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
    export ZEPHYR_SDK_INSTALL_DIR=~/zephyr/sdk
    source zephyr-env.sh
 
build sample:
    cd samples/bluetooth/hci_uart/
    mkdir build && cd build
    cmake -GNinja -DBOARD=nrf52_pca10040 ..
 
output:
    Zephyr version: 1.14.99
-- Selected BOARD nrf52_pca10040
-- Found west: /home/jeremy/.local/bin/west (found suitable version "0.5.7", minimum required is "0.5.6")
-- Loading /home/jeremy/zephyr/source/zephyr/boards/arm/nrf52_pca10040/nrf52_pca10040.dts as base
-- Overlaying /home/jeremy/zephyr/source/zephyr/dts/common/common.dts
-- Overlaying /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/nrf52_pca10040.overlay
Parsing Kconfig tree in /home/jeremy/zephyr/source/zephyr/Kconfig
Loading /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config as base
Configuration written to '/home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config'
-- Cache files will be written to: /home/jeremy/.cache/zephyr
Including module: tinycbor in path: /home/jeremy/zephyr/source/modules/lib/tinycbor
Including module: qmsi in path: /home/jeremy/zephyr/source/modules/hal/qmsi
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build
 
    ninja
output:
[137/142] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       73191 B       512 KB     13.96%
            SRAM:       18908 B        64 KB     28.85%
        IDT_LIST:         136 B         2 KB      6.64%
[142/142] Linking C executable zephyr/zephyr.elf
 
 
    jeremy@jeremy:~/zephyr/source/zephyr/samples/bluetooth/hci_uart/build$ ninja menuconfig
[0/1] cd /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/...urce/zephyr/scripts/kconfig/menuconfig.py /home/jeremy/zephyr/source/zephyr/Kconfig
Using existing configuration '/home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config' as base
No changes to save (for '/home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config')
 
 
    jeremy@jeremy:~/zephyr/source/zephyr/samples/bluetooth/hci_uart/build$ ninja guiconfig
ninja: error: unknown target 'guiconfig'
 
 
 
 


Upcoming Event: Zephyr Project: Dev Meeting - Thu, 06/13/2019 8:00am-9:00am, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: Dev Meeting

When: Thursday, 13 June 2019, 8:00am to 9:00am, (GMT-07:00) America/Los Angeles

Where:https://zoom.us/j/993312203

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description: Join Zoom Meeting
https://zoom.us/j/993312203

One tap mobile
+16699006833,,993312203# US (San Jose)
+16465588656,,993312203# US (New York)

Dial by your location
        +1 669 900 6833 US (San Jose)
        +1 646 558 8656 US (New York)
        +1 877 369 0926 US Toll-free
        +1 855 880 1246 US Toll-free
Meeting ID: 993 312 203
Find your local number: https://zoom.us/u/ankEMRagf


Re: ninja guiconfig fail #gettingstartedguide

hotkernel@...
 

Hi Carles,
Here is my detail steps to reproduce this fail:
OS version: Ubuntu 18.04.2 LTS 64 bits
 
install zephyr development environment:
    1. sudo apt-get update
    2. sudo apt-get upgrade
    3. 
        sudo apt-get install --no-install-recommends git cmake ninja-build gperf \
        ccache dfu-util device-tree-compiler wget \
        python3-pip python3-setuptools python3-wheel xz-utils file make gcc \
        gcc-multilib 
    4. pip3 install --user cmake

zephyr sdk:
    1. version:  zephyr-sdk-0.10.0-setup.run
    2. install path: ~/zephyr/sdk
 
get zephyr source code:
    cd ~/zephyr
    pip3 install --user west
    west --version
    west init source
    cd source
    west update
 
    the version was 1.14.99, source path: ~/zephyr/source
 
install python packages:
    cd ~/zephyr/source
    pip3 install --user -r zephyr/scripts/requirements.txt     
    sudo apt-get install python3-tk
 
export variant:
    cd ~/zephyr/source/zephyr
    export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
    export ZEPHYR_SDK_INSTALL_DIR=~/zephyr/sdk
    source zephyr-env.sh
 
build sample:
    cd samples/bluetooth/hci_uart/
    mkdir build && cd build
    cmake -GNinja -DBOARD=nrf52_pca10040 ..
 
output:
    Zephyr version: 1.14.99
-- Selected BOARD nrf52_pca10040
-- Found west: /home/jeremy/.local/bin/west (found suitable version "0.5.7", minimum required is "0.5.6")
-- Loading /home/jeremy/zephyr/source/zephyr/boards/arm/nrf52_pca10040/nrf52_pca10040.dts as base
-- Overlaying /home/jeremy/zephyr/source/zephyr/dts/common/common.dts
-- Overlaying /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/nrf52_pca10040.overlay
Parsing Kconfig tree in /home/jeremy/zephyr/source/zephyr/Kconfig
Loading /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config as base
Configuration written to '/home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config'
-- Cache files will be written to: /home/jeremy/.cache/zephyr
Including module: tinycbor in path: /home/jeremy/zephyr/source/modules/lib/tinycbor
Including module: qmsi in path: /home/jeremy/zephyr/source/modules/hal/qmsi
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build
 
    ninja
output:
[137/142] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       73191 B       512 KB     13.96%
            SRAM:       18908 B        64 KB     28.85%
        IDT_LIST:         136 B         2 KB      6.64%
[142/142] Linking C executable zephyr/zephyr.elf
 
 
    jeremy@jeremy:~/zephyr/source/zephyr/samples/bluetooth/hci_uart/build$ ninja menuconfig
[0/1] cd /home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/...urce/zephyr/scripts/kconfig/menuconfig.py /home/jeremy/zephyr/source/zephyr/Kconfig
Using existing configuration '/home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config' as base
No changes to save (for '/home/jeremy/zephyr/source/zephyr/samples/bluetooth/hci_uart/build/zephyr/.config')
 
 
    jeremy@jeremy:~/zephyr/source/zephyr/samples/bluetooth/hci_uart/build$ ninja guiconfig
ninja: error: unknown target 'guiconfig'
 
 
 
 


Re: "net arp" command displays "ARP cache is empty" even after a series of arpings from peer devices #nrf52840

giriprasad@...
 

Hi,

Thanks for your reply. I am sure that, I am getting ICMP reply correctly and there is no entry in the ARP cache. But, I need to tell you about a code change that I have made in the Zephyr drivers, in the process of my application development. I have disabled a piece of code in the file "zephyr/subsys/net/l2/ethernet/ethernet.c". Attached this file to the mail. The code under "#if DISABLED"  is the code that was disabled. Please let me know whether this change is responsible for the behavior I have stated in my previous mail. Below is the reason for the code-change. Please go through.

Reason for the code change:
I was trying to interface ENC28J60 to PCA10056. I have flashed dumb_http_server example. But I was unable to see the web page in the browser. I have verified the ethernet packet transactions in wireshark application. I saw a series of ARP requests and replies between server and client. (Please verify the screenshot of wireshark application attached to the mail. In the attached screenshot "10.128.8.103" is the IP of the system where I am loading the web page and "Microchi_23:3d:65"  is the ip of my device.) So, for a trial I have disabled the ARP related code in the function "ethernet_ll_prepare_on_ipv4". From then, I was able to see the web page on the browser. Also, I am able to ping the device. But ARP cache always shows as empty. 

Please help me to understand, why I was unable to see web page until I disabled ARP related code. Also let me know whether my code change is responsible for ARP cache being empty. Please let me know if you need more information.

Thanks in advance,
Giri Prasad N.


Re: ninja guiconfig fail #gettingstartedguide

Carles Cufi
 

Hi there,

 

Can you please let us know what error you get?

Also, can you give us more details including which Zephyr version (master, 1.14, etc), what Host OS (Linux, Windows, macOS) and which toolchain configuration? (ZEPHYR_TOOLCHAIN_VARIANT)

 

Carles

 

From: devel@... <devel@...> On Behalf Of hotkernel via Lists.Zephyrproject.Org
Sent: 12 June 2019 02:39
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] ninja guiconfig fail #gettingstartedguide

 

Hi, after I building the example: samples/bluetooth/hci_uart, under the directory "build",
I can run "ninja menuconfig" command successfully, but run "ninja guiconfig" failed.
I have searched the zephyr online document for help, but did not find the answer.
Can some one tell me how to launch the command "ninja guiconfig". Thanks in advance.


ninja guiconfig fail #gettingstartedguide

hotkernel@...
 

Hi, after I building the example: samples/bluetooth/hci_uart, under the directory "build",
I can run "ninja menuconfig" command successfully, but run "ninja guiconfig" failed.
I have searched the zephyr online document for help, but did not find the answer.
Can some one tell me how to launch the command "ninja guiconfig". Thanks in advance.


Upcoming Event: Zephyr Project: APIs - Tue, 06/11/2019 9:00am-10:00am, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: APIs

When: Tuesday, 11 June 2019, 9:00am to 10:00am, (GMT-07:00) America/Los Angeles

Where:https://zoom.us/j/177647878

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description: Join from PC, Mac, Linux, iOS or Android: https://zoom.us/j/177647878

Or iPhone one-tap :
    US: +16465588656,,177647878# or +16699006833,,177647878# 
Or Telephone:
    Dial(for higher quality, dial a number based on your current location): 
        US: +1 646 558 8656 or +1 669 900 6833 or +1 855 880 1246 (Toll Free) or +1 877 369 0926 (Toll Free)
    Meeting ID: 177 647 878
    International numbers available: https://zoom.us/zoomconference?m=ioAR9GK1OE5LkN1ojt-heTCl7yPcJrhY


 Live meeting minutes: https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit?usp=sharing


API meeting: Agenda

Carles Cufi
 

Agenda:

- New proposal: Video for Zephyr API
- New proposal: clock_control extension
- Counter extensions: Update on progress
- Sensor API: Update on progress
- GPIO: Update on progress

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.

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


Quark_D lightweight crypto

jacob morales
 

Hi, i am currently i am working developing a lightweight crypto primitive (https://131002.net/quark/quark_full.pdf), in brief, it is a module that returns fix size hash/digest of an arbitrary stream of information. I have "figured out" most of the implementation of the module, but the problem that is that of how to process the incoming stream of information, all the prove of concepts on the web use a pointer to an area of memory and they indicate the number of chuncks of information to be hashed. I don't think that this is feasible because i will execute the code in an arduino 101 or a quark d-2000 which don't have the memory to do that. So the partial solution that i have now is to implement an asynchronous protocol, something like this:

void quark_u()
{
     unsigned char flag=1;
     unsigned char chunk=0x00;
     while(flag) 
     {
           m=/*read */;
           flag=/*read*/;
     }
}

My intention is to be platform independent, is this possible? or should it be different versions of this function that read specific I/O ports of specific platforms?, any insight, observation or pointer will be greatly appreciated.
 
--
Kind Regards


is it possible to implement concurrent link with mutiple roles on nrf52832 with zephyr os ? #nrf52832 #ble

hotkernel@...
 
Edited

Hi,
I want to implement a such system that there are about 10 BLE devices running with zephyr os on nrf52832,
and some of them act as Central role, and some of them act as Peripheral role, and some provide
both Central and Peripheral roles simultaneously. By this I can build a network to transfer data with
BLE connection and low latency than BLE mesh network.
 
I have found that the Nordic softdevice support concurrent link with multiple roles at the same time.
and I'm a new user of zephyr and not sure that the zephyr os support such multiple roles, is there any
example code for this application for nrf52 ?
Thanks in advance!


Re: [Zephyr-announce] Zephyr SDK 0.10.1-rc1 available

Paul Sokolovsky
 

Hello Kumar,

On Thu, 6 Jun 2019 17:01:06 -0500
Kumar Gala <kumar.gala@linaro.org> wrote:

[]


Can we please before the release do something about very outdated
Newlib in Xtensa SDK toolchain:
https://github.com/zephyrproject-rtos/sdk-ng/issues/64 ? That
complicates most of POSIX subsys work, and requires landing ugly
workarounds in the main codebase.
Is there a newer Newlib for Xtensa available?
To the best of my knowledge, there's a single Newlib project, hosted at
https://sourceware.org/newlib/ , which is mostly
architecture-independent, though definitely may need some arch-specific
code (setjmp/longjmp are usual suspects). If there's a fork of Newlib
with Xtensa-specific changes, made in 2015, and not merged upstream
since then, and we chose to use it in Zephyr SDK, then ... we have a
typical downstream maintenance problem.

I definitely can look in Zephyr SDK project to see if that's true, but
I'm not sure if that would help much. The above situation doesn't
scale, and if we're blocked on outdated Newlib for one of
architectures, another approach would be to state that POSIX subsystem
requires up-to-date Newlib (on par with the rest of the archs), and
then exclude non-compliant archs from CI for POSIX subsys.

Let me know if you agree and I should prepare such a patch on next
occasion where Xtensa fails where other platforms works ok.


- k

--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog


Re: "net arp" command displays "ARP cache is empty" even after a series of arpings from peer devices #nrf52840

Jukka Rissanen
 

Hi,

from the attached .config file, the zephyr IP address is 10.128.8.81, and if you ping it from your network, you get a ICMP reply correctly but still no entry in arp cache in zephyr, is this correct? There definitely should be entry in arp cache as otherwise zephyr would not be able to send the reply back. Are you sure that you are pinging the correct device in this case?

Cheers,
Jukka


On Fri, 2019-05-31 at 04:00 -0700, giriprasad@... wrote:
Hi,

I have interfaced "ENC28J60" to "PCA10056"(NRF52840) through SPI. Made necessary configurations in order to reflect hardware changes in software. Flashed sample application, "dumb_http_server" to the board. Enabled "ARP" and "ICMP". I am able to ping the board from peer devices in network and vice versa. Also, I am able to "arping" the board from peer devices in network. After this, I have issued "net arp" command in the serial console of the board. By this, I am expecting a list of peer devices to be displayed on the console. But console throws a message saying "ARP cache is empty". Can I know the reason for this behavior? Please let me know, if I was wrong in the process. Also, let me know if more information is needed. Attached configuration file for reference.

Thanks & Regards,
Giri Prasad N.


Re: [Zephyr-announce] Zephyr SDK 0.10.1-rc1 available

Kumar Gala
 

On Jun 6, 2019, at 6:26 AM, Paul Sokolovsky <paul.sokolovsky@linaro.org> wrote:

Hello Kumar,

On Thu, 6 Jun 2019 06:01:27 -0500
"Kumar Gala" <kumar.gala@linaro.org> wrote:

Hi,
Latest version of the SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.10.1-rc1

Please download and try things out and report any issues.

Changes since the last release:

• --enable-initfini-array to gcc configure
• Fix bossa (revert back to 1.9.1)
• Enable multilibs on RISC-V
• Fix inclusion of MIPS toolchain
• Add x86_64 toolchain
• Fix assembler issue for Cortex M-23
• Fixes for openocd on ARC
• Updated TI CC32xx openocd scripts

Can we please before the release do something about very outdated Newlib
in Xtensa SDK toolchain:
https://github.com/zephyrproject-rtos/sdk-ng/issues/64 ? That
complicates most of POSIX subsys work, and requires landing ugly
workarounds in the main codebase.
Is there a newer Newlib for Xtensa available?

- k


Upcoming Event: Zephyr Project: Dev Meeting - Thu, 06/06/2019 8:00am-9:00am, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: Dev Meeting

When: Thursday, 6 June 2019, 8:00am to 9:00am, (GMT-07:00) America/Los Angeles

Where:https://zoom.us/j/993312203

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description: Join Zoom Meeting
https://zoom.us/j/993312203

One tap mobile
+16699006833,,993312203# US (San Jose)
+16465588656,,993312203# US (New York)

Dial by your location
        +1 669 900 6833 US (San Jose)
        +1 646 558 8656 US (New York)
        +1 877 369 0926 US Toll-free
        +1 855 880 1246 US Toll-free
Meeting ID: 993 312 203
Find your local number: https://zoom.us/u/ankEMRagf

2001 - 2020 of 8033