Date   

Re: Zephyr escaping its virtual environment

Jason Bens
 

Hey Marti, thanks for the advice.

In this case specifically, I tracked it down to a pretty silly mistake. I was using the nRF extension for VS Code, but also had the CMake extension installed. I had been hitting the CMake extension's build button, not the nRF extension's, without realizing it was bypassing west. So, an easy enough fix once I realized it.

- Jason

-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@nordicsemi.no>
Sent: Friday, November 12, 2021 6:53 PM
To: Jason Bens <Jason.Bens@teufel.de>; users@lists.zephyrproject.org
Subject: RE: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi,

It's hard to diagnose issues like this remotely, and especially with so few details.

If you are looking for general advice:

- check your PATH for where west is installed
- check things like 'py -3 -m pip freeze' inside and outside
your virtual environment to check what is installed where
- uninstall any pythons on your system, making sure you do not have
'west' on your PATH, then reinstalling them

Using Zephyr with a python virtual environment is supported, does work, and is my strong personal recommendation. Unfortunately, if you have been inconsistent about using venvs, it can leave your system in a mixed state that you will need to untangle.

I have been pushing for virtual environments to be the default recommendation in the getting started guide for years, but other maintainers have disagreed with me, and it hasn't happened. Sorry for any inconvenience.

Marti

On Fri, Nov 12 2021, Jason Bens wrote:
Hey Marti,

As far as I can tell, I don't have west currently installed outside of the virtual environment. This project I'm trying to get going predates a tonne of build environment issues I've been fixing for the past couple weeks, though. When I first started, there was no venv, and python was on the normal windows path. Could it be that the original path has been stored somewhere and survived the purge?

Jason


-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@nordicsemi.no>
Sent: Thursday, November 11, 2021 6:40 PM
To: Jason Bens <Jason.Bens@teufel.de>; users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr tries to use the same python from the build system that you used for running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Re: Zephyr for ARM A53

Manivannan Sadhasivam <mani@...>
 

On Fri, Nov 12, 2021 at 11:29:52AM +0000, Sandeep Kulkarni via lists.zephyrproject.org wrote:
Hello all,

This is Sandeep from Maxlinear Technologies.

We are building a solution using ARM A53 - Wherein we plan to run RTOS on a couple of cores for time critical functions and we also need openAMP support.
Currently we are exploring the options - FreeRTOS, Zephyr, Threadx etc

Zephyr seems to support most of what we need in-terms of features/functionality, but I don't find much information for Zephyr with A53 on web, only thing I see is the QEMU support.
So need your guidance on this topic.
Zephyr has support for multiple ARMv8 based SoCs/boards. Take a look at:
https://github.com/zephyrproject-rtos/zephyr/tree/main/soc/arm64
https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/arm64

There is also an ongoing PR to support NXP IMX8M SoC that has ARM Cortex A53.

* Has anyone tried Zephyr on A53 hardware ? Rpi or any other platforms?
* Is this stable?
Support for ARM64 is still new compared to ARM32 in Zephyr but if you find
something is missing or broken, let us know :)

* How is the community support for this?
There is some interest but it is still picking up pace.

* OpenAMP b/n Zephyr and Zephyr on A53
This one works pretty well and I've tested it on STM32MP platform.

* OpenAMP b/n Linux and Zephyr on A53
This should also work but I haven't tested personally.

Thanks,
Mani



Thanks,
Sandeep







#customboard Linker Error with Custom Board #customboard

mbarrett@...
 

