Date   

Re: FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Carles Cufi
 

Thanks.

 

I’ve sent a PR to the west repo to fix this. If you could test it (simply get the file and overwrite your local jlink.py) and approve it it would be most helpful.

https://github.com/zephyrproject-rtos/west/pull/145

 

Thanks,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Bo.Kragelund@...
Sent: 03 January 2019 12:42
To: devel@...
Subject: Re: [Zephyr-devel] FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

 

Hi Carles,

Number 2 works fine.
Thanks a lot.

Regards,
Bo


Re: FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Bo.Kragelund@...
 

Hi Carles,

Number 2 works fine.
Thanks a lot.

Regards,
Bo


Re: FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Carles Cufi
 

Right, I think I know what is going on, the default value in the constructor is not being used.

 

I believe there are 2 ways to try and fix the issue until we submit a patch:

 

  1. Add a line  board_runner_args(jlink "--commander=JLink.exe") in your board.cmake in the boards/arm/<board name> folder
  2. Replace JLinkExe with JLink.exe in https://github.com/zephyrproject-rtos/zephyr/blob/master/scripts/meta/west/runners/jlink.py#L65

 

Carles

 

From: devel@... <devel@...> On Behalf Of Bo.Kragelund@...
Sent: 03 January 2019 11:13
To: devel@...
Subject: Re: [Zephyr-devel] FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

 

Hi Carles,

And thank you very much for your quick response.

I have renamed 'JLinkExe' to 'JLink.exe' in line 20 of my local jlink.py.
I also renamed  'JLinkGDBServer' to 'JLinkGDBServer.exe' in line 23 of my local jlink.py.

I then updated the PATH environment variable with "c:\Program Files (x86)\SEGGER\JLink_V640\", where the exe files are located.

After this I can type both JLink.exe and JLinkGDBServer.exe on the command line of the cmd window from the build directory of the "hello_world" sample, and both programs starts.

But if I type ninja flash, I still get the same error.

I hope this feedback can help fixing this Windows issue.

Best regards,
Bo


Re: Disabling Multithreading

Carles Cufi
 

Hi Raj,

 

The issue with CONFIG_MULTITHREADING is that it was never properly supported. It was added for MCUboot and considered for removal a couple of times, but that never happened because the size difference is still significant enough for many people.

The only option at this point is for you to submit a patch for the drivers you need that disables use of any primitives that require multithreading (semaphores, mutexes, etc) behind a macro, like it’s done here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/flash/soc_flash_nrf.c#L68

 

This might not be trivial for SPI though, depending on how the driver is written.

 

Carles

 

From: devel@... <devel@...> On Behalf Of Raj Gundi
Sent: 03 January 2019 10:38
To: Cufi, Carles <Carles.Cufi@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] Disabling Multithreading

 

Hi Carles,

 

Guess this mail got buried while you were away. Please help me out here.

 

Regards,

Raj

 

From: devel@... [mailto:devel@...] On Behalf Of Raj Gundi
Sent: Saturday, December 15, 2018 8:24 PM
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...
Subject: [Zephyr-devel] Disabling Multithreading

 

Hi Carles,

 

I am trying to build Zephyr to fit in a memory constrained device of 64kB. My device doesn’t require multithreading and hence I disabled multithreading to save on the memory. However, this is throwing me exceptions since I have UART and SPI Flash drivers enabled. It appears the semaphore accesses in those drivers are not “single-thread” aware. Is there anything that can be done to work-around this? Does just “nop”ing it out suffice? Please let me know.

 

Regards,

Raj


Re: FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Bo.Kragelund@...
 

Hi Carles,

And thank you very much for your quick response.

I have renamed 'JLinkExe' to 'JLink.exe' in line 20 of my local jlink.py.
I also renamed  'JLinkGDBServer' to 'JLinkGDBServer.exe' in line 23 of my local jlink.py.

