Date   

Re: Zephyr C++ support #CPP

Stephanos Ioannidis
 

Hi Dave,

 

> Is C++ exception support (reentrancy problems) now fixed?

 

Yes, C++ exceptions should be working for all supported architectures now when using the Zephyr SDK.

 

Regards,

 

Stephanos


Re: Zephyr C++ support #CPP

Dave Nadler
 

Is C++ exception support (reentrancy problems) now fixed?
Thanks!
Best Regards, Dave

On 5/16/2022 9:12 AM, Stephanos Ioannidis wrote:

Hi,

 

That documentation is outdated and will be updated in the 3.1 release.

 

Zephyr supports new and delete operators.

 

Regards,

 

Stephanos

 

From: users@... <users@...> On Behalf Of giatorta via lists.zephyrproject.org
Sent: Monday, May 16, 2022 8:18 PM
To: users@...
Subject: [Zephyr-users] Zephyr C++ support #CPP

 

Hi all,

I read here:
https://docs.zephyrproject.org/3.0.0/reference/kernel/other/cxx_support.html

that Zephyr supports C++ applications, but that the kernel does not support the new and delete operators, which looks quite restrictive to me (since the standard library itself uses those features)

Here however:
https://github.com/zephyrproject-rtos/zephyr/issues/31281
I read that STL is among the C++ "things that work" in Zephyr

I am missing something? My interest is in writing C++ applications over Zephyr, not drivers/kernel modules

thanks in advance!
Gianluca

--
Dave Nadler, USA East Coast voice (978) 263-0097, drn@..., Skype 
 Dave.Nadler1


Re: Zephyr C++ support #CPP

Stephanos Ioannidis
 

Hi,

 

That documentation is outdated and will be updated in the 3.1 release.

 

Zephyr supports new and delete operators.

 

Regards,

 

Stephanos

 

From: users@... <users@...> On Behalf Of giatorta via lists.zephyrproject.org
Sent: Monday, May 16, 2022 8:18 PM
To: users@...
Subject: [Zephyr-users] Zephyr C++ support #CPP

 

Hi all,

I read here:
https://docs.zephyrproject.org/3.0.0/reference/kernel/other/cxx_support.html

that Zephyr supports C++ applications, but that the kernel does not support the new and delete operators, which looks quite restrictive to me (since the standard library itself uses those features)

Here however:
https://github.com/zephyrproject-rtos/zephyr/issues/31281
I read that STL is among the C++ "things that work" in Zephyr

I am missing something? My interest is in writing C++ applications over Zephyr, not drivers/kernel modules

thanks in advance!
Gianluca


Zephyr C++ support #CPP

gianluca torta
 

Hi all,

I read here:
https://docs.zephyrproject.org/3.0.0/reference/kernel/other/cxx_support.html

that Zephyr supports C++ applications, but that the kernel does not support the new and delete operators, which looks quite restrictive to me (since the standard library itself uses those features)

Here however:
https://github.com/zephyrproject-rtos/zephyr/issues/31281
I read that STL is among the C++ "things that work" in Zephyr

I am missing something? My interest is in writing C++ applications over Zephyr, not drivers/kernel modules

thanks in advance!
Gianluca


Re: GSM modem AT commands

William Fish
 
Edited

Gordon,

This seems to be something that would need to be included in the device driver rather than the PPP modem. I see the issue being how a generic driver could provide device specific control?

You could use the AT+UPSV command but not all modems will support it.


Billy..


GSM modem AT commands

Gordon Klaus <gordon@...>
 

Hello,

 

I have successfully made a network connection using MODEM_GSM_PPP.  Now, I would like to reduce power consumption by using power saving mode (PSM).  What is the recommended way to send the AT commands to achieve this?

 

Can I send AT commands to the UART device after gsm_ppp_start has been called?  How would I handle the response when the modem driver is already listening to that UART?  Is this what GSM_MUX is for?  I don’t see any documentation for how do use GSM mux.  Can I attach another UART mux to the device?  Can I pick an arbitrary unused DLCI?

 

I see that the modem driver has code to simplify handling AT responses, but this code is private to the driver.  Why is this code not available for general purpose AT command handling?  Is it planned to be made available?

 

Best regards,

Gordon


Zephyr Developer Survey: Your Input Requested by Thursday, May 19

Brett Preston
 

(TSC Members/Alternates, Maintainers, Collaborators please follow link that were sent to you)


Members of the Zephyr Community,


We have assembled a Developer Survey to help us understand what is working well in the Zephyr Project, and what could be improved. The summary information will be shared with the TSC, and used to help the project figure out where to focus going forward. Responses are captured anonymously.


