Date   

Re: console_getline vs 0ms char delay in UART comms

Lawrence King
 

I wasn’t suspecting your FT232R HW, just how the various terminal programs set up the HW may be different. When all other debugging fails, nothing beats the certainty of capturing the waveforms with an oscilloscope and validating that all of the characters were sent, and the signal levels are good. But you are not likely to this level of debugging yet.

 

When you are using cutecom, try setting to 8N2. This adds one extra bit time between characters which a lot less than 1mS and may be enough that you stop dropping characters.

 

What baudrate are you running at? The usual 115200? Do you see the same problem if you try slower speeds like 38400 or 19200? Of course you need to change both ends of the link if you select an alternat baud rate.

 

Finally, what processor and processor clock rate are you running, you may simply be sending characters faster than your processor can respond to interrupts and receive the characters (which would make sense if you are missing every second character).

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: Piotr Barszczewski <piotr@...>
Sent: Wednesday, March 17, 2021 3:43 PM
To: Lawrence King <lawrence.king@...>; users@...
Subject: RE: [Zephyr-users] console_getline vs 0ms char delay in UART comms

 

Hello Lawrence,

 

Thank you for your reply. I’m working with 8N1 and the USB-UART is FT232R of which I’m pretty certain that it’s working correctly. It works with other firmware, developed with older Nordics SDK and haven’t experienced issues with it yet. In my experience I’ve narrowed it down to the 0ms delay in Cutecom making the getline console example to loose some characters on hadrware which works ok with different firmware with the same Cutecom settings.

 

As for hardware design it uses a schematic which has been validated by FTDI support as on a different device we’ve been experiencing different issues so I find it unlikely that it would be at blame here.

 

When I have a moment I’ll try to replicate it with nrf52832 DK but I expect that it could be better as the DK enumerates as ttyACM port device which I’ve previously found to behave differently than ttyUSB which I wrote down in https://devzone.nordicsemi.com/f/nordic-q-a/62732/zephyr-hci_uart-on-nrf52840-with-ft232r and unfortunately it’s still unsolved by me. Maybe FT232R and Zephyr sometimes don’t really get along for some reason?

 

Best regards,

Piotr

 

On 17 March 2021 at 14:30:35, Lawrence King (lawrence.king@...) wrote:

Hi Piotr

 

There are may be pieces of equipment along  the path between cutecom and the serial input on your micro-controller. Usually there is a USB to Serial chip. The programs inside screen and cutecom set parameters in the USB2Serial chip. Specifically I would be worried about the number of databits and stop bits, also parity. The ‘normal’ setting is 8N1 which means send a start bit, 8 data bits, no parity bits, and a single stop bit. However if cutecom selected 7N1, or screen selected 8N1 and the serial port on your Zephyr board was set to 8N2 you would see these types of problems.

 

Curiously you are consistently loosing the characters with Even parity. Is your Zephyr board set up to expect 7O1?

 

You need to look at the data being send from the USB2Serial adapter and ensure that it is valid. I have never had a problem with Zephyr dropping characters, but it really depends on your board, and kernel options.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Piotr Barszczewski
Sent: Monday, March 15, 2021 12:31 PM
To:
users@...
Subject: [Zephyr-users] console_getline vs 0ms char delay in UART comms

 

Hello,

 

I’ve been reviewing code from a colleague, which (code, not the colleague) is heavily based on the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html I’ve been experiencing some unexpected behaviour when using CuteCom vs screen to communicate with the console. I’ve dug deeper and deeper and eventually it seemed like the value returned by console_getline function was indeed already corrupted. In screen everything worked fine.

 

My assumption was that when I’m using screen each character is passed 1-by-1 to a buffer and everything is golden. On the other hand CuteCom buffers the input until I press enter and fires away at the serial port - pretty much like M2M communications would work over UART.

Eventually I opened up the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html project and the behaviour was the same. It corrupted the buffer when used in Cutecom and worked ok with screen. 

 

This is an example of the output of FW when sending “1234” over Cutecom with 0ms delay (which is what I have been using +/- forever):

