Date   
Arch: RISC-V PMP on Qemu

antmc@...
 

Hello,
 
I am new here and I don't know if this is the right place to ask these kind of questions, if not, sorry!
 
Me and my friend are currently doing our thesis about RISC-V and the latest standard with physical memory protection (PMP) on embedded systems with no MMU. For this, we are using Zephyr RTOS (we have cloned the git repo) and the qemu_riscv32. We have currently not done any bigger changes to the kernel and arch files for RISC-V, instead we have created a small API that will set up the PMP registers, go to U-mode, test it etc. Now, to my main question: Does the qemu_riscv32 support the latest RISC-V standard? I wonder because when debugging, the pmp registers are all set and seems to be correct but sometimes the permissions are completely ignored. Maybe we have understood the RISC-V specification wrong... 
 
Example case:
A thread is created and the pmp registers are set to e.g. only allow RW to the stack region and RX to the code region (we use A-TOR to set the ranges). For the code region it seems to work as expected in most cases (Remove the X permissions raises a fault etc). But for the stack region it does not work when trying to execute a binary located in the stack (i.e. the binary gets executed even though there is no X permissions).
 
Thanks!

Re: scripts/subfolder_list.py: os.symlink: OSError: [Errno 36] File name too long

Rasmussen, Torsten
 

Hi,

This is actually a bug, and is fixed now:
https://github.com/zephyrproject-rtos/zephyr/pull/24584

Regards

Torsten

safely calling bt_gatt_subscribe_params.notify #ble

Mike DiClaudio
 