It would be very helpful to the project if you could take the time to share your thoughts in the survey at https://linuxfoundation.surveymonkey.com/r/25MM7CR. There are 35 questions, and we estimate it should probably take about 10 minutes to fill it in.


Responses are requested by end-of-day on Thursday, May 19.


If you have any questions, please don’t hesitate to reach out to one of us.


Thanks, 



Anas, Kate & Brett

--
Brett Preston
Sr. Program Manager
The Linux Foundation
+1 (971) 303-9030


Reminder to Register: Zephyr Developer Summit

Brett Preston
 

Members of the Zephyr Community,


The Zephyr Developer Summit is now less than a month away!


Have you completed your registration yet? https://events.linuxfoundation.org/zephyr-developer-summit/register/


All sessions will be streamed live for Virtual Attendees.


The Full Schedule is available at https://events.linuxfoundation.org/zephyr-developer-summit/program/schedule/


Session videos will be posted to YouTube post-event on a rolling cadence, but your best opportunity to experience the content, without delay, will be via In-Person or Virtual attendance.


For those newer to Zephyr, we’ve got events scheduled for Tuesday, June 7 – including a Hands-on Tutorial


For questions, please email events@...


We look forward to seeing you at the event!



Zephyr Project


Join us in Discord: https://chat.zephyrproject.org/ (Dev Summit channel - # zds2022)


--
Brett Preston
Sr. Program Manager
The Linux Foundation
+1 (971) 303-9030


Re: How to access the child nodes in a device tree (DTS) in Zephyr using DT_FOREACH_CHILD #dts #nrf52

unsunk.ship@...
 

The results from previous code were OK, I think it's a bug in the debugger. I posted the details here [^].
BR.


How to access the child nodes in a device tree (DTS) in Zephyr using DT_FOREACH_CHILD #dts #nrf52

unsunk.ship@...
 

Hi,
I originally posted this question to stackoverflow [^] so I think its better not to duplicate the whole story here.
Supposing I have a DTS file with a content like this one below:

n: detectors {
    compatible = "foo-detectors";
        
    // Definition of first channel
    det0: det_0 {
        irq-pins = <13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
        label = "Bar detector channel 1";
    };
    // Definition of second channel
    det1: det_1 {
        irq-pins = <17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
        label = "Bar detector channel 2";
    };
};
And a structure like here below:
struct foo_detector_desc { 
    int irqpin; 
    int irqpin_flags;
}
How can I use macro DT_FOREACH_CHILD for populating an array with one item for each child of node detectors?

I tried this code below but, yet it compiled, the results where not what I wanted.

#define PIN_INFO_AND_COMMA(node_id) \
    { \
        .pin=DT_PROP_BY_IDX(node_id, irq_pins, 0),\
        .flags=DT_PROP_BY_IDX(node_id, irq_pins, 1),\
    },

const struct detector_data _det_data[] = {
    DT_FOREACH_CHILD(DT_NODELABEL(n), PIN_INFO_AND_COMMA)
};

BR.


Re: Scheduler/Thread Status #api

Andy Ross
 

Not public ones, no.  You can check kernel/include/ksched.h for the internal API for this.  I guess the immediate question has to be "what are you trying to do"?  Recognize that any decision made on the basis of this kind of stuff is going to be inherently racy without access to the scheduler's own synchronization (though on a single CPU device, just holding an interrupt lock is enough to be safe).

Also, just to clarify: k_sched_lock() doesn't mutate "scheduler" state at all, it's implemented via a trick that essentially elevates the current thread priority to a cooperative level, preventing preemption.

Andy


Scheduler/Thread Status #api

Casey Shea
 

Are there any API calls for retrieving thread and scheduler status?  I'm looking for something that would indicate the following:

  • Is the scheduler locked?
  • What is the thread status? (Ready, Waiting, Suspended)


Thanks!


Re: Implementation of Zephyr on custom board

Murphy, Lauren
 

Hi Bharath,

 

(1) I’ll look more into this and email you 1:1.

 

(2) Could you explain what you mean by “build the code without any board dependencies in West”? The module (if you’re using the module) can build for any board; see the Hello World sample. If you’re trying to use a custom board, you need definitions for the board + an overlay to make Zephyr aware of sensors you’re using.

 

Sincerely,

Lauren Murphy

 

From: users@... <users@...> On Behalf Of Bharath V
Sent: Wednesday, May 4, 2022 4:37 AM
To: users@...
Subject: [Zephyr-users] Implementation of Zephyr on custom board

 

Dear Team

 