I copied the board files from mimxrt1050_evk, and renamed them to my own board, basically just changing the names. When I do I get the following linker error:
/opt/toolchains/zephyr-sdk-0.13.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(soc_rt10xx.c.obj):(.boot_hdr.ivt+0xc): undefined reference to `dcd_data'

The Kconfig.board file looks as follows (where I changed the first two lines)
config BOARD_MIMXRT1050_ODB
bool "MIMXRT1050-ODB"
depends on SOC_SERIES_IMX_RT
select SOC_PART_NUMBER_MIMXRT1052DVL6A

I keep looking at all fields I've changed but can't find any issue. Any guidance on how to troubleshoot this?

Thanks!


Re: Zephyr escaping its virtual environment

Bolivar, Marti
 

Hi,

It's hard to diagnose issues like this remotely, and especially with so
few details.

If you are looking for general advice:

- check your PATH for where west is installed
- check things like 'py -3 -m pip freeze' inside and outside
your virtual environment to check what is installed where
- uninstall any pythons on your system, making sure you do not have
'west' on your PATH, then reinstalling them

Using Zephyr with a python virtual environment is supported, does work,
and is my strong personal recommendation. Unfortunately, if you have
been inconsistent about using venvs, it can leave your system in a mixed
state that you will need to untangle.

I have been pushing for virtual environments to be the default
recommendation in the getting started guide for years, but other
maintainers have disagreed with me, and it hasn't happened. Sorry for
any inconvenience.

Marti

On Fri, Nov 12 2021, Jason Bens wrote:
Hey Marti,

As far as I can tell, I don't have west currently installed outside of the virtual environment. This project I'm trying to get going predates a tonne of build environment issues I've been fixing for the past couple weeks, though. When I first started, there was no venv, and python was on the normal windows path. Could it be that the original path has been stored somewhere and survived the purge?

Jason


-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@nordicsemi.no>
Sent: Thursday, November 11, 2021 6:40 PM
To: Jason Bens <Jason.Bens@teufel.de>; users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr tries to use the same python from the build system that you used for running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Zephyr for ARM A53

Sandeep Kulkarni <skulkarni@...>
 

Hello all,

 

This is Sandeep from Maxlinear Technologies.

 

We are building a solution using ARM A53 – Wherein we plan to run RTOS on a couple of cores for time critical functions and we also need openAMP support.

Currently we are exploring the options – FreeRTOS, Zephyr, Threadx etc

 

Zephyr seems to support most of what we need in-terms of features/functionality, but I don’t find much information for Zephyr with A53 on web, only thing I see is the QEMU support.

So need your guidance on this topic.

  • Has anyone tried Zephyr on A53 hardware ? Rpi or any other platforms?
    • Is this stable?
    • How is the community support for this?
  • OpenAMP b/n Zephyr and Zephyr on A53
  • OpenAMP b/n Linux and Zephyr on A53

 

 

Thanks,
Sandeep

 

 


Re: Zephyr escaping its virtual environment

Jason Bens
 

Hey Marti,

As far as I can tell, I don't have west currently installed outside of the virtual environment. This project I'm trying to get going predates a tonne of build environment issues I've been fixing for the past couple weeks, though. When I first started, there was no venv, and python was on the normal windows path. Could it be that the original path has been stored somewhere and survived the purge?

Jason

-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@nordicsemi.no>
Sent: Thursday, November 11, 2021 6:40 PM
To: Jason Bens <Jason.Bens@teufel.de>; users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr tries to use the same python from the build system that you used for running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Re: Zephyr escaping its virtual environment

Bolivar, Marti
 

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr
tries to use the same python from the build system that you used for
running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Zephyr escaping its virtual environment

Jason Bens
 

Hi.

 

I’m trying to build zephyr inside a python virtual environment.  It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment.  This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones).  It looks like the python path is picked up in python.cmake:

 

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")

  find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})

  if(PYTHON_PREFER_EXECUTABLE) <…snip>

 

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to.  I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point.  I’ve confirmed that .venv\Scripts is the first entry in my path.  `where python´ from my virtual environment returns the following:

 

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe

C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

 

I’m working with version 2.6.99.  Before I file it as an issue, is this something that is fixed in 2.7.99?  Is there some known configuration stuff I’m failing to do?

 

Thanks,

 

  • Jason


Re: Easy way to setup Zephyr in VSCode?

Jonathan Beri
 