[17:07:53:997] 13␍␊
[17:07:54:012] line: 13
␍␊
[17:07:54:012] last char was: 0x33
␍␊
[17:07:54:842] 13
␍␊
[17:07:54:859] line: 13
␍␊
[17:07:54:859] last char was: 0x33
␍␊
[17:07:55:794] 13
␍␊
[17:07:55:810] line: 13
␍␊
[17:07:55:810] last char was: 0x33
␍␊
[17:07:57:074] 1S@

In the end I’ve changed CuteComs char delay to 1ms and everything works well:

[17:07:50:368] 1234␍␊
[17:07:50:368] line: 1234
␍␊
[17:07:50:384] last char was: 0x34
␍␊

 

Is there some simple CONFIG_ argument to change this? I’ve looked in menuconfig but without luck. 

It’s not much of a problem to instruct every user of the FW to change it to 1ms but I’m a bit concerned about using various scripts to communicate with the firmware which will use the console. Depending on the implementation of serial driver it might require additional work to accound for the buffer not handling bursts of data.

 

Best regards

 

 

 

 

 


Re: console_getline vs 0ms char delay in UART comms

Piotr Barszczewski <piotr@...>
 

Hello Lawrence,

Thank you for your reply. I’m working with 8N1 and the USB-UART is FT232R of which I’m pretty certain that it’s working correctly. It works with other firmware, developed with older Nordics SDK and haven’t experienced issues with it yet. In my experience I’ve narrowed it down to the 0ms delay in Cutecom making the getline console example to loose some characters on hadrware which works ok with different firmware with the same Cutecom settings.

As for hardware design it uses a schematic which has been validated by FTDI support as on a different device we’ve been experiencing different issues so I find it unlikely that it would be at blame here.

When I have a moment I’ll try to replicate it with nrf52832 DK but I expect that it could be better as the DK enumerates as ttyACM port device which I’ve previously found to behave differently than ttyUSB which I wrote down in https://devzone.nordicsemi.com/f/nordic-q-a/62732/zephyr-hci_uart-on-nrf52840-with-ft232r and unfortunately it’s still unsolved by me. Maybe FT232R and Zephyr sometimes don’t really get along for some reason?

Best regards,
Piotr

On 17 March 2021 at 14:30:35, Lawrence King (lawrence.king@...) wrote:

Hi Piotr

 

There are may be pieces of equipment along  the path between cutecom and the serial input on your micro-controller. Usually there is a USB to Serial chip. The programs inside screen and cutecom set parameters in the USB2Serial chip. Specifically I would be worried about the number of databits and stop bits, also parity. The ‘normal’ setting is 8N1 which means send a start bit, 8 data bits, no parity bits, and a single stop bit. However if cutecom selected 7N1, or screen selected 8N1 and the serial port on your Zephyr board was set to 8N2 you would see these types of problems.

 

Curiously you are consistently loosing the characters with Even parity. Is your Zephyr board set up to expect 7O1?

 

You need to look at the data being send from the USB2Serial adapter and ensure that it is valid. I have never had a problem with Zephyr dropping characters, but it really depends on your board, and kernel options.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Piotr Barszczewski
Sent: Monday, March 15, 2021 12:31 PM
To: users@...
Subject: [Zephyr-users] console_getline vs 0ms char delay in UART comms

 

Hello,

 

I’ve been reviewing code from a colleague, which (code, not the colleague) is heavily based on the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html I’ve been experiencing some unexpected behaviour when using CuteCom vs screen to communicate with the console. I’ve dug deeper and deeper and eventually it seemed like the value returned by console_getline function was indeed already corrupted. In screen everything worked fine.

 

My assumption was that when I’m using screen each character is passed 1-by-1 to a buffer and everything is golden. On the other hand CuteCom buffers the input until I press enter and fires away at the serial port - pretty much like M2M communications would work over UART.

Eventually I opened up the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html project and the behaviour was the same. It corrupted the buffer when used in Cutecom and worked ok with screen. 

 

This is an example of the output of FW when sending “1234” over Cutecom with 0ms delay (which is what I have been using +/- forever):

[17:07:53:997] 13␍␊
[17:07:54:012] line: 13
␍␊
[17:07:54:012] last char was: 0x33
␍␊
[17:07:54:842] 13
␍␊
[17:07:54:859] line: 13
␍␊
[17:07:54:859] last char was: 0x33
␍␊
[17:07:55:794] 13
␍␊
[17:07:55:810] line: 13
␍␊
[17:07:55:810] last char was: 0x33
␍␊
[17:07:57:074] 1S@