in bluetooth/host/gatt.c, the notify member of bt_gatt_subscribe_params is called without checking for a null pointer. In my central, the peripheral disconnected while I was subscribed to an attribute and unbeknownst to me, the subscription was still maintained. Upon disconnect, I zeroed the params and wiped out the notify pointer which was eventually called. Adding BT_GATT_SUBSCRIBE_FLAG_VOLATILE resolved the problem. Additionally, the behavior only happens with a LESC bonded connection. Possible ways that I see to fix this:
* check for null pointer before calling notify() and either skip it or perhaps panic
* set the volatile flag by default (I don't know BLE well, so maybe this is part of the standard as it is)
* adjust the logic in gatt.c:remove_subscriptions() to perform the same regardless of the bonding state

Mike

Re: scripts/subfolder_list.py: os.symlink: OSError: [Errno 36] File name too long

Abhishek Shah
 

Hi Carles,

I think this can be solved in multiple ways, just by taking a quick look at the subfolder_list.py script.

I don't have much experience on Python. I thought sharing with the community, we could get quicker and proper solution.

Opened GitHub enhancement issue here per your suggestion: https://github.com/zephyrproject-rtos/zephyr/issues/24576


Thanks,
Abhishek

Re: scripts/subfolder_list.py: os.symlink: OSError: [Errno 36] File name too long

Carles Cufi
 

Hi Abhishek,

 

I think this can be solved in multiple ways, just by taking a quick look at the subfolder_list.py script.

It is even handled differently on Windows, where symlinks are not supported.

 

Could you open a GitHub enhancement issue with the contents of the email and then we can discuss the solution there?

scripts/subfolder_list.py was added by Torsten (I have added him on copy) so I think he’d be the right person to assign the issue to.

 

Regards,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Abhishek Shah via lists.zephyrproject.org
Sent: 18 April 2020 21:01
To: devel@...
Subject: [Zephyr-devel] scripts/subfolder_list.py: os.symlink: OSError: [Errno 36] File name too long

 

Hi -

 

I am facing an issue where os.symlink call in subfolder_list.py(zephyr v2.2) results in below error:

"scripts/subfolder_list.py", line 56, in main

os.symlink(directory, symlink)
OSError: [Errno 36] File name too long
   

 

Here is the example of one of the symlink getting created on one of the systems:

directory path:

'/tmp/yocto_builds/ 20133855_ genericx86-64/poky/build/tmp/work/
aarch64-poky-linux/brcm-zephyr/gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0/git/
zephyr/include/arch/arm/aarch32/cortex_m/mpu'

 

It's symlink created by subfolder_list.py:

 '/tmp/yocto_builds/ 20133855_ genericx86-64/poky/build/tmp/work/
aarch64-poky-linux/brcm-zephyr/gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0/git/
zephyr/samples/hello_world/build_soc/zephyr/misc/generated/syscalls_links/
_tmp_yocto_builds_20133855_genericx86-64_poky_build_tmp_work_aarch64-poky-linux_brcm-zephyr_gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0_git_zephyr_include_arch_arm_aarch32_cortex_m_mpu'

 

Above symlink is evidently too long.

 

I can think of 2 ways to reduce symlink length:

1. Symlink creation should use relative path instead of absolute path.

As symlink is in zephyr build directory and original directory is in build directory;

a relation needs to be established in between zephyr source directory and build directory.

 

2. The final symlink name should not use entire PATH in the name, rather just start from "include_*"

For example: Instead of this:

_tmp_yocto_builds_20133855_genericx86-64_poky_build_tmp_work_aarch64-poky-linux_brcm-zephyr_gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0_git_zephyr_include_arch_arm_aarch32_cortex_m_mpu

Name could be just:

include_arch_arm_aarch32_cortex_m_mpu

This should reduce symlink length almost by half.

 

Regards,

Abhishek

Re: scripts/subfolder_list.py: os.symlink: OSError: [Errno 36] File name too long

Abhishek Shah
 

correction:
As symlink is in zephyr build directory and original directory is in source directory;
a relation needs to be established in between zephyr source directory and build directory.
 

Release Readiness meeting today

Carles Cufi
 

Hi all,

The release readiness meeting today will take place as planned, just using Webex instead of Zoom:

*******************************

NOTE: We will be using Webex for this meeting instead of zoom. The link is here:
https://meetingsemea5.webex.com/meetingsemea5/e.php?MTID=m64daae188a1da10f363b25708426dcb2

*******************************

Additional info:
https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-release-readinessbug-triage

Regards,

Carles

API meeting cancelled today

Carles Cufi
 

Hi all,

I have cancelled the API meeting today due to my lack of availability today. To my knowledge, we did not have any pressing matters to discuss, but as always please let me know or add the issue or PR to the API review/cleanup/rework GitHub project in order to be discussed next week.

Apologies for the short notice.

Regards,

Carles

Cancelled Event: Zephyr Project: APIs - Tuesday, 21 April 2020 #cal-cancelled

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

Cancelled: Zephyr Project: APIs

This event has been cancelled.

When:
Tuesday, 21 April 2020
9:00am to 10:00am
(UTC-07:00) America/Los Angeles

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

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

Zephyr 1.14.2 Released

Nashif, Anas
 

Hi,

We are excited to announce the release of Zephyr 1.14.2, the second maintenance release of Zephyr 1.14 (LTS). This release comes 1 year after 1.14.0 was released.

 

This is primarily a bug fix release with the following security vulnerabilities (CVEs) addressed:

  • CVE-2020-10019
  • CVE-2020-10021
  • CVE-2020-10022
  • CVE-2020-10023
  • CVE-2020-10024
  • CVE-2020-10027
  • CVE-2020-10028

 

A list of all issues fixes or addressed can be found here:

 

https://github.com/zephyrproject-rtos/zephyr/releases/tag/v1.14.2

 

 

Thank you everyone for making this happen.

 

Anas

scripts/subfolder_list.py: os.symlink: OSError: [Errno 36] File name too long

Abhishek Shah
 

Hi -

I am facing an issue where os.symlink call in subfolder_list.py(zephyr v2.2) results in below error:
"scripts/subfolder_list.py", line 56, in main
os.symlink(directory, symlink)
OSError: [Errno 36] File name too long   

Here is the example of one of the symlink getting created on one of the systems:
directory path:
'/tmp/yocto_builds/ 20133855_ genericx86-64/poky/build/tmp/work/
aarch64-poky-linux/brcm-zephyr/gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0/git/
zephyr/include/arch/arm/aarch32/cortex_m/mpu'

It's symlink created by subfolder_list.py:
 '/tmp/yocto_builds/ 20133855_ genericx86-64/poky/build/tmp/work/
aarch64-poky-linux/brcm-zephyr/gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0/git/
zephyr/samples/hello_world/build_soc/zephyr/misc/generated/syscalls_links/
_tmp_yocto_builds_20133855_genericx86-64_poky_build_tmp_work_aarch64-poky-linux_brcm-zephyr_gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0_git_zephyr_include_arch_arm_aarch32_cortex_m_mpu'

Above symlink is evidently too long.

I can think of 2 ways to reduce symlink length:
1. Symlink creation should use relative path instead of absolute path.
As symlink is in zephyr build directory and original directory is in build directory;
a relation needs to be established in between zephyr source directory and build directory.

2. The final symlink name should not use entire PATH in the name, rather just start from "include_*"
For example: Instead of this:
_tmp_yocto_builds_20133855_genericx86-64_poky_build_tmp_work_aarch64-poky-linux_brcm-zephyr_gitAUTOINC+a20a30cd86_bfa48a337e_dbbf7c9b30_f3635d87f4_90d93a11ba_ae871b61ae_5ba575618e-r0_git_zephyr_include_arch_arm_aarch32_cortex_m_mpu
Name could be just:
include_arch_arm_aarch32_cortex_m_mpu
This should reduce symlink length almost by half.

Regards,
Abhishek

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

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

Reminder: Zephyr Project: Dev Meeting

When: Thursday, 16 April 2020, 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

Zephyr Toolchain Working Group - Thu, 04/16/2020 #cal-notice

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

Zephyr Toolchain Working Group

When:
Thursday, 16 April 2020
7:00am to 8:00am
(GMT-07:00) America/Los Angeles

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

Description:
Zephyr Working Group is inviting you to a scheduled Zoom meeting.

 

Topic:  Zephyr Toolchain Working Group

Time: Mar 19, 2020 07:00 AM Pacific Time (US and Canada)

        Every 2 weeks on Thu, until Jul 23, 2020, 10 occurrence(s)

        Mar 19, 2020 07:00 AM

        Apr 2, 2020 07:00 AM

        Apr 16, 2020 07:00 AM

        Apr 30, 2020 07:00 AM

        May 14, 2020 07:00 AM

        May 28, 2020 07:00 AM

        Jun 11, 2020 07:00 AM

        Jun 25, 2020 07:00 AM

        Jul 9, 2020 07:00 AM

        Jul 23, 2020 07:00 AM

Please download and import the following iCalendar (.ics) files to your calendar system.

Weekly: https://zoom.us/meeting/tJIqcu2hrD4id0z59MlGQgtjfduqRH_iTA/ics?icsToken=98tyKuCuqT4uE9aQuF39e7cqA97lbN-1i3UesPYEsRPCMidHaAXyI_NwGo12JPmB

 

Join Zoom Meeting

https://zoom.us/j/967549258

 

Meeting ID: 967 549 258

 

One tap mobile

+16699006833,,967549258# US (San Jose)

+16465588656,,967549258# US (New York)

 

Dial by your location

        +1 669 900 6833 US (San Jose)

        +1 646 558 8656 US (New York)

        855 880 1246 US Toll-free

        877 369 0926 US Toll-free

        +1 647 558 0588 Canada

        855 703 8985 Canada Toll-free

Meeting ID: 967 549 258

Find your local number: https://zoom.us/u/abfRKTHWtN

 


Live meeting minutes: https://docs.google.com/document/d/1IQKBK-GcJNZG0O9QArqYfvb6Huk5xHscN-XIGEZr-z8/edit#heading=h.x36xe8bnwr9r

hcitool lescan stops scanning beacons #ble #hci #nrf52480 #uart

Mayank
 

Hi Community,

I have one custom board on which I'm having Nordic's nrf52840_pca10056 chip on which i have flashed zephyr's 'hci_uart' sample application for the beacon scanning purpose.
"hci_uart" app is build with hardware flow control enable (Tx, Rx, RTS, CTS).

I'm using below commands to create the hci interface.
1) btattach -B /dev/ttymxc0 -S 1000000
2) hciconfig hci0 up

