Date   

Re: How to use "Serial CAN Bus Module" #driver #uart #can

Lawrence King
 

I have used the Longan module with Zephyr on nrf52840. I connected it to a Serial, then modified the Longan library to compile and work under Zephyr.

 

This isn’t everything you need (missing the .h includes, and the uart1_xx functions) but should get you started.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of s9gosich@...
Sent: Wednesday, August 12, 2020 11:52 AM
To: users@...
Subject: [Zephyr-users] How to use "Serial CAN Bus Module" #can #driver #uart

 

Hi all,

I’m new to zephyr and need some help.

I have a nrf52dk board and want to use this ( https://www.longan-labs.cc/1030001.html ) serial to CAN device. I was able to test this with an Arduino and this library ( https://github.com/Longan-Labs/Serial_CAN_Arduino ). Now, I’m a bit lost how to use it with Zephyr.
Can I import the arduino library into Zephyr? Or do I need to rewrite the library? Or would it be easier to buy some othe CAN module which is supported by Zephyr?

 

Thank you!

Govinda


How to use "Serial CAN Bus Module" #driver #uart #can

s9gosich@...
 

Hi all,

I’m new to zephyr and need some help.

I have a nrf52dk board and want to use this ( https://www.longan-labs.cc/1030001.html ) serial to CAN device. I was able to test this with an Arduino and this library ( https://github.com/Longan-Labs/Serial_CAN_Arduino ). Now, I’m a bit lost how to use it with Zephyr.
Can I import the arduino library into Zephyr? Or do I need to rewrite the library? Or would it be easier to buy some othe CAN module which is supported by Zephyr?


Thank you!

Govinda


Re: Debugging with Eclipse and PyOCD: Uncaught Exception in pyocd.exe

Bolivar, Marti
 

Hi, responses inline.

"Weber, Dominik via lists.zephyrproject.org"
<dominik.weber=iis.fraunhofer.de@lists.zephyrproject.org> writes:

Hello there,

I'm new to Zephyr and having some trouble with debugging my application with PyOCD and Eclipse. I'm running a multithreaded application on a nRF52840 DK. I flash and want to debug the application via the onboard debugger on the DK. I followed the steps described in the tutorial: https://docs.zephyrproject.org/2.3.0/application/index.html#application in the section "Eclipse Debugging".

I use:

* Zephyr 2.3 Build 99

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

* Eclipse 2019-09

* Python 3.8.3

* West 0.7.2

* C compiler GNU 9.2.1

All Python dependencies for Zephyr are satisfied.
Does this mean you installed the latest pyocd? The zephyr
requirements-run-test.txt file from which pyocd comes just says:

pyocd>=0.24.0

The version of this tool is likely what is at issue.


When I try to debug the application via pyocd.exe or pyocd-gdbserver.exe I get the following error:

0001289:CRITICAL:__main__:uncaught exception: 'JLinkProbe' object has no attribute '_lock'
Traceback (most recent call last):
File "c:\python38\lib\site-packages\pyocd\__main__.py", line 362, in run
self._COMMANDS[self._args.cmd](self)
File "c:\python38\lib\site-packages\pyocd\__main__.py", line 680, in do_gdbserver
with session:
File "c:\python38\lib\site-packages\pyocd\core\session.py", line 302, in __enter__
self.open()
File "c:\python38\lib\site-packages\pyocd\core\session.py", line 420, in open
self._board.init()
File "c:\python38\lib\site-packages\pyocd\board\board.py", line 85, in init
self.target.init()
File "c:\python38\lib\site-packages\pyocd\core\coresight_target.py", line 160, in init
seq.invoke()
File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 213, in invoke
resultSequence.invoke()
File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 208, in invoke
resultSequence = call()
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 359, in power_up_debug
self.write_reg(DP_CTRL_STAT, CSYSPWRUPREQ | CDBGPWRUPREQ | MASKLANE | TRNNORMAL)
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 348, in write_reg
self.write_dp(addr, data)
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 528, in write_dp
did_lock = self._set_dpbanksel(addr, True)
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 480, in _set_dpbanksel
self.lock()
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 252, in lock
self.probe.lock()
File "c:\python38\lib\site-packages\pyocd\probe\debug_probe.py", line 173, in lock
self._lock.acquire()
AttributeError: 'JLinkProbe' object has no attribute '_lock'

Is this a bug in the python scripts or is the debugger not supported?
This error is coming from pyocd itself. Since it's an AttributeError it
looks like there's probably a bug in the tool. Knowing the exact version
is the next step. I would try manually installing the 0.24.0 version
given in the requirements file if the latest release is buggy here.

I don't understand if "When I try to debug the application via pyocd.exe
or pyocd-gdbserver.exe" means you are using 'west debug' or 'west
debugserver', but if so, you can run in verbose mode to see the pyocd
commands under the hood:

west -v debug

Example output:

$ west -v debug
[...]
-- west debug: using runner pyocd
-- runners.pyocd: pyOCD GDB server running on port 3333
runners.pyocd: pyocd gdbserver -p 3333 -T 4444 -t nrf52840 -f 4000000
runners.pyocd: /home/mbolivar/bin/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb /home/mbolivar/zp/zephyr/build/zephyr/zephyr.elf -ex 'target remote :3333' -ex 'monitor halt' -ex 'monitor reset' -ex load

Thanks,
Martí


Thanks for your help!

Best Regards,
Dominik



Debugging with Eclipse and PyOCD: Uncaught Exception in pyocd.exe

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

Hello there,

 

I’m new to Zephyr and having some trouble with debugging my application with PyOCD and Eclipse. I’m running a multithreaded application on a nRF52840 DK. I flash and want to debug the application via the onboard debugger on the DK. I followed the steps described in the tutorial: https://docs.zephyrproject.org/2.3.0/application/index.html#application in the section „Eclipse Debugging“.

 

I use:

·         Zephyr 2.3 Build 99

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

·         Eclipse 2019-09

·         Python 3.8.3

·         West 0.7.2

·         C compiler GNU 9.2.1

 

All Python dependencies for Zephyr are satisfied.

 

When I try to debug the application via pyocd.exe or pyocd-gdbserver.exe I get the following error:

 

0001289:CRITICAL:__main__:uncaught exception: 'JLinkProbe' object has no attribute '_lock'

Traceback (most recent call last):

  File "c:\python38\lib\site-packages\pyocd\__main__.py", line 362, in run

    self._COMMANDS[self._args.cmd](self)

  File "c:\python38\lib\site-packages\pyocd\__main__.py", line 680, in do_gdbserver

    with session:

  File "c:\python38\lib\site-packages\pyocd\core\session.py", line 302, in __enter__

    self.open()

  File "c:\python38\lib\site-packages\pyocd\core\session.py", line 420, in open

    self._board.init()

  File "c:\python38\lib\site-packages\pyocd\board\board.py", line 85, in init

    self.target.init()

  File "c:\python38\lib\site-packages\pyocd\core\coresight_target.py", line 160, in init

    seq.invoke()

  File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 213, in invoke

    resultSequence.invoke()

  File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 208, in invoke

    resultSequence = call()

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 359, in power_up_debug

    self.write_reg(DP_CTRL_STAT, CSYSPWRUPREQ | CDBGPWRUPREQ | MASKLANE | TRNNORMAL)

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 348, in write_reg

    self.write_dp(addr, data)

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 528, in write_dp

    did_lock = self._set_dpbanksel(addr, True)

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 480, in _set_dpbanksel

    self.lock()

  File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 252, in lock

    self.probe.lock()

  File "c:\python38\lib\site-packages\pyocd\probe\debug_probe.py", line 173, in lock

    self._lock.acquire()

AttributeError: 'JLinkProbe' object has no attribute '_lock'

 

Is this a bug in the python scripts or is the debugger not supported?

 

Thanks for your help!

 

Best Regards,

Dominik

 


API meeting: agenda

Carles Cufi
 


How to enable external #pullup resistor in #pullup #i2c

Diogo Correia <dcorreia@...>
 

Hello there,

I'm trying to connect my board (nrf52dk-nrf52832) to a development kit, through I2C, which has external pull up resistors. I would like to configure the I2C port to accept the external pull-up resistors, just like in nRF52 SDK, I've already searched on the "All Configuration Options" page but can't find anything.

Kind regards,
Diogo Correia


Re: Using counter (with RTC) on #nrf52832

Diogo Correia <diogo.correia@...>
 

Hi Krzysztof,

I thought that the use of one of the counters would be considered due to its presence in the device-tree.
So from what I understood, every instance from the device-tree must be enabled, either on .conf or Kconfig files? I'm asking this, because i've used a sensor (with TWI), did not enabled the port on the config file, just created added it into the .orverlay file, and it worked.

Kind regards,
Diogo


Diogo Correia 
Junior Researcher | Fraunhofer Portugal AICOS
t. +351 220430300  w. www.fraunhofer.pt


De: Chruściński, Krzysztof <Krzysztof.Chruscinski@...>
Enviado: 7 de agosto de 2020 06:49:32
Para: Diogo Correia; users@...
Assunto: RE: [Zephyr-users] Using counter (with RTC) on #nRF52832
 

Hi Diogo,

 

CMake is complaining because even though COUNTER driver is enabled there is no COUNTER instance enabled. In the example there is a Kconfig (samples/drivers/counter/alarm/Kconfig) which enabled COUNTER_RTC0 for Nordic platform and you need to do the same.

 

Note that for other drivers enabling instances happens in Device Tree. Counter will be aligned to that at some point.

 

Regards,

Krzysztof

 

From: users@... <users@...> On Behalf Of Diogo Correia via lists.zephyrproject.org
Sent: Thursday, August 6, 2020 3:23 PM
To: users@...
Subject: [Zephyr-users] Using counter (with RTC) on #nRF52832

 

Hi there,

 

I've started using Zephyr OS last week, so is better to advise that there might be a tiny chance of this question being dumb. I'm trying to use the Nordic's nRF52832 RTC clock, so wrote a small piece of software (based on the samples/counter/alarm/ example). However, when trying to compile I receive the following error:

 

CMake Error at /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:372 (add_library):
  No SOURCES given to target: drivers__counter
Call Stack (most recent call first):
  /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:349 (zephyr_library_named)
  /home/diogo.correia/zephyrproject/zephyr/drivers/counter/CMakeLists.txt:3 (zephyr_library)


-- Build files have been written to: /home/diogo.correia/zephyrproject/zephyrLAB/build
FAILED: build.ninja
/usr/local/bin/cmake -S/home/diogo.correia/zephyrproject/zephyrLAB -B/home/diogo.correia/zephyrproject/zephyrLAB/build
ninja: error: rebuilding 'build.ninja': subcommand failed
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/diogo.correia/zephyrproject/zephyrLAB/build

 

 

My .conf file:

 

#Nordic nRF52 RTT LOGGER

 

CONFIG_USE_SEGGER_RTT=y

 

CONFIG_RTT_CONSOLE=y

 

CONFIG_UART_CONSOLE=n

 



 

#Counter

 

CONFIG_COUNTER=y

 

 

 

My .c file:

 

#include

<zephyr.h>

 

#include

<sys/printk.h>

 

#include

<device.h>

 

#include

<drivers/counter.h>

 



 

#if

defined(CONFIG_COUNTER_RTC0)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc0))

 