There are options! I'd recommend this discussion as a starting point. There are 3 solutions I know of:
  1. Nordic has their nRF Connect extension that works very well with Nordic-based boards, and can even be used with non-Nordic boards with a bit of effort.
  2. A project from Victor called Zephyrus looks promising.
  3. PlatformIO has support for many boards.
Hope that helps!


Easy way to setup Zephyr in VSCode?

markus.prager@...
 

Hi, I am trying to find a way to build my projects in VSCode. So far I have been manually building in my terminal using west.
Is there an easy way to change that and start building out of VSCode directly? I might have to add that I am working on a custom board, so I don't think something like platformio is a good solution for me. Any directions are very welcome, and thanks in advance for any tips!

kind regards,
Markus


Re: big_http_download sample localhost download

Lubos, Robert
 

Hi Brenton,

 

I don’t have exact answers for the issue you report, but some observations from my side, while I tried to find the root cause for the problem. The core reason http client disconnects is that we set the RX timeout on a socket (see the setsockopt calls). If you remove the timeout from a socket you’ll notice the connection remains, however the communication is extremely slow.

 

Now as for the reason of the sluggishness of the data transfer, I’ve noticed the following:

  1. The packets received by the e1000 driver tend to appear out of order, compared to what’s visible on wireshark (the server usually sends two packets at once after receiving ack)– this actually is not a big deal as Zephyr’s TCP implementation takes care of that,
  2. e1000 sometimes does not receive a packet, if a few of them were sent in a bulk – no RX irq is received at all for the lost packet. This also shouldn’t be a big deal, as retransmission at TCP level should kick in then. I’ve noticed however that the python HTTP server you use has some bizarre TCP retransmission delays (as if the delay was duplicated on each retransmission). This eventually leads to a timeout on a socket (if enabled).

 

Now, I’m not sure what is the reason that not all packets reach the e1000 driver. It could be something with RX IRQ handling, or it could be a qemu issue not handling heavy traffic well. Perhaps someone more familiar with this device or qemu emulation could elaborate on the problem.

 

Regards,

Robert

 

From: Brenton Chetty <brent7984@...>
Sent: środa, 3 listopada 2021 19:10
To: Lubos, Robert <Robert.Lubos@...>
Cc: users@...
Subject: Re: [Zephyr-users] big_http_download sample localhost download

 

Hi Robert

 

Thank you for your assistance. I managed to get qemu to begin downloading a file on localhost.

However, the file downloads up to a maximum of 2680 bytes, then it fails, and restarts the download.

 

Do you have any suggestions on why this only happens when downloading on localhost?

 

Regards

Brenton

 

On Wed, Nov 3, 2021 at 2:45 PM Lubos, Robert <Robert.Lubos@...> wrote:

Hi Brenton,

 

The DNS server configuration shouldn’t be an issue in this case, as we provide the IP address of the server – in such case the DNS query isn’t even sent as we already know the IP address.

 

I’ve reproduced the problem locally, and it turned out there was a problem with ARP retransmission handling, wrong source address was selected for the retransmission, I’ve posted a PR with a fix proposal:

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

 

Another thing is that the reason for the ARP retransmission even being sent  is the fact that e1000 driver does not process any incoming packets early after boot (for about 1 second). I have to little knowledge the particular device/driver to figure out why is this happening, but I’ve asked the question in the aforementioned PR, perhaps we’ll get some answers there.

 

Regards,

Robert

 

From: users@... <users@...> On Behalf Of Brenton Chetty via lists.zephyrproject.org
Sent: wtorek, 2 listopada 2021 20:11
To: users@...
Subject: [Zephyr-users] big_http_download sample localhost download

 

Hello,

I am attempting to download a file hosted on a localhost file server.