root@board-imx6ull:~# hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 00:00:00:00:00:00  ACL MTU: 27:7  SCO MTU: 0:0
        UP RUNNING
        RX bytes:504 acl:0 sco:0 events:38 errors:0
        TX bytes:278 acl:0 sco:0 commands:38 errors:0

--> Here, hci interface is now UP RUNNING you can see above.
Now, when i use "hcitool lescan --duplicates" command to scan the beacons, it starts scanning immediately but after 3-4 minutes it stops scanning, even though all the beacons in surrounding are still present and advertising.

Tried without '--duplicate' switch but same issue is there.

Q1: Is there any issue in zephyr's hci_uart application or what?
NOTE : My actual use case is to scan the BLE beacons continuously.

Thanks,
Mayank

Upcoming Event: Zephyr Toolchain Working Group - Thu, 04/16/2020 7:00am-8:00am #cal-reminder

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

Reminder: Zephyr Toolchain Working Group

When: Thursday, 16 April 2020, 7:00am to 8:00am, (GMT-07:00) America/Los Angeles

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

View Event

Organizer: Maureen Helm

Description: Zephyr Working Group is inviting you to a scheduled Zoom meeting.

 

Topic:  Zephyr Toolchain Working Group

Time: Mar 19, 2020 07:00 AM Pacific Time (US and Canada)

        Every 2 weeks on Thu, until Jul 23, 2020, 10 occurrence(s)

        Mar 19, 2020 07:00 AM

        Apr 2, 2020 07:00 AM

        Apr 16, 2020 07:00 AM

        Apr 30, 2020 07:00 AM

        May 14, 2020 07:00 AM

        May 28, 2020 07:00 AM

        Jun 11, 2020 07:00 AM

        Jun 25, 2020 07:00 AM

        Jul 9, 2020 07:00 AM

        Jul 23, 2020 07:00 AM