I then updated the PATH environment variable with "c:\Program Files (x86)\SEGGER\JLink_V640\", where the exe files are located.

After this I can type both JLink.exe and JLinkGDBServer.exe on the command line of the cmd window from the build directory of the "hello_world" sample, and both programs starts.

But if I type ninja flash, I still get the same error.

I hope this feedback can help fixing this Windows issue.

Best regards,
Bo


Re: Disabling Multithreading

Raj Gundi
 

Hi Carles,

 

Guess this mail got buried while you were away. Please help me out here.

 

Regards,

Raj

 

From: devel@... [mailto:devel@...] On Behalf Of Raj Gundi
Sent: Saturday, December 15, 2018 8:24 PM
To: Cufi, Carles <carles.cufi@...>
Cc: devel@...
Subject: [Zephyr-devel] Disabling Multithreading

 

Hi Carles,

 

I am trying to build Zephyr to fit in a memory constrained device of 64kB. My device doesn’t require multithreading and hence I disabled multithreading to save on the memory. However, this is throwing me exceptions since I have UART and SPI Flash drivers enabled. It appears the semaphore accesses in those drivers are not “single-thread” aware. Is there anything that can be done to work-around this? Does just “nop”ing it out suffice? Please let me know.

 

Regards,

Raj


Re: FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Marcio Montenegro
 

The same problem occurs using the nxp kw41z board and windows 10

On Wed, Jan 2, 2019 at 10:31 AM <Bo.Kragelund@...> wrote:
Hi,

I have followed the getting started guide and installed zephyr, GNU, and tools on a Windows 7 machine and now trying to build and flash the "hello_world" sample.

I'm following the guidelines for the supported NXP FRDM-K64F board.
Since I'm using jlink for flashing, which is not default, I use below cmake command:
cmake -GNinja -DOPENSDA_FW=jlink -DBOARD=frdm_k64f ..
This command executes without any errors.

Then I use below command for making the elf file and flash the board.
ninja flash
This also runs without errors until the actual flashing. See output from cmd window below:
[103/109] Linking C executable zephyr\zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       12676 B         1 MB      1.21%
            SRAM:        4012 B       192 KB      2.04%
        IDT_LIST:          88 B         2 KB      4.30%
[108/109] Flashing frdm_k64f
Using runner: jlink
Flashing Target Device
FATAL ERROR: 2 The system cannot find the file specified None 2 None
run as "west -v ... flash ..." for a stack trace

I believe all my environment variables are set correct for using GNU compiler:
GNUARMEMB_TOOLCHAIN_PATH=C:\gnu_arm_embedded
ZEPHYR_BASE=c:\zephyr\zephyr\
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

I can flash the elf file using the J-Flash Lite without any problems, so I beleive hardware and windows drivers are fine.

I hope somebody can help me fix this basic issue.

Best regards,
Bo


Re: FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Carles Cufi
 

Hi there,

 

The jlink runner will try to execute a file named “JLinkExe”. This exists on Linux but I just checked my Windows machine and it is named differently, namely “JLink.exe”’.

I think we need a patch in the runner to execute a different filename based on the platform.

 

Could you try renaming “JLinkExe” to “JLink.exe” here:

https://github.com/zephyrproject-rtos/zephyr/blob/master/scripts/meta/west/runners/jlink.py#L20

 

and see if that works.

 

Thanks,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Bo.Kragelund@...
Sent: 02 January 2019 14:31
To: devel@...
Subject: [Zephyr-devel] FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

 

Hi,

I have followed the getting started guide and installed zephyr, GNU, and tools on a Windows 7 machine and now trying to build and flash the "hello_world" sample.

I'm following the guidelines for the supported NXP FRDM-K64F board.
Since I'm using jlink for flashing, which is not default, I use below cmake command:

cmake -GNinja -DOPENSDA_FW=jlink -DBOARD=frdm_k64f ..
This command executes without any errors.