- I am hosting a file named "Zephyr" using "python3 -m http.server 8980"
- I am using a zeth interface and the "overlay-e1000.conf" to allow qemu to communicate with localhost. I successfully tested the LWM2M client example to ensure the connection was good.
- I can download the Zephyr file when I input "http://192.0.2.2:8980/zephyr" into a web browser.
- I attempted using the "overlay-ci.conf" file to perform the download.
    CONFIG_SAMPLE_BIG_HTTP_DL_URL="http://192.0.2.2:8980/zephyr"
 however I get the following error:
     Preparing HTTP GET request for http://192.0.2.2:8980/zephyr
     addrinfo @0x6da008: ai_family=1, ai_socktype=1, ai_protocol=6, sa_family=1, sin_port=1423
     Iteration 1 of 1:
     sock = 0
     [00:00:00.000,000] <inf> net_config: Initializing network
     [00:00:00.000,000] <inf> net_config: IPv4 address: 192.0.2.1
     [00:00:00.000,000] <inf> net_config: Running dhcpv4 client...
     Error: connect(sock, ai->ai_addr, ai->ai_addrlen)
     exit

I managed to get the example to download the online vmlinuz file, however I cannot get the sample to download via localhost.
Do you have any suggestions on what steps I could have missed?
Could it be a DNS issue? for downloading the online vmlinuz file I used 8.8.8.8 as CONFIG_DNS_SERVER1. For localhost, I left it at 192.0.2.2

With thanks
Brenton


Re: Setting MAC address at boot? #stm32

Anders
 

Hi again Jukka,

Thank you! Setting of MAC works fine now.

The CONFIG_NET_L2_ETHERNET_MGMT parameter did the trick!

/Anders


Re: Setting MAC address at boot? #stm32

Jukka Rissanen
 

Try to add also these two settings

CONFIG_NET_MGMT_EVENT=y
CONFIG_NET_L2_ETHERNET_MGMT=y


Jukka

On Thu, 2021-11-04 at 04:41 -0700, Anders wrote:
Thanks for helping me figure this out!

I have tried to use the proposed, proper way of doing this using:

net_mgmt(NET_REQUEST_ETHERNET_SET_MAC_ADDRESS, iface,
                       &params, sizeof(struct ethernet_req_params));

Unfortunately the build will fail due to: undefined reference to
`net_mgmt_NET_REQUEST_ETHERNET_SET_MAC_ADDRESS' when trying to use
it.

I have added CONFIG_NET_MGMT=y to prj.conf.

Do I have to add more or could it be that my platform (nucleo_f767zi)
lacks support for this feature?

/Anders





Re: Setting MAC address at boot? #stm32

Anders
 

Thanks for helping me figure this out!

I have tried to use the proposed, proper way of doing this using:

net_mgmt(NET_REQUEST_ETHERNET_SET_MAC_ADDRESS, iface,
&params, sizeof(struct ethernet_req_params));

Unfortunately the build will fail due to: undefined reference to `net_mgmt_NET_REQUEST_ETHERNET_SET_MAC_ADDRESS' when trying to use it.

I have added CONFIG_NET_MGMT=y to prj.conf.

Do I have to add more or could it be that my platform (nucleo_f767zi) lacks support for this feature?

/Anders


Re: Setting MAC address at boot? #stm32

Jukka Rissanen
 

Hi Anders,

there is also some info about MAC address setting in
https://github.com/zephyrproject-rtos/zephyr/discussions/39252

Note that if you are setting the MAC address from application, then
calling the net_if_set_link_addr() from app is not a proper way.

The MAC address is Ethernet concept, so we used the "link address" here
in order to use the same function in other network technologies.


Jukka

On Thu, 2021-10-28 at 23:39 -0700, Anders wrote:
Update! Problem solved. The function net_if_set_link_addr() sets the
MAC address.

Why isn't the function named net_if_set_mac_addr()?





Re: big_http_download sample localhost download

Brenton Chetty
 

I forgot to mention.

After downloading up to 2680 bytes, I receive the following error:
     Timeout on reading responsees; 2 KiB; 0 MiB


