Date   

Re: LWM2M client to nrf582540-DK #nrf52840 #networking

Nikos Karamolegkos
 

I am a bit lost.  I am trying to compile the OpenThread NCP sample in order to connect the nrf52840 dk with the raspberry which will be running the openthread border router docker image. In order to compile the sample I am running west build -b nrf52840dk_nrf52840 samples/net/openthread/ncp/ -- -DCONF_FILE="overlay-usb-nrf-br.conf" but I have to add CONFIG_UART_INTERRUPT_DRIVEN=y in the overlay file (otherwise I have errors). Is this a bug? Nevertheless, finally, when I am using the pre compiled image from openthread site for the nrf52840-dk and at the same time I have a node running the LWM2M sample with the default overlay-ot.conf file (from the echo client) I can see the network in the OTBR GUI. I am trying to join the network from the OTBR but I don't know how to continue (or to check if the procedure is successful)  . Is the OTBR configured ok? Have anybody experience running the the LWM2M client over OT using the border router? I will appreciate some help.


Re: LWM2M client to nrf582540-DK #nrf52840 #networking

Nikos Karamolegkos
 

I have a bunch of this type errors " #error "CONFIG_UART_INTERRUPT_DRIVEN must be set for CDC ACM driver", "error: 'const struct uart_driver_api' has no member named 'fifo_fill'
  999 |  .fifo_fill = cdc_acm_fifo_fill"


Re: LWM2M client to nrf582540-DK #nrf52840 #networking

Lubos, Robert
 

Hi,

 

I’ve just checked current master, and building with "overlay-usb-nrf-br.conf" worked fine for me. Perhaps you need to clear your build directory?

 

Anyway, unless I miss something, it should be ok to use pre-built NCP app.

 

Regards,

Robert

 

From: users@... [mailto:users@...] On Behalf Of Nikos Karamolegkos via lists.zephyrproject.org
Sent: Wednesday, September 2, 2020 10:24
To: users@...
Subject: Re: [Zephyr-users] LWM2M client to nrf582540-DK #nrf52840 #networking

 

I am following this https://openthread.io/certification/border-router/device-setup tutorial. So I will USB. However, when I am trying to use "overlay-usb-nrf-br.conf" I have some errors while compiling the zephyr sample (maybe some dependencies are missing - I will check it -). For now I am using the pre-built nRF52840 firmware image (https://openthread.io/platforms/co-processor/firmware#flash_the_nrf52840). Is this problem? In general, the procedure is really simple but I have not managed to make it work


Re: LWM2M client to nrf582540-DK #nrf52840 #networking

Nikos Karamolegkos
 

I am following this https://openthread.io/certification/border-router/device-setup tutorial. So I will USB. However, when I am trying to use "overlay-usb-nrf-br.conf" I have some errors while compiling the zephyr sample (maybe some dependencies are missing - I will check it -). For now I am using the pre-built nRF52840 firmware image (https://openthread.io/platforms/co-processor/firmware#flash_the_nrf52840). Is this problem? In general, the procedure is really simple but I have not managed to make it work


Re: LWM2M client to nrf582540-DK #nrf52840 #networking

Lubos, Robert
 

Hi Nikos,

 

The project file selection depends on whether you want to use USB CDC or UART for the communication, by default UART is used, applying ` overlay-usb-nrf-br.conf` will switch to USB (you’ll need to use the “nRF USB” port on your DK).

 

As for the Border Router itself, you can either setup a RPi, or use a Docker image provided by OpenThread community and run it on any Linux host.

 

Regards,

Robert

 

From: users@... [mailto:users@...] On Behalf Of Nikos Karamolegkos via lists.zephyrproject.org
Sent: Wednesday, September 2, 2020 09:52
To: users@...
Subject: Re: [Zephyr-users] LWM2M client to nrf582540-DK #nrf52840 #networking

 

Thank you Robert, so the idea is to flash this https://docs.zephyrproject.org/latest/samples/net/openthread/ncp/README.html on my nrf52840-dk and then using the openthread border router implementation on a raspberry to build a OpenThread Border Router (OTBR)? If yes, do I need the overlay-usb-nrf-br.conf file or just the simple proj.conf?

Regards,
Nikos

On 8/17/20 5:58 PM, Lubos, Robert wrote:

Hi Nikos,

 

Unfortunately, we don’t have a step-by-step guide for the scenario you describe, but I can provide you with some guidelines.

 