Then I use below command for making the elf file and flash the board.
ninja flash
This also runs without errors until the actual flashing. See output from cmd window below:

[103/109] Linking C executable zephyr\zephyr_prebuilt.elf

Memory region         Used Size  Region Size  %age Used

           FLASH:       12676 B         1 MB      1.21%

            SRAM:        4012 B       192 KB      2.04%

        IDT_LIST:          88 B         2 KB      4.30%

[108/109] Flashing frdm_k64f

Using runner: jlink

Flashing Target Device

FATAL ERROR: 2 The system cannot find the file specified None 2 None

run as "west -v ... flash ..." for a stack trace


I believe all my environment variables are set correct for using GNU compiler:
GNUARMEMB_TOOLCHAIN_PATH=C:\gnu_arm_embedded

ZEPHYR_BASE=c:\zephyr\zephyr\

ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb


I can flash the elf file using the J-Flash Lite without any problems, so I beleive hardware and windows drivers are fine.

I hope somebody can help me fix this basic issue.

Best regards,
Bo


FATAL ERROR: 2 The system cannot find the file specified None 2 None #gettingstartedguide

Bo.Kragelund@...
 

Hi,

I have followed the getting started guide and installed zephyr, GNU, and tools on a Windows 7 machine and now trying to build and flash the "hello_world" sample.

I'm following the guidelines for the supported NXP FRDM-K64F board.
Since I'm using jlink for flashing, which is not default, I use below cmake command:
cmake -GNinja -DOPENSDA_FW=jlink -DBOARD=frdm_k64f ..
This command executes without any errors.

Then I use below command for making the elf file and flash the board.
ninja flash
This also runs without errors until the actual flashing. See output from cmd window below:
[103/109] Linking C executable zephyr\zephyr_prebuilt.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       12676 B         1 MB      1.21%
            SRAM:        4012 B       192 KB      2.04%
        IDT_LIST:          88 B         2 KB      4.30%
[108/109] Flashing frdm_k64f
Using runner: jlink
Flashing Target Device
FATAL ERROR: 2 The system cannot find the file specified None 2 None
run as "west -v ... flash ..." for a stack trace

I believe all my environment variables are set correct for using GNU compiler:
GNUARMEMB_TOOLCHAIN_PATH=C:\gnu_arm_embedded
ZEPHYR_BASE=c:\zephyr\zephyr\
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

I can flash the elf file using the J-Flash Lite without any problems, so I beleive hardware and windows drivers are fine.

I hope somebody can help me fix this basic issue.

Best regards,
Bo


Integration of central and peripheral code #nrf52832

Akash Naidu <akashnaiduece@...>
 

Hi all,
is there any example that supports both central and peripheral roles?

I would like to integrate central and peripheral roles into rpl_node example.
I have successfully integrated peripheral code, but couldn't enable the central code.

could please help me to enable central role (which should support 7 servers)in rpl_node?

Advance in thanks.

Regards
Akash.


How to build images for client or server in bluetooth mesh examples? #bluetoothmesh

wxzzzh
 

I noticed that in these examples, there's only one main.c file, and only one image file would be built, it can support different hardware, but seems not different roles?
Bluetooth Mesh is supposed to be run in different roles, right?
If one image is enough, how to set it for different roles?


Re: PCA10059 without additional debugger - non-volatile storage of settings

Martin <ma@...>
 

Hi Jamie,
thanks!
I was already trying different values, such as

storage_partition: partition@b0000 {
label = "storage";
reg = < 0xb0000 0x4000 >;
};