#elif

defined(CONFIG_COUNTER_RTC1)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc1))

 

#elif

defined(CONFIG_COUNTER_RTC2)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc2))

 

#endif

 

 

 



 

struct device *counter;

 

 

 

struct counter_alarm_cfg alarm_config;

 

 

 

void

init();

 

void

counter_callback(struct device *counter_dev,

u8_t

chan_id,

u32_t ticks,

void *user_data);

 

 

 

 



 

 

 

 

void

main(void)

 

{

 

init();

 

while(1) {

 

k_sleep(K_FOREVER);

 

}

 



}

 

 

 

 



 

 

 

void

init(){

 

// Counter

 

counter = device_get_binding(TIMER);

 

if (counter ==

NULL){

 

printk("ERROR: %s not found.\n",

TIMER);

 

return;

 

}

 

counter_start(counter);

 

alarm_config.flags =

0;

 

alarm_config.ticks =

counter_us_to_ticks(counter,

1000000);

 

alarm_config.callback = counter_callback;

 

counter_set_channel_alarm(counter,

0, &alarm_config);

 

}

 

 



 

 

 

 

 


Re: Using counter (with RTC) on #nrf52832

Chruściński, Krzysztof
 

Hi Diogo,

 

As written before “Note that for other drivers enabling instances happens in Device Tree. Counter will be aligned to that at some point.”.