Please download and import the following iCalendar (.ics) files to your calendar system.

Weekly: https://zoom.us/meeting/tJIqcu2hrD4id0z59MlGQgtjfduqRH_iTA/ics?icsToken=98tyKuCuqT4uE9aQuF39e7cqA97lbN-1i3UesPYEsRPCMidHaAXyI_NwGo12JPmB

 

Join Zoom Meeting

https://zoom.us/j/967549258

 

Meeting ID: 967 549 258

 

One tap mobile

+16699006833,,967549258# US (San Jose)

+16465588656,,967549258# US (New York)

 

Dial by your location

        +1 669 900 6833 US (San Jose)

        +1 646 558 8656 US (New York)

        855 880 1246 US Toll-free

        877 369 0926 US Toll-free

        +1 647 558 0588 Canada

        855 703 8985 Canada Toll-free

Meeting ID: 967 549 258

Find your local number: https://zoom.us/u/abfRKTHWtN

 


Live meeting minutes: https://docs.google.com/document/d/1IQKBK-GcJNZG0O9QArqYfvb6Huk5xHscN-XIGEZr-z8/edit#heading=h.x36xe8bnwr9r

Zephyr Toolchain Working Group Meeting – 16 April 2020

Rasmussen, Torsten
 

*******************************

 

NOTE: We will be using Webex for this meeting instead of zoom.  The link is here:

https://meetingsemea10.webex.com/meetingsemea10/j.php?MTID=m95936ee77c8c1c8043b15f9165f9cb47

 

*******************************

 

Hi,

 

For today’s meeting let’s follow up on last meeting action items and get a status update.

 

Where:
https://meetingsemea10.webex.com/meetingsemea10/j.php?MTID=m95936ee77c8c1c8043b15f9165f9cb47

 

 

 