OpenThread has a reference implementation of border router, which can be run on a Linux host under docker (OpenThread is a protocol that enables IP over 802.15.4):

https://openthread.io/guides/border-router/docker

 

The `lwm2m_client` does not support OpenThread out-of-the box, but it can be easily added, see this comment:

https://github.com/zephyrproject-rtos/zephyr/issues/24840#issuecomment-624717991

 

Regards,

Robert

 

From: users@... [mailto:users@...] On Behalf Of Nikos Karamolegkos via lists.zephyrproject.org
Sent: Wednesday, August 5, 2020 11:32
To: users@...
Subject: [Zephyr-users] LWM2M client to nrf582540-DK #nrf52840 #networking

 

Hi all,

I have two nrf582540-dk modules and I would like to run the lwm2m client example of the link using the leshan server. How could I implement this using real device? How my 802.15.4 device will communicate with the server running on my PC? Is there any border router? 

I really need this. Can someone point me in the right direction?

Thank you,
Nikos

-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Re: LWM2M client to nrf582540-DK #nrf52840 #networking

Nikos Karamolegkos
 

Thank you Robert, so the idea is to flash this https://docs.zephyrproject.org/latest/samples/net/openthread/ncp/README.html on my nrf52840-dk and then using the openthread border router implementation on a raspberry to build a OpenThread Border Router (OTBR)? If yes, do I need the overlay-usb-nrf-br.conf file or just the simple proj.conf?

Regards,
Nikos

On 8/17/20 5:58 PM, Lubos, Robert wrote:

Hi Nikos,

 

Unfortunately, we don’t have a step-by-step guide for the scenario you describe, but I can provide you with some guidelines.

 

OpenThread has a reference implementation of border router, which can be run on a Linux host under docker (OpenThread is a protocol that enables IP over 802.15.4):

https://openthread.io/guides/border-router/docker

 

The `lwm2m_client` does not support OpenThread out-of-the box, but it can be easily added, see this comment:

https://github.com/zephyrproject-rtos/zephyr/issues/24840#issuecomment-624717991

 

Regards,

Robert

 

From: users@... [mailto:users@...] On Behalf Of Nikos Karamolegkos via lists.zephyrproject.org
Sent: Wednesday, August 5, 2020 11:32
To: users@...
Subject: [Zephyr-users] LWM2M client to nrf582540-DK #nrf52840 #networking

 

Hi all,

I have two nrf582540-dk modules and I would like to run the lwm2m client example of the link using the leshan server. How could I implement this using real device? How my 802.15.4 device will communicate with the server running on my PC? Is there any border router? 

I really need this. Can someone point me in the right direction?

Thank you,
Nikos

-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Async networking

Christoph Schramm
 

Dear all,

What is the current state of the art for implementing async networking?
I want to invoke and use callbacks for socket events (open/close/recv) and net_if_up /_down
I‘m currently doing it the sync way but well, it’s not nice

Thanks,
Chris


Re: Reg: Installing and Running with windows laptop.

Carles Cufi
 

Hi Deepa,

 

From your question it seems you are using the nRF Connect SDK, and not vanilla Zephyr.

You should therefore direct your question to the Nordic DevZone instead:

https://devzone.nordicsemi.com/

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Deepalakshmi RR via lists.zephyrproject.org
Sent: 31 August 2020 12:33
To: users@... <users@...>; devel@...
Subject: [Zephyr-users] Reg: Installing and Running with windows laptop.

 

 

Hello team,

 

Greetings From Deepa. I need an manual  installation procedure and building, compiling and Running the zephyr -OS with my laptop for learning purpose. I browsed and compiled via cmd prompt, but still I need an Editor support for running this OS with nrf9160 controller. In addition to that, I  tried running with web browser as well. I also willing to run with an IDE(any IDE which supports for NC sdk) for creating my own projects and running with NC sdk.

 

Please, suggest some options along with sample projects running procedure at the earliest.

 

 

Thanks & Regards,

Deepa.R

+91-9486308286/ 8072608604

 

Sent from Mail for Windows 10

 

=====================================================
Please refer to https://northamerica.altran.com/email-disclaimer
for important disclosures regarding this electronic communication.
=====================================================


Reg: Installing and Running with windows laptop.

Deepalakshmi RR <deepalakshmi.rr@...>
 

 

Hello team,

 