In the end I’ve changed CuteComs char delay to 1ms and everything works well:

[17:07:50:368] 1234␍␊
[17:07:50:368] line: 1234
␍␊
[17:07:50:384] last char was: 0x34
␍␊

 

Is there some simple CONFIG_ argument to change this? I’ve looked in menuconfig but without luck. 

It’s not much of a problem to instruct every user of the FW to change it to 1ms but I’m a bit concerned about using various scripts to communicate with the firmware which will use the console. Depending on the implementation of serial driver it might require additional work to accound for the buffer not handling bursts of data.

 

Best regards

 

 

 

 

 


Re: console_getline vs 0ms char delay in UART comms

Lawrence King
 

Hi Piotr

 

There are may be pieces of equipment along  the path between cutecom and the serial input on your micro-controller. Usually there is a USB to Serial chip. The programs inside screen and cutecom set parameters in the USB2Serial chip. Specifically I would be worried about the number of databits and stop bits, also parity. The ‘normal’ setting is 8N1 which means send a start bit, 8 data bits, no parity bits, and a single stop bit. However if cutecom selected 7N1, or screen selected 8N1 and the serial port on your Zephyr board was set to 8N2 you would see these types of problems.

 

Curiously you are consistently loosing the characters with Even parity. Is your Zephyr board set up to expect 7O1?

 

You need to look at the data being send from the USB2Serial adapter and ensure that it is valid. I have never had a problem with Zephyr dropping characters, but it really depends on your board, and kernel options.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of Piotr Barszczewski
Sent: Monday, March 15, 2021 12:31 PM
To: users@...
Subject: [Zephyr-users] console_getline vs 0ms char delay in UART comms

 

Hello,

 

I’ve been reviewing code from a colleague, which (code, not the colleague) is heavily based on the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html I’ve been experiencing some unexpected behaviour when using CuteCom vs screen to communicate with the console. I’ve dug deeper and deeper and eventually it seemed like the value returned by console_getline function was indeed already corrupted. In screen everything worked fine.

 

My assumption was that when I’m using screen each character is passed 1-by-1 to a buffer and everything is golden. On the other hand CuteCom buffers the input until I press enter and fires away at the serial port - pretty much like M2M communications would work over UART.

Eventually I opened up the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html project and the behaviour was the same. It corrupted the buffer when used in Cutecom and worked ok with screen. 

 

This is an example of the output of FW when sending “1234” over Cutecom with 0ms delay (which is what I have been using +/- forever):

[17:07:53:997] 13␍␊
[17:07:54:012] line: 13
␍␊
[17:07:54:012] last char was: 0x33
␍␊
[17:07:54:842] 13
␍␊
[17:07:54:859] line: 13
␍␊
[17:07:54:859] last char was: 0x33
␍␊
[17:07:55:794] 13
␍␊
[17:07:55:810] line: 13
␍␊
[17:07:55:810] last char was: 0x33
␍␊
[17:07:57:074] 1S@

In the end I’ve changed CuteComs char delay to 1ms and everything works well:

[17:07:50:368] 1234␍␊
[17:07:50:368] line: 1234
␍␊
[17:07:50:384] last char was: 0x34
␍␊

 

Is there some simple CONFIG_ argument to change this? I’ve looked in menuconfig but without luck. 

It’s not much of a problem to instruct every user of the FW to change it to 1ms but I’m a bit concerned about using various scripts to communicate with the firmware which will use the console. Depending on the implementation of serial driver it might require additional work to accound for the buffer not handling bursts of data.

 

Best regards

 

 

 

 

 


console_getline vs 0ms char delay in UART comms

Piotr Barszczewski <piotr@...>
 

Hello,

I’ve been reviewing code from a colleague, which (code, not the colleague) is heavily based on the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html I’ve been experiencing some unexpected behaviour when using CuteCom vs screen to communicate with the console. I’ve dug deeper and deeper and eventually it seemed like the value returned by console_getline function was indeed already corrupted. In screen everything worked fine.