Re: big_http_download sample localhost download

Brenton Chetty
 

Hi Robert

Thank you for your assistance. I managed to get qemu to begin downloading a file on localhost.
However, the file downloads up to a maximum of 2680 bytes, then it fails, and restarts the download.

Do you have any suggestions on why this only happens when downloading on localhost?

Regards
Brenton


On Wed, Nov 3, 2021 at 2:45 PM Lubos, Robert <Robert.Lubos@...> wrote:

Hi Brenton,

 

The DNS server configuration shouldn’t be an issue in this case, as we provide the IP address of the server – in such case the DNS query isn’t even sent as we already know the IP address.

 

I’ve reproduced the problem locally, and it turned out there was a problem with ARP retransmission handling, wrong source address was selected for the retransmission, I’ve posted a PR with a fix proposal:

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

 

Another thing is that the reason for the ARP retransmission even being sent  is the fact that e1000 driver does not process any incoming packets early after boot (for about 1 second). I have to little knowledge the particular device/driver to figure out why is this happening, but I’ve asked the question in the aforementioned PR, perhaps we’ll get some answers there.

 

Regards,

Robert

 

From: users@... <users@...> On Behalf Of Brenton Chetty via lists.zephyrproject.org
Sent: wtorek, 2 listopada 2021 20:11
To: users@...
Subject: [Zephyr-users] big_http_download sample localhost download

 

Hello,

I am attempting to download a file hosted on a localhost file server.

- I am hosting a file named "Zephyr" using "python3 -m http.server 8980"
- I am using a zeth interface and the "overlay-e1000.conf" to allow qemu to communicate with localhost. I successfully tested the LWM2M client example to ensure the connection was good.
- I can download the Zephyr file when I input "http://192.0.2.2:8980/zephyr" into a web browser.
- I attempted using the "overlay-ci.conf" file to perform the download.
    CONFIG_SAMPLE_BIG_HTTP_DL_URL="http://192.0.2.2:8980/zephyr"
 however I get the following error:
     Preparing HTTP GET request for http://192.0.2.2:8980/zephyr
     addrinfo @0x6da008: ai_family=1, ai_socktype=1, ai_protocol=6, sa_family=1, sin_port=1423
     Iteration 1 of 1:
     sock = 0
     [00:00:00.000,000] <inf> net_config: Initializing network
     [00:00:00.000,000] <inf> net_config: IPv4 address: 192.0.2.1
     [00:00:00.000,000] <inf> net_config: Running dhcpv4 client...
     Error: connect(sock, ai->ai_addr, ai->ai_addrlen)
     exit

I managed to get the example to download the online vmlinuz file, however I cannot get the sample to download via localhost.
Do you have any suggestions on what steps I could have missed?
Could it be a DNS issue? for downloading the online vmlinuz file I used 8.8.8.8 as CONFIG_DNS_SERVER1. For localhost, I left it at 192.0.2.2

With thanks
Brenton


ODP: k_sleep causes nRF5340 to reset

Chruściński, Krzysztof
 

Hi Jason,

I would check two things:
  • if call to k_sleep happens before kernel is ready. You can use k_is_pre_kernel to check that.
  • if your board has LF XTAL (as nrf5340dk) or it must run from LFRC. You can try CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y just to check if it will work then. k_busy_wait is using cpu noping so does not need system clock (used by k_sleep) which is using low frequency clock.
regards,
Krzysztof

Od: users@... <users@...> w imieniu użytkownika Jason Bens via lists.zephyrproject.org <jason.bens=teufel.de@...>
Wysłane: środa, 3 listopada 2021 12:35
Do: users@... <users@...>
Temat: [Zephyr-users] k_sleep causes nRF5340 to reset
 

Hi,

 