Greetings From Deepa. I need an manual  installation procedure and building, compiling and Running the zephyr -OS with my laptop for learning purpose. I browsed and compiled via cmd prompt, but still I need an Editor support for running this OS with nrf9160 controller. In addition to that, I  tried running with web browser as well. I also willing to run with an IDE(any IDE which supports for NC sdk) for creating my own projects and running with NC sdk.

 

Please, suggest some options along with sample projects running procedure at the earliest.

 

 

Thanks & Regards,

Deepa.R

+91-9486308286/ 8072608604

 

Sent from Mail for Windows 10

 

=====================================================
Please refer to https://northamerica.altran.com/email-disclaimer
for important disclosures regarding this electronic communication.
=====================================================


bme280 compatible with bmp180?

Karol P
 

Hi all, 

Just a quick question - is driver from zephyr/drivers/sensor/bme280 also compatible with bmp180? I couldn't find definitive answer via search.

Best regards,
Karol 


Re: Direct ISR support on ARC

Ruud Derwig
 

Hi Justin,

 

What version are you using? ARC support for direct interrupts was added in v2.1

(and note that Z_ARCH_IRQ_DIRECT_CONNECT was renamed to ARCH_IRQ_DIRECT_CONNECT).

 

Regards,

 

Ruud.

 

From: users@... <users@...> On Behalf Of Justin Huang
Sent: Saturday, August 29, 2020 2:45 AM
To: users@...
Subject: [Zephyr-users] Direct ISR support on ARC

 

Hi,

 

It appears to me that there is no support of 'direct ISR' by Zepher for the ARC processors: I do not see the definition of Z_ARCH_IRQ_DIRECT_CONNECT in the irq.h for ARC. 

Could someone please share why it is not supported?

 

Thanks,
Justin


Direct ISR support on ARC

Justin Huang
 

Hi,

It appears to me that there is no support of 'direct ISR' by Zepher for the ARC processors: I do not see the definition of Z_ARCH_IRQ_DIRECT_CONNECT in the irq.h for ARC. 
Could someone please share why it is not supported?

Thanks,
Justin


west: CMake Error while building blinky

Mohamed Belaroussi <mohamed.belaroussi@...>
 

Hi,

While trying to build the sample example blinky for the nRF5340pdk using west, I encountered this error.

C:\zephyrproject\zephyr>west build -b nrf5340pdk_nrf5340_cpuapp samples\basic\blinky --pristine
-- west build: making build dir C:\zephyrproject\zephyr\build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): C:/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.3.99 (C:/zephyrproject/zephyr)
-- Found Python3: C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.8_3.8.1520.0_x64__qbz5n2kfra8p0/python3.8.exe (found suitable version "3.8.5", minimum required is "3.6") found components: Interpreter
-- Found west: C:/Zypher/v1.3.0/toolchain/opt/bin/Scripts/west.exe (found suitable version "0.7.3", minimum required is "0.7.1")
-- Board: nrf5340pdk_nrf5340_cpuapp
-- Found toolchain: gnuarmemb (c:/gnuarm)
CMake Error at C:/zephyrproject/zephyr/cmake/compiler/gcc/generic.cmake:8 (message):
  Zephyr was unable to find the toolchain.  Is the environment misconfigured?


  User-configuration:

  ZEPHYR_TOOLCHAIN_VARIANT: gnuarmemb

  Internal variables:

  CROSS_COMPILE: c:/gnuarm/bin/arm-none-eabi-

  TOOLCHAIN_HOME: c:/gnuarm

Call Stack (most recent call first):
  C:/zephyrproject/zephyr/cmake/generic_toolchain.cmake:70 (include)
  C:/zephyrproject/zephyr/cmake/app/boilerplate.cmake:527 (include)
  C:/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  C:/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' '-DWEST_PYTHON=C:\Users\mohamed.belaroussi\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' '-BC:\zephyrproject\zephyr\build' '-SC:\zephyrproject\zephyr\samples\basic\blinky' -GNinja -DBOARD=nrf5340pdk_nrf5340_cpuapp

 
Any suggestions?

Kind regards
Mohamed Belaroussi



Please consider the environment before printing this email.
*********************************************************************
This communication may contain information which is confidential, personal and/or privileged. It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited. If you have received it in error please contact the sender immediately by return e-mail. Please then delete the e-mail and any copies of it and do not use or disclose its contents to any person.
Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them. Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.
This message has been checked for viruses on behalf of the company.
*********************************************************************