Agenda

  • Updates:
    • Wayne: PR22668: News
    • Thomas: IAR: News
    • Torsten: Toolchain abstraction: Issue:#16031 News

 

  • AP: Last meeting:
    • Clean-up offset.h to make it easier to support more compilers
    • Exploration work on CI Toolchain test cases: Wayne
    • Everyone: Give feedback on PR#22688, and issue: #5517: Status ?
    • Toolchain abstraction: Issue:#16031, look at current work, and explore possibilities of improvements: Torsten.

 

  • Short term goals, way forward
    • Dedicated toolchain test cases.
      •  
    • Label PR for automatic execution of CI Toolchain test cases

 

          

 

Feel free to send a mail, if you would like additional topics to be discussed.

 

Best regards

 

Torsten T. Rasmussen           

 

Live meeting minutes: https://docs.google.com/document/d/1IQKBK-GcJNZG0O9QArqYfvb6Huk5xHscN-XIGEZr-z8/edit#heading=h.x36xe8bnwr9r

 

 

Beacon scanning limitation using hci_uart #uart #ninja #ble #hci #nrf52480

Mayank
 

Hello All,

I have one question regarding the ability of zephyr's hci_uart sample app.
I am using this application on nrf52840_pca10056 for scanning the ble beacons.

Scenario is i can see "hci0" interface UP RUNNING. and my custom application starts scanning beacons continuously (Here I'm using bluez's api).
Here, as i am in continuous scanning/receiving mode, I can see that when I'm using "hciconfig" command to show hci interface, there Rx bytes keep on increasing.

$hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 00:00:00:00:00:00  ACL MTU: 27:7  SCO MTU: 0:0
        UP RUNNING
        RX bytes:247820 acl:0 sco:0 events:1643 errors:0
        TX bytes:295 acl:0 sco:0 commands:40 errors:0

--> Now, After few times (5-10 minutes) Rx bytes count becomes so high and may be because of that the beacon scanning stops entirely.

Is there any limitation of beacon scanning? (I want more no of samples per second of ble beacon and thats why i'm using hci0 interface for continuous scanning).

NOTE: After scanning for every 10 seconds, I'm able to flush the UART buffer successfuly.

Thanks,
Mayank

Dev-Review Meeting Agenda Apr 16

Kumar Gala
 

*******************************

NOTE: We will be using Webex for this meeting instead of zoom. The link is here:

https://meetingsamer4.webex.com/meetingsamer4/j.php?MTID=m43ef84def3356ff1725609f8000d3854

*******************************

Here’s the agenda topics for this week:

* Review PR’s tagged with dev-review:

* Zephyr sdk improvement [@tejlmand)
https://github.com/zephyrproject-rtos/zephyr/pull/24143

* usb: USB Audio class implementation [@carles]:
https://github.com/zephyrproject-rtos/zephyr/pull/21526

* Zephyr Bluetooth Authentication - ZEBRA [@carles]
https://github.com/zephyrproject-rtos/zephyr/issues/23465

* Any topics anyone else has.

- k

Upcoming Event: Zephyr Project: APIs - Tue, 04/14/2020 9:00am-10:00am, Please RSVP #cal-reminder

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

Reminder: Zephyr Project: APIs

When: Tuesday, 14 April 2020, 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

Re: API meeting: agenda

Carles Cufi
 

Two additional items:

- DAC API proposal
- PR: https://github.com/zephyrproject-rtos/zephyr/pull/21805

- Auth API location
- Issue: https://github.com/zephyrproject-rtos/zephyr/issues/23465

-----Original Message-----
From: devel@... <devel@...> On
Behalf Of Cufi, Carles via lists.zephyrproject.org
Sent: 13 April 2020 19:33
To: users@...; devel@...
Cc: julien.dascenzio@...; jukka.rissanen@...;
@jhe; Andersson, Joakim
<Joakim.Andersson@...>
Subject: [Zephyr-devel] API meeting: agenda

Hi all,

Tomorrow's topics:

- Proposal to unify the "forever" timeout constant across subsystems
that take milliseconds as an input parameter
- PR: https://github.com/zephyrproject-rtos/zephyr/pull/24267

- RTC API proposal review after comments from the author
- PR: https://github.com/zephyrproject-rtos/zephyr/pull/23526/

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