We are going towards instances being enabled in DT and counter is not yet there.

 

Regards,

Krzysztof

 

From: Diogo Correia <diogo.correia@...>
Sent: Friday, August 7, 2020 11:08 AM
To: Chruściński, Krzysztof <Krzysztof.Chruscinski@...>; users@...
Subject: Re: [Zephyr-users] Using counter (with RTC) on #nRF52832

 

Hi Krzysztof,

I thought that the use of one of the counters would be considered due to its presence in the device-tree.
So from what I understood, every instance from the device-tree must be enabled, either on .conf or Kconfig files? I'm asking this, because i've used a sensor (with TWI), did not enabled the port on the config file, just created added it into the .orverlay file, and it worked.

 

Kind regards,

Diogo

 

Diogo Correia 

Junior Researcher | Fraunhofer Portugal AICOS
t. +351 220430300  w. www.fraunhofer.pt

 


De: Chruściński, Krzysztof <Krzysztof.Chruscinski@...>
Enviado: 7 de agosto de 2020 06:49:32
Para: Diogo Correia; users@...
Assunto: RE: [Zephyr-users] Using counter (with RTC) on #nRF52832

 

Hi Diogo,

 

CMake is complaining because even though COUNTER driver is enabled there is no COUNTER instance enabled. In the example there is a Kconfig (samples/drivers/counter/alarm/Kconfig) which enabled COUNTER_RTC0 for Nordic platform and you need to do the same.

 