G4S Regional Management (UK&I) Limited, Registered Office: Southside, 105 Victoria Street, London, SW1E 6QT. Registered in England No. 3189802.

G4S Care and Justice Services (UK) Limited, trading as G4S Central Government Services, Registered in England No. 390328.
G4S Health Services (UK) Limited, Registered in England No. 5121608.
G4S Government and Outsourcing Services (UK) Limited, trading as G4S Outsourcing Services, Registered in England No.3175173.
G4S Facilities Management (UK) Limited, Registered in England No. 3333860.
G4S Investigation Solutions (UK) Limited, Registered in England No. 3749819.
G4S Monitoring Technologies Limited, Registered in England No. 2626613.
G4S Ordnance Management Limited, Registered in England No. 7068855.
G4S Risk Management Limited, Registered in England No. 1540857.
G4S Secure Solutions (Iraq) Limited, Registered in England No.5128617.
G4S Risk Consulting Limited, Registered in England No. 4047630.
The Registered office of all the above companies is Southside, 105 Victoria Street, London, SW1E 6QT.

G4S Aviation Services (UK) Limited, Registered in England No. 2837136.
G4S Secure Solutions (UK) Limited, Registered in England No. 1046019.
G4S Security Services (UK) Limited, Registered in England No.2380900.
G4S Gurkha Services (UK) Limited, Registered in England No.6304482.
G4S Cash Solutions (UK) Limited, Registered in England No.354883.
G4S Cash Centres (UK) Limited, Registered in England No.1485104.
G4S Bullion Solutions (UK) Limited, Registered in England No.7860383.
The Registered office of all the above companies is Sutton Park House, 15 Carshalton Road, Sutton, Surrey SM1 4LD. 


Re: Chocolatey: vcredist140 and Python3 failed to install

Mohamed Belaroussi <mohamed.belaroussi@...>
 

Hi Marti,

Thank you.
No, I haven't. But what I have done is reboot my machine and when I tried to re-run the same command again it returned a message saying all apps have been successfully installed including the two vcredist140 and python3 that seemingly didn't get installed prior to the reboot.
So, the problem disappeared just by rebooting.

Kind regards
Mohamed


On Fri, Aug 28, 2020 at 5:18 PM Bolivar, Marti <Marti.Bolivar@...> wrote:
Hi there and welcome.

"Mohamed Belaroussi via lists.zephyrproject.org"
<mohamed.belaroussi=uk.g4s.com@...> writes:

> *Installing vcredist140-x64...*
> Chocolatey timed out waiting for the command to finish. The timeout
>  specified (or the default value) was '2700' seconds. Perhaps try a
>  higher `--execution-timeout`? See `choco -h` for details.
>   vcredist140 may be able to be automatically uninstalled.
> The install of vcredist140 was NOT successful.

This seems to be a potential cause of the problem and the output
suggests a solution. Did you try looking into this?

Thanks
Martí


Please consider the environment before printing this email.
*********************************************************************
This communication may contain information which is confidential, personal and/or privileged. It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited. If you have received it in error please contact the sender immediately by return e-mail. Please then delete the e-mail and any copies of it and do not use or disclose its contents to any person.
Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them. Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.
This message has been checked for viruses on behalf of the company.
*********************************************************************


G4S Regional Management (UK&I) Limited, Registered Office: Southside, 105 Victoria Street, London, SW1E 6QT. Registered in England No. 3189802.

G4S Care and Justice Services (UK) Limited, trading as G4S Central Government Services, Registered in England No. 390328.
G4S Health Services (UK) Limited, Registered in England No. 5121608.
G4S Government and Outsourcing Services (UK) Limited, trading as G4S Outsourcing Services, Registered in England No.3175173.
G4S Facilities Management (UK) Limited, Registered in England No. 3333860.
G4S Investigation Solutions (UK) Limited, Registered in England No. 3749819.
G4S Monitoring Technologies Limited, Registered in England No. 2626613.
G4S Ordnance Management Limited, Registered in England No. 7068855.
G4S Risk Management Limited, Registered in England No. 1540857.
G4S Secure Solutions (Iraq) Limited, Registered in England No.5128617.
G4S Risk Consulting Limited, Registered in England No. 4047630.
The Registered office of all the above companies is Southside, 105 Victoria Street, London, SW1E 6QT.