unfortunately without success.. The display of nRF Connect does not
change here, such that it does not show an additional region for the
config (I don't know if it is supposed to).

Best regards,
Martin

Am Do., 27. Dez. 2018 um 15:07 Uhr schrieb Jamie Mccrae
<Jamie.Mccrae@...>:


Hi Martin,
You have this in your DTS:
storage_partition: partition@fa000 {
label = "storage";
reg = < 0xfa000 0x4000 >;
};

You are setting the storage partition to 0xfa000, from your picture, the Nordic bootloader starts at 0xe0000, so yes the settings will never work because you're attempting to overwrite the bootloader. Luckily for you it looks like the bootloader enables write protection using ACL, otherwise it's likely your module would no longer be working.
Thanks,
Jamie


Re: PCA10059 without additional debugger - non-volatile storage of settings

lairdjm
 

Hi Martin,
You have this in your DTS:
storage_partition: partition@fa000 {
label = "storage";
reg = < 0xfa000 0x4000 >;
};

You are setting the storage partition to 0xfa000, from your picture, the Nordic bootloader starts at 0xe0000, so yes the settings will never work because you're attempting to overwrite the bootloader. Luckily for you it looks like the bootloader enables write protection using ACL, otherwise it's likely your module would no longer be working.
Thanks,
Jamie


PCA10059 without additional debugger - non-volatile storage of settings

Martin <ma@...>
 

Hi,
I know it is a quite specific question, but I thought that maybe
someone has an idea into which direction to go..

I have some PCA10059 (nRF52-Dongles) lying around and would like to
make experiments with them running Zephyr OS. Unfortunately, I do not
have a an appropriate cable for connecting it to my nRF52 DK to flash
it and buying a cable would crash my budget.

Luckily, work has been ongoing to make flashing the PCA10059 possible
without an external debugger. The solution (how I understand it) is
that the stock Nordic bootloader remains on the PCA10059, loads
MCUboot, which in turn loads Zephyr OS. The merge request can be found
here: https://github.com/zephyrproject-rtos/zephyr/pull/11210

I have playing around with it (i.e. flash samples/bluetooth/mesh) and
can report that it is working. I had to make two modifications:
Comment storage_partition in
boards\arm\nrf52840_pca10059\nrf52840_pca10059.dts, such that there is
no duplicate collision with dts/common/nrf52840-nrf5-*.overlay and
strangely (I would interpret the documention differently) keep Kconfig
settings how they are (leave CONFIG_BOOTLOADER_MCUBOOT=n).

The "only" problem I have: Storage of settings does not work. The
symptoms are that I have to re-provision the PCA10059 every time it is
power-cycled.

I have been playing around with storage settings in the .dts-files
(changing the memory regions) with no success. Attached is the
_dts_compiled that is generated during the build phase and a
screenshot of nrf connect showing in which regions code resides.

Has anyone already gotten storage of settings with PCA10059 to work
(possibly even with the traditional debugger solution)? And does
anyone have a clue / an idea why it is not working and where I should
look into?

Thanks,
Martin


Re: Possibility to reduce the power consumption of peripheral device #ble #nrf52480

Zięcik, Piotr <piotr.ziecik@...>
 

Hi.

 

It looks that you have HFCLK running all the time.

This is probably caused by small issue in power management code.

Please try to remove the calls to nrf_power_task_trigger() from soc/arm/nordic_nrf/nrf52/power.c

Piotr ZIĘCIK | Senior Firmware Engineer
M +48 698 726 973| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 

From: devel@... <devel@...> On Behalf Of swapnil
Sent: Sunday, December 23, 2018 7:05 PM
To: devel@...
Subject: [Zephyr-devel] Possibility to reduce the power consumption of peripheral device #ble #nrf52480

 

Hello,

In order to use the peripheral and central device for energy efficient application, I performed some power measurement test with the following configuration using nrf52 DK.

Central_hr sample application is used as it is without making any changes.

In Peripheral_hr sample application notification time is changed to 1 sec.

In menuconfig :

·               Device drivers:

o   Console drivers

o   Serial drivers

o   GPIO drivers

o   Use legacy SPI API

are disabled

·                 Debugging Options: everything is disabled

·                 Bluetooth: none of the debug option is enabled

 

The average Current consumption on Peripheral device is 390 μA and average power consumption is 1.31mW with 3.35 V source.

 

Once the peripheral starts notifying, there are continuous spikes in the measurements between 2 notifications. I also checked with different connection intervals and different notification periods but still, there are same spikes.

Is there any possibility to improve energy consumption even further? 

Thank you in advance.

Regards,
Swapnil


Re: zephyr thread

Raj Gundi
 

The stack is not allocated in your example when you are using k_thread_create. Use the below code instead.

 

 

static K_THREAD_STACK_DEFINE(threadStack1, 1024);

static struct k_thread thread1;

k_thread_create(&thread1, threadStack1, 1024, (void*)DL_StateMachine_ModeHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

 

 

K_THREAD_STACK_DEFINE is called internally if you use K_THREAD_DEFINE instead of k_thread_create,

 

Regards,

Raj

 

From: devel@... [mailto:devel@...] On Behalf Of Florian Fouillet
Sent: Wednesday, December 26, 2018 11:07 PM
To: devel@...
Subject: [Zephyr-devel] zephyr thread

 

Hi everyone,

 

I am currently working on the Zephyr OS with a FDRM_K64f board from NXP.

 

To create thread I was first using K_THREAD_DEFINE.

 

I want to create an abstraction layer if I need to use different OS (a platform with generic definition for thread) so I won't have to modify the source code.

 

Since I can't call K_THREAD_DEFINE inside a function (I was ending up with an error). I am trying to use k_thread_create.

 

It's working when I create 1 thread but I have error as soon as I am trying to create multiple one.

 

Here for example I am creating 2 threads:

 

struct k_thread thread1 ;

k_thread_stack_t threadStack1 ;

 

struct k_thread thread2 ;

k_thread_stack_t threadStack2 ;

 

 

k_thread_create(&thread1, & threadStack1, 1024, (void*)DL_StateMachine_ModeHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

k_thread_create(&thread2, & threadStack2, 1024, (void*)DL_StateMachine_MsgHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

 

 

it compiles but then when I am trying to execute it I have the following issue:

 

 

 

 

Does anyone know how to correctly use the k_thread_create? My other question is, what’s k_thread_stack_t and what to do with it?

 

 

Thank you,

 

 

 

 


zephyr thread

Florian Fouillet <Florian.Fouillet@...>
 

Hi everyone,

 

I am currently working on the Zephyr OS with a FDRM_K64f board from NXP.

 

To create thread I was first using K_THREAD_DEFINE.

 

I want to create an abstraction layer if I need to use different OS (a platform with generic definition for thread) so I won't have to modify the source code.

 

Since I can't call K_THREAD_DEFINE inside a function (I was ending up with an error). I am trying to use k_thread_create.

 

It's working when I create 1 thread but I have error as soon as I am trying to create multiple one.

 

Here for example I am creating 2 threads:

 

struct k_thread thread1 ;

k_thread_stack_t threadStack1 ;

 

struct k_thread thread2 ;

k_thread_stack_t threadStack2 ;

 

 

k_thread_create(&thread1, & threadStack1, 1024, (void*)DL_StateMachine_ModeHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

k_thread_create(&thread2, & threadStack2, 1024, (void*)DL_StateMachine_MsgHandler, NULL, NULL, NULL, 7, 0, K_NO_WAIT);

 

 

it compiles but then when I am trying to execute it I have the following issue:

 

 

 

 

Does anyone know how to correctly use the k_thread_create? My other question is, what’s k_thread_stack_t and what to do with it?

 

 

Thank you,

 

 

 

 


Possibility to reduce the power consumption of peripheral device #ble #nrf52480

swapnil <swapnil2007kadam@...>
 

Hello,

In order to use the peripheral and central device for energy efficient application, I performed some power measurement test with the following configuration using nrf52 DK.

Central_hr sample application is used as it is without making any changes.

In Peripheral_hr sample application notification time is changed to 1 sec.

In menuconfig :

·               Device drivers:

o   Console drivers

o   Serial drivers

o   GPIO drivers

o   Use legacy SPI API

are disabled

·                 Debugging Options: everything is disabled

·                 Bluetooth: none of the debug option is enabled

 

The average Current consumption on Peripheral device is 390 μA and average power consumption is 1.31mW with 3.35 V source.

 

Once the peripheral starts notifying, there are continuous spikes in the measurements between 2 notifications. I also checked with different connection intervals and different notification periods but still, there are same spikes.

Is there any possibility to improve energy consumption even further? 

Thank you in advance.

Regards,
Swapnil


Does zephry support standard c io library?

ljh_dev@...
 

I finded zephyr source stdio.h only support a minimal io system, it did not include such as FILE ..defines,etc, does it support c io library ?


Re: Opus codec on nrf52840

Zięcik, Piotr <piotr.ziecik@...>
 

Hi.

 

Great to hear that!

Do you have any information about resource usage (Flash/RAM used, CPU load etc)?

 

Piotr ZIĘCIK | Senior Firmware Engineer
M +48 698 726 973| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 

From: nicolas lantz <nicolas.lantz@...>
Sent: Wednesday, December 19, 2018 10:15 AM
To: Zięcik, Piotr <Piotr.Ziecik@...>; Cufi, Carles <Carles.Cufi@...>; devel@...
Subject: Re: [Zephyr-devel] Opus codec on nrf52840

 

Hello,

I have a "net_opus" server sample that is able to compress and then decode an audio PCM stream with the opus codec.
- It work on the fly in realtime with an opus codec configured in low complexity on the nrf52840-dk board.
- the stream come from a  TCP client like netcat, it's encoded with opus, then decoded, and the output pcm stream is sent back to the TCP client.

Running the demo give something like that :
nc 192.0.2.1 4242 < Test_16000Hz_mono_16bit.raw  | aplay -t raw -f S16_LE -r 16000 -c 1 -

If someone is interested on it :
https://gitlab.com/ubicore/zephyr/commit/177a410c6902ecacb9552c907f1e4f60e7a23b1a



Regards,
Nicolas
 
Nicolas LANTZ
M : +33 (0)6 19 07 43 43
T : +33 (0)9 52 96 81 86
www.ubicore.net

Le 04/12/2018 à 10:38, nicolas lantz a écrit :

Thanks you for the reponse.
I took the time to extract the modified opus library code from the Smart Ready project (from the .exe to linux) and compared it to the origin opus lib.
Now i will try to use it in a zephry project
 
Regards,
 
Nicolas
Nicolas LANTZ
M : +33 (0)6 19 07 43 43
T : +33 (0)9 52 96 81 86
www.ubicore.net

Le 29/11/2018 à 12:56, Zięcik, Piotr a écrit :

Hello.

 

I can recommend looking into https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRFready-Smart-Remote-3-for-nRF52-Series

Unfortunately it is not based on the Zephyr, however it implements audio streaming using Opus and contains an optimized version of the codec

(with reduced memory requirements as well as using DPS extensions available on the Nordic chips).

 

If you require any further information, feel free to contact me.

Piotr ZIĘCIK | Senior Firmware Engineer
M +48 698 726 973| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 

From: Cufi, Carles
Sent: Thursday, November 29, 2018 12:49 PM
To: nicolas lantz <nicolas.lantz@...>; devel@...; Zięcik, Piotr <Piotr.Ziecik@...>
Subject: RE: [Zephyr-devel] Opus codec on nrf52840

 

+ Piotr

 

From: devel@... <devel@...> On Behalf Of nicolas lantz
Sent: 29 November 2018 12:41
To: devel@...
Subject: [Zephyr-devel] Opus codec on nrf52840

 

Hi,

I would like to use the Opus codec with zephyr on a nrf52840 to encode or decode an audio stream.
Has anyone have a suggestion on this project?


Regards,
 
Nicolas