Note that for other drivers enabling instances happens in Device Tree. Counter will be aligned to that at some point.

 

Regards,

Krzysztof

 

From: users@... <users@...> On Behalf Of Diogo Correia via lists.zephyrproject.org
Sent: Thursday, August 6, 2020 3:23 PM
To: users@...
Subject: [Zephyr-users] Using counter (with RTC) on #nRF52832

 

Hi there,

 

I've started using Zephyr OS last week, so is better to advise that there might be a tiny chance of this question being dumb. I'm trying to use the Nordic's nRF52832 RTC clock, so wrote a small piece of software (based on the samples/counter/alarm/ example). However, when trying to compile I receive the following error:

 

CMake Error at /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:372 (add_library):
  No SOURCES given to target: drivers__counter
Call Stack (most recent call first):
  /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:349 (zephyr_library_named)
  /home/diogo.correia/zephyrproject/zephyr/drivers/counter/CMakeLists.txt:3 (zephyr_library)


-- Build files have been written to: /home/diogo.correia/zephyrproject/zephyrLAB/build
FAILED: build.ninja
/usr/local/bin/cmake -S/home/diogo.correia/zephyrproject/zephyrLAB -B/home/diogo.correia/zephyrproject/zephyrLAB/build
ninja: error: rebuilding 'build.ninja': subcommand failed
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/diogo.correia/zephyrproject/zephyrLAB/build

 

 

My .conf file:

 

#Nordic nRF52 RTT LOGGER

 

CONFIG_USE_SEGGER_RTT=y

 

CONFIG_RTT_CONSOLE=y

 

CONFIG_UART_CONSOLE=n

 

 

 

#Counter

 

CONFIG_COUNTER=y

 

 

 

My .c file:

 

#include

<zephyr.h>

 

#include

<sys/printk.h>

 

#include

<device.h>

 

#include

<drivers/counter.h>

 

 

 

#if

defined(CONFIG_COUNTER_RTC0)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc0))

 

#elif

defined(CONFIG_COUNTER_RTC1)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc1))

 

#elif

defined(CONFIG_COUNTER_RTC2)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc2))

 

#endif

 

 

 

 

 

struct device *counter;

 

 

 

struct counter_alarm_cfg alarm_config;

 

 

 

void

init();

 

void

counter_callback(struct device *counter_dev,

u8_t

chan_id,

u32_t ticks,

void *user_data);

 

 

 

 

 

 

 

 

 