My assumption was that when I’m using screen each character is passed 1-by-1 to a buffer and everything is golden. On the other hand CuteCom buffers the input until I press enter and fires away at the serial port - pretty much like M2M communications would work over UART.
Eventually I opened up the https://docs.zephyrproject.org/latest/samples/subsys/console/getline/README.html project and the behaviour was the same. It corrupted the buffer when used in Cutecom and worked ok with screen. 

This is an example of the output of FW when sending “1234” over Cutecom with 0ms delay (which is what I have been using +/- forever):
[17:07:53:997] 13␍␊
[17:07:54:012] line: 13␍␊
[17:07:54:012] last char was: 0x33␍␊
[17:07:54:842] 13␍␊
[17:07:54:859] line: 13␍␊
[17:07:54:859] last char was: 0x33␍␊
[17:07:55:794] 13␍␊
[17:07:55:810] line: 13␍␊
[17:07:55:810] last char was: 0x33␍␊
[17:07:57:074] 1S@
In the end I’ve changed CuteComs char delay to 1ms and everything works well:
[17:07:50:368] 1234␍␊
[17:07:50:368] line: 1234␍␊
[17:07:50:384] last char was: 0x34␍␊

Is there some simple CONFIG_ argument to change this? I’ve looked in menuconfig but without luck. 
It’s not much of a problem to instruct every user of the FW to change it to 1ms but I’m a bit concerned about using various scripts to communicate with the firmware which will use the console. Depending on the implementation of serial driver it might require additional work to accound for the buffer not handling bursts of data.

Best regards






Adding of Azure SDK to Zephyr as a module #AzureSDK

petrus.vanderwalt@...
 

Hi, I found a discussion on github regarding adding the Azure SDK to Zephyr as a module.  The milestone was set for February.  Is there any news on when it will be included in Zephyr?

Thanks.

Kind regards,
Jurgens


Azure Firmware Overt The Air updates (FOTA) #fota

petrus.vanderwalt@...
 

Hi, are there any plans to expand the current mqtt_azure sample/library to include FOTA.  I would really like to update my devices from Azure IoT Hub using something like Azure Blob storage.

Thank you in advance

Kind regards,
Jurgens


DPS functionality, direct method and support for X509 certificate support #mqtt

petrus.vanderwalt@...
 

Hi,  I would like to use the Device Provisioning Service (DPS) along with the mqtt_azure sample/library.  Are there any plans to expand the mqtt_azure sample/library to include DPS?  I am also looking to use the direct method to send simple commands from Azure to my devices, Are there any plans to include this functionality? 

Lastly, the current mqtt_azure sample makes use of a SAS token for authentication.  Would it be possible to adapt the example to use X509 certificates?  Does the current MBED TLS library in Zephyr allow the use of a root certificate, device certificate, and device key to authenticate connections to Azure?

Your feedback is highly appreciated.

Kind regards,
Jurgens


Re: C library re-entrancy under Zephyr

Rob Meades
 

Answering my own question for the benefit of anyone listening who didn’t already know: the answer is that the built-in minimal C library offers some functions re-entrantly and, if you chose to use newlib, memory allocation through malloc() etc. is re-entrant, it’s the other functions (stdio etc.) in the integration with newlib which are not reentrant.

 

Rob

From: Rob Meades
Sent: 11 March 2021 20:13
To: Kumar Gala <kumar.gala@...>
Cc: users@...
Subject: RE: [Zephyr-users] C library re-entrancy under Zephyr

 

Just to be clear on this, is it true that re-entrancy is not supported by Zephyr for any of the newlib stdio.h or stdlib.h functions, so not just the likes of strok() but also snprintf() and, more fundamentally, malloc()/free()?

 

If this is the case, are there any other C libraries (so not newlib) for which Zephyr does support re-entrancy and which fulfil the same functions?

 

Rob

From: Dave Nadler <drn@...>
Sent: 11 March 2021 19:23
To: Rob Meades <Rob.Meades@...>; Kumar Gala <kumar.gala@...>
Cc: users@...
Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr

 

*** This is an EXTERNAL email. It was sent from outside of u-blox. ***

Hi Rob - Went through this a few years back with FreeRTOS.
The link below may be helpful.
Hope that helps!
Best Regards, Dave

 

 