I am currently working on implementing Zephyr RTOS with Tensorflow lite on a custom board (RISC-V based). I am facing the few issues such as

 

(i) Unable to avoid the use of standard C++ libraries.

(ii) Can we build the code without any board dependencies in west.

 

Kindly requesting for assistance.

 

Thanks and regards

Bharath V


Profiling tools

Guy Morand
 

Hi Zephyr users!

I would like to profile my application and was wondering if there are tools available such as the famous ``perf``?

I have found ``THREAD_ANALYZER`` that is very useful but I would need more information about which functions is called and how long.

Happy hacking!

Guy


Implementation of Zephyr on custom board

Bharath V <bk.fml95@...>
 

Dear Team

I am currently working on implementing Zephyr RTOS with Tensorflow lite on a custom board (RISC-V based). I am facing the few issues such as

(i) Unable to avoid the use of standard C++ libraries.
(ii) Can we build the code without any board dependencies in west.

Kindly requesting for assistance.

Thanks and regards
Bharath V


Re: designing a message "bus"

Guy Morand
 

Hi Yshragai,

Small correction on my previous statement. As stated in the documentation, broadcasting is not possible:

Each message may be received by only one thread (i.e.
point-to- multipoint and broadcast messaging is not supported).
We had a small internal discussion about a similar topic this morning and for this reason, we decided to implement our own observer pattern by sending events to a dispatcher using message queue.

Anyway, if you have a better approach, I'm eager to hear more!

Best regards,

Guy


On 5/4/22 09:31, Guy Morand via lists.zephyrproject.org wrote:
Hi Yshragai,
Have you looked at 'k_mbox' data structure? It seems you can set a destination thread or broadcast messages with 'K_ANY':
https://docs.zephyrproject.org/latest/kernel/services/data_passing/mailboxes.html Hope this helps,
regards,
Guy
On 5/3/22 23:20, yshragai.firmware@... wrote:
Hi,
I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".
Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.
One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?
I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).
Thanks!
--
bytes at work
Technoparkstrasse 7
CH-8406 Winterthur
Switzerland

phone: +41 52 213 79 79


Re: designing a message "bus"

Guy Morand
 

Hi Yshragai,

Have you looked at 'k_mbox' data structure? It seems you can set a destination thread or broadcast messages with 'K_ANY':
https://docs.zephyrproject.org/latest/kernel/services/data_passing/mailboxes.html

Hope this helps,
regards,

Guy

On 5/3/22 23:20, yshragai.firmware@... wrote:
Hi,
I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".
Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.
One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?
I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).
Thanks!
--
bytes at work
Technoparkstrasse 7
CH-8406 Winterthur
Switzerland

phone: +41 52 213 79 79


Re: designing a message "bus"

Jason Bens <jason.bens@...>
 

I’m sure you’ll get a slew of possible implementations, but have you considered implementing the observer pattern?  https://en.wikipedia.org/wiki/Observer_pattern .  If I were to implement this, I’d give each module an event queue to receive messages on, and a list containing pointers to the event queues of other interested modules (the observers).  Observers are notified by iterating over the list and sending the event to each one.  Unfortunately, the granularity of this approach is only to the module level, and so may not meet your needs as described.

 

  • Jason

 

From: users@... <users@...> On Behalf Of yshragai.firmware@...
Sent: May 3, 2022 11:20 PM
To: users@...
Subject: [Zephyr-users] designing a message "bus"

 

External Email:

Hi,

I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".

 

Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.

 

One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?

 

I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).

 

Thanks!


designing a message "bus"

yshragai.firmware@...
 

Hi,
I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".
 
Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.
 
One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?
 
I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).
 
Thanks!


Re: Connecting to a private resolvable address found using bt_le_scan_start

Chettimada, Vinayak Kariappa
 

Hi Jason,

 

Without bonding (connect, pair, encrypt and distribute keys) with the device, IRK cannot be obtained from the remove device.

 

Regards,

Vinayak

 

From: users@... <users@...> On Behalf Of Jason Bens via lists.zephyrproject.org
Sent: 02 May 2022 12:03
To: users@...
Subject: [Zephyr-users] Connecting to a private resolvable address found using bt_le_scan_start

 

Hi,

 

I’m writing some firmware for both sides of a BLE link.  I would like to scan for advertisers, filter the results to find my device, then store the address to be connected later, without necessarily connecting at the moment.  I think this is possible if I use static addresses, but I would prefer to use a private resolvable address.  What is the process to use the bt_le_address_t returned in the info struct of the .recv callback to get the IRK so I can connect to the remote device at a later time?

 

Thanks,

 

  • Jason

181 - 200 of 3125