void

main(void)

 

{

 

init();

 

while(1) {

 

k_sleep(K_FOREVER);

 

}

 

 

}

 

 

 

 

 

 

 

 

void

init(){

 

// Counter

 

counter = device_get_binding(TIMER);

 

if (counter ==

NULL){

 

printk("ERROR: %s not found.\n",

TIMER);

 

return;

 

}

 

counter_start(counter);

 

alarm_config.flags =

0;

 

alarm_config.ticks =

counter_us_to_ticks(counter,

1000000);

 

alarm_config.callback = counter_callback;

 

counter_set_channel_alarm(counter,

0, &alarm_config);

 

}

 

 

 

 

 

 

 

 


Re: Using counter (with RTC) on #nrf52832

Chruściński, Krzysztof
 

Hi Diogo,

 

CMake is complaining because even though COUNTER driver is enabled there is no COUNTER instance enabled. In the example there is a Kconfig (samples/drivers/counter/alarm/Kconfig) which enabled COUNTER_RTC0 for Nordic platform and you need to do the same.

 

Note that for other drivers enabling instances happens in Device Tree. Counter will be aligned to that at some point.

 

Regards,

Krzysztof

 

From: users@... <users@...> On Behalf Of Diogo Correia via lists.zephyrproject.org
Sent: Thursday, August 6, 2020 3:23 PM
To: users@...
Subject: [Zephyr-users] Using counter (with RTC) on #nRF52832

 

Hi there,

 

I've started using Zephyr OS last week, so is better to advise that there might be a tiny chance of this question being dumb. I'm trying to use the Nordic's nRF52832 RTC clock, so wrote a small piece of software (based on the samples/counter/alarm/ example). However, when trying to compile I receive the following error:

 

CMake Error at /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:372 (add_library):
  No SOURCES given to target: drivers__counter
Call Stack (most recent call first):
  /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:349 (zephyr_library_named)
  /home/diogo.correia/zephyrproject/zephyr/drivers/counter/CMakeLists.txt:3 (zephyr_library)


-- Build files have been written to: /home/diogo.correia/zephyrproject/zephyrLAB/build
FAILED: build.ninja
/usr/local/bin/cmake -S/home/diogo.correia/zephyrproject/zephyrLAB -B/home/diogo.correia/zephyrproject/zephyrLAB/build
ninja: error: rebuilding 'build.ninja': subcommand failed
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/diogo.correia/zephyrproject/zephyrLAB/build

 

 

My .conf file:

 

#Nordic nRF52 RTT LOGGER

 

CONFIG_USE_SEGGER_RTT=y

 

CONFIG_RTT_CONSOLE=y

 

CONFIG_UART_CONSOLE=n

 



 

#Counter

 

CONFIG_COUNTER=y

 

 

 

My .c file:

 

#include

<zephyr.h>

 

#include

<sys/printk.h>

 

#include

<device.h>

 

#include

<drivers/counter.h>

 



 

#if

defined(CONFIG_COUNTER_RTC0)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc0))

 

#elif

defined(CONFIG_COUNTER_RTC1)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc1))

 

#elif

defined(CONFIG_COUNTER_RTC2)

 

#define TIMER

DT_LABEL(DT_NODELABEL(rtc2))

 

#endif

 

 

 



 

struct device *counter;

 

 

 

struct counter_alarm_cfg alarm_config;

 

 

 

void

init();

 

void

counter_callback(struct device *counter_dev,

u8_t

chan_id,

u32_t ticks,

void *user_data);

 

 

 

 



 

 

 

 

void

main(void)

 

{

 

init();

 

while(1) {

 

k_sleep(K_FOREVER);

 

}

 



}

 

 

 

 



 

 

 

void

init(){

 

// Counter

 

counter = device_get_binding(TIMER);

 

if (counter ==

NULL){

 

printk("ERROR: %s not found.\n",

TIMER);

 

return;

 

}

 

counter_start(counter);

 

alarm_config.flags =

0;

 

alarm_config.ticks =

counter_us_to_ticks(counter,

1000000);

 

alarm_config.callback = counter_callback;

 

counter_set_channel_alarm(counter,

0, &alarm_config);

 

}

 

 



 

 

 

 

 

 