On 3/11/2021 1:04 PM, Rob Meades via lists.zephyrproject.org wrote:

Thanks for the swift response.  That's a shame.  
I will go look at the PR at your link as shifting to the re-entrant versions just for Zephyr is going to be painful.
 
Rob
-----Original Message-----
From: users@... <users@...> On Behalf Of Kumar Gala
Sent: 11 March 2021 17:54
To: Rob Meades <Rob.Meades@...>
Cc: users@...
Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr
 
*** This is an EXTERNAL email. It was sent from outside of u-blox. ***
 
Re-entrant support between newlib and zephyr is not currently supported.
 
There’s an old PR on the subject
 
https://github.com/zephyrproject-rtos/zephyr/pull/21518
 
- k
 
On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@...> wrote:
 
Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?
 
I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere.  My prj.conf file is attached in case it is helpful in answering the question.
 
Rob
 
 
 
 
 
<prj.conf>
 
 
 
 
 
 
 
 

 
 

 

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


Should I choose Zephyr OS? #modem #networking

tiborcasteleijn@...
 

I am considering switching to Zephyr OS and want to know if this is the right choice considering the following. 
 
My project requires LTE-M connectivity which I want to develop on a quectel BG96 dragino arduino shield. If this works I'd also like to port it to an ESP32. Is it hard to implement this and is Zephyr OS the right choice considering I have no experience yet with the operating system? 
 


Hello

Tibor Casteleijn <tiborcasteleijn@...>
 

Hello, 

I am considering switching to Zephyr OS and want to know if this is the right choice considering the following. 

My project requires LTE-M connectivity which I want to develop on a quectel BG96 dragino arduino shield. If this works I'd also like to port it to an ESP32. Is it hard to implement this and is Zephyr OS the right choice considering I have no experience yet with the operating system? 

Kind regards, 

Tibor



Re: C library re-entrancy under Zephyr

Rob Meades
 

Just to be clear on this, is it true that re-entrancy is not supported by Zephyr for any of the newlib stdio.h or stdlib.h functions, so not just the likes of strok() but also snprintf() and, more fundamentally, malloc()/free()?

 

If this is the case, are there any other C libraries (so not newlib) for which Zephyr does support re-entrancy and which fulfil the same functions?

 

Rob

From: Dave Nadler <drn@...>
Sent: 11 March 2021 19:23
To: Rob Meades <Rob.Meades@...>; Kumar Gala <kumar.gala@...>
Cc: users@...
Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr

 

*** This is an EXTERNAL email. It was sent from outside of u-blox. ***

Hi Rob - Went through this a few years back with FreeRTOS.
The link below may be helpful.
Hope that helps!
Best Regards, Dave

 

 

On 3/11/2021 1:04 PM, Rob Meades via lists.zephyrproject.org wrote:

Thanks for the swift response.  That's a shame.  
I will go look at the PR at your link as shifting to the re-entrant versions just for Zephyr is going to be painful.
 
Rob
-----Original Message-----
From: users@... <users@...> On Behalf Of Kumar Gala
Sent: 11 March 2021 17:54
To: Rob Meades <Rob.Meades@...>
Cc: users@...
Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr
 
*** This is an EXTERNAL email. It was sent from outside of u-blox. ***
 
Re-entrant support between newlib and zephyr is not currently supported.
 
There’s an old PR on the subject
 
https://github.com/zephyrproject-rtos/zephyr/pull/21518
 
- k
 
On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@...> wrote:
 
Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?
 
I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere.  My prj.conf file is attached in case it is helpful in answering the question.
 
Rob
 
 
 
 
 
<prj.conf>
 
 
 
 
 
 
 
 

 
 

 

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


Re: C library re-entrancy under Zephyr

Dave Nadler
 

Hi Rob - Went through this a few years back with FreeRTOS.
The link below may be helpful.
Hope that helps!
Best Regards, Dave


On 3/11/2021 1:04 PM, Rob Meades via lists.zephyrproject.org wrote:
Thanks for the swift response.  That's a shame.
I will go look at the PR at your link as shifting to the re-entrant versions just for Zephyr is going to be painful.

Rob
-----Original Message-----
From: users@... <users@...> On Behalf Of Kumar Gala
Sent: 11 March 2021 17:54
To: Rob Meades <Rob.Meades@...>
Cc: users@...
Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr

*** This is an EXTERNAL email. It was sent from outside of u-blox. ***

Re-entrant support between newlib and zephyr is not currently supported.

There’s an old PR on the subject

https://github.com/zephyrproject-rtos/zephyr/pull/21518

- k

On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@...> wrote:

Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?

I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere.  My prj.conf file is attached in case it is helpful in answering the question.

Rob





<prj.conf>











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


Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required

Kumar Gala
 

Will see if other downstream users request such support.

How long would want for the various phases?

- k

On Mar 11, 2021, at 11:45 AM, Jack Rosenthal <jrosenth@chromium.org> wrote:

The typical way I've seen this done is:

Phase 1: Create the main branch at the same commit hash as master. Repo maintainers make sure that the main branch is synced to master.
Phase 2: Set the default branch to "main". Continue syncing "main" and "master".
Phase 3: Stop syncing "main" and "master". Master goes stale.
Phase 4: Delete the (now stale) master branch.

I'm not sure if GitHub has tools for branch syncing, but it can be done easy enough from the command line by someone with push access.

On Thu, Mar 11, 2021 at 10:38 AM Kumar Gala <kumar.gala@linaro.org> wrote:
Jack,

We are utilizing what GitHub provides and as far as I can tell once we make the change to the default branch from ‘master’ to ‘main’ the ‘master’ branch will no longer exist in the repository.

So downstream users will need to adjust after the change is made.

If you have some means to handle such a synchronization its something that we can discuss.

- k

On Mar 11, 2021, at 10:12 AM, Jack Rosenthal <jrosenth@chromium.org> wrote:

Hi,

Will there be a period of time that we have two main branches ("master" and "main") that are auto-synced to give time for people to adjust their tools?

Thanks,

Jack

On Thu, Mar 11, 2021 at 6:32 AM Kumar Gala <kumar.gala@linaro.org> wrote:
We will be changing the default branch on github from ‘master' to ‘main' on Friday (Mar 11, 2021).

There is no action required for any open PRs, however you’ll need to update your local git clone as follows:

git branch -m master main
git fetch origin
git branch -u origin/main main

Will announce here when this change is made on Friday.

thanks

- k




Re: C library re-entrancy under Zephyr

Kumar Gala
 

As with and open source project, patches/PRs are welcome to improve and support this :)

- k

On Mar 11, 2021, at 12:04 PM, Rob Meades <Rob.Meades@u-blox.com> wrote:

Thanks for the swift response. That's a shame. I will go look at the PR at your link as shifting to the re-entrant versions just for Zephyr is going to be painful.

Rob
-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On Behalf Of Kumar Gala
Sent: 11 March 2021 17:54
To: Rob Meades <Rob.Meades@u-blox.com>
Cc: users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr

*** This is an EXTERNAL email. It was sent from outside of u-blox. ***

Re-entrant support between newlib and zephyr is not currently supported.

There’s an old PR on the subject

https://github.com/zephyrproject-rtos/zephyr/pull/21518

- k

On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@lists.zephyrproject.org> wrote:

Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?

I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere. My prj.conf file is attached in case it is helpful in answering the question.

Rob





<prj.conf>





Re: C library re-entrancy under Zephyr

Rob Meades
 

Thanks for the swift response. That's a shame. I will go look at the PR at your link as shifting to the re-entrant versions just for Zephyr is going to be painful.

Rob

-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On Behalf Of Kumar Gala
Sent: 11 March 2021 17:54
To: Rob Meades <Rob.Meades@u-blox.com>
Cc: users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] C library re-entrancy under Zephyr

*** This is an EXTERNAL email. It was sent from outside of u-blox. ***

Re-entrant support between newlib and zephyr is not currently supported.

There’s an old PR on the subject

https://github.com/zephyrproject-rtos/zephyr/pull/21518

- k

On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@lists.zephyrproject.org> wrote:

Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?

I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere. My prj.conf file is attached in case it is helpful in answering the question.

Rob





<prj.conf>


Re: C library re-entrancy under Zephyr

Kumar Gala
 

Re-entrant support between newlib and zephyr is not currently supported.

There’s an old PR on the subject