I’m porting some code from an nRF5340 eval board to my own board, and I’ve run into an issue.  While waiting for the net core to boot up, I enter a loop and call k_sleep until an initialization callback returns, before proceeding to the rest of the code.  For some reason, k_sleep is causing the application to reset, but only when building for release.  Debug works perfectly fine.  Replacing k_sleep with k_busy_wait or k_yield also works.  This code was originally built on the zephyr release that ships with nRF Connect SDK 1.6.1, but updating to 1.7.1 doesn’t resolve the issue.

 

I’m working on creating a minimal project that reproduces this behaviour, but in the meantime, what could I check to troubleshoot this?  Blinky, which also uses k_sleep in main, does not trigger a reset loop.

 

Thanks,

 

  • Jason

 


Re: big_http_download sample localhost download

Lubos, Robert
 

Hi Brenton,

 

The DNS server configuration shouldn’t be an issue in this case, as we provide the IP address of the server – in such case the DNS query isn’t even sent as we already know the IP address.

 

I’ve reproduced the problem locally, and it turned out there was a problem with ARP retransmission handling, wrong source address was selected for the retransmission, I’ve posted a PR with a fix proposal:

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

 

Another thing is that the reason for the ARP retransmission even being sent  is the fact that e1000 driver does not process any incoming packets early after boot (for about 1 second). I have to little knowledge the particular device/driver to figure out why is this happening, but I’ve asked the question in the aforementioned PR, perhaps we’ll get some answers there.

 

Regards,

Robert

 

From: users@... <users@...> On Behalf Of Brenton Chetty via lists.zephyrproject.org
Sent: wtorek, 2 listopada 2021 20:11
To: users@...
Subject: [Zephyr-users] big_http_download sample localhost download

 

Hello,

I am attempting to download a file hosted on a localhost file server.

- I am hosting a file named "Zephyr" using "python3 -m http.server 8980"
- I am using a zeth interface and the "overlay-e1000.conf" to allow qemu to communicate with localhost. I successfully tested the LWM2M client example to ensure the connection was good.
- I can download the Zephyr file when I input "http://192.0.2.2:8980/zephyr" into a web browser.
- I attempted using the "overlay-ci.conf" file to perform the download.
    CONFIG_SAMPLE_BIG_HTTP_DL_URL="http://192.0.2.2:8980/zephyr"
 however I get the following error:
     Preparing HTTP GET request for http://192.0.2.2:8980/zephyr
     addrinfo @0x6da008: ai_family=1, ai_socktype=1, ai_protocol=6, sa_family=1, sin_port=1423
     Iteration 1 of 1:
     sock = 0
     [00:00:00.000,000] <inf> net_config: Initializing network
     [00:00:00.000,000] <inf> net_config: IPv4 address: 192.0.2.1
     [00:00:00.000,000] <inf> net_config: Running dhcpv4 client...
     Error: connect(sock, ai->ai_addr, ai->ai_addrlen)
     exit

I managed to get the example to download the online vmlinuz file, however I cannot get the sample to download via localhost.
Do you have any suggestions on what steps I could have missed?
Could it be a DNS issue? for downloading the online vmlinuz file I used 8.8.8.8 as CONFIG_DNS_SERVER1. For localhost, I left it at 192.0.2.2

With thanks
Brenton


k_sleep causes nRF5340 to reset

Jason Bens
 

Hi,

 

I’m porting some code from an nRF5340 eval board to my own board, and I’ve run into an issue.  While waiting for the net core to boot up, I enter a loop and call k_sleep until an initialization callback returns, before proceeding to the rest of the code.  For some reason, k_sleep is causing the application to reset, but only when building for release.  Debug works perfectly fine.  Replacing k_sleep with k_busy_wait or k_yield also works.  This code was originally built on the zephyr release that ships with nRF Connect SDK 1.6.1, but updating to 1.7.1 doesn’t resolve the issue.

 

I’m working on creating a minimal project that reproduces this behaviour, but in the meantime, what could I check to troubleshoot this?  Blinky, which also uses k_sleep in main, does not trigger a reset loop.

 

Thanks,

 

  • Jason

 

181 - 200 of 2946