G4S Aviation Services (UK) Limited, Registered in England No. 2837136.
G4S Secure Solutions (UK) Limited, Registered in England No. 1046019.
G4S Security Services (UK) Limited, Registered in England No.2380900.
G4S Gurkha Services (UK) Limited, Registered in England No.6304482.
G4S Cash Solutions (UK) Limited, Registered in England No.354883.
G4S Cash Centres (UK) Limited, Registered in England No.1485104.
G4S Bullion Solutions (UK) Limited, Registered in England No.7860383.
The Registered office of all the above companies is Sutton Park House, 15 Carshalton Road, Sutton, Surrey SM1 4LD. 


Re: Chocolatey: vcredist140 and Python3 failed to install

Bolivar, Marti
 

Hi there and welcome.

"Mohamed Belaroussi via lists.zephyrproject.org"
<mohamed.belaroussi=uk.g4s.com@lists.zephyrproject.org> writes:

*Installing vcredist140-x64...*
Chocolatey timed out waiting for the command to finish. The timeout
specified (or the default value) was '2700' seconds. Perhaps try a
higher `--execution-timeout`? See `choco -h` for details.
vcredist140 may be able to be automatically uninstalled.
The install of vcredist140 was NOT successful.
This seems to be a potential cause of the problem and the output
suggests a solution. Did you try looking into this?

Thanks
Martí


Re: FIFO is not empty after getting all data items; reference pointer still points to another item

Carles Cufi
 

Hi Dominik,

 

>. Is there a reason why Zephyr does not copy the items to the queue like FreeRTOS does it? The Zephyr documentation lacks this kind of information!

 

FIFOs do not copy the contents of the message, they only store the pointer in a linked list. Maybe this is not clear enough in the documentation, please consider sending a Pull Request enhancing the doc.

 

If you need the kernel to copy the contents of your message for you, you can use Message Queues:

https://docs.zephyrproject.org/latest/reference/kernel/data_passing/message_queues.html

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of Weber, Dominik via lists.zephyrproject.org
Sent: 28 August 2020 13:22
To: users@...
Subject: [Zephyr-users] FIFO is not empty after getting all data items; reference pointer still points to another item

 

Hey everyone,

 

I’m currently having problems when putting items to a FIFO. As long as I put data items to my FIFO queue, everything is ok and works as expected. If I stop putting data to the queue, the reading thread continues reading the last data item out of the queue over and over again, although the queue should be empty but is not (k_fifo_is_empty() says it’s not empty).

 

There’s a writing and a reading thread in my software project.

 

I have the following data item, defined in the header file of the reading thread:

 

typedef struct