Diogo Correia
Junior Researcher

 

 

Fraunhofer Portugal Research Center for

Assistive Information and Communication Solutions

Rua Alfredo Allen 455/461

4200-135 Porto, Portugal

follow us on facebook youtube linkedin twitter

t.

+351 220430300

f.

+351 226005029

e.

diogo.correia@...

w.

www.fraunhofer.pt


Fraunhofer Portugal Challenge 2018


Re: #west #west

ahmed.balata@...
 

attached my Dockerfile and myscript1.sh


Re: #west #west

ahmed.balata@...
 

Thank you for your replay.
i have checked the path and it has been fixed, still it only works manually but if I take the script as entrypoint it does not work.


Re: #west #west

Bolivar, Marti
 

Hello,

Some responses inline.

"ahmed.balata via lists.zephyrproject.org"
<ahmed.balata=tu-dortmund.de@lists.zephyrproject.org> writes:

Hello,
I want or create a docker image for Zephyr, I have a script that has
west init /
West Update
west zephyr export
..........and the next steps. While the previous steps are in Dockerfile.

when i use this script as entrypoint, i get these errors
Line 9: West: command not found
Line 10: West: command not found
Line 11: West: command not found
If these are really copy/pasted from the error output, then the problem
seems to be that it should be "west", not "West" -- lowercase "w", that
is.


but if I normally execute the container and then manually execute the
script in the container, I don't get any errors.
The other thing to check is that the west executable installed by pip is
in the PATH. Use "pip3 show -f west" to find these.

So for example:

Location: /foo/lib/python3.8/site-packages
Files:
../../../bin/west

This means west is in
/foo/lib/python3.8/site-packages/../../../bin/west, or
/foo/bin/west

Martí


How can i use such script as an entrypoint?
Thank you


#west #west

ahmed.balata@...
 

Hello,
I want or create a docker image for Zephyr, I have a script that has
west init /
West Update
west zephyr export
..........and the next steps. While the previous steps are in Dockerfile.

when i use this script as entrypoint, i get these errors
Line 9: West: command not found
 Line 10: West: command not found
 Line 11: West: command not found

but if I normally execute the container and then manually execute the script in the container, I don't get any errors.

How can i use such script as an entrypoint?
Thank you


Using counter (with RTC) on #nrf52832

Diogo Correia <diogo.correia@...>
 

Hi there,

I've started using Zephyr OS last week, so is better to advise that there might be a tiny chance of this question being dumb. I'm trying to use the Nordic's nRF52832 RTC clock, so wrote a small piece of software (based on the samples/counter/alarm/ example). However, when trying to compile I receive the following error:

CMake Error at /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:372 (add_library):
  No SOURCES given to target: drivers__counter
Call Stack (most recent call first):
  /home/diogo.correia/zephyrproject/zephyr/cmake/extensions.cmake:349 (zephyr_library_named)
  /home/diogo.correia/zephyrproject/zephyr/drivers/counter/CMakeLists.txt:3 (zephyr_library)


-- Build files have been written to: /home/diogo.correia/zephyrproject/zephyrLAB/build
FAILED: build.ninja
/usr/local/bin/cmake -S/home/diogo.correia/zephyrproject/zephyrLAB -B/home/diogo.correia/zephyrproject/zephyrLAB/build
ninja: error: rebuilding 'build.ninja': subcommand failed
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/diogo.correia/zephyrproject/zephyrLAB/build


My .conf file:

#Nordic nRF52 RTT LOGGER
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n

#Counter
CONFIG_COUNTER=y


My .c file:

#include <zephyr.h>
#include <sys/printk.h>
#include <device.h>
#include <drivers/counter.h>

#if defined(CONFIG_COUNTER_RTC0)
#define TIMER DT_LABEL(DT_NODELABEL(rtc0))
#elif defined(CONFIG_COUNTER_RTC1)
#define TIMER DT_LABEL(DT_NODELABEL(rtc1))
#elif defined(CONFIG_COUNTER_RTC2)
#define TIMER DT_LABEL(DT_NODELABEL(rtc2))
#endif