https://github.com/zephyrproject-rtos/zephyr/pull/21518

- k

On Mar 11, 2021, at 11:51 AM, Rob Meades via lists.zephyrproject.org <Rob.Meades=u-blox.com@lists.zephyrproject.org> wrote:

Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?

I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere. My prj.conf file is attached in case it is helpful in answering the question.

Rob





<prj.conf>


C library re-entrancy under Zephyr

Rob Meades
 

Should I expect C library functions (e.g. strtok()) under Zephyr to be re-entrant or must I call the re-entrant versions (i.e. in this case strtok_r())?

I ask because I am building/running nRF52840 (cortex-m4) and strok() _appears_ to NOT be re-entrant: I'd like to understand if this is expected or if I've messed up a configuration somewhere. My prj.conf file is attached in case it is helpful in answering the question.

Rob


Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required

Jack Rosenthal <jrosenth@...>
 

The typical way I've seen this done is:

Phase 1: Create the main branch at the same commit hash as master. Repo maintainers make sure that the main branch is synced to master.
Phase 2: Set the default branch to "main". Continue syncing "main" and "master".
Phase 3: Stop syncing "main" and "master". Master goes stale.
Phase 4: Delete the (now stale) master branch.

I'm not sure if GitHub has tools for branch syncing, but it can be done easy enough from the command line by someone with push access.

On Thu, Mar 11, 2021 at 10:38 AM Kumar Gala <kumar.gala@...> wrote:
Jack,

We are utilizing what GitHub provides and as far as I can tell once we make the change to the default branch from ‘master’ to ‘main’ the ‘master’ branch will no longer exist in the repository.

So downstream users will need to adjust after the change is made.

If you have some means to handle such a synchronization its something that we can discuss.

- k

> On Mar 11, 2021, at 10:12 AM, Jack Rosenthal <jrosenth@...> wrote:
>
> Hi,
>
> Will there be a period of time that we have two main branches ("master" and "main") that are auto-synced to give time for people to adjust their tools?
>
> Thanks,
>
> Jack
>
> On Thu, Mar 11, 2021 at 6:32 AM Kumar Gala <kumar.gala@...> wrote:
> We will be changing the default branch on github from ‘master' to ‘main' on Friday (Mar 11, 2021).
>
> There is no action required for any open PRs, however you’ll need to update your local git clone as follows:
>
> git branch -m master main
> git fetch origin
> git branch -u origin/main main
>
> Will announce here when this change is made on Friday.
>
> thanks
>
> - k
>
>
>
>


Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required

Kumar Gala
 

Jack,

We are utilizing what GitHub provides and as far as I can tell once we make the change to the default branch from ‘master’ to ‘main’ the ‘master’ branch will no longer exist in the repository.

So downstream users will need to adjust after the change is made.

If you have some means to handle such a synchronization its something that we can discuss.

- k

On Mar 11, 2021, at 10:12 AM, Jack Rosenthal <jrosenth@chromium.org> wrote:

Hi,

Will there be a period of time that we have two main branches ("master" and "main") that are auto-synced to give time for people to adjust their tools?

Thanks,

Jack

On Thu, Mar 11, 2021 at 6:32 AM Kumar Gala <kumar.gala@linaro.org> wrote:
We will be changing the default branch on github from ‘master' to ‘main' on Friday (Mar 11, 2021).

There is no action required for any open PRs, however you’ll need to update your local git clone as follows:

git branch -m master main
git fetch origin
git branch -u origin/main main

Will announce here when this change is made on Friday.

thanks

- k




Re: [Zephyr-devel] Changing default branch name on GitHub - possible action required

Jack Rosenthal <jrosenth@...>
 

Hi,

Will there be a period of time that we have two main branches ("master" and "main") that are auto-synced to give time for people to adjust their tools?

Thanks,

Jack

On Thu, Mar 11, 2021 at 6:32 AM Kumar Gala <kumar.gala@...> wrote:
We will be changing the default branch on github from ‘master' to ‘main' on Friday (Mar 11, 2021).

There is no action required for any open PRs, however you’ll need to update your local git clone as follows:

git branch -m master main
git fetch origin
git branch -u origin/main main

Will announce here when this change is made on Friday.

thanks

- k




161 - 180 of 2659