{

    void *fifoReserved;     ///< 1st word reserved for use by fifo

    int data1;               

    int data2;              

 

s_data_item_fifo_ecg_t;

 

 

 

 

The writing thread is like:

 

(This is a static variable in the software module)

static s_data_item_fifo_ecg_t ecgDataStruct;  ///< This data item contains the ecg information to put to the data fifo.

 

(Inside the thread)

while (1)

    {

        /* Thread will be unready until signal was raised, signal will be raised when data ready interrupt comes */

        k_poll(daEvents1, K_FOREVER);

 

        /* Reset signal */

        daEvents[0].signal->signaled = 0;

        daEvents[0].state = K_POLL_STATE_NOT_READY;

 

        /* …get data from hardware chip here… */

 

        ecgDataStruct.data1 = ;

        ecgDataStruct.data2 = ;

 

        dataProcessingPutFifoECG(&ecgDataStruct);

    }

 

The last function is part of the reading thread software module and just puts the item to the queue with k_fifo_put().

 

 

 

The reading thread is like:

 

(This is a static variable in the software module)

static struct k_fifo dpFifoECG;      ///< FIFO structure for handling incoming ECG data

 

There is an init function, where this is called:

k_fifo_init(&dpFifoECG);

 

 

s_data_item_fifo_ecg_t *fifoDataECG;

 

    while (1

    {

        /* Get data from queue. */

        fifoDataECG = k_fifo_get(&dpFifoECG, K_FOREVER);

 

        printk("%d,%d\n"fifoDataECG->data1fifoDataECG->data2);

 

    }

 

I checked the print outputs with a terminal program and realized that the data is still printed, even if I stop the measurement and stop putting data to the queue, which means that the program is not waiting at k_fifo_get() as expected. It just continues reading the last item which should be removed from the queue.

 

When I have a look at the fifoReserved pointer for these unwanted items, I see that the pointer is always the same and not NULL. Shouldn’t the pointer be NULL if there are no more items in the list?

 

This is really driving me crazy.

 

Both threads do have a maximum memory thread stack size of 8kB.

 

The priorities are -2 for the writing thread (implements SPI communication) and 1 for the reading thread. (There are three threads running on the system, excluding main thread and idle thread).

 

A general question:

 

For me, it is not really clear, if a data item is passed by copy or by reference to the fifo queue. I assume, the items are passed by reference, since I faced some serious problems when passing data items from an ISR, which are lying on the ISR stack. The content of the data item was sometimes different after reading the item compared to when the item was putted to the queue. The solution to this problem was to define a static data item on the memory heap of the software module and to only adjust the data of the same item and put it again to the queue. This seems very unintuitive to me, since I put the same item to the queue over and over again, only with different content. Is there a reason why Zephyr does not copy the items to the queue like FreeRTOS does it? The Zephyr documentation lacks this kind of information!

 

My setup:

  • Zephyr 2.3 Build 99
  • Nordic nRF52840 DK
  • Segger J-Link OB-SAM3U128-V2-NordicSemi
  • Eclipse 2019-09
  • Python 3.8.3
  • West 0.7.2
  • C compiler GNU 9.2.1

 

Thanks for your help!

 


FIFO is not empty after getting all data items; reference pointer still points to another item

Weber, Dominik <dominik.weber@...>
 

Hey everyone,

 

I’m currently having problems when putting items to a FIFO. As long as I put data items to my FIFO queue, everything is ok and works as expected. If I stop putting data to the queue, the reading thread continues reading the last data item out of the queue over and over again, although the queue should be empty but is not (k_fifo_is_empty() says it’s not empty).

 

There’s a writing and a reading thread in my software project.

 

I have the following data item, defined in the header file of the reading thread:

 

typedef struct

{

    void *fifoReserved;     ///< 1st word reserved for use by fifo

    int data1;               

    int data2;              

 

s_data_item_fifo_ecg_t;

 

 

 

 

The writing thread is like:

 

(This is a static variable in the software module)

static s_data_item_fifo_ecg_t ecgDataStruct;  ///< This data item contains the ecg information to put to the data fifo.

 

(Inside the thread)

while (1)

    {

        /* Thread will be unready until signal was raised, signal will be raised when data ready interrupt comes */

        k_poll(daEvents1, K_FOREVER);

 

        /* Reset signal */

        daEvents[0].signal->signaled = 0;

        daEvents[0].state = K_POLL_STATE_NOT_READY;

 

        /* …get data from hardware chip here… */

 

        ecgDataStruct.data1 = ;

        ecgDataStruct.data2 = ;

 

        dataProcessingPutFifoECG(&ecgDataStruct);

    }

 

The last function is part of the reading thread software module and just puts the item to the queue with k_fifo_put().

 

 

 

The reading thread is like:

 

(This is a static variable in the software module)

static struct k_fifo dpFifoECG;      ///< FIFO structure for handling incoming ECG data

 

There is an init function, where this is called:

k_fifo_init(&dpFifoECG);

 

 

s_data_item_fifo_ecg_t *fifoDataECG;

 

    while (1

    {

        /* Get data from queue. */

        fifoDataECG = k_fifo_get(&dpFifoECG, K_FOREVER);

 

        printk("%d,%d\n"fifoDataECG->data1fifoDataECG->data2);

 

    }

 

I checked the print outputs with a terminal program and realized that the data is still printed, even if I stop the measurement and stop putting data to the queue, which means that the program is not waiting at k_fifo_get() as expected. It just continues reading the last item which should be removed from the queue.

 

When I have a look at the fifoReserved pointer for these unwanted items, I see that the pointer is always the same and not NULL. Shouldn’t the pointer be NULL if there are no more items in the list?

 

This is really driving me crazy.

 

Both threads do have a maximum memory thread stack size of 8kB.

 

The priorities are -2 for the writing thread (implements SPI communication) and 1 for the reading thread. (There are three threads running on the system, excluding main thread and idle thread).

 

A general question:

 

For me, it is not really clear, if a data item is passed by copy or by reference to the fifo queue. I assume, the items are passed by reference, since I faced some serious problems when passing data items from an ISR, which are lying on the ISR stack. The content of the data item was sometimes different after reading the item compared to when the item was putted to the queue. The solution to this problem was to define a static data item on the memory heap of the software module and to only adjust the data of the same item and put it again to the queue. This seems very unintuitive to me, since I put the same item to the queue over and over again, only with different content. Is there a reason why Zephyr does not copy the items to the queue like FreeRTOS does it? The Zephyr documentation lacks this kind of information!

 

My setup:

·         Zephyr 2.3 Build 99

·         Nordic nRF52840 DK

·         Segger J-Link OB-SAM3U128-V2-NordicSemi

·         Eclipse 2019-09

·         Python 3.8.3

·         West 0.7.2

·         C compiler GNU 9.2.1

 

Thanks for your help!

 


Chocolatey: vcredist140 and Python3 failed to install

Mohamed Belaroussi <mohamed.belaroussi@...>
 

Hello,

This is the first time I am posting on this forum asking you guys if you could help me figure out what is causing the installation of vcredist140 and python3 to fail. 
Please let me know if this is not the right forum to ask for help.

I installed chocolatey successfully. I then opened a cmd window in administrator mode and ran the following commands.

·        choco feature enable -n allowGlobalConfirmation

·        choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'

·        choco install ninja gperf python git


The first two completed OK but the third one in red failed with the following errors. Note, I already have Python 3.8.2 installed on my machine at "c:\Program Files\Python3.8.2".

vcredist140 v14.26.28720.3 [Approved]
vcredist140 package files install completed. Performing other installation steps.
Downloading vcredist140-x86
  from 'https://download.visualstudio.microsoft.com/download/pr/d60aa805-26e9-47df-b4e3-cd6fcc392333/A06AAC66734A618AB33C1522920654DDFC44FC13CAFAA0F0AB85B199C3D51DC0/VC_redist.x86.exe'
Progress: 100% - Completed download of C:\Users\mohamed.belaroussi\AppData\Local\Temp\chocolatey\vcredist140\14.26.28720.3\VC_redist.x86.exe (13.75 MB).
Download of VC_redist.x86.exe (13.75 MB) completed.
Hashes match.
Installing vcredist140-x86...
vcredist140-x86 has been installed.
Downloading vcredist140-x64 64 bit
  from 'https://download.visualstudio.microsoft.com/download/pr/d60aa805-26e9-47df-b4e3-cd6fcc392333/7D7105C52FCD6766BEEE1AE162AA81E278686122C1E44890712326634D0B055E/VC_redist.x64.exe'
Progress: 100% - Completed download of C:\Users\mohamed.belaroussi\AppData\Local\Temp\chocolatey\vcredist140\14.26.28720.3\VC_redist.x64.exe (14.28 MB).
Download of VC_redist.x64.exe (14.28 MB) completed.
Hashes match.
Installing vcredist140-x64...
Chocolatey timed out waiting for the command to finish. The timeout
 specified (or the default value) was '2700' seconds. Perhaps try a
 higher `--execution-timeout`? See `choco -h` for details.

  vcredist140 may be able to be automatically uninstalled.
The install of vcredist140 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\vcredist140\tools\chocolateyInstall.ps1'.
 See log for details.


python3 v3.8.5.20200721 [Approved]
python3 package files install completed. Performing other installation steps.
Installing 64-bit python3...
WARNING: Another installation currently in progress. Try again later.
ERROR: Running ["C:\ProgramData\chocolatey\lib\python3\tools\python-3.8.5-amd64.exe" /quiet InstallAllUsers=1 PrependPath=1 TargetDir="C:\Python38" ] was not successful. Exit code was '1618'. Exit code indicates the following: Another installation currently in progress. Try again later..
The install of python3 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\python3\tools\chocolateyInstall.ps1'.
 See log for details.


python v3.8.5.20200721 [Approved]
python package files install completed. Performing other installation steps.
 The install of python was successful.
  Software install location not explicitly set, could be in package or
  default install location if installer.
Progress: Downloading git.install 2.28.0... 100%
Progress: Downloading git 2.28.0... 100%

Thank you.

Kind regards


Mohamed Belaroussi
Senior Embedded Systems Design Engineer
G4S Monitoring Technologies

3 Centurion Court, Meridian Business Park, Leicester, LE19 1TP
Tel:     0116 2820184 (internal: 281)


Please consider the environment before printing this email.
*********************************************************************
This communication may contain information which is confidential, personal and/or privileged. It is for the exclusive use of the intended recipient(s).
If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited. If you have received it in error please contact the sender immediately by return e-mail. Please then delete the e-mail and any copies of it and do not use or disclose its contents to any person.
Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them. Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.
This message has been checked for viruses on behalf of the company.
*********************************************************************


G4S Regional Management (UK&I) Limited, Registered Office: Southside, 105 Victoria Street, London, SW1E 6QT. Registered in England No. 3189802.

G4S Care and Justice Services (UK) Limited, trading as G4S Central Government Services, Registered in England No. 390328.
G4S Health Services (UK) Limited, Registered in England No. 5121608.
G4S Government and Outsourcing Services (UK) Limited, trading as G4S Outsourcing Services, Registered in England No.3175173.
G4S Facilities Management (UK) Limited, Registered in England No. 3333860.
G4S Investigation Solutions (UK) Limited, Registered in England No. 3749819.
G4S Monitoring Technologies Limited, Registered in England No. 2626613.
G4S Ordnance Management Limited, Registered in England No. 7068855.
G4S Risk Management Limited, Registered in England No. 1540857.
G4S Secure Solutions (Iraq) Limited, Registered in England No.5128617.
G4S Risk Consulting Limited, Registered in England No. 4047630.
The Registered office of all the above companies is Southside, 105 Victoria Street, London, SW1E 6QT.

G4S Aviation Services (UK) Limited, Registered in England No. 2837136.
G4S Secure Solutions (UK) Limited, Registered in England No. 1046019.
G4S Security Services (UK) Limited, Registered in England No.2380900.
G4S Gurkha Services (UK) Limited, Registered in England No.6304482.
G4S Cash Solutions (UK) Limited, Registered in England No.354883.
G4S Cash Centres (UK) Limited, Registered in England No.1485104.
G4S Bullion Solutions (UK) Limited, Registered in England No.7860383.
The Registered office of all the above companies is Sutton Park House, 15 Carshalton Road, Sutton, Surrey SM1 4LD. 


Blocking printk #usb #nrf52840

forum.contas@...
 

Hi to everyone:

First post.

I've a simple Zephyr RTOS program where I use USB CDC ACM to see the output of the console and also the printk output.

Everything works fine, if I connect a terminal program to see the output.

If I do not connect a terminal program at start up (power on) the thread that has the printk just blocks. All other threads continue to run fine.

If after a while I connect the terminal program I can see some buffered output, and work resumes ok.

If I wait to much the thread never recovers, by other words I get no output and it seems that the thread is hanged and non functional.

Any idea how to make the USB output non blockcable or just overrun any output buffer?


Re: Flash two firmware in flash and jump from one address to another #flash #nrf52480

Nikos Karamolegkos
 

Hello,

Update: I just want to change the boot address (or slot) before the reboot, without using MCUboot. I am looking on zephyr documentation for a mechanism like this but I can not find any utility. Any proposals/ideas?

Thank you

On 8/25/20 8:31 PM, Nikos Karamolegkos wrote:

Thank you Carles, I would prefer not to use MCUboot. However, I have already checked MCUboot code in order to take some ideas. I am looking for something MCUboot interdependent. For example a function that change the boot address before the reboot.

On 8/25/20 5:22 PM, Cufi, Carles wrote:

Hi Nikos,

 

Maybe you want to look at MCUboot, which supports this out of the box and is integrated with Zephyr?

https://mcuboot.com/

 

https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BOOTLOADER_MCUBOOT.html#cmdoption-arg-config-bootloader-mcuboot

 

Thanks,

 

Carles

 

From: users@... <users@...> On Behalf Of Nikos Karamolegkos via lists.zephyrproject.org
Sent: 25 August 2020 15:52
To: users@...
Subject: [Zephyr-users] Flash two firmware in flash and jump from one address to another #flash #nrf52480

 

Hello, I am using nrf52840-dk module (this is not really important). I would like to write two different firmwares in my device in different addresses (slots). Lets say the first firmware is located at address 0x000 (slot 0) and the second one is located at address 0x0000C000 (slot 1). How can I flash these two firmwares in these two different addresses and how can my application jump from the one address to the other (after reboot)?

Thanks,
Nikos

-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)
-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)

461 - 480 of 2659