struct device *counter;
struct counter_alarm_cfg alarm_config;
void init();
void counter_callback(struct device *counter_dev, u8_t chan_id, u32_t ticks, void *user_data);

void main(void)
{
init();
while(1) {
k_sleep(K_FOREVER);
}

}

void init(){
// Counter
counter = device_get_binding(TIMER);
if (counter == NULL){
printk("ERROR: %s not found.\n", TIMER);
return;
}
counter_start(counter);
alarm_config.flags = 0;
alarm_config.ticks = counter_us_to_ticks(counter, 1000000);
alarm_config.callback = counter_callback;
counter_set_channel_alarm(counter, 0, &alarm_config);
}



Diogo Correia
Junior Researcher
 
 
Fraunhofer Portugal Research Center for
Assistive Information and Communication Solutions
Rua Alfredo Allen 455/461
4200-135 Porto, Portugal
follow us on facebook youtube linkedin twitter
t. +351 220430300
f. +351 226005029
e. diogo.correia@...
w. www.fraunhofer.pt

Fraunhofer Portugal Challenge 2018


West v0.7.3 released

Bolivar, Marti
 

Hello,

I'm announcing the release of west v0.7.3.

https://pypi.org/project/west/0.7.3/
https://github.com/zephyrproject-rtos/west/tree/v0.7.3

To upgrade:

Ubuntu: pip3 install --user west==0.7.3
Windows/macoS: pip3 install west==0.7.3

This is a bugfix release from v0.7.2. The main bug fixed causes 'west
update' to fail in some situations when manifest imports are used.

For details about this bug, see:

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

For details about manifest imports, see:

https://docs.zephyrproject.org/latest/guides/west/manifest.html#manifest-imports

Full commit list since v0.7.2:

Martí Bolívar (5):
conftest: make it more os.PathLike friendly
app: fix import error followed by update
app/project: add missing f for f-string
lint: flake8 fixes
West v0.7.3

Thanks,
Martí


LWM2M client to nrf582540-DK #nrf52840 #networking

Nikos Karamolegkos
 

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


RFC: removing eeprom_slave as driver in Zephyr

Peter A. Bigot
 

The eeprom_slave driver accessed under CONFIG_I2C_EEPROM_SLAVE implements the I2C follower (slave) driver API. This device isn't an actual hardware driver: it's a virtual EEPROM that stores data in an instance-specific RAM buffer, with the data exposed on an I2C bus as a I2C follower device that can be controlled by another device acting as a leader (master) on that same bus.

As such it's a reasonable example of how to write an I2C follower driver, but it's not clear that it has a real use in applications: the sole in-tree reference is in the i2c_slave_api test.

Unless this driver has real-world applications I intend to move this from the drivers directory into the source directory for the test that uses it.  Consequently CONFIG_I2C_EEPROM_SLAVE and the device it provided will no longer be supported.

If you have a use for this driver or other concerns about this please comment at: https://github.com/zephyrproject-rtos/zephyr/issues/27303

Peter


API meeting: agenda

Carles Cufi
 


Re: [solved] Re: SMP Server Sample: Fails to upload over BLE

Lawrence King
 

Hi George:

 

I had no end of trouble with the built-in bluetooth adapter on my laptop. It was an Intel adapter and would only work if I moved the target Zephyr box about 15ft away from the laptop.

 

I changed over to using another nrf52840 board with the hci_usb sample loaded, connected to the laptop via USB. With this setup mcumgr targeted at hci1 instead of hci0 works great.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: users@... <users@...> On Behalf Of George Ruinelli
Sent: Tuesday, August 4, 2020 3:09 AM
To: users@...
Subject: [Zephyr-users] [solved] Re: SMP Server Sample: Fails to upload over BLE

 

Thanks to the support of Nick, I was able to trace it down to an issue in the MCUmgr on the PC side.

There is now an open bug report for this: https://github.com/apache/mynewt-mcumgr-cli/issues/15


[solved] Re: SMP Server Sample: Fails to upload over BLE

George Ruinelli
 

Thanks to the support of Nick, I was able to trace it down to an issue in the MCUmgr on the PC side.

There is now an open bug report for this: https://github.com/apache/mynewt-mcumgr-cli/issues/15

501 - 